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/isofs/cd9660 | |
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/isofs/cd9660')
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 7c83449..639dc75 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -65,7 +65,7 @@ MALLOC_DEFINE(M_ISOFSNODE, "ISOFS node", "ISOFS vnode private part"); struct iconv_functions *cd9660_iconv = NULL; -static vfs_mount_t cd9660_mount; +static vfs_omount_t cd9660_omount; static vfs_unmount_t cd9660_unmount; static vfs_root_t cd9660_root; static vfs_statfs_t cd9660_statfs; @@ -76,7 +76,7 @@ static vfs_vptofh_t cd9660_vptofh; static struct vfsops cd9660_vfsops = { .vfs_fhtovp = cd9660_fhtovp, .vfs_init = cd9660_init, - .vfs_mount = cd9660_mount, + .vfs_omount = cd9660_omount, .vfs_root = cd9660_root, .vfs_statfs = cd9660_statfs, .vfs_uninit = cd9660_uninit, @@ -179,11 +179,10 @@ iso_mountroot(mp, td) * mount system call */ static int -cd9660_mount(mp, path, data, ndp, td) +cd9660_omount(mp, path, data, td) struct mount *mp; char *path; caddr_t data; - struct nameidata *ndp; struct thread *td; { struct vnode *devvp; @@ -192,6 +191,7 @@ cd9660_mount(mp, path, data, ndp, td) int error; mode_t accessmode; struct iso_mnt *imp = 0; + struct nameidata ndp; if (path == NULL) /* We are doing the initial root mount */ return (iso_mountroot(mp, td)); @@ -214,11 +214,11 @@ cd9660_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 block device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); - if ((error = namei(ndp))) + NDINIT(&ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); + if ((error = namei(&ndp))) return (error); - NDFREE(ndp, NDF_ONLY_PNBUF); - devvp = ndp->ni_vp; + NDFREE(&ndp, NDF_ONLY_PNBUF); + devvp = ndp.ni_vp; if (!vn_isdisk(devvp, &error)) { vrele(devvp); |