[BusyBox] patch for bug in coreutils/df.c
Ramon Bastiaans
bastiaans at sara.nl
Wed May 19 07:00:59 UTC 2004
Hi,
Not sure if this is the correct way to submit a patch, but I found a
little bug in the "df" module. I came across this when trying to
integrate the new busybox into a ramdisk we use for systemimager. Here
is what the problem was:
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 1824 1824 0 100% /old_root
tmpfs 258068 12576 245492 5% /
/dev/hda1 2099680 1747976 351704 83% /a
/dev/hda4 15610380 256 15610124 0% /a/scratch
/dev/hda2 2099712 158240 1941472 8% /a/var
# df /a /old_root
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda1 2099680 1747976 351704 83% /a
/dev/root 1824 1824 0 100% /old_root
# df /
Filesystem 1k-blocks Used Available Use% Mounted on
#
As you can see for the last command "df /", it doesn't display any
output for the rootfs, which messed up the systemimager boot shell
scripts.
I traced the bug, which was caused by a incorrect "continue" statement.
I fixed it, and added a little check so it doesn't display mountpoints
multiple times
I included my diff patch as a attachment to this e-mail, let me know if
you find this usefull.
Kind regards,
Ramon.
--
Ramon Bastiaans
SARA - Academic Computing Services
Kruislaan 415
1098 SJ Amsterdam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox.df.fix.patch
Type: application/octet-stream
Size: 3901 bytes
Desc: busybox.df.fix.patch
Url : http://lists.busybox.net/pipermail/busybox/attachments/20040519/e2024919/attachment.obj
More information about the busybox
mailing list