From 4591c200f94674ae06bafed47fe1073f1d5f0ce1 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Fri, 19 Sep 2003 05:25:13 +0000 Subject: - 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. --- sys/arch/i386/stand/boot/conf.c | 4 ++-- sys/arch/i386/stand/libsa/diskprobe.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c index 959b7064d3e..0f3321439d0 100644 --- a/sys/arch/i386/stand/boot/conf.c +++ b/sys/arch/i386/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.25 2003/09/18 08:24:10 fgsch Exp $ */ +/* $OpenBSD: conf.c,v 1.26 2003/09/19 05:25:12 fgsch Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -42,7 +42,7 @@ #include #include -const char version[] = "2.03"; +const char version[] = "2.04"; int debug = 1; 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)); -- cgit v1.2.3