Bug 849972 - busybox 'du' reporting different sizes with -h and -m parameters
busybox 'du' reporting different sizes with -h and -m parameters
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: busybox (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Denys Vlasenko
qe-baseos-daemons
: FutureFeature
Depends On:
Blocks: 1270638
  Show dependency treegraph
 
Reported: 2012-08-21 07:39 EDT by Tomas Dolezal
Modified: 2015-10-15 15:26 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-15 15:26:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Dolezal 2012-08-21 07:39:57 EDT
Description of problem:
busybox 'du' applet reports different sizes with -h and -m parameters comparing to coreutils 'du' on small files

Version-Release number of selected component (if applicable):
busybox-1.15.1-15.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. `dd if=/dev/zero of=/tmp/testfile.tmp bs=1128k count=1`
2. check `du -h /tmp/testfile.tmp` and analogically with busybox
3. compare results
  
Actual results:
 comparation of last line with -h parameter
	busybox			|	coreutils
>1.1M	/tmp/testfile.tmp	| 1.2M	/tmp/testfile.tmp

 comparation of last line with -m parameter
	busybox			|	coreutils
>1	/tmp/testfile.tmp	| 2	/tmp/testfile.tmp

Expected results:
busybox 'du' reports same sizes when approximating as coreutils 'du' does
Comment 2 Denys Vlasenko 2012-12-14 11:21:48 EST
Coreutils rounds sizes up, busybox rounds to nearest.

Not sure whether this needs to be fixed...

For now I added a comment in the upstream busybox source explaining this.
Comment 3 Denys Vlasenko 2015-10-15 15:26:51 EDT
Closing as WONTFIX. This doesn't look important.

Note You need to log in before you can comment on or make changes to this bug.