mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: skip errno check in main
skip it if there is a valid checksum, to mitigate erroneous errno state upon exit from run_cmd(), because we can assume by this point that we are in fact ready to write at this point. the check at the end still exists, which will catch any error set by write, and any error set before that. this fixes a weird warning on cmd_dump. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -501,9 +501,10 @@ main(int argc, char *argv[])
|
||||
errno = 0;
|
||||
run_cmd(cmd_index);
|
||||
|
||||
if (errno)
|
||||
if (errno && (!(part_valid[0] || part_valid[1])))
|
||||
err(errno, "%s: Unhandled error (WRITE SKIPPED)", fname);
|
||||
else if (command[cmd_index].flags == O_RDWR)
|
||||
|
||||
if (command[cmd_index].flags == O_RDWR)
|
||||
write_gbe_file();
|
||||
|
||||
close_files();
|
||||
|
||||
Reference in New Issue
Block a user