]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: use log_warning_errno() where we can, instead of log_warning()
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Nov 2020 12:56:48 +0000 (13:56 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 25 Nov 2020 12:21:27 +0000 (13:21 +0100)
src/cryptsetup/cryptsetup.c

index f0761ac8aa53b62812b0b758a62ea58fd180bd2d..5f9d7bb3bbb8ce9a9aa5eabf54cd9de996422356 100644 (file)
@@ -448,10 +448,9 @@ static int get_password(
 
                 assert(strv_length(passwords2) == 1);
 
-                if (!streq(passwords[0], passwords2[0])) {
-                        log_warning("Passwords did not match, retrying.");
-                        return -EAGAIN;
-                }
+                if (!streq(passwords[0], passwords2[0]))
+                        return log_warning_errno(SYNTHETIC_ERRNO(EAGAIN),
+                                                 "Passwords did not match, retrying.");
         }
 
         strv_uniq(passwords);