diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-31 11:41:27 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-31 11:45:21 +0100 |
| commit | aacf9fb6c9f6f364c8d1799b02f4d5fc0f63e98f (patch) | |
| tree | a166d0f2630db46c36266fdeffe7137bb63ac0ff /util/libreboot-utils/include | |
| parent | f2dd830c7b9f283ba8db26c7cbb29fb1763f86aa (diff) | |
libreboot-utils: unified EINTR loop handling
absolutely unified.
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, 6 insertions, 2 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h index 12c6c486..b2e6f0d9 100644 --- a/util/libreboot-utils/include/common.h +++ b/util/libreboot-utils/include/common.h @@ -497,6 +497,10 @@ 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); +int off_retry(int saved_errno, off_t rval); +int sys_retry(int saved_errno, long rval); +int fs_retry(int saved_errno, int rval); +int rw_retry(int saved_errno, ssize_t rval); /* Error handling and cleanup */ @@ -557,7 +561,7 @@ int fs_rename_at(int olddirfd, const char *old, int newdirfd, const char *new); int fs_open(const char *path, int flags); void free_and_set_null(char **buf); -void open_on_eintr(const char *path, int *fd, int flags, mode_t mode, +void open_file_on_eintr(const char *path, int *fd, int flags, mode_t mode, struct stat *st); struct filesystem *rootfs(void); int fs_resolve_at(int dirfd, const char *path, int flags); @@ -567,7 +571,7 @@ int fs_open_component(int dirfd, const char *name, int flags, int is_last); int fs_dirname_basename(const char *path, char **dir, char **base, int allow_relative); -int openat2p(int dirfd, const char *path, +int openat_on_eintr(int dirfd, const char *path, int flags, mode_t mode); int mkdirat_on_eintr(int dirfd, const char *pathname, mode_t mode); |
