diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-31 12:06:33 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-31 12:06:33 +0100 |
| commit | a7695375549797a2894546d51ab8c8c3b093f8a8 (patch) | |
| tree | 93834f74a02a5331507d27cbe03da2ad2c3bd5b9 /util | |
| parent | bca09eebf3db31f8dafde9aa3bdaa6bf5d5c5d0d (diff) | |
lbutils/file: don't alllow EAGAIN/EWOULDBLOCK
a non-blocking file descriptor could be used while
errno is set to these. this would create an infinite
loop. it's better that we only allow EINTR.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/libreboot-utils/lib/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/util/libreboot-utils/lib/file.c b/util/libreboot-utils/lib/file.c index f3fff555..5ab00031 100644 --- a/util/libreboot-utils/lib/file.c +++ b/util/libreboot-utils/lib/file.c @@ -1001,9 +1001,7 @@ close_on_eintr(int *fd) */ #define fs_err_retry() \ if ((rval == -1) && \ - (errno == EINTR || \ - errno == EAGAIN || \ - errno == EWOULDBLOCK)) \ + (errno == EINTR)) \ return 1; \ if (rval >= 0 && !errno) \ errno = saved_errno; \ |
