From d91abbd912399a1d29cc77e4be7b7d6f94014180 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 26 Oct 2015 13:49:40 +0100 Subject: flowtop: Fix short form unit of kilobytes from KB to kB The SI prefix for 1000 is 'k', not 'K' (which is used for 1024 bytes by some). Signed-off-by: Tobias Klauser --- flowtop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flowtop.c b/flowtop.c index 88ac2fd..cfe76d5 100644 --- a/flowtop.c +++ b/flowtop.c @@ -793,7 +793,7 @@ static char *bandw2str(double bytes, char *buf, size_t len) else if (bytes > 1000000.) snprintf(buf, len, "%.1fMB", bytes / 1000000.); else if (bytes > 1000.) - snprintf(buf, len, "%.1fKB", bytes / 1000.); + snprintf(buf, len, "%.1fkB", bytes / 1000.); else snprintf(buf, len, "%g bytes", bytes); @@ -807,7 +807,7 @@ static char *rate2str(double rate, char *buf, size_t len) else if (rate > 1000000.) snprintf(buf, len, "%.1fMB/s", rate / 1000000.); else if (rate > 1000.) - snprintf(buf, len, "%.1fKB/s", rate / 1000.); + snprintf(buf, len, "%.1fkB/s", rate / 1000.); else snprintf(buf, len, "%gB/s", rate); -- cgit v1.2.3-54-g00ecf