mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: comment the unhandled errno exit
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -236,6 +236,19 @@ main(int argc, char *argv[])
|
||||
err(ECANCELED, "close '%s'", rname);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We still exit with non-zero status if
|
||||
* errno is set, but we don't need to print
|
||||
* the error on dump commands, because they
|
||||
* already print errors.
|
||||
*
|
||||
* If both parts have bad checksums, then
|
||||
* cmd_dump will cause non-zero exit. If at
|
||||
* least one part is valid, it resets errno.
|
||||
*
|
||||
* However, if we're not using cmd_dump, then
|
||||
* we have a bug somewhere in the code.
|
||||
*/
|
||||
if (cmd != cmd_dump) {
|
||||
if (errno)
|
||||
err(ECANCELED, "Unhandled error on exit");
|
||||
|
||||
Reference in New Issue
Block a user