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
This commit is contained in:
Robert Watson 2005-11-17 19:31:52 +00:00
parent 0749cbc1a4
commit a2e59d80d5

View File

@ -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);
}