summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2001-03-01 21:00:17 +0000
committeradrian <adrian@FreeBSD.org>2001-03-01 21:00:17 +0000
commit401895533496c6f7943c0cadf487c2cfa8f852ac (patch)
tree19b63a29b1f18d2efdee5765c5bffd371838dd1e /sys/ufs/ffs/ffs_vfsops.c
parent845eeac4fc47466824d871b49fc54af4c3812e09 (diff)
downloadFreeBSD-src-401895533496c6f7943c0cadf487c2cfa8f852ac.zip
FreeBSD-src-401895533496c6f7943c0cadf487c2cfa8f852ac.tar.gz
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.
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 2d48115..4558780 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -323,9 +323,8 @@ ffs_mount(mp, path, data, ndp, p)
* We need the name for the mount point (also used for
* "last mounted on") copied in. If an error occurs,
* the mount point is discarded by the upper level code.
+ * Note that vfs_mount() populates f_mntonname for us.
*/
- copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
- bzero( mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
if ((error = ffs_mountfs(devvp, mp, p, M_FFSNODE)) != 0) {
vrele(devvp);
return (error);
OpenPOWER on IntegriCloud