summaryrefslogtreecommitdiff
path: root/libbb/human_readable.c
diff options
context:
space:
mode:
authorDenys Vlasenko2015-10-15 21:33:34 +0200
committerDenys Vlasenko2015-10-15 21:33:34 +0200
commit93dd9fd90ae284e7878767fe14bcb17e3edd9cf8 (patch)
treece345561860ba2894f0793d846dd54200b6069d5 /libbb/human_readable.c
parent5251135bc184bdcb8cbcb964e8c44c6c301bffdc (diff)
downloadbusybox-93dd9fd90ae284e7878767fe14bcb17e3edd9cf8.zip
busybox-93dd9fd90ae284e7878767fe14bcb17e3edd9cf8.tar.gz
du: extra compat: with -k and -m, round sizes up
function old new delta print 36 65 +29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/human_readable.c')
-rw-r--r--libbb/human_readable.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libbb/human_readable.c b/libbb/human_readable.c
index 5c7fc07..b4e0ef1 100644
--- a/libbb/human_readable.c
+++ b/libbb/human_readable.c
@@ -14,16 +14,11 @@
* representations (say, powers of 1024) and manipulating coefficients.
* The base ten "bytes" output could be handled similarly.
*
- * 2) This routine always outputs a decimal point and a tenths digit when
- * display_unit != 0. Hence, it isn't uncommon for the returned string
+ * 2) This routine outputs a decimal point and a tenths digit when
+ * display_unit == 0. Hence, it isn't uncommon for the returned string
* to have a length of 5 or 6.
*
- * It might be nice to add a flag to indicate no decimal digits in
- * that case. This could be either an additional parameter, or a
- * special value of display_unit. Such a flag would also be nice for du.
- *
- * Some code to omit the decimal point and tenths digit is sketched out
- * and "#if 0"'d below.
+ * If block_size is also 0, no decimal digits are printed.
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/