summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-01-17 18:20:55 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-01-17 18:20:55 +0000
commit6f59441389b6cfcbf2851960f34314ca482663cd (patch)
treeeac35a21091c646e8e8b2338e56f1f010b986667
parent26c43f519cb4a8bb8268ffe4ad2439fdac6b278f (diff)
right f_bavail calculation
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 65df3ceb414..e0602ba4ac1 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.15 1998/01/09 20:39:54 csapuntz Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.16 1998/01/17 18:20:54 mickey Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -706,8 +706,7 @@ ffs_statfs(mp, sbp, p)
sbp->f_blocks = fs->fs_dsize;
sbp->f_bfree = fs->fs_cstotal.cs_nbfree * fs->fs_frag +
fs->fs_cstotal.cs_nffree;
- sbp->f_bavail = (fs->fs_dsize * (100 - fs->fs_minfree) / 100) -
- (fs->fs_dsize - sbp->f_bfree);
+ sbp->f_bavail = sbp->f_bfree - fs->fs_dsize * fs->fs_minfree / 100;
sbp->f_files = fs->fs_ncg * fs->fs_ipg - ROOTINO;
sbp->f_ffree = fs->fs_cstotal.cs_nifree;
if (sbp != &mp->mnt_stat) {