summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-15 01:52:06 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-15 01:52:06 +0000
commitb365781a4c9f650cacb099ded749c2644e236d4b (patch)
tree13cbf00a9348af610a0750740659f637d9d02fb9 /util/nvmutil
parentc442225fa37a2889221407deb7ab1883348bf83d (diff)
no, break instead
in the last patch, i return, which then avoids resetting the offset. prw is very careful not to return early. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 60aacf07..55af4395 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -2126,8 +2126,10 @@ real_pread_pwrite:
else if (rw_type == IO_PWRITE)
r = write(fd, mem, nrw);
- if (rw_over_nrw(r, nrw) == -1)
- return -1;
+ if (rw_over_nrw(r, nrw) == -1) {
+ errno = EIO;
+ break;
+ }
} while (r == -1 &&
(errno == try_err(loop_eintr, EINTR)