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>
This commit is contained in:
parent
cc06250f11
commit
8487dbee9f
|
@ -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))
|
if (type && pattern && !mnt_match_fstype(type, pattern))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!mnt_fs_is_pseudofs(fs))
|
if (!mnt_fs_is_pseudofs(fs) && !mnt_fs_is_netfs(fs))
|
||||||
xsrc = mnt_pretty_path(src, cache);
|
xsrc = mnt_pretty_path(src, cache);
|
||||||
printf ("%s on ", xsrc ? xsrc : src);
|
printf ("%s on ", xsrc ? xsrc : src);
|
||||||
safe_fputs(mnt_fs_get_target(fs));
|
safe_fputs(mnt_fs_get_target(fs));
|
||||||
|
|
Loading…
Reference in New Issue