summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-10-26 13:49:40 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-10-26 13:49:40 +0100
commitd91abbd912399a1d29cc77e4be7b7d6f94014180 (patch)
tree9bcf27a0d33af56c71f0ee8790fd0f30dce55016
parent8cddf0164f310018484b6c518f8ded87724222d7 (diff)
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 <tklauser@distanz.ch>
-rw-r--r--flowtop.c4
1 files 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);