busybox df question...

Mark Whitley markw at lineo.com
Mon Feb 26 17:39:45 UTC 2001


Package: busybox
Version: v0.50pre
Severity: normal

Confirmed, Mike. I was able to dup this on my machine. Normal df output (w/o
the -h) reports correct sizes, but something in the HUMAN_READABLE part isn't
working properly. Here's some examples on my box:


[w/o -h: works fine]

$ df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda4              8815404   5911964   2455632  71% /
/dev/hda1                62187      4946     54030   8% /boot
/dev/hda3              3958799    676625   3077346  18% /home/markw/mp3

$ ./busybox df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda4              8815404   5911964   2455632  71% /
/dev/hda1                62187      4946     54030   8% /boot
/dev/hda3              3958799    676625   3077346  18% /home/markw/mp3


[df -h: same problem you observed]

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda4             8.4G  5.6G  2.3G  71% /
/dev/hda1              61M  4.8M   53M   8% /boot
/dev/hda3             3.8G  661M  2.9G  18% /home/markw/mp3

$ ./busybox df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/hda4                 8.4M      5.6M      2.3M  71% /
/dev/hda1                60.7k      4.8k     52.8k   8% /boot
/dev/hda3                 3.8M    660.8k      2.9M  18% /home/markw/mp3


[df -hk: forcing kilobyte units display - still shows megs]

$ df -hk
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda4              8815404   5911964   2455632  71% /
/dev/hda1                62187      4946     54030   8% /boot
/dev/hda3              3958799    676625   3077346  18% /home/markw/mp3

$ ./busybox df -hk
Filesystem                Size      Used Available Use% Mounted on
/dev/hda4                 8.4M      5.6M      2.3M  71% /
/dev/hda1                60.7k      4.8k     52.8k   8% /boot
/dev/hda3                 3.8M    660.8k      2.9M  18% /home/markw/mp3


[df -hm: forcing megabyte units display - all zeroes]

$ df -hm
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda4                 8609      5773      2398  71% /
/dev/hda1                   61         5        53   8% /boot
/dev/hda3                 3866       661      3005  18% /home/markw/mp3

$ ./busybox df -hm
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda4                    0         0         0  71% /
/dev/hda1                    0         0         0   8% /boot
/dev/hda3                    0         0         0  18% /home/markw/mp3



Submitting to bug tracking.

Mr. Kent Robotti, if you have some time, I'd appreciate you looking into this.


Mark Whitley
markw at lineo.com


On Sat, Feb 24, 2001 at 10:24:32PM -0800, Mike McQuade wrote:
> 
> Mark,
> 
> I saw you incorporated a patch from Kent (reading list archives, I'm not yet
> on the list)...
> 
> Anyhow, I built BusyBox from CVS tonight and put it on my embedded slackware
> gadget.
> 
> Here is 'df -h' from BB.
> 
>  root at devsys:/# df -h
>  Filesystem                Size      Used Available Use% Mounted on
>  /dev/hda2               286.0k     13.0k    258.2k   5% /
>  /dev/hda1               953.5k    583.8k    320.5k  65% /fullsys
>  /dev/hdc1                25.8k      7.7k     16.7k  32% /cfdisk
>  root at devsys:/#
> 
> And here is the slackware version of 'df -h'
> 
>  root at devsys:/# /fullsys/bin/df -h
>  Filesystem            Size  Used Avail Use% Mounted on
>  /dev/hda2             286M   13M  258M   5% /
>  /dev/hda1             953M  584M  320M  65% /fullsys
>  /dev/hdc1              26M  7.7M   17M  32% /cfdisk
>  root at devsys:/#
> 
> 
> Maybe I am missing someting in the BB configs, but it sure seems to me that
> the default 'df -h' on BB is showing 'k' when it should show 'M'.
> 
> I know that I don't have a fully functional Slackware system in 12k of disk
> ;).
> 
> Regards,
> 
> Mike McQuade
> 
> 
> 

---------------------------------------
Received: (at 1109-done) by bugs.lineo.com; 7 Mar 2001 04:07:13 +0000


More information about the busybox mailing list