diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-19 07:43:43 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-19 07:43:43 +0000 |
| commit | dcf698b9a0b33d08a70be40631e8c502e909a2a5 (patch) | |
| tree | 0e79606e649e7282256140f9cec35776636f2cea /util | |
| parent | 2eee2b5cac33adf9e297842f98cdc1d9d3bdc0a2 (diff) | |
nvmutil: don't have finite eintr wait
this is technically incorrect. we don't control
faults in the hardware.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/include/common.h | 4 | ||||
| -rw-r--r-- | util/nvmutil/lib/file.c | 9 |
2 files changed, 1 insertions, 12 deletions
diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h index 270e5994..ae805548 100644 --- a/util/nvmutil/include/common.h +++ b/util/nvmutil/include/common.h @@ -59,10 +59,6 @@ int fchmod(int fd, mode_t mode); #define HAVE_REAL_PREAD_PWRITE 0 #endif -#ifndef MAX_EAGAIN_RETRIES -#define MAX_EAGAIN_RETRIES 100000 -#endif - #ifndef LOOP_EAGAIN #define LOOP_EAGAIN 1 #endif diff --git a/util/nvmutil/lib/file.c b/util/nvmutil/lib/file.c index d9ec3011..338f3837 100644 --- a/util/nvmutil/lib/file.c +++ b/util/nvmutil/lib/file.c @@ -606,12 +606,6 @@ prw(int fd, void *mem, unsigned long nrw, int loop_eagain, int loop_eintr, int off_reset) { -#ifndef MAX_EAGAIN_RETRIES - unsigned long retries = 100000; -#else - unsigned long retries = MAX_EAGAIN_RETRIES; -#endif - long r; int positional_rw; struct stat st; @@ -740,8 +734,7 @@ real_pread_pwrite: } while (r == -1 && (errno == try_err(loop_eintr, EINTR) || - errno == try_err(loop_eagain, EAGAIN)) && - retries++ < MAX_EAGAIN_RETRIES); + errno == try_err(loop_eagain, EAGAIN))); } saved_errno = errno; |
