summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-03 19:59:35 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-03 19:59:35 +0000
commit3f7d89c4012144c0a04f01f535c0fbbc9cfabcb3 (patch)
tree3e86b49177e079703b08d6762d9e53eb8c7e0a3a /util
parentfd515e4c2845abe55b5ef1ae7096ec149f8c483c (diff)
util/nvmutil: consistent errors on close()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index bb9210b0..30a2b57c 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -124,8 +124,10 @@ main(int argc, char *argv[])
(*cmd)();
write_gbe();
- err_if(close(fd) == -1);
- err_if(close(rfd) == -1);
+ if (close(fd) == -1)
+ err(ECANCELED, "Could not close '%s'", fname);
+ if (close(rfd) == -1)
+ err(ECANCELED, "Could not close '/dev/urandom'");
err_if((errno != 0) && (cmd != cmd_dump));
return errno ? EXIT_FAILURE : EXIT_SUCCESS;