diff options
author | Ron Yorston <rmy@pobox.com> | 2019-04-01 10:21:42 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-04-01 10:21:42 +0100 |
commit | 8b340122e5c5014358a4919d1e87ef2f81c83b6f (patch) | |
tree | 2aa63b22070dd9ccd5d54104b092b7e5c060b2b0 /shell | |
parent | f6228015354adbdbbc736b33296112bebbc96cf3 (diff) | |
download | busybox-w32-8b340122e5c5014358a4919d1e87ef2f81c83b6f.tar.gz busybox-w32-8b340122e5c5014358a4919d1e87ef2f81c83b6f.tar.bz2 busybox-w32-8b340122e5c5014358a4919d1e87ef2f81c83b6f.zip |
df: display origin of mapped drive
When a drive is mapped to a network share or a path display the
mapping in the 'Filesystem' column of df's output.
Since this changes the mnt_fsname field of the mntent structure
a slight alteration is needed to print_all_cwd() in ash.
Revert the change in commit a8c63f25b that enabled FEATURE_DF_FANCY
in the default configuration. None of the additional options is
very useful.
See GitHub issue #164.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 8a3c3ae35..68512799e 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3185,7 +3185,8 @@ print_all_cwd(void) | |||
3185 | mnt = setmntent(bb_path_mtab_file, "r"); | 3185 | mnt = setmntent(bb_path_mtab_file, "r"); |
3186 | if (mnt) { | 3186 | if (mnt) { |
3187 | while ((entry=getmntent(mnt)) != NULL) { | 3187 | while ((entry=getmntent(mnt)) != NULL) { |
3188 | if (get_drive_cwd(entry->mnt_fsname, buffer, PATH_MAX) != NULL) | 3188 | entry->mnt_dir[2] = '\0'; |
3189 | if (get_drive_cwd(entry->mnt_dir, buffer, PATH_MAX) != NULL) | ||
3189 | out1fmt("%s\n", buffer); | 3190 | out1fmt("%s\n", buffer); |
3190 | } | 3191 | } |
3191 | endmntent(mnt); | 3192 | endmntent(mnt); |