diff options
author | phk <phk@FreeBSD.org> | 2004-07-30 22:08:52 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-07-30 22:08:52 +0000 |
commit | 2d868d02cfcc9af8da398c52add2f28fe1c493bc (patch) | |
tree | af2a6b4c3e63a13443b647b947b57d5b31690b5a /sys/fs/msdosfs/msdosfs_vfsops.c | |
parent | 941a15ae99cc0252acd241ea5e407eb00a540858 (diff) | |
download | FreeBSD-src-2d868d02cfcc9af8da398c52add2f28fe1c493bc.zip FreeBSD-src-2d868d02cfcc9af8da398c52add2f28fe1c493bc.tar.gz |
Put a version element in the VFS filesystem configuration structure
and refuse initializing filesystems with a wrong version. This will
aid maintenance activites on the 5-stable branch.
s/vfs_mount/vfs_omount/
s/vfs_nmount/vfs_mount/
Name our filesystems mount function consistently.
Eliminate the namiedata argument to both vfs_mount and vfs_omount.
It was originally there to save stack space. A few places abused
it to get hold of some credentials to pass around. Effectively
it is unused.
Reorganize the root filesystem selection code.
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_vfsops.c')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index b54f6ec..ccf4b7b 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -96,7 +96,7 @@ static int update_mp(struct mount *mp, struct msdosfs_args *argp, static int mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td, struct msdosfs_args *argp); static vfs_fhtovp_t msdosfs_fhtovp; -static vfs_mount_t msdosfs_mount; +static vfs_omount_t msdosfs_omount; static vfs_root_t msdosfs_root; static vfs_statfs_t msdosfs_statfs; static vfs_sync_t msdosfs_sync; @@ -158,17 +158,17 @@ update_mp(mp, argp, td) * special file to treat as a filesystem. */ static int -msdosfs_mount(mp, path, data, ndp, td) +msdosfs_omount(mp, path, data, td) struct mount *mp; char *path; caddr_t data; - struct nameidata *ndp; struct thread *td; { struct vnode *devvp; /* vnode for blk device to mount */ struct msdosfs_args args; /* will hold data from mount request */ /* msdosfs specific mount control block */ struct msdosfsmount *pmp = NULL; + struct nameidata ndp; size_t size; int error, flags; mode_t accessmode; @@ -241,12 +241,12 @@ msdosfs_mount(mp, path, data, ndp, td) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible disk device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); - error = namei(ndp); + NDINIT(&ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); + error = namei(&ndp); if (error) return (error); - devvp = ndp->ni_vp; - NDFREE(ndp, NDF_ONLY_PNBUF); + devvp = ndp.ni_vp; + NDFREE(&ndp, NDF_ONLY_PNBUF); if (!vn_isdisk(devvp, &error)) { vrele(devvp); @@ -294,7 +294,7 @@ msdosfs_mount(mp, path, data, ndp, td) bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); (void) msdosfs_statfs(mp, &mp->mnt_stat, td); #ifdef MSDOSFS_DEBUG - printf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); + printf("msdosfs_omount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); #endif return (0); } @@ -900,7 +900,7 @@ msdosfs_vptofh(vp, fhp) static struct vfsops msdosfs_vfsops = { .vfs_fhtovp = msdosfs_fhtovp, .vfs_init = msdosfs_init, - .vfs_mount = msdosfs_mount, + .vfs_omount = msdosfs_omount, .vfs_root = msdosfs_root, .vfs_statfs = msdosfs_statfs, .vfs_sync = msdosfs_sync, |