summaryrefslogtreecommitdiffstats
path: root/sys-utils/umount.c
diff options
context:
space:
mode:
authorKarel Zak2013-06-17 13:02:15 +0200
committerKarel Zak2013-06-17 13:02:15 +0200
commit7ba207e781c7af3945d3a718651b87425685131e (patch)
treed8edf4afc0d81a68f94a68c5421b4446677e70c2 /sys-utils/umount.c
parentlibblkid: support pseudo PARTUUID= for MBR (diff)
downloadkernel-qcow2-util-linux-7ba207e781c7af3945d3a718651b87425685131e.tar.gz
kernel-qcow2-util-linux-7ba207e781c7af3945d3a718651b87425685131e.tar.xz
kernel-qcow2-util-linux-7ba207e781c7af3945d3a718651b87425685131e.zip
libmount: be robust for empty target/source strings
* lib/canonicalize.c: don't interpret empty strings as relative paths * libmount: more robust libmnt_table find function and debug messages References: https://bugzilla.novell.com/show_bug.cgi?id=825150 Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/umount.c')
-rw-r--r--sys-utils/umount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c
index e3f0e2dd0..c3b8187ce 100644
--- a/sys-utils/umount.c
+++ b/sys-utils/umount.c
@@ -236,7 +236,10 @@ static int mk_exit_code(struct libmnt_context *cxt, int rc)
tgt);
break;
case ENOENT:
- warnx(_("%s: not found"), tgt);
+ if (tgt && *tgt)
+ warnx(_("%s: mountpoint not found"), tgt);
+ else
+ warnx(_("undefined mountpoint"));
break;
case EPERM:
warnx(_("%s: must be superuser to unmount"), tgt);