From 8b340122e5c5014358a4919d1e87ef2f81c83b6f Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 1 Apr 2019 10:21:42 +0100 Subject: 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. --- shell/ash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shell') 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) mnt = setmntent(bb_path_mtab_file, "r"); if (mnt) { while ((entry=getmntent(mnt)) != NULL) { - if (get_drive_cwd(entry->mnt_fsname, buffer, PATH_MAX) != NULL) + entry->mnt_dir[2] = '\0'; + if (get_drive_cwd(entry->mnt_dir, buffer, PATH_MAX) != NULL) out1fmt("%s\n", buffer); } endmntent(mnt); -- cgit v1.2.3-55-g6feb