mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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 <leah@libreboot.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user