bug#1094: [BusyBox] bug#1094: "df" => divide by zero when showing ramfs stats

Richard June rjune at ims1.imagestream-is.com
Wed Jan 17 12:16:07 UTC 2001


ok, I'll have that fixed today.

On Wed, 17 Jan 2001, Philipp Roebrock wrote:

> Package: busybox
> Version: 0.48
> Severity: low
> 
> When I use a ramfs filesystem, and show the filesystem statistics with df, I get
> a divide by zero exception, df is halted immediately.
> 
> The file df.c contains a "statfs" call, that returns a null for the total
> blocks and free blocks count of a ramfs filesystem. If "Use%"
> (blocks_percent_used) is calculated, you get the division by zero:
> Used%=(used*100)/(used+avail) with used=0, avail=0 !
> 
> The normal df (e.g. under SuSE Linux 7.0) has the same problem.  :-)
> 
> P.
> 
> 
> 
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 







More information about the busybox mailing list