diff options
author | mux <mux@FreeBSD.org> | 2002-07-03 09:27:24 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2002-07-03 09:27:24 +0000 |
commit | 4f6ffa4183037ce887b9b69664f8eed5e8020022 (patch) | |
tree | d53e321a8a0a312467001f5b0dfa9da8d8cdb741 /sys/kern/vfs_subr.c | |
parent | 27e23d9345937f87714e22347e57ab2e6f4ceb83 (diff) | |
download | FreeBSD-src-4f6ffa4183037ce887b9b69664f8eed5e8020022.zip FreeBSD-src-4f6ffa4183037ce887b9b69664f8eed5e8020022.tar.gz |
Move vfs_rootmountalloc() in vfs_mount.c and remove lite2_vfs_mountroot()
which was #if 0'd and is not likely to be used now.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f8baa12..6662d01 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -319,77 +319,6 @@ vfs_unbusy(mp, td) } /* - * Lookup a filesystem type, and if found allocate and initialize - * a mount structure for it. - * - * Devname is usually updated by mount(8) after booting. - */ -int -vfs_rootmountalloc(fstypename, devname, mpp) - char *fstypename; - char *devname; - struct mount **mpp; -{ - struct thread *td = curthread; /* XXX */ - struct vfsconf *vfsp; - struct mount *mp; - - if (fstypename == NULL) - return (ENODEV); - for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) - if (!strcmp(vfsp->vfc_name, fstypename)) - break; - if (vfsp == NULL) - return (ENODEV); - mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK | M_ZERO); - lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE); - (void)vfs_busy(mp, LK_NOWAIT, 0, td); - TAILQ_INIT(&mp->mnt_nvnodelist); - TAILQ_INIT(&mp->mnt_reservedvnlist); - mp->mnt_vfc = vfsp; - mp->mnt_op = vfsp->vfc_vfsops; - mp->mnt_flag = MNT_RDONLY; - mp->mnt_vnodecovered = NULLVP; - vfsp->vfc_refcount++; - mp->mnt_iosize_max = DFLTPHYS; - mp->mnt_stat.f_type = vfsp->vfc_typenum; - mp->mnt_flag |= vfsp->vfc_flags & MNT_VISFLAGMASK; - strncpy(mp->mnt_stat.f_fstypename, vfsp->vfc_name, MFSNAMELEN); - mp->mnt_stat.f_mntonname[0] = '/'; - mp->mnt_stat.f_mntonname[1] = 0; - (void) copystr(devname, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, 0); - *mpp = mp; - return (0); -} - -/* - * 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. - */ -#ifdef notdef /* XXX JH */ -int -lite2_vfs_mountroot() -{ - struct vfsconf *vfsp; - extern int (*lite2_mountroot)(void); - int error; - - if (lite2_mountroot != NULL) - return ((*lite2_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); -} -#endif - -/* * Lookup a mount point by filesystem identifier. */ struct mount * |