mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 15:03:44 +02:00
lbutils/file: don't loop EINTR on close()
state is undefined after EINTR. just abort universally. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user