mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-25 07:46:17 +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,6 +292,10 @@ main(int argc, char *argv[])
|
||||
|
||||
read_gbe_file();
|
||||
run_cmd(cmd_index);
|
||||
|
||||
if (errno)
|
||||
err(errno, "Unhandled error: will not write file: %s", fname);
|
||||
else
|
||||
write_gbe_file();
|
||||
|
||||
if (close(gbe_fd) == -1)
|
||||
|
||||
Reference in New Issue
Block a user