summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-09-19 05:25:13 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-09-19 05:25:13 +0000
commit4591c200f94674ae06bafed47fe1073f1d5f0ce1 (patch)
tree371702ba4d3b1a6970111667d3419d56f1d1a242 /sys
parent995bef6414773527856ab6eb6a774d05217a8985 (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')
-rw-r--r--sys/arch/i386/stand/boot/conf.c4
-rw-r--r--sys/arch/i386/stand/libsa/diskprobe.c5
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 <biosdev.h>
#include <dev/cons.h>
-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));