From 9593fa03366dbd0cc414985231f2bc8f7cd660fd Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 4 May 2007 23:21:24 +0000 Subject: 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 --- sys/kern/subr_disk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') 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 -- cgit v1.2.3