summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2008-05-06 17:19:40 +0000
committerthib <thib@openbsd.org>2008-05-06 17:19:40 +0000
commit0da299125aac5826e10041ba94c2be5739a0ea44 (patch)
treec943dc70933f1920ad44cd0e8019f0bffc60df11 /sys/kern/init_main.c
parenttypo fix; from tanner (diff)
downloadwireguard-openbsd-0da299125aac5826e10041ba94c2be5739a0ea44.tar.xz
wireguard-openbsd-0da299125aac5826e10041ba94c2be5739a0ea44.zip
retire vfs_mountroot();
setroot() is now (and has been) responsible for setting the mountroot function pointer "to the right thing", or failing todo that, to ffs_mountroot; based on a discussion/diff from deraadt@. OK deraadt@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index a930d841132..fd0409870d0 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.148 2008/01/01 16:31:42 miod Exp $ */
+/* $OpenBSD: init_main.c,v 1.149 2008/05/06 17:19:40 thib Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -446,9 +446,9 @@ main(void *framep)
/* Configure root/swap devices */
diskconf();
- /* Mount the root file system. */
- if (vfs_mountroot())
+ if (mountroot == NULL || ((*mountroot)() != 0))
panic("cannot mount root");
+
CIRCLEQ_FIRST(&mountlist)->mnt_flag |= MNT_ROOTFS;
/* Get the vnode for '/'. Set p->p_fd->fd_cdir to reference it. */