add more check into set_device.
This commit is contained in:
parent
3c77f34cc1
commit
e7e309350c
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
1999-09-12 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* stage2/disk_io.c (sane_partition) [STAGE1_5]: Defined.
|
||||||
|
(set_device): Use sane_partition to make sure that CURRENT_DRIVE
|
||||||
|
has a valid value. Reported by Pavel Roskin.
|
||||||
|
|
||||||
1999-09-11 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
1999-09-11 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
From Pavel Roskin:
|
From Pavel Roskin:
|
||||||
|
|
|
@ -233,7 +233,6 @@ devread (int sector, int byte_offset, int byte_len, char *buf)
|
||||||
byte_len, buf);
|
byte_len, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef STAGE1_5
|
|
||||||
static int
|
static int
|
||||||
sane_partition (void)
|
sane_partition (void)
|
||||||
{
|
{
|
||||||
|
@ -249,7 +248,6 @@ sane_partition (void)
|
||||||
errnum = ERR_DEV_VALUES;
|
errnum = ERR_DEV_VALUES;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* ! STAGE1_5 */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
attempt_mount (void)
|
attempt_mount (void)
|
||||||
|
@ -818,6 +816,9 @@ set_device (char *device)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! sane_partition ())
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (retval)
|
if (retval)
|
||||||
retval = device + 1;
|
retval = device + 1;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue