diff options
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) |