From 7ba207e781c7af3945d3a718651b87425685131e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 17 Jun 2013 13:02:15 +0200 Subject: 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 Signed-off-by: Karel Zak --- sys-utils/umount.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys-utils/umount.c') 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); -- cgit v1.2.3-55-g7522