summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-15 00:17:12 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-15 00:17:12 +0000
commit6fc8bca77bd1c54d792a50aea1d1b71af2374afe (patch)
tree576ad5a81967d434dc77e06b5ad757c39dbe2a1a
parentd64d7878e46d498edc1945ce0ab8eb85bb24987e (diff)
comment
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 690cf497..6fc5f4a7 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -2088,6 +2088,16 @@ real_pread_pwrite:
if (!off_reset)
goto err_prw;
+ /*
+ * Even if we allow to continue,
+ * we still need to reset the
+ * offset. If we can't, then
+ * we can't recover at all.
+ *
+ * However, we must preserve
+ * errno in that case, so
+ * just return immediately.
+ */
if (lseek_loop(fd, off, SEEK_SET,
loop_eagain, loop_eintr) == (off_t)-1)
return -1;