mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
@@ -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; \
|
||||
|
||||
Reference in New Issue
Block a user