libreboot-utils: much stricter close() handling

remove close_warn and close_no_err

make close_on_eintr a void, and abort
on error instead of returning -1.

a failed file closure is a world-ending
event. burn accordingly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-28 07:30:55 +00:00
parent fd26c6e631
commit 63984a4a6a
5 changed files with 40 additions and 95 deletions
+1 -3
View File
@@ -539,14 +539,12 @@ int secure_file(int *fd,
int check_seek,
int do_lock,
mode_t mode);
int close_on_eintr(int fd);
void close_on_eintr(int *fd);
int fsync_on_eintr(int fd);
int fs_rename_at(int olddirfd, const char *old,
int newdirfd, const char *new);
int fs_open(const char *path, int flags);
void close_no_err(int *fd);
void free_and_set_null(char **buf);
int close_warn(int *fd, char *s);
struct filesystem *rootfs(void);
int fs_resolve_at(int dirfd, const char *path, int flags);
int fs_next_component(const char **p,