summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2008-03-30 20:24:32 +0000
committermiod <miod@openbsd.org>2008-03-30 20:24:32 +0000
commit7c2b90918ecf6283d341087c0ded18c11b1f62e5 (patch)
tree0e37b7840aac373afc46d206ba2bb002862d284e /sys/kern/subr_disk.c
parentImplement bus_space_*8 and bus_space_vaddr. (diff)
downloadwireguard-openbsd-7c2b90918ecf6283d341087c0ded18c11b1f62e5.tar.xz
wireguard-openbsd-7c2b90918ecf6283d341087c0ded18c11b1f62e5.zip
Do not do the ``swap generic'' behaviour if rootdev != NODEV when entering
setroot(), as this neuters RAIDframe autoconfiguration; found the hard way by naddy@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 9a8f851a817..d0e30cfd706 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.69 2008/03/23 17:05:40 deraadt Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.70 2008/03/30 20:24:32 miod Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -1165,7 +1165,7 @@ gotswap:
rootdv = bootdv;
rootdev = dumpdev = swapdev = NODEV;
#endif
- } else if (mountroot == NULL) {
+ } else if (mountroot == NULL && rootdev == NODEV) {
/* `swap generic': Use the device the ROM told us to use */
rootdv = bootdv;
majdev = findblkmajor(rootdv);