From: Lennart Poettering Date: Mon, 10 Jul 2017 19:42:39 +0000 (+0200) Subject: mount: add missing validation error message X-Git-Tag: v234~13^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=514368adfbc9104c6226e883b8a68b451780ed23;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index c0b0e4630c0..ed6578d5402 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)