diff options
author | 2003-10-23 18:33:45 +0000 | |
---|---|---|
committer | 2003-10-23 18:33:45 +0000 | |
commit | 2545f8cd580ce17fb06cc64161819e1311d85537 (patch) | |
tree | 304b7cbaeee15a56630a4c8c2533073a62b09f27 | |
parent | typos from Jared Yanovich; (diff) | |
download | wireguard-openbsd-2545f8cd580ce17fb06cc64161819e1311d85537.tar.xz wireguard-openbsd-2545f8cd580ce17fb06cc64161819e1311d85537.zip |
- 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.
-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); |