Date: Mon, 25 Nov 2019 00:33:56 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355072 - stable/12/usr.bin/top Message-ID: <201911250033.xAP0XuZi080867@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911250033.xAP0XuZi080867>