projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44c0e17
)
When displaying the size in 1kB blocks round up if an odd number of
author
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 10 Mar 2004 09:58:51 +0000
(09:58 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 10 Mar 2004 09:58:51 +0000
(09:58 -0000)
blocks
coreutils/du.c
patch
|
blob
|
history
diff --git
a/coreutils/du.c
b/coreutils/du.c
index 7984d657a227541ca3e034a8c3cbf24e4d1c6781..df75a6953bb6ba6a85e422460a72a944e4c0d63f 100644
(file)
--- a/
coreutils/du.c
+++ b/
coreutils/du.c
@@
-77,7
+77,11
@@
static void print(long size, char *filename)
bb_printf("%s\t%s\n", make_human_readable_str(size, 512, disp_hr),
filename);
#else
- bb_printf("%ld\t%s\n", size >> disp_k, filename);
+ if (disp_k) {
+ size++;
+ size >>= 1;
+ }
+ bb_printf("%ld\t%s\n", size, filename);
#endif
}