From e7e309350c4391e9b17535fe331a638c30750842 Mon Sep 17 00:00:00 2001 From: okuji Date: Sun, 12 Sep 1999 05:54:39 +0000 Subject: [PATCH] add more check into set_device. --- ChangeLog | 6 ++++++ stage2/disk_io.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 773e61094..9be018fa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-09-12 OKUJI Yoshinori + + * 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 From Pavel Roskin: diff --git a/stage2/disk_io.c b/stage2/disk_io.c index 7afa1fc52..05e57b72a 100644 --- a/stage2/disk_io.c +++ b/stage2/disk_io.c @@ -233,7 +233,6 @@ devread (int sector, int byte_offset, int byte_len, char *buf) byte_len, buf); } -#ifndef STAGE1_5 static int sane_partition (void) { @@ -249,7 +248,6 @@ sane_partition (void) errnum = ERR_DEV_VALUES; return 0; } -#endif /* ! STAGE1_5 */ static void attempt_mount (void) @@ -818,6 +816,9 @@ set_device (char *device) } } + if (! sane_partition ()) + return 0; + if (retval) retval = device + 1; else