summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
authorStanislav Brabec2019-02-06 00:07:54 +0100
committerKarel Zak2019-02-06 11:56:47 +0100
commit8487dbee9f68b2fc9b92a955a5f0f18d60975640 (patch)
tree9be0b74480288609577ba87dc819d4553d44b136 /sys-utils/mount.c
parentcol: improve error message, update regression test (diff)
downloadkernel-qcow2-util-linux-8487dbee9f68b2fc9b92a955a5f0f18d60975640.tar.gz
kernel-qcow2-util-linux-8487dbee9f68b2fc9b92a955a5f0f18d60975640.tar.xz
kernel-qcow2-util-linux-8487dbee9f68b2fc9b92a955a5f0f18d60975640.zip
mount: Do not call mnt_pretty_path() on net file systems.
Calling mnt_pretty_path() on network file systems can cause mangling of the output: root# mount | grep nfs nfs.example.com:/home on /home type nfs4 ... root# mkdir -p nfs.example.com:/home root# mount | grep nfs /root/nfs.example.com:/home on /home type nfs4 ... Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index f4a387b8a..b91d4779a 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -143,7 +143,7 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label)
if (type && pattern && !mnt_match_fstype(type, pattern))
continue;
- if (!mnt_fs_is_pseudofs(fs))
+ if (!mnt_fs_is_pseudofs(fs) && !mnt_fs_is_netfs(fs))
xsrc = mnt_pretty_path(src, cache);
printf ("%s on ", xsrc ? xsrc : src);
safe_fputs(mnt_fs_get_target(fs));