Bug 9041

Summary: ls -lh does true rounding
Product: Busybox Reporter: John Ata <john.ata>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.23.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description John Ata 2016-06-22 22:45:40 UTC
Given a file with 5734510790 bytes, Linux reports it with the -h option as 5.4G
while busybox reports it as 5.3G.   This is because Linux always rounds up no
matter how small the fraction while busybox does true rounding (The fraction is
5.340679353103042).  Normally a nit, however, when comparing identical
directories on two systems, this could get confusing leading one to believe that identical files are in fact different.  I realize that there's good arguments for both approaches but wondered if someone had thought about it.