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
+2 -2
View File
@@ -169,7 +169,7 @@ retry_rand:
#if defined(USE_URANDOM) && \
((USE_URANDOM) > 0)
close_no_err(&fd);
close_on_eintr(&fd);
#endif
goto out;
#endif
@@ -179,7 +179,7 @@ out:
err:
#if defined(USE_URANDOM) && \
((USE_URANDOM) > 0)
close_no_err(&fd);
close_on_eintr(&fd);
#endif
err_exit(ECANCELED,
"Randomisation failure, possibly unsupported in your kernel");