From e9a2a2cf25fc5070d6a0e74f86f45be2675daadd Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 14 Dec 2023 08:00:38 -0500 Subject: [PATCH] zipl: Fix error handling for read The return value is not errno. --- src/libostree/ostree-bootloader-zipl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libostree/ostree-bootloader-zipl.c b/src/libostree/ostree-bootloader-zipl.c index 43a74cace5..d6fb7ebd3e 100644 --- a/src/libostree/ostree-bootloader-zipl.c +++ b/src/libostree/ostree-bootloader-zipl.c @@ -149,8 +149,8 @@ _ostree_secure_boot_is_enabled (gboolean *out_enabled, GCancellable *cancellable while (*out_enabled != TRUE && max_lines > 0) { char buf[1024]; - ssize_t len = read (fd, buf, sizeof (buf)); - if (len == -EAGAIN) + ssize_t len = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf))); + if (len < 0) break; *out_enabled = strstr (buf, "Secure-IPL enabled") != NULL; --max_lines;