diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-01 17:43:43 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-01 17:43:43 +0100 |
| commit | 736a2504bbe1014fc2804c311e10b72826a71b74 (patch) | |
| tree | 9817b918ea51d671a283042dbd814940f0d97f17 /util/libreboot-utils/lib/io.c | |
| parent | 249ae57c295c94f4d244251bf5639be305ab2528 (diff) | |
lbutils/file: don't loop EINTR on close()
state is undefined after EINTR. just abort universally.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/io.c')
| -rw-r--r-- | util/libreboot-utils/lib/io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/libreboot-utils/lib/io.c b/util/libreboot-utils/lib/io.c index 801d4c53..5a1b121d 100644 --- a/util/libreboot-utils/lib/io.c +++ b/util/libreboot-utils/lib/io.c @@ -251,8 +251,8 @@ write_to_gbe_bin(void) saved_errno = errno; - close_on_eintr(&f->tmp_fd); - close_on_eintr(&f->gbe_fd); + xclose(&f->tmp_fd); + xclose(&f->gbe_fd); errno = saved_errno; @@ -437,7 +437,7 @@ gbe_mv(void) tmp_gbe_bin_exists = 0; if (f->gbe_fd > -1) { - close_on_eintr(&f->gbe_fd); + xclose(&f->gbe_fd); if (fsync_dir(f->fname) < 0) { f->io_err_gbe_bin = 1; @@ -445,7 +445,7 @@ gbe_mv(void) } } - close_on_eintr(&f->tmp_fd); + xclose(&f->tmp_fd); /* before this function is called, * tmp_fd may have been moved |
