aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ntfs/ntfs_vfsops.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2001-03-01 21:00:17 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2001-03-01 21:00:17 +0000
commitf3a90da99535deaf4e33d660ac83e7126a20a20f (patch)
tree8ea107615a4d686bc40bbe2cead2f674e6cd07f2 /sys/fs/ntfs/ntfs_vfsops.c
parentc909b97167e227032fe53444366c2c742570373f (diff)
downloadsrc-f3a90da99535deaf4e33d660ac83e7126a20a20f.tar.gz
src-f3a90da99535deaf4e33d660ac83e7126a20a20f.zip
Reviewed by: jlemon
An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
Notes
Notes: svn path=/head/; revision=73286
Diffstat (limited to 'sys/fs/ntfs/ntfs_vfsops.c')
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 384883e81159..89a7dd7bc0f4 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*/