diff options
Diffstat (limited to 'sys/fs')
| -rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 2 | ||||
| -rw-r--r-- | sys/fs/devfs/devfs_vfsops.c | 8 | ||||
| -rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 3 | ||||
| -rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 14 | ||||
| -rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 3 | ||||
| -rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 14 | ||||
| -rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 2 | ||||
| -rw-r--r-- | sys/fs/nwfs/nwfs_vfsops.c | 3 | ||||
| -rw-r--r-- | sys/fs/portalfs/portal_vfsops.c | 2 | ||||
| -rw-r--r-- | sys/fs/umapfs/umap_vfsops.c | 2 | ||||
| -rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 3 |
11 files changed, 10 insertions, 46 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 3017339f22518..606f9d3794130 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -249,8 +249,6 @@ cd9660_mount(mp, path, data, ndp, p) return error; } imp = VFSTOISOFS(mp); - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index eb13d8f719cbe..ee369e16ee811 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -67,7 +67,6 @@ devfs_mount(mp, path, data, ndp, p) struct proc *p; { int error; - size_t size; struct devfs_mount *fmp; struct vnode *rvp; @@ -100,13 +99,6 @@ devfs_mount(mp, path, data, ndp, p) } VOP_UNLOCK(rvp, 0, p); - if (path != NULL) { - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - } else { - strcpy(mp->mnt_stat.f_mntonname, "/"); - size = 1; - } - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); bzero(mp->mnt_stat.f_mntfromname, MNAMELEN); bcopy("devfs", mp->mnt_stat.f_mntfromname, sizeof("devfs")); (void)devfs_statfs(mp, &mp->mnt_stat, p); diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 84940c70a7453..7737e37dd5c7e 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -74,7 +74,6 @@ fdesc_mount(mp, path, data, ndp, p) struct proc *p; { int error = 0; - u_int size; struct fdescmount *fmp; struct vnode *rvp; @@ -98,8 +97,6 @@ fdesc_mount(mp, path, data, ndp, p) mp->mnt_data = (qaddr_t) fmp; vfs_getnewfsid(mp); - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); bzero(mp->mnt_stat.f_mntfromname, MNAMELEN); bcopy("fdesc", mp->mnt_stat.f_mntfromname, sizeof("fdesc")); (void)fdesc_statfs(mp, &mp->mnt_stat, p); diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 1581851da1cad..2d40b2da1253f 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -272,16 +272,12 @@ hpfs_mount ( /* * Since this is a new mount, we want the names for * the device and the mount point copied in. If an - * error occurs, the mountpoint is discarded by the - * upper level code. + * error occurs, the mountpoint is discarded by the + * upper level code. Note that vfs_mount() handles + * copying the mountpoint f_mntonname for us, so we + * don't have to do it here unless we want to set it + * to something other than "path" for some rason. */ - /* Save "last mounted on" info for mount point (NULL pad)*/ - copyinstr( path, /* mount point*/ - mp->mnt_stat.f_mntonname, /* save area*/ - MNAMELEN - 1, /* max size*/ - &size); /* real size*/ - bzero( mp->mnt_stat.f_mntonname + size, MNAMELEN - size); - /* Save "mounted from" info for mount point (NULL pad)*/ copyinstr( args.fspec, /* device name*/ mp->mnt_stat.f_mntfromname, /* save area*/ diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 3088d7a2bd6a0..672ea5df2e2f4 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -345,9 +345,6 @@ msdosfs_mount(mp, path, data, ndp, p) msdosfs_unmount(mp, MNT_FORCE, p); return error; } - - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 384883e81159a..89a7dd7bc0f47 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -376,16 +376,12 @@ ntfs_mount ( /* * Since this is a new mount, we want the names for * the device and the mount point copied in. If an - * error occurs, the mountpoint is discarded by the - * upper level code. + * error occurs, the mountpoint is discarded by the + * upper level code. Note that vfs_mount() handles + * copying the mountpoint f_mntonname for us, so we + * don't have to do it here unless we want to set it + * to something other than "path" for some rason. */ - /* Save "last mounted on" info for mount point (NULL pad)*/ - copyinstr( path, /* mount point*/ - mp->mnt_stat.f_mntonname, /* save area*/ - MNAMELEN - 1, /* max size*/ - &size); /* real size*/ - bzero( mp->mnt_stat.f_mntonname + size, MNAMELEN - size); - /* Save "mounted from" info for mount point (NULL pad)*/ copyinstr( args.fspec, /* device name*/ mp->mnt_stat.f_mntfromname, /* save area*/ diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 333916237b4bf..b852cc45ff1ec 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -191,8 +191,6 @@ nullfs_mount(mp, path, data, ndp, p) mp->mnt_data = (qaddr_t) xmp; vfs_getnewfsid(mp); - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); (void) copyinstr(args.target, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c index 3e76b30ac1a92..7d17e7d0247d2 100644 --- a/sys/fs/nwfs/nwfs_vfsops.c +++ b/sys/fs/nwfs/nwfs_vfsops.c @@ -146,7 +146,6 @@ static int nwfs_mount(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p) { struct nwfs_args args; /* will hold data from mount request */ - size_t size; int error; struct nwmount *nmp = NULL; struct ncp_conn *conn = NULL; @@ -198,8 +197,6 @@ static int nwfs_mount(struct mount *mp, char *path, caddr_t data, nmp->m.dir_mode = (nmp->m.dir_mode & (S_IRWXU|S_IRWXG|S_IRWXO)) | S_IFDIR; if ((error = nwfs_initnls(nmp)) != 0) goto bad; - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); pc = mp->mnt_stat.f_mntfromname; pe = pc+sizeof(mp->mnt_stat.f_mntfromname); bzero(pc, MNAMELEN); diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index 139746d3d35bb..3f7903ca2577a 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -133,8 +133,6 @@ portal_mount(mp, path, data, ndp, p) mp->mnt_data = (qaddr_t) fmp; vfs_getnewfsid(mp); - (void)copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); (void)copyinstr(args.pa_config, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index 6457897c46a7e..768ad48334ec6 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -221,8 +221,6 @@ umapfs_mount(mp, path, data, ndp, p) mp->mnt_data = (qaddr_t) amp; vfs_getnewfsid(mp); - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); (void) copyinstr(args.target, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index dfa6eae70098b..5018f094653f7 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -253,9 +253,6 @@ union_mount(mp, path, data, ndp, p) mp->mnt_data = (qaddr_t) um; vfs_getnewfsid(mp); - (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); - bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); - switch (um->um_op) { case UNMNT_ABOVE: cp = "<above>:"; |
