From: Karel Zak Date: Mon, 26 May 2014 09:37:02 +0000 (+0200) Subject: umount: add info that --all-targets works with mtab symlink only X-Git-Tag: v2.25-rc1~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd7c492401b75f606908ed9793cb87e0a3c2dbd8;p=thirdparty%2Futil-linux.git umount: add info that --all-targets works with mtab symlink only Reported-by: Ruediger Meier Signed-off-by: Karel Zak --- diff --git a/sys-utils/umount.8 b/sys-utils/umount.8 index 94a13f77db..c9e2aca960 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 0d576595b6..1ad9e6aeb9 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)