diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2006-11-20 16:04:41 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2006-11-20 16:04:41 +0000 |
| commit | 5c88a11e6ecbdb249da4ea006de1d486b13c328c (patch) | |
| tree | 4492f0248b0817ad7a3f6e447b1c16b1f57bfac9 /usr.bin/vmstat | |
| parent | 681efe08347bbf750276ccf4825ae6865129be01 (diff) | |
Notes
Diffstat (limited to 'usr.bin/vmstat')
| -rw-r--r-- | usr.bin/vmstat/vmstat.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 24d6622b1bed..36be718171a4 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include <devstat.h> #include <err.h> #include <errno.h> +#include <inttypes.h> #include <kvm.h> #include <limits.h> #include <memstat.h> @@ -574,12 +575,13 @@ dovmstat(unsigned int interval, int reps) fill_vmmeter(&sum); fill_vmtotal(&total); - (void)printf("%2d %1d %1d", + (void)printf("%2u %1u %1u", total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw); -#define vmstat_pgtok(a) ((a) * (sum.v_page_size >> 10)) +#define vmstat_pgtok(a) ((uintmax_t)(a) * (sum.v_page_size >> 10)) #define rate(x) (((x) + halfuptime) / uptime) /* round */ - (void)printf(" %7ld %6ld ", (long)vmstat_pgtok(total.t_avm), - (long)vmstat_pgtok(total.t_free)); + (void)printf(" %7zu %6zu ", + vmstat_pgtok(total.t_avm), + vmstat_pgtok(total.t_free)); (void)printf("%5lu ", (unsigned long)rate(sum.v_vm_faults - osum.v_vm_faults)); (void)printf("%3lu ", |
