diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-07-10 21:42:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-07-10 21:42:39 +0200 |
commit | 514368adfbc9104c6226e883b8a68b451780ed23 (patch) | |
tree | c1ff633e50be0a9cbaad8bf8be1a2b8d01958a0e /src/mount | |
parent | mount: change find_loop_device() error code when no loop device is found to E... (diff) | |
download | systemd-514368adfbc9104c6226e883b8a68b451780ed23.tar.xz systemd-514368adfbc9104c6226e883b8a68b451780ed23.zip |
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.
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 4 |
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) |