diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-03 21:36:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-03 21:36:08 +0000 |
commit | 23e89bd2f3d7f2a8df2359f445cfaac1ba2e1813 (patch) | |
tree | e833f6c68b8e418f1926e1b68bbf41e04ebdfaf7 /sys/arch | |
parent | f133aa3e054e25bcda4b78257f92324175e88346 (diff) |
if we booted from the floppy, the geometry is for the hard disk
bail completely if the geometry information is not available
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/stand/installboot/installboot.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index 7e80a44bd78..9e25d70e7e5 100644 --- a/sys/arch/i386/stand/installboot/installboot.c +++ b/sys/arch/i386/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.16 1997/10/03 20:58:06 deraadt Exp $ */ +/* $OpenBSD: installboot.c,v 1.17 1997/10/03 21:36:07 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -144,7 +144,7 @@ main(argc, argv) if ((nheads == -1 || nsectors == -1) && sysctl(mib, 3, &biosdev, &size, NULL, 0) != -1) { - if (biosdev & 0x80) { + if (biosdev == 0 || (biosdev & 0x80)) { u_int geo; mib[2] = BIOS_GEOMETRY; @@ -158,7 +158,9 @@ main(argc, argv) if (nsectors == -1) nsectors = BIOSNSECTS(geo); } - } else if (nheads == -1 || nsectors == -1) + } + + if (nheads == -1 || nsectors == -1) errx(1, "Unable to get BIOS geometry, must specify -h and -s"); /* Open and check raw disk device */ |