From 1ed555b712be6df19dbcf6e744489e3ca3476c77 Mon Sep 17 00:00:00 2001 From: Felipe Sateler Date: Thu, 7 Sep 2017 16:12:35 -0300 Subject: [PATCH] mount: Add message when the target path does not exist Fixes: #6760 --- src/mount/mount-tool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 3c974adddad..2e282ef04ef 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -1004,6 +1004,11 @@ static int action_umount( p = canonicalize_file_name(a); + if (!p) { + r2 = log_error_errno(errno, "Failed to canonicalize path %s: %m", argv[i]); + continue; + } + if (stat(p, &st) < 0) return log_error_errno(errno, "Can't stat %s: %m", p);