diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-15 01:45:23 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-15 01:45:23 +0000 |
| commit | c442225fa37a2889221407deb7ab1883348bf83d (patch) | |
| tree | f8684615820eb685f8af257329d9a129b1ee2e3e | |
| parent | 2a0a903a5eee287145b3ae6e31f5adbce0e7dcac (diff) | |
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>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index f1ea171b..60aacf07 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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) |
