summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-02-23 17:08:32 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-02-23 17:08:32 +0100
commite20a703fd34fa0f3ac17c53d868735a99d794a3e (patch)
tree6c28bf545fd7048061ccf56160ba3fcd9dd712d4
parent58cd6e1adef72e0c71c4ab9213196a720c9a926d (diff)
downloadbusybox-w32-e20a703fd34fa0f3ac17c53d868735a99d794a3e.tar.gz
busybox-w32-e20a703fd34fa0f3ac17c53d868735a99d794a3e.tar.bz2
busybox-w32-e20a703fd34fa0f3ac17c53d868735a99d794a3e.zip
df: do "rootfs" check sooner
function old new delta df_main 1065 1064 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/df.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index 1ed09d015..50dccac52 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -206,6 +206,11 @@ int df_main(int argc UNUSED_PARAM, char **argv)
206 } 206 }
207 207
208 device = mount_entry->mnt_fsname; 208 device = mount_entry->mnt_fsname;
209
210 /* GNU coreutils 6.10 skips certain mounts, try to be compatible */
211 if (ENABLE_FEATURE_SKIP_ROOTFS && strcmp(device, "rootfs") == 0)
212 continue;
213
209 mount_point = mount_entry->mnt_dir; 214 mount_point = mount_entry->mnt_dir;
210 fs_type = mount_entry->mnt_type; 215 fs_type = mount_entry->mnt_type;
211 216
@@ -245,10 +250,6 @@ int df_main(int argc UNUSED_PARAM, char **argv)
245 blocks_percent_used = u / (unsigned)blocks_total; 250 blocks_percent_used = u / (unsigned)blocks_total;
246 } 251 }
247 252
248 /* GNU coreutils 6.10 skips certain mounts, try to be compatible. */
249 if (ENABLE_FEATURE_SKIP_ROOTFS && strcmp(device, "rootfs") == 0)
250 continue;
251
252#ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY 253#ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY
253 if (strcmp(device, "/dev/root") == 0) { 254 if (strcmp(device, "/dev/root") == 0) {
254 /* Adjusts device to be the real root device, 255 /* Adjusts device to be the real root device,