diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2009-05-03 05:01:55 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2009-05-03 05:01:55 +0000 |
commit | 4859f9b7812e778554340fae89158ac857cb8c28 (patch) | |
tree | 448cee7f4dfe645d17beacdb51b4ac335687e65d /usr.bin/systat/vmstat.c | |
parent | eb5edafdfa8700058da59f02a1ab75d2e0f7803c (diff) |
Hinge at the natural rollover point 9999x instead of 1024x when switching to
the next unit K->M->G. ok deraadt@
Diffstat (limited to 'usr.bin/systat/vmstat.c')
-rw-r--r-- | usr.bin/systat/vmstat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index d7fba27e2a3..b5335798346 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.68 2009/03/30 05:35:22 deraadt Exp $ */ +/* $OpenBSD: vmstat.c,v 1.69 2009/05/03 05:01:54 drahn Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif -static char rcsid[] = "$OpenBSD: vmstat.c,v 1.68 2009/03/30 05:35:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vmstat.c,v 1.69 2009/05/03 05:01:54 drahn Exp $"; #endif /* not lint */ /* @@ -536,9 +536,9 @@ putintmk(int n, int l, int c, int w) addch(' '); return; } - if (n > 1024 * 1024) + if (n > 9999 * 1024) snprintf(b, sizeof b, "%*dG", w - 1, n / 1024 / 1024); - else if (n > 1024) + else if (n > 9999) snprintf(b, sizeof b, "%*dM", w - 1, n / 1024); else snprintf(b, sizeof b, "%*dK", w - 1, n); |