summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/libsa/diskprobe.c
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>1997-10-18 00:33:17 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>1997-10-18 00:33:17 +0000
commit471616d7beb9d52cf9822c2da7178f9b1e595954 (patch)
tree4adbd002eeb842d14d212078646f837175381216 /sys/arch/i386/stand/libsa/diskprobe.c
parent885625daa00685cbe93848f489778e853656803c (diff)
Copy in bios_diskinfo array from /boot space.
Add length field for checksum to same. Start of making /boot deduce bsd dev_t for all BIOS drives.
Diffstat (limited to 'sys/arch/i386/stand/libsa/diskprobe.c')
-rw-r--r--sys/arch/i386/stand/libsa/diskprobe.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c
index 4cc947f8d25..d59ad4a5ed7 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.1 1997/10/17 18:46:56 weingart Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.2 1997/10/18 00:33:15 weingart Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -33,15 +33,33 @@
*/
#include <sys/param.h>
+#include <sys/reboot.h>
#include <machine/biosvar.h>
#include "biosdev.h"
#include "libsa.h"
+extern struct BIOS_vars BIOS_vars;
+
/* These get passed to kernel */
bios_diskinfo_t bios_diskinfo[16];
+/* Find info on given BIOS disk */
+bios_diskinfo_t *
+diskfind(dev)
+ int dev;
+{
+ int i;
+
+ for(i = 0; bios_diskinfo[i].bios_number != -1; i++)
+ if(bios_diskinfo[i].bios_number == dev)
+ return(&bios_diskinfo[i]);
+
+ return(NULL);
+}
+
+/* Probe for all BIOS disks */
void
diskprobe()
{
@@ -62,7 +80,7 @@ diskprobe()
printf(" fd%d", drive);
/* Fill out best we can */
- bios_diskinfo[i].bsd_major = 2; /* fd? */
+ bios_diskinfo[i].bsd_dev = MAKEBOOTDEV(2, 0, 0, 0, 0); /* fd? */
bios_diskinfo[i].bios_number = drive;
bios_diskinfo[i].bios_cylinders = BIOSNTRACKS(p);
bios_diskinfo[i].bios_heads = BIOSNHEADS(p);
@@ -85,7 +103,7 @@ diskprobe()
printf(" hd%d", drive - 128);
/* Fill out best we can */
- bios_diskinfo[i].bsd_major = -1; /* XXX - fill in */
+ bios_diskinfo[i].bsd_dev = -1; /* XXX - fill in */
bios_diskinfo[i].bios_number = drive;
bios_diskinfo[i].bios_cylinders = BIOSNTRACKS(p);
bios_diskinfo[i].bios_heads = BIOSNHEADS(p);
@@ -98,6 +116,9 @@ diskprobe()
/* End of list */
bios_diskinfo[i].bios_number = -1;
+ /* XXX - This needs a better place! */
+ BIOS_vars.boot_data = bios_diskinfo;
+
printf("\n");
}