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-26 06:59:41 +0000
commit7530881adc288f2e9eac90eaa4f14f8399a969ac (patch)
tree553728f74e57a3d8cb85bd9010c1ae1da079e7d3
parent2c66b813ef18bf8e31bc15dc7023b843a710e080 (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;