diff options
-rw-r--r-- | sys/kern/init_main.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 26 | ||||
-rw-r--r-- | sys/sys/mount.h | 3 |
3 files changed, 5 insertions, 30 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. */ diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 0f7cbce95ff..5638d013a07 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.163 2008/03/23 12:32:44 miod Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.164 2008/05/06 17:19:40 thib Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -216,30 +216,6 @@ vfs_rootmountalloc(char *fstypename, char *devname, struct mount **mpp) } /* - * Find an appropriate filesystem to use for the root. If a filesystem - * has not been preselected, walk through the list of known filesystems - * trying those that have mountroot routines, and try them until one - * works or we have tried them all. - */ -int -vfs_mountroot(void) -{ - struct vfsconf *vfsp; - int error; - - if (mountroot != NULL) - return ((*mountroot)()); - for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) { - if (vfsp->vfc_mountroot == NULL) - continue; - if ((error = (*vfsp->vfc_mountroot)()) == 0) - return (0); - printf("%s_mountroot failed: %d\n", vfsp->vfc_name, error); - } - return (ENODEV); -} - -/* * Lookup a mount point by filesystem identifier. */ struct mount * diff --git a/sys/sys/mount.h b/sys/sys/mount.h index dc0ce42f237..f199ec5b7e4 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.h,v 1.82 2008/03/16 19:42:57 otto Exp $ */ +/* $OpenBSD: mount.h,v 1.83 2008/05/06 17:19:40 thib Exp $ */ /* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */ /* @@ -597,7 +597,6 @@ int vfs_mount_foreach_vnode(struct mount *, int (*func)(struct vnode *, void vfs_getnewfsid(struct mount *); struct mount *vfs_getvfs(fsid_t *); int vfs_mountedon(struct vnode *); -int vfs_mountroot(void); int vfs_rootmountalloc(char *, char *, struct mount **); void vfs_unbusy(struct mount *); void vfs_unmountall(void); |