summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-15 01:52:06 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:41 +0000
commit572f00e7b7906ae0add8c27c9967124ca7d8c170 (patch)
tree44e7cb72599c72b4ea0953a7bee9d48f6c1b3798 /util
parentd890a6b1387e392076a64799298ae18a812a42ae (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')
-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)