summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 23:21:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 23:21:24 +0000
commit9593fa03366dbd0cc414985231f2bc8f7cd660fd (patch)
tree5c9f544561433e926073806f7439aa10d3f98d7e
parentf100e7b44b0074164c2534ea2ec4212730a4dfc7 (diff)
when we are in ramdisk mode, we must also disable any previous mountroot
setting that pre-setroot() code did (for instance a network boot) found by phessler, tested by reyk
-rw-r--r--sys/kern/subr_disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 3e7d7a001cd..e0a01cce326 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.36 2007/05/04 19:30:55 deraadt Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.37 2007/05/04 23:21:23 deraadt Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -646,6 +646,7 @@ setroot(struct device *bootdv, int part, int exitflags)
#ifdef RAMDISK_HOOKS
bootdv = &fakerdrootdev;
+ mountroot = NULL;
part = 0;
#endif