From b365781a4c9f650cacb099ded749c2644e236d4b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 15 Mar 2026 01:52:06 +0000 Subject: 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 --- util/nvmutil/nvmutil.c | 6 ++++-- 1 file 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) -- cgit v1.2.1