Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Add support for / on RAID. A bit of a gross hack, ...
details: https://anonhg.NetBSD.org/src/rev/d729f1e3fc29
branches: trunk
changeset: 482072:d729f1e3fc29
user: oster <oster%NetBSD.org@localhost>
date: Sun Feb 13 04:57:44 2000 +0000
description:
Add support for / on RAID. A bit of a gross hack, but sufficient for now.
Note that this doesn't help you much until the RAID autoconfig code
in sys/dev/raidframe/rf_netbsdkintf.c is turned on.
diffstat:
sys/kern/kern_subr.c | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diffs (75 lines):
diff -r 2cd64f2adabd -r d729f1e3fc29 sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c Sun Feb 13 04:55:30 2000 +0000
+++ b/sys/kern/kern_subr.c Sun Feb 13 04:57:44 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_subr.c,v 1.56 2000/02/01 05:28:01 enami Exp $ */
+/* $NetBSD: kern_subr.c,v 1.57 2000/02/13 04:57:44 oster Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -535,6 +535,16 @@
static struct device fakemdrootdev[NMD];
#endif
+#include "raid.h"
+#if NRAID == 1
+#define BOOT_FROM_RAID_HOOKS 1
+#endif
+
+#ifdef BOOT_FROM_RAID_HOOKS
+extern int numraid;
+extern struct device *raidrootdev;
+#endif
+
void
setroot(bootdv, bootpartition)
struct device *bootdv;
@@ -885,6 +895,16 @@
const char *name;
{
struct device *dv;
+#ifdef BOOT_FROM_RAID_HOOKS
+ int j;
+
+ for (j = 0; j < numraid; j++) {
+ if (strcmp(name, raidrootdev[j].dv_xname) == 0) {
+ dv = &raidrootdev[j];
+ return(dv);
+ }
+ }
+#endif;
for (dv = TAILQ_FIRST(&alldevs); dv != NULL;
dv = TAILQ_NEXT(dv, dv_list))
@@ -904,6 +924,9 @@
#ifdef MEMORY_DISK_HOOKS
int i;
#endif
+#ifdef BOOT_FROM_RAID_HOOKS
+ int j;
+#endif
if ((dv = parsedisk(str, len, defpart, devp)) == NULL) {
printf("use one of:");
@@ -913,6 +936,13 @@
printf(" %s[a-%c]", fakemdrootdev[i].dv_xname,
'a' + MAXPARTITIONS - 1);
#endif
+#ifdef BOOT_FROM_RAID_HOOKS
+ if (isdump == 0)
+ for (j = 0; j < numraid; j++)
+ printf(" %s[a-%c]",
+ raidrootdev[j].dv_xname,
+ 'a' + MAXPARTITIONS - 1);
+#endif
for (dv = alldevs.tqh_first; dv != NULL;
dv = dv->dv_list.tqe_next) {
if (dv->dv_class == DV_DISK)
@@ -940,7 +970,6 @@
#ifdef MEMORY_DISK_HOOKS
int i;
#endif
-
if (len == 0)
return (NULL);
Home |
Main Index |
Thread Index |
Old Index