ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
c2dfb7
From ea0c4c31f6dff7d01e585bd8d5f962b373844544 Mon Sep 17 00:00:00 2001
c2dfb7
From: Lennart Poettering <lennart@poettering.net>
c2dfb7
Date: Mon, 21 Jan 2019 20:13:11 +0100
c2dfb7
Subject: [PATCH] cryptsetup: add some commenting about EAGAIN generation
c2dfb7
c2dfb7
(cherry picked from commit b7a0fead10959b03a1fa642a5ae7aca3a6a3dee9)
c2dfb7
c2dfb7
Related: #1776408
c2dfb7
---
c2dfb7
 src/cryptsetup/cryptsetup.c | 2 +-
c2dfb7
 1 file changed, 1 insertion(+), 1 deletion(-)
c2dfb7
c2dfb7
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
c2dfb7
index 0881aea915..f2b2557497 100644
c2dfb7
--- a/src/cryptsetup/cryptsetup.c
c2dfb7
+++ b/src/cryptsetup/cryptsetup.c
c2dfb7
@@ -455,7 +455,7 @@ static int attach_tcrypt(
c2dfb7
                 r = read_one_line_file(key_file, &passphrase);
c2dfb7
                 if (r < 0) {
c2dfb7
                         log_error_errno(r, "Failed to read password file '%s': %m", key_file);
c2dfb7
-                        return -EAGAIN;
c2dfb7
+                        return -EAGAIN; /* log with the actual error, but return EAGAIN */
c2dfb7
                 }
c2dfb7
 
c2dfb7
                 params.passphrase = passphrase;