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>
This commit is contained in:
Leah Rowe
2026-03-31 12:06:33 +01:00
parent bca09eebf3
commit a769537554
+1 -3
View File
@@ -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; \