summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lib/rand.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-28 07:30:55 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-28 07:30:55 +0000
commit63984a4a6abb7a65098f27196fcb6395fc0ada22 (patch)
tree3c7e6e562d82f735f2b27201a0b23abc9afb367e /util/libreboot-utils/lib/rand.c
parentfd26c6e63163d9811a89c3a5ca27a9aa2f61b09f (diff)
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>
Diffstat (limited to 'util/libreboot-utils/lib/rand.c')
-rw-r--r--util/libreboot-utils/lib/rand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c
index 3ca19d0c..99da713c 100644
--- a/util/libreboot-utils/lib/rand.c
+++ b/util/libreboot-utils/lib/rand.c
@@ -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");