[procps] [PATCH] Switch from kB to MB later.

  • From: James Cloos <cloos@xxxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sun, 5 Feb 2012 13:40:20 -0500

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@xxxxxxxxxxx>
---
 top/top.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/top/top.c b/top/top.c
index ae05965..caa3d1c 100644
--- a/top/top.c
+++ b/top/top.c
@@ -3398,7 +3398,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; }
-- 
James Cloos <cloos@xxxxxxxxxxx>         OpenPGP: 1024D/ED7DAEA6


Other related posts:

  • » [procps] [PATCH] Switch from kB to MB later. - James Cloos