Author: markj
Date: Mon Nov 25 00:33:56 2019
New Revision: 355072
URL: https://svnweb.freebsd.org/changeset/base/355072

Log:
  MFC r354829:
  Add a "B" suffix to memory quantities in top(1) output.

Modified:
  stable/12/usr.bin/top/utils.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/top/utils.c
==============================================================================
--- stable/12/usr.bin/top/utils.c       Sun Nov 24 23:46:29 2019        
(r355071)
+++ stable/12/usr.bin/top/utils.c       Mon Nov 25 00:33:56 2019        
(r355072)
@@ -291,13 +291,14 @@ format_time(long seconds)
 char *
 format_k(int64_t amt)
 {
-    static char retarray[NUM_STRINGS][16];
-    static int index_ = 0;
-    char *ret;
+       static char retarray[NUM_STRINGS][16];
+       static int index_ = 0;
+       char *ret;
 
-    ret = retarray[index_];
+       ret = retarray[index_];
        index_ = (index_ + 1) % NUM_STRINGS;
-       humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE);
+       humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE |
+           HN_B);
        return (ret);
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to