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.
This commit is contained in:
Lennart Poettering
2018-10-05 22:37:58 +02:00
parent 880512fe6a
commit 2abe64666e
+4 -2
View 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)