libreboot-utils/file: never retry file rw on zero

even with a timer, it's possible that on a buggy system,
we may keep writing even though the outcome is zero. if
a system comes back with zero bytes written, that is a
fatal bug and we should stop.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-04-01 16:11:50 +01:00
parent 5b465d3af6
commit f68cedf202
4 changed files with 8 additions and 23 deletions
+1 -1
View File
@@ -493,7 +493,7 @@ cat_buf(unsigned char *b)
exitf("null pointer in cat command");
if (rw_file_exact(STDOUT_FILENO, b,
GBE_PART_SIZE, 0, IO_WRITE, MAX_ZERO_RW_RETRY) < 0)
GBE_PART_SIZE, 0, IO_WRITE) < 0)
exitf("stdout: cat");
}
void