diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-10-23 18:33:46 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-10-23 18:33:46 +0000 |
commit | 9695f4e40f6743151e126433c33c168ce1263c7e (patch) | |
tree | 3b2bf7142a85f64741104d5686f7a79a09e1dc8a /sys/arch/i386/stand | |
parent | 85b80a6ce4c3d20e14e0e660c7c182e20bd77b57 (diff) |
- delay reading the disklabel for floppies until after we're sure it's
the boot device. this fixes a delay (sometimes very long) if the bios
correctly reports a floppy but it's unplugged.
- bump version.
original idea from mdw@, tested by nick@, toby@ ok.
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r-- | sys/arch/i386/stand/boot/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/diskprobe.c | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c index 0f3321439d0..f6b90a6c977 100644 --- a/sys/arch/i386/stand/boot/conf.c +++ b/sys/arch/i386/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.26 2003/09/19 05:25:12 fgsch Exp $ */ +/* $OpenBSD: conf.c,v 1.27 2003/10/23 18:33:45 fgsch Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -42,7 +42,7 @@ #include <biosdev.h> #include <dev/cons.h> -const char version[] = "2.04"; +const char version[] = "2.05"; int debug = 1; diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c index a89a95d6175..62089facae5 100644 --- a/sys/arch/i386/stand/libsa/diskprobe.c +++ b/sys/arch/i386/stand/libsa/diskprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskprobe.c,v 1.22 2003/09/19 05:25:12 fgsch Exp $ */ +/* $OpenBSD: diskprobe.c,v 1.23 2003/10/23 18:33:45 fgsch Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -79,10 +79,14 @@ floppyprobe(void) /* Fill out best we can - (fd?) */ dip->bios_info.bsd_dev = MAKEBOOTDEV(2, 0, 0, i, RAW_PART); - if((bios_getdisklabel(&dip->bios_info, &dip->disklabel)) != 0) - dip->bios_info.flags |= BDI_BADLABEL; - else - dip->bios_info.flags |= BDI_GOODLABEL; + + /* + * Delay reading the disklabel until we're sure we want + * to boot from the floppy. Doing this avoids a delay + * (sometimes very long) when trying to read the label + * and the drive is unplugged. + */ + dip->bios_info.flags |= BDI_BADLABEL; /* Add to queue of disks */ TAILQ_INSERT_TAIL(&disklist, dip, list); |