summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-12-06 20:02:13 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-12-06 20:02:13 +0000
commit7ab8c8c03c7aaf9cff905442b9dd9d3650d6d0f0 (patch)
treeb16d4fa14e03bc9ed39697e4aa103ef9e068b3db
parenta1f5fe153848bc760984141a1fa428936d807fb7 (diff)
Notes
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c4
-rw-r--r--sys/fs/nullfs/null_vfsops.c7
2 files changed, 3 insertions, 8 deletions
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index d3b0be7fe170..2492fefbe8b9 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -88,9 +88,7 @@ fdesc_mount(struct mount *mp, struct thread *td)
mp->mnt_data = (qaddr_t) fmp;
vfs_getnewfsid(mp);
- bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
- bcopy("fdescfs", mp->mnt_stat.f_mntfromname, sizeof("fdescfs"));
- (void)fdesc_statfs(mp, &mp->mnt_stat, td);
+ vfs_mountedfrom(mp, "fdescfs");
return (0);
}
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index fc8967aeb8b8..21ee962d97c3 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -78,7 +78,6 @@ nullfs_mount(struct mount *mp, struct thread *td)
struct vnode *nullm_rootvp;
struct null_mount *xmp;
char *target;
- size_t size;
int isvnunlocked = 0, len;
struct nameidata nd, *ndp = &nd;
@@ -184,10 +183,8 @@ nullfs_mount(struct mount *mp, struct thread *td)
mp->mnt_data = (qaddr_t) xmp;
vfs_getnewfsid(mp);
- (void) copystr(target, mp->mnt_stat.f_mntfromname,
- MNAMELEN - 1, &size);
- bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)nullfs_statfs(mp, &mp->mnt_stat, td);
+ vfs_mountedfrom(mp, target);
+
NULLFSDEBUG("nullfs_mount: lower %s, alias at %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
return (0);