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
This commit is contained in:
parent
6a876b92fb
commit
aeab4f72a0
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user