mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-12 06:22:56 +02:00
util/nvmutil: don't write gbe file if errno set
nice bit of defense here we absolutely need this code to be bullet proof Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -292,7 +292,11 @@ main(int argc, char *argv[])
|
||||
|
||||
read_gbe_file();
|
||||
run_cmd(cmd_index);
|
||||
write_gbe_file();
|
||||
|
||||
if (errno)
|
||||
err(errno, "Unhandled error: will not write file: %s", fname);
|
||||
else
|
||||
write_gbe_file();
|
||||
|
||||
if (close(gbe_fd) == -1)
|
||||
err(ECANCELED, "close '%s'", fname);
|
||||
|
||||
Reference in New Issue
Block a user