From b6add043f9fb96f224397cadcb342ededeb4bb60 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 30 Dec 2002 18:19:19 +0000 Subject: Back out rev 1.78; getbsize(3)'s original interface has been restored. Approved by: markm --- usr.sbin/pstat/pstat.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'usr.sbin/pstat') diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 3781994..f85de47 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -467,22 +467,21 @@ static int nswdev; static void print_swap_header(void) { - size_t hlen; + int hlen; long blocksize; const char *header; header = getbsize(&hlen, &blocksize); if (totalflag == 0) (void)printf("%-15s %*s %8s %8s %8s %s\n", - "Device", (int)hlen, header, + "Device", hlen, header, "Used", "Avail", "Capacity", "Type"); } static void print_swap(struct kvm_swap *ksw) { - size_t hlen; - int pagesize; + int hlen, pagesize; long blocksize; pagesize = getpagesize(); @@ -492,7 +491,7 @@ print_swap(struct kvm_swap *ksw) ++nswdev; if (totalflag == 0) { (void)printf("%-15s %*d ", - ksw->ksw_devname, (int)hlen, + ksw->ksw_devname, hlen, CONVERT(ksw->ksw_total)); (void)printf("%8d %8d %5.0f%% %s\n", CONVERT(ksw->ksw_used), @@ -506,8 +505,7 @@ print_swap(struct kvm_swap *ksw) static void print_swap_total(void) { - size_t hlen; - int pagesize; + int hlen, pagesize; long blocksize; pagesize = getpagesize(); @@ -518,7 +516,7 @@ print_swap_total(void) CONVERT(swtot.ksw_used), CONVERT(swtot.ksw_total)); } else if (nswdev > 1) { (void)printf("%-15s %*d %8d %8d %5.0f%%\n", - "Total", (int)hlen, CONVERT(swtot.ksw_total), + "Total", hlen, CONVERT(swtot.ksw_total), CONVERT(swtot.ksw_used), CONVERT(swtot.ksw_total - swtot.ksw_used), (swtot.ksw_used * 100.0) / swtot.ksw_total); -- cgit v1.1