From a2e59d80d59752f376955755952db332d670d05a Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Thu, 17 Nov 2005 19:31:52 +0000 Subject: [PATCH] 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 MFC after: 3 days --- usr.sbin/pstat/pstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 519f4d8bb37a..6130e77bd254 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); }