summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-03-08 10:33:11 +0000
committerphk <phk@FreeBSD.org>2002-03-08 10:33:11 +0000
commit0a13c0f2f6eea459daeae0e31aab75ee86f1874e (patch)
tree857bf4b7207179e792209215c70daf9b5e686691 /sys/kern/init_main.c
parent6b229a1455c9cd14021328f87387a7c0532f3518 (diff)
downloadFreeBSD-src-0a13c0f2f6eea459daeae0e31aab75ee86f1874e.zip
FreeBSD-src-0a13c0f2f6eea459daeae0e31aab75ee86f1874e.tar.gz
Move the mount of the root filesystem to happen in the init process before
the exec if /sbin/init. This allows the scheduler to get started and kthreads a chance to run before we start filesystem operations.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 7816666..e847534 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -487,6 +487,8 @@ start_init(void *dummy)
td = curthread;
p = td->td_proc;
+ vfs_mountroot(NULL);
+
/* Get the vnode for '/'. Set p->p_fd->fd_cdir to reference it. */
if (VFS_ROOT(TAILQ_FIRST(&mountlist), &rootvnode))
panic("cannot find root vnode");
OpenPOWER on IntegriCloud