replace mountroot with function vfs_mountroot
[unix-history] / usr / src / sys / kern / init_main.c
index 47caecd..e45d84a 100644 (file)
@@ -9,7 +9,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)init_main.c 8.12 (Berkeley) %G%
+ *     @(#)init_main.c 8.15 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -82,7 +82,6 @@ main(framep)
        register int i;
        int s;
        register_t rval[2];
        register int i;
        int s;
        register_t rval[2];
-       extern int (*mountroot) __P((void));
        extern struct pdevinit pdevinit[];
        extern void roundrobin __P((void *));
        extern void schedcpu __P((void *));
        extern struct pdevinit pdevinit[];
        extern void roundrobin __P((void *));
        extern void schedcpu __P((void *));
@@ -221,11 +220,12 @@ main(framep)
        schedcpu(NULL);
 
        /* Mount the root file system. */
        schedcpu(NULL);
 
        /* Mount the root file system. */
-       if ((*mountroot)())
+       if (vfs_mountroot())
                panic("cannot mount root");
                panic("cannot mount root");
+       mountlist.cqh_first->mnt_flag |= MNT_ROOTFS;
 
        /* Get the vnode for '/'.  Set fdp->fd_fd.fd_cdir to reference it. */
 
        /* Get the vnode for '/'.  Set fdp->fd_fd.fd_cdir to reference it. */
-       if (VFS_ROOT(mountlist.tqh_first, &rootvnode))
+       if (VFS_ROOT(mountlist.cqh_first, &rootvnode))
                panic("cannot find root vnode");
        fdp->fd_fd.fd_cdir = rootvnode;
        VREF(fdp->fd_fd.fd_cdir);
                panic("cannot find root vnode");
        fdp->fd_fd.fd_cdir = rootvnode;
        VREF(fdp->fd_fd.fd_cdir);