- sbp->f_blocks += mstat.f_blocks;
- sbp->f_bfree = mstat.f_bfree;
- sbp->f_bavail = mstat.f_bavail;
- sbp->f_files += mstat.f_files;
- sbp->f_ffree = mstat.f_ffree;
-
- if (sbp != &mp->mnt_stat) {
- sbp->f_type = mp->mnt_vfc->vfc_typenum;
- bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid));
- bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
- bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
- }
+ if (VFSATTR_IS_SUPPORTED(&attr, f_blocks))
+ fsap->f_blocks += attr.f_blocks;
+ if (VFSATTR_IS_SUPPORTED(&attr, f_bfree))
+ fsap->f_bfree = attr.f_bfree;
+ if (VFSATTR_IS_SUPPORTED(&attr, f_bavail))
+ fsap->f_bavail = attr.f_bavail;
+ if (VFSATTR_IS_SUPPORTED(&attr, f_bused))
+ fsap->f_bused += attr.f_bused;
+ if (VFSATTR_IS_SUPPORTED(&attr, f_files))
+ fsap->f_files += attr.f_files;
+ if (VFSATTR_IS_SUPPORTED(&attr, f_ffree))
+ fsap->f_ffree = attr.f_ffree;
+
+ VFSATTR_SET_SUPPORTED(fsap, f_bsize);
+ VFSATTR_SET_SUPPORTED(fsap, f_blocks);
+ VFSATTR_SET_SUPPORTED(fsap, f_bfree);
+ VFSATTR_SET_SUPPORTED(fsap, f_bavail);
+ VFSATTR_SET_SUPPORTED(fsap, f_bused);
+ VFSATTR_SET_SUPPORTED(fsap, f_files);
+ VFSATTR_SET_SUPPORTED(fsap, f_ffree);
+