libreboot-utils/lib: loop eintr on [p]read/[p]write

i forgot to do this!

with this, I/O should be bullet proof now.
i already loop this on other I/O commands.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-29 14:15:34 +01:00
parent a56903a7b0
commit ac04a5f50a
3 changed files with 121 additions and 7 deletions
+8
View File
@@ -482,6 +482,14 @@ ssize_t rw_over_nrw(ssize_t r, size_t nrw);
off_t lseek_on_eintr(int fd, off_t off,
int whence, int loop_eagain, int loop_eintr);
int try_err(int loop_err, int errval);
ssize_t read_on_eintr(int fd,
void *buf, size_t count);
ssize_t write_on_eintr(int fd,
void *buf, size_t count);
ssize_t pread_on_eintr(int fd,
void *buf, size_t count, off_t off);
ssize_t pwrite_on_eintr(int fd,
void *buf, size_t count, off_t off);
/* Error handling and cleanup
*/