Skip to content

Commit

Permalink
zipl: Fix error handling for read
Browse files Browse the repository at this point in the history
The return value is not errno.
  • Loading branch information
cgwalters committed Dec 14, 2023
1 parent 876ddd3 commit e9a2a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libostree/ostree-bootloader-zipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e9a2a2c

Please sign in to comment.