diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-19 05:25:13 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-19 05:25:13 +0000 |
commit | 4591c200f94674ae06bafed47fe1073f1d5f0ce1 (patch) | |
tree | 371702ba4d3b1a6970111667d3419d56f1d1a242 /sys/arch/i386/stand/libsa | |
parent | 995bef6414773527856ab6eb6a774d05217a8985 (diff) |
- some bios return a valid geometry for inexistent hd's so before
getting the geometry check the number of attached drives from
the bios area at 40:75.
- bump version.
from toby@. we want people to test this, specially those with ghost
drives showing up.
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r-- | sys/arch/i386/stand/libsa/diskprobe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c index 82f33add173..a89a95d6175 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.21 2003/08/11 06:23:09 deraadt Exp $ */ +/* $OpenBSD: diskprobe.c,v 1.22 2003/09/19 05:25:12 fgsch Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -98,9 +98,10 @@ hardprobe(void) int i; u_int bsdunit, type; u_int scsi = 0, ide = 0; + const char *dc = (const char *)((0x40 << 4) + 0x75); /* Hard disks */ - for(i = 0x80; i < 0x88; i++) { + for (i = 0x80; i < (0x80 + *dc); i++) { dip = alloc(sizeof(struct diskinfo)); bzero(dip, sizeof(*dip)); |