summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-07-10 21:42:39 +0200
committerLennart Poettering <lennart@poettering.net>2017-07-10 21:42:39 +0200
commit514368adfbc9104c6226e883b8a68b451780ed23 (patch)
treec1ff633e50be0a9cbaad8bf8be1a2b8d01958a0e
parentaa46fa6420c641552eda6cde5de712cbebbc8dc6 (diff)
downloadsystemd-514368adfbc9104c6226e883b8a68b451780ed23.tar.gz
mount: add missing validation error message
We really should generate exactly one log message for each error, hence let's do that in this one case too.
-rw-r--r--src/mount/mount-tool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c
index c0b0e4630c..ed6578d540 100644
--- a/src/mount/mount-tool.c
+++ b/src/mount/mount-tool.c
@@ -1241,8 +1241,10 @@ static int discover_loop_backing_file(void) {
escaped = xescape(basename(arg_mount_what), "\\");
if (!escaped)
return log_oom();
- if (!filename_is_valid(escaped))
+ if (!filename_is_valid(escaped)) {
+ log_error("Escaped name %s is not a valid filename.", escaped);
return -EINVAL;
+ }
arg_mount_where = strjoin("/run/media/system/", escaped);
if (!arg_mount_where)