summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/include/common.h
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-04-01 16:11:50 +0100
committerLeah Rowe <leah@libreboot.org>2026-04-01 16:19:46 +0100
commitf68cedf202c1fc6c39243136a4d766bc1d67cc80 (patch)
treed9b2bccaaa19437aafe4e95ed56bfdebf2730b98 /util/libreboot-utils/include/common.h
parent5b465d3af6d61c3a1dc69d727948bef470b7be46 (diff)
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>
Diffstat (limited to 'util/libreboot-utils/include/common.h')
-rw-r--r--util/libreboot-utils/include/common.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h
index 5058317c..2e8cb9a7 100644
--- a/util/libreboot-utils/include/common.h
+++ b/util/libreboot-utils/include/common.h
@@ -83,10 +83,6 @@
#error "Unexpected bit layout"
#endif
-#ifndef MAX_ZERO_RW_RETRY
-#define MAX_ZERO_RW_RETRY 5
-#endif
-
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
@@ -462,7 +458,7 @@ ssize_t rw_gbe_file_exact(int fd, unsigned char *mem, size_t nrw,
int fsync_dir(const char *path);
ssize_t rw_file_exact(int fd, unsigned char *mem, size_t len,
- off_t off, int rw_type, size_t max_retries);
+ off_t off, int rw_type);
ssize_t rw(int fd, void *mem, size_t nrw,
off_t off, int rw_type);
int io_args(int fd, void *mem, size_t nrw,