summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat/pstat.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-11-17 19:31:52 +0000
committerrwatson <rwatson@FreeBSD.org>2005-11-17 19:31:52 +0000
commitf6aff4df9f27ebb4e725976af02f0cb74b97ad5a (patch)
treebd7c28f24b42a3795802bd96d455ba86b1fb2e9c /usr.sbin/pstat/pstat.c
parent755ccc14355d08121fd68608d862ac6525b7b314 (diff)
downloadFreeBSD-src-f6aff4df9f27ebb4e725976af02f0cb74b97ad5a.zip
FreeBSD-src-f6aff4df9f27ebb4e725976af02f0cb74b97ad5a.tar.gz
Print (total - used) as the amount of available swap for a swap device
when printing swapinfo output, rather than (total), as that is (strictly speaking) more accurate. Pointed out by: Rob <spamrefuse at yahoo dot com> MFC after: 3 days
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r--usr.sbin/pstat/pstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 519f4d8..6130e77 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -526,7 +526,7 @@ print_swap(struct kvm_swap *ksw)
++nswdev;
if (totalflag == 0)
print_swap_line(ksw->ksw_devname, ksw->ksw_total,
- ksw->ksw_used, ksw->ksw_total,
+ ksw->ksw_used, ksw->ksw_total - ksw->ksw_used,
(ksw->ksw_used * 100.0) / ksw->ksw_total);
}
OpenPOWER on IntegriCloud