diff options
author | markm <markm@FreeBSD.org> | 2002-10-23 18:55:20 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-10-23 18:55:20 +0000 |
commit | a3db15f196f32fb84c213ce0ca89b9a18a33226a (patch) | |
tree | 627aba23a96146273a92d188e5ea836bf0666efb | |
parent | d2ef180a5695f0cd057b940a9b1da8ae490ba2fb (diff) | |
download | FreeBSD-src-a3db15f196f32fb84c213ce0ca89b9a18a33226a.zip FreeBSD-src-a3db15f196f32fb84c213ce0ca89b9a18a33226a.tar.gz |
Adjust argument passed to getbsize().
-rw-r--r-- | usr.sbin/pstat/pstat.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index f85de47..3781994 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -467,21 +467,22 @@ static int nswdev; static void print_swap_header(void) { - int hlen; + size_t hlen; long blocksize; const char *header; header = getbsize(&hlen, &blocksize); if (totalflag == 0) (void)printf("%-15s %*s %8s %8s %8s %s\n", - "Device", hlen, header, + "Device", (int)hlen, header, "Used", "Avail", "Capacity", "Type"); } static void print_swap(struct kvm_swap *ksw) { - int hlen, pagesize; + size_t hlen; + int pagesize; long blocksize; pagesize = getpagesize(); @@ -491,7 +492,7 @@ print_swap(struct kvm_swap *ksw) ++nswdev; if (totalflag == 0) { (void)printf("%-15s %*d ", - ksw->ksw_devname, hlen, + ksw->ksw_devname, (int)hlen, CONVERT(ksw->ksw_total)); (void)printf("%8d %8d %5.0f%% %s\n", CONVERT(ksw->ksw_used), @@ -505,7 +506,8 @@ print_swap(struct kvm_swap *ksw) static void print_swap_total(void) { - int hlen, pagesize; + size_t hlen; + int pagesize; long blocksize; pagesize = getpagesize(); @@ -516,7 +518,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", hlen, CONVERT(swtot.ksw_total), + "Total", (int)hlen, CONVERT(swtot.ksw_total), CONVERT(swtot.ksw_used), CONVERT(swtot.ksw_total - swtot.ksw_used), (swtot.ksw_used * 100.0) / swtot.ksw_total); |