diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-29 14:15:34 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-29 14:15:34 +0100 |
| commit | ac04a5f50abdbf241d14bce845051051eb80b137 (patch) | |
| tree | cfded5c593ca2ca6edb3574685f648795450b8e6 /util/libreboot-utils/include | |
| parent | a56903a7b04e7f0a563850b8607261ce60cd9e1e (diff) | |
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>
Diffstat (limited to 'util/libreboot-utils/include')
| -rw-r--r-- | util/libreboot-utils/include/common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h index aa5d043a..0ccc02aa 100644 --- a/util/libreboot-utils/include/common.h +++ b/util/libreboot-utils/include/common.h @@ -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 */ |
