summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2014-05-26 11:37:02 +0200
committerKarel Zak2014-05-26 11:37:02 +0200
commitfd7c492401b75f606908ed9793cb87e0a3c2dbd8 (patch)
tree6369abf77b6c452c539163cf2cb1de2cb4f8a11c
parentbuild-sys: cleanup bash-completion/ (diff)
downloadkernel-qcow2-util-linux-fd7c492401b75f606908ed9793cb87e0a3c2dbd8.tar.gz
kernel-qcow2-util-linux-fd7c492401b75f606908ed9793cb87e0a3c2dbd8.tar.xz
kernel-qcow2-util-linux-fd7c492401b75f606908ed9793cb87e0a3c2dbd8.zip
umount: add info that --all-targets works with mtab symlink only
Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--sys-utils/umount.84
-rw-r--r--sys-utils/umount.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys-utils/umount.8 b/sys-utils/umount.8
index 94a13f77d..c9e2aca96 100644
--- a/sys-utils/umount.8
+++ b/sys-utils/umount.8
@@ -70,7 +70,9 @@ filesystem is not unmounted.)
Unmount all mountpoints in the current namespace for the specified filesystem.
The filesystem could be specified by one of the mountpoints or device name (or
UUID, etc.). This option could be used together with \fB\-\-recursive\fR then
-all nested mounts within the filesystem are recursively unmounted.
+all nested mounts within the filesystem are recursively unmounted. The
+\fB\-\-all-targets\fR is only supported on systems where /etc/mtab is a symlink
+to /proc/mounts.
.TP
\fB\-c\fR, \fB\-\-no\-canonicalize\fR
Do not canonicalize paths. For more details about this option see the
diff --git a/sys-utils/umount.c b/sys-utils/umount.c
index 0d576595b..1ad9e6aeb 100644
--- a/sys-utils/umount.c
+++ b/sys-utils/umount.c
@@ -435,7 +435,9 @@ static int umount_alltargets(struct libmnt_context *cxt, const char *spec, int r
return mk_exit_code(cxt, rc); /* error */
if (!mnt_fs_get_srcpath(fs) || !mnt_fs_get_devno(fs))
- err(MOUNT_EX_USAGE, _("%s: failed to determine source"), spec);
+ errx(MOUNT_EX_USAGE, _("%s: failed to determine source "
+ "(--all-targets is unsupported on systems with "
+ "regular mtab file)."), spec);
itr = mnt_new_iter(MNT_ITER_BACKWARD);
if (!itr)