summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-08 17:24:25 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-08 17:24:25 +0000
commita0829f7a2774fd42fe55a03840be26f0a1dcf932 (patch)
tree91fbce4c911afdaa0a0255c3670598f2673fd7dc /util/nvmutil
parent624ecc4ce19a33777e1bacca76ed5386469b2b44 (diff)
util/nvmutil: simplified exit error
no more command-specific logic here. this should be the same in the rest of the code now. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index bc5d662f..474e90eb 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -349,28 +349,10 @@ main(int argc, char *argv[])
}
#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_index != CMD_DUMP) {
- if (errno)
- err(ECANCELED, "Unhandled error on exit");
- }
-
if (errno)
- return EXIT_FAILURE;
- else
- return EXIT_SUCCESS;
+ err(ECANCELED, "Unhandled error on exit");
+
+ return EXIT_SUCCESS;
}
/*