mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user