summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-01-19 16:39:14 +0000
committerrwatson <rwatson@FreeBSD.org>2008-01-19 16:39:14 +0000
commit5baa8fe0004741a35c29a3b56dd3500ae74ba4c7 (patch)
tree7f062832e0f3c6f8d4d46a02b97d3a0432512b84
parentaaee2ef564bf1c5fc99a37291522877aa33e15cc (diff)
downloadFreeBSD-src-5baa8fe0004741a35c29a3b56dd3500ae74ba4c7.zip
FreeBSD-src-5baa8fe0004741a35c29a3b56dd3500ae74ba4c7.tar.gz
Rework coda_statfs(): no longer need to zero the statfs structure or
fill out all fields, just fill out the ones the file system knows about. Among other things, this causes the outpuf of "mount" and "df" to make quite a bit more sense as /dev/cfs0 is specified as the mountfrom name. MFC after: 3 days
-rw-r--r--sys/fs/coda/coda_vfsops.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index ec0f80d..06793e4 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -371,13 +371,11 @@ coda_nb_statfs(vfsp, sbp, td)
return(EINVAL);
}
- bzero(sbp, sizeof(struct statfs));
/* XXX - what to do about f_flags, others? --bnoble */
/* Below This is what AFS does
#define NB_SFS_SIZ 0x895440
*/
- /* Note: Normal fs's have a bsize of 0x400 == 1024 */
- sbp->f_type = vfsp->mnt_vfc->vfc_typenum;
+ sbp->f_flags = 0;
sbp->f_bsize = 8192; /* XXX */
sbp->f_iosize = 8192; /* XXX */
#define NB_SFS_SIZ 0x8AB75D
@@ -386,9 +384,6 @@ coda_nb_statfs(vfsp, sbp, td)
sbp->f_bavail = NB_SFS_SIZ;
sbp->f_files = NB_SFS_SIZ;
sbp->f_ffree = NB_SFS_SIZ;
- bcopy((caddr_t)&(vfsp->mnt_stat.f_fsid), (caddr_t)&(sbp->f_fsid), sizeof (fsid_t));
- snprintf(sbp->f_mntonname, sizeof(sbp->f_mntonname), "/coda");
- snprintf(sbp->f_fstypename, sizeof(sbp->f_fstypename), "coda");
/* MARK_INT_SAT(CODA_STATFS_STATS); */
return(0);
}
OpenPOWER on IntegriCloud