summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/vfs_conf.c7
-rw-r--r--sys/kern/vfs_mount.c7
-rw-r--r--sys/sys/mount.h1
4 files changed, 7 insertions, 10 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");
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c
index 27c2b54..0f1ab00 100644
--- a/sys/kern/vfs_conf.c
+++ b/sys/kern/vfs_conf.c
@@ -87,7 +87,6 @@ static char *cdrom_rootdevnames[] = {
NULL
};
-static void vfs_mountroot(void *junk);
static int vfs_mountroot_try(char *mountfrom);
static int vfs_mountroot_ask(void);
static void gets(char *cp);
@@ -96,13 +95,11 @@ static void gets(char *cp);
char *rootdevnames[2] = {NULL, NULL};
static int setrootbyname(char *name);
-SYSINIT(mountroot, SI_SUB_MOUNT_ROOT, SI_ORDER_SECOND, vfs_mountroot, NULL);
-
/*
* Find and mount the root filesystem
*/
-static void
-vfs_mountroot(void *junk)
+void
+vfs_mountroot(void *foo __unused)
{
int i;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 27c2b54..0f1ab00 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -87,7 +87,6 @@ static char *cdrom_rootdevnames[] = {
NULL
};
-static void vfs_mountroot(void *junk);
static int vfs_mountroot_try(char *mountfrom);
static int vfs_mountroot_ask(void);
static void gets(char *cp);
@@ -96,13 +95,11 @@ static void gets(char *cp);
char *rootdevnames[2] = {NULL, NULL};
static int setrootbyname(char *name);
-SYSINIT(mountroot, SI_SUB_MOUNT_ROOT, SI_ORDER_SECOND, vfs_mountroot, NULL);
-
/*
* Find and mount the root filesystem
*/
-static void
-vfs_mountroot(void *junk)
+void
+vfs_mountroot(void *foo __unused)
{
int i;
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index b6099d1..5cd748d 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -431,6 +431,7 @@ dev_t vfs_getrootfsid __P((struct mount *));
struct mount *vfs_getvfs __P((fsid_t *)); /* return vfs given fsid */
int vfs_modevent __P((module_t, int, void *));
int vfs_mountedon __P((struct vnode *)); /* is a vfs mounted on vp */
+void vfs_mountroot __P((void *)); /* mount our root filesystem */
int vfs_rootmountalloc __P((char *, char *, struct mount **));
void vfs_unbusy __P((struct mount *, struct thread *td));
void vfs_unmountall __P((void));
OpenPOWER on IntegriCloud