daandemeyer / rpms / systemd

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