]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount: add missing validation error message 6322/head
authorLennart Poettering <lennart@poettering.net>
Mon, 10 Jul 2017 19:42:39 +0000 (21:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Jul 2017 19:42:39 +0000 (21:42 +0200)
We really should generate exactly one log message for each error, hence
let's do that in this one case too.

src/mount/mount-tool.c

index c0b0e4630c0fc37dc9dddf1c1ef02e7c4d552b4b..ed6578d54021f88b5c1d1a06b73467c56b383496 100644 (file)
@@ -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)