From 4859f9b7812e778554340fae89158ac857cb8c28 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Sun, 3 May 2009 05:01:55 +0000 Subject: Hinge at the natural rollover point 9999x instead of 1024x when switching to the next unit K->M->G. ok deraadt@ --- usr.bin/systat/vmstat.c | 8 ++++---- 1 file 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); -- cgit v1.2.3