summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2009-07-05 04:50:36 +0200
committerDenys Vlasenko2009-07-05 04:50:36 +0200
commit09e63bb81f12707d31c8c4570931af0196b53a46 (patch)
tree1b550ca677e6cd4fdd70eabda1fd402684b8ec7d /coreutils
parent9b1b62adc4e4c1e80d9f72180c6b7b1eaef9f95a (diff)
downloadbusybox-09e63bb81f12707d31c8c4570931af0196b53a46.zip
busybox-09e63bb81f12707d31c8c4570931af0196b53a46.tar.gz
df: fix "df /"
also, clean up mount checks in mkfs/fsck. function old new delta find_mount_point 243 261 +18 sha1_process_block64 497 510 +13 find_main 436 444 +8 display_speed 85 90 +5 df_main 795 793 -2 parse_command 1463 1460 -3 static.ignored_mounts 8 - -8 mkfs_minix_main 2962 2937 -25 fsck_minix_main 3065 2970 -95 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 4/4 up/down: 44/-133) Total: -89 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/df.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index 34b0150..d95aff3 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -44,7 +44,6 @@ int df_main(int argc, char **argv)
FILE *mount_table;
struct mntent *mount_entry;
struct statfs s;
- static const char ignored_mounts[] ALIGN1 = "rootfs\0";
enum {
OPT_KILO = (1 << 0),
@@ -120,7 +119,7 @@ int df_main(int argc, char **argv)
mount_point = *argv++;
if (!mount_point)
break;
- mount_entry = find_mount_point(mount_point, bb_path_mtab_file);
+ mount_entry = find_mount_point(mount_point);
if (!mount_entry) {
bb_error_msg("%s: can't find mount point", mount_point);
set_error:
@@ -154,8 +153,8 @@ int df_main(int argc, char **argv)
) / (blocks_used + s.f_bavail);
}
- /* GNU coreutils 6.10 skip certain mounts, try to be compatible. */
- if (index_in_strings(device, ignored_mounts) != -1)
+ /* GNU coreutils 6.10 skips certain mounts, try to be compatible. */
+ if (strcmp(device, "rootfs") == 0)
continue;
#ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY