]> granicus.if.org Git - procps-ng/commitdiff
top: postpone the switch from Kb to Mb in summary display
authorJames Cloos <cloos@jhcloos.com>
Mon, 6 Feb 2012 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Sun, 12 Feb 2012 10:52:23 +0000 (21:52 +1100)
The mem and swap lines have enough room to show eight significant
digits, so switch to showing MB when >=100MB, not >=10MB.

The extra detail is valuable; it should not be elided.

Signed-off-by: James Cloos <cloos@jhcloos.com>
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index d0b40acc6623e829fea71fe2769bb1ed4f83ecfb..0baa0274c48761591d135ae051210395d2566fe0 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -3417,7 +3417,7 @@ static void summary_show (void) {
       int shift = 0;
 
       /*** hotplug_acclimated ***/
-      if (kb_main_total > 9999999)
+      if (kb_main_total > 99999999)
          { which = N_txt(AMT_megabyte_txt); shift = 10; }
       if (kb_main_total > 9999999999ull)
          { which = N_txt(AMT_gigabyte_txt); shift = 20; }