Blame SOURCES/0049-cryptsetup-don-t-use-m-if-there-s-no-error-to-show.patch

a3e2b5
From 95bfd1d2f52698604e44c17dba2082f61b5f8eab Mon Sep 17 00:00:00 2001
a3e2b5
From: Lennart Poettering <lennart@poettering.net>
a3e2b5
Date: Fri, 5 Oct 2018 22:37:37 +0200
a3e2b5
Subject: [PATCH] cryptsetup: don't use %m if there's no error to show
a3e2b5
a3e2b5
We are not the ones receiving an error here, but the ones generating it,
a3e2b5
hence we shouldn't show it with %m, that's just confusing, as it
a3e2b5
suggests we received an error from some other call.
a3e2b5
a3e2b5
(cherry-picked from commit 2abe64666e544be6499f870618185f8819b4c152)
a3e2b5
a3e2b5
Related: #1656869
a3e2b5
---
a3e2b5
 src/cryptsetup/cryptsetup-generator.c | 6 ++++--
a3e2b5
 1 file changed, 4 insertions(+), 2 deletions(-)
a3e2b5
a3e2b5
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
a3e2b5
index 8c7a76e789..52391bd185 100644
a3e2b5
--- a/src/cryptsetup/cryptsetup-generator.c
a3e2b5
+++ b/src/cryptsetup/cryptsetup-generator.c
a3e2b5
@@ -152,8 +152,10 @@ static int create_disk(
a3e2b5
                         return log_oom();
a3e2b5
         }
a3e2b5
 
a3e2b5
-        if (keydev && !password)
a3e2b5
-                return log_error_errno(-EINVAL, "Keydev is specified, but path to the password file is missing: %m");
a3e2b5
+        if (keydev && !password) {
a3e2b5
+                log_error("Key device is specified, but path to the password file is missing.");
a3e2b5
+                return -EINVAL;
a3e2b5
+        }
a3e2b5
 
a3e2b5
         r = generator_open_unit_file(arg_dest, NULL, n, &f);
a3e2b5
         if (r < 0)