diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-01 19:17:32 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-01 19:17:32 +0100 |
| commit | a6d2de4e888b42e6fad53240d97b6cc2f06bf79f (patch) | |
| tree | 58611fcb8ee66e5214f93454dce14c4e274f23bf /util/libreboot-utils/lib/file.c | |
| parent | d12ca7fd8ee9e090b784812648a101335e507a2c (diff) | |
libreboot-utils: don't loop lseek on EINTR
not necessary.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/file.c')
| -rw-r--r-- | util/libreboot-utils/lib/file.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/util/libreboot-utils/lib/file.c b/util/libreboot-utils/lib/file.c index ae7f007d..986bf788 100644 --- a/util/libreboot-utils/lib/file.c +++ b/util/libreboot-utils/lib/file.c @@ -608,7 +608,7 @@ open_file_on_eintr(const char *path, exitf("%s: not a regular file", path); } - if (lseek_on_eintr(*fd, 0, SEEK_CUR) == (off_t)-1) + if (lseek(*fd, 0, SEEK_CUR) == (off_t)-1) exitf("%s: file not seekable", path); errno = saved_errno; /* see previous comment */ @@ -670,20 +670,6 @@ openat_on_eintr(int dirfd, const char *path, } #endif -off_t -lseek_on_eintr(int fd, off_t off, int whence) -{ - int saved_errno = errno; - off_t rval = 0; - errno = 0; - - while (off_retry(saved_errno, - rval = lseek(fd, off, whence))); - - reset_caller_errno(rval); - return rval; -} - int mkdirat_on_eintr(int dirfd, const char *path, mode_t mode) |
