mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: consistent errors on close()
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user