summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2012-01-11 15:17:48 +0000
committerjsing <jsing@openbsd.org>2012-01-11 15:17:48 +0000
commite066a18bc2503174406103cd9d237bc6e8bcab4c (patch)
tree4d2564e0e0523fe48d05497fd26a0359e5791c88 /sys/kern/subr_disk.c
parentTeach OpenBSD/amd64 boot(8) how to access softraid(8) volumes. This (diff)
downloadwireguard-openbsd-e066a18bc2503174406103cd9d237bc6e8bcab4c.tar.xz
wireguard-openbsd-e066a18bc2503174406103cd9d237bc6e8bcab4c.zip
Move softraid root mapping to later in the boot process - this will allow
us to play some tricks in setroot().
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 35664552ebc..af42b879752 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.135 2011/12/28 16:02:45 jsing Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.136 2012/01/11 15:17:48 jsing Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -67,6 +67,8 @@
#include <dev/rndvar.h>
#include <dev/cons.h>
+#include "softraid.h"
+
/*
* A global list of all disks attached to the system. May grow or
* shrink over time.
@@ -83,6 +85,8 @@ u_char rootduid[8]; /* DUID of root disk. */
/* softraid callback, do not use! */
void (*softraid_disk_attach)(struct disk *, int);
+void sr_map_root(void);
+
void disk_attach_callback(void *, void *);
/*
@@ -1166,6 +1170,10 @@ setroot(struct device *bootdv, int part, int exitflags)
extern char *nfsbootdevname;
#endif
+#if NSOFTRAID > 0
+ sr_map_root();
+#endif
+
/*
* If `swap generic' and we couldn't determine boot device,
* ask the user.