util/cbmem: Change abort() to exit(1) in die()

Call to abort() in die() causes many tools to assume that the cbmem util
crashed even in case of just incorrect parameters. Changing it to
exit(1) allows for easier error handling by just getting the exit code
instead of having to handle SIGABRT.

Change-Id: Ic59e3479dcbe090a43878bf773409781729146c8
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88981
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Jakub Czapiga 2025-08-28 09:50:34 +00:00 committed by Matt DeVillier
commit 4fd3cb35c2

View file

@ -20,7 +20,7 @@ extern int cbmem_util_verbose;
#define die(x...) \
do { \
fprintf(stderr, x); \
abort(); \
exit(1); \
} while (0)
struct cbmem_console {