summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-05 22:37:37 +0200
committerLukáš Nykrýn <lnykryn@redhat.com>2018-12-11 17:10:46 +0100
commit95bfd1d2f52698604e44c17dba2082f61b5f8eab (patch)
treef7b8db279c72edae3ea364b777660f4039224635
parent0977e6b34fb5f28fc94f1df32261742881fa9bbe (diff)
downloadsystemd-95bfd1d2f52698604e44c17dba2082f61b5f8eab.tar.gz
cryptsetup: don't use %m if there's no error to show
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. (cherry-picked from commit 2abe64666e544be6499f870618185f8819b4c152) Related: #1656869
-rw-r--r--src/cryptsetup/cryptsetup-generator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
index 8c7a76e789..52391bd185 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/cryptsetup/cryptsetup-generator.c
@@ -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)