From c721d6f4f45c8212d79c03b92622ea8850d76bbd Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 3 Mar 2026 03:43:06 +0000 Subject: util/nvmutil: use EXIT_FAILURE/SUCCESS for exits this, in conjunction with the centralised exit scheme now used by nvmutil, means that we have portable exit status. notwithstanding the use of non-portable unix functions, and especially the use of non-standard err.c (which GNU and BSD libc implementations all have anyway, as does musl). this code should now run on essentially any computer with Linux or BSD on it. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 81654d41..8314ba44 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -92,7 +92,7 @@ main(int argc, char *argv[]) writeGbe(); err_if((errno != 0) && (cmd != cmd_dump)); - return errno ? 1 : 0; + return errno ? EXIT_FAILURE : EXIT_SUCCESS; } void @@ -488,5 +488,5 @@ int set_err(int x) { errno = errno ? errno : x; - return 1; + return EXIT_FAILURE; } -- cgit v1.2.1