summaryrefslogtreecommitdiff
path: root/src/cryptsetup
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-05 22:37:37 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-05 22:37:58 +0200
commit2abe64666e544be6499f870618185f8819b4c152 (patch)
tree1804e3be18c1a64d5ba5ff284d450b898a2a8e88 /src/cryptsetup
parent880512fe6aed8c824c536994d71859ed9a76e5eb (diff)
downloadsystemd-2abe64666e544be6499f870618185f8819b4c152.tar.gz
systemd-2abe64666e544be6499f870618185f8819b4c152.tar.bz2
systemd-2abe64666e544be6499f870618185f8819b4c152.zip
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.
Diffstat (limited to 'src/cryptsetup')
-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 24ccf04273..6c4aabe57d 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)