Notes |
(0010804)
vda
08-27-08 14:33
|
It's coreutils compat:
bash-3.2# /usr/bin/df --version
df (GNU coreutils) 6.9
...
bash-3.2# /usr/bin/df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 964500 598724 316780 66% /
/dev/root 964500 598724 316780 66% /
/dev/sda6 15622684 7281860 8340824 47% /.share
/dev/sda7 97656112 94548720 3107392 97% /.1
/dev/sda8 171930376 148124504 23805872 87% /.2
/dev/sda6 15622684 7281860 8340824 47% /.local
bash-3.2# df --help
BusyBox v1.12.0.svn (2008-08-21 01:18:52 CEST) multi-call binary
bash-3.2# df
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 964500 598724 316780 65% /
/dev/root 964500 598724 316780 65% /
/dev/sda6 15622684 7281860 8340824 47% /.share
/dev/sda7 97656112 94548720 3107392 97% /.1
/dev/sda8 171930376 148124504 23805872 86% /.2
/dev/sda6 15622684 7281860 8340824 47% /.local |
| |
(0010814)
vda
08-27-08 14:34
|
If you can find a case where we differ from coreutils df, *that* is probably a bug. |
| |
(0010834)
zhuangyy
08-27-08 18:15
|
my debian box:
test:~# df --version
df (GNU coreutils) 5.97
...
test:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 76185728 1729628 70586044 3% /
tmpfs 124168 0 124168 0% /lib/init/rw
udev 10240 40 10200 1% /dev
tmpfs 124168 0 124168 0% /dev/shm
I guess /dev/root will be displayed if there is no /etc/fstab exist.
how about add an option to busybox df? if this option is on, df will ignore rootfs and output the real device of /dev/root (find_block_device("/")). so a shell script can use df to find the real root device and then run fsck or other operations on it.
I am maintaining a program running on multiple hardware platforms of different root devices.
If you do not want to include this feature in busybox official release, would you please keep those codes so i can patch the df.c myself? |
| |
(0010844)
bernhardf
08-28-08 00:21
|
$ df --version 2>&1 >&1 | sed 1q
df (GNU coreutils) 6.10
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda6 85546040 76371096 4829364 95% /
tmpfs 1037552 0 1037552 0% /lib/init/rw
udev 10240 112 10128 2% /dev
tmpfs 1037552 0 1037552 0% /dev/shm
/dev/sda3 482246 78194 379152 18% /boot
$ /tmp/busybox/busybox df
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 85546040 76371096 4829364 94% /
udev 10240 112 10128 1% /dev
/dev/sda6 85546040 76371096 4829364 94% /
/dev/sda6 85546040 76371096 4829364 94% /dev/.static/dev
tmpfs 1037552 0 1037552 0% /lib/init/rw
tmpfs 1037552 0 1037552 0% /dev/shm
/dev/sda3 482246 78194 379152 17% /boot
The input is as follows:
$ cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/sda6 / ext3 rw 0 0
/dev/sda6 /dev/.static/dev ext3 rw 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
/dev/sda3 /boot ext3 ro 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
automount(pid4299) /home autofs
nfsd /proc/fs/nfsd nfsd rw 0 0 |
| |
(0011184)
vda
09-08-08 11:06
|
fixed in svn (patch by Bernhard) |
| |