summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-10-07 08:56:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-10-07 08:56:20 +0000
commit36366d3e530e60882724c4d01a4a51db3a274182 (patch)
treef034641ea18045d377c98aef33000b8dbd8228ca
parent1d20611f5f37c0591fd170d9c4ec00dc8f9da9f2 (diff)
better fix for floppy boot
-rw-r--r--sys/arch/i386/stand/installboot/installboot.c7
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c
index 9e25d70e7e5..db4cf96bccc 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.17 1997/10/03 21:36:07 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.18 1997/10/07 08:56:18 mickey 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 == 0 || (biosdev & 0x80)) {
+ if (biosdev & 0x80) {
u_int geo;
mib[2] = BIOS_GEOMETRY;
@@ -431,7 +431,8 @@ loadblocknums(boot, devfd, dl)
fprintf(stderr, "Will load %d blocks of size %d each.\n",
ndb, fs->fs_bsize);
- if (dl->d_type != 0 && dl->d_type < DTYPE_FLOPPY) {
+ if (dl->d_type != 0 && dl->d_type != DTYPE_FLOPPY &&
+ dl->d_type != DTYPE_VND ) {
/* adjust disklabel w/ synthetic geometry */
dl->d_nsectors = nsectors;
dl->d_secpercyl = dl->d_nsectors * nheads;
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c
index 2601755c950..193a4755780 100644
--- a/sys/arch/i386/stand/libsa/biosdev.c
+++ b/sys/arch/i386/stand/libsa/biosdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.c,v 1.35 1997/09/24 22:42:59 mickey Exp $ */
+/* $OpenBSD: biosdev.c,v 1.36 1997/10/07 08:56:19 mickey Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -229,13 +229,13 @@ biosopen(struct open_file *f, ...)
return ENXIO;
}
- BIOS_vars.bios_dev = bd->biosdev;
bd->dinfo = biosdinfo(bd->biosdev);
if (!bd->dinfo)
bd->dinfo = 0x01014f12; /* fake geometry */
/* pass c: geometry for floppy */
BIOS_vars.bios_geometry = (bd->biosdev & 0x80)? bd->dinfo
: biosdinfo(0x80);
+ BIOS_vars.bios_dev = (bd->biosdev & 0x80)? bd->biosdev : 0x80;
/* maj is fixed later w/ disklabel read */
bootdev = bd->bsddev = MAKEBOOTDEV(maj, 0, 0, unit, part);