diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-10-25 19:50:09 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-10-25 19:50:09 +0000 |
commit | 1b0d606670c13232cf51b51833fa2820a7c7207b (patch) | |
tree | 7d84692b89380820d79366992df6d4cbe248e105 /sys/arch/i386 | |
parent | 62acfef8b54dd77de9fdc001b8b9b9ba2c537059 (diff) |
treat a case bios0 is not attached
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/bios.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c index 385b1fb5175..d83a8586655 100644 --- a/sys/arch/i386/i386/bios.c +++ b/sys/arch/i386/i386/bios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bios.c,v 1.17 1997/10/25 08:45:53 mickey Exp $ */ +/* $OpenBSD: bios.c,v 1.18 1997/10/25 19:50:08 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -82,7 +82,7 @@ struct cfdriver bios_cd = { extern u_int bootapiver; /* locore.s */ extern dev_t bootdev; -bios_diskinfo_t *bios_diskinfo; +bios_diskinfo_t *bios_diskinfo = NULL; u_int32_t bios_cksumlen; bios_diskinfo_t *bios_getdiskinfo __P((dev_t)); @@ -349,6 +349,9 @@ bios_getdiskinfo(dev) { bios_diskinfo_t *pdi; + if (bios_diskinfo == NULL) + return NULL; + for (pdi = bios_diskinfo; pdi->bios_number != -1; pdi++) { if ((dev & B_MAGICMASK) == B_DEVMAGIC) { /* search by bootdev */ if (pdi->bsd_dev == dev) |