util/nvmutil pread: rw_over_nrw exit, not set

otherwise, if it's -1 and errno happens to be
EINTR or EAGAIN, we might loop on what is a
real error. this bug fixes that edge case.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-15 01:45:23 +00:00
parent 2a0a903a5e
commit c442225fa3

View File

@@ -2126,7 +2126,8 @@ real_pread_pwrite:
else if (rw_type == IO_PWRITE)
r = write(fd, mem, nrw);
r = rw_over_nrw(r, nrw);
if (rw_over_nrw(r, nrw) == -1)
return -1;
} while (r == -1 &&
(errno == try_err(loop_eintr, EINTR)