]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: don't use %m if there's no error to show
authorLennart Poettering <lennart@poettering.net>
Fri, 5 Oct 2018 20:37:37 +0000 (22:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Oct 2018 20:37:58 +0000 (22:37 +0200)
We are not the ones receiving an error here, but the ones generating it,
hence we shouldn't show it with %m, that's just confusing, as it
suggests we received an error from some other call.

src/cryptsetup/cryptsetup-generator.c

index 24ccf0427341b90f3b6c4c946652d70cdee876a4..6c4aabe57db305ce960f02c5b356bc9ef60845ef 100644 (file)
@@ -152,8 +152,10 @@ static int create_disk(
                         return log_oom();
         }
 
-        if (keydev && !password)
-                return log_error_errno(-EINVAL, "Keydev is specified, but path to the password file is missing: %m");
+        if (keydev && !password) {
+                log_error("Key device is specified, but path to the password file is missing.");
+                return -EINVAL;
+        }
 
         r = generator_open_unit_file(arg_dest, NULL, n, &f);
         if (r < 0)