From 4fd3cb35c268ac291c971a8067aa71c6d2540050 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Thu, 28 Aug 2025 09:50:34 +0000 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/88981 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Julius Werner --- util/cbmem/cbmem_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cbmem/cbmem_util.h b/util/cbmem/cbmem_util.h index 738e7d35b9..3df0eabe7d 100644 --- a/util/cbmem/cbmem_util.h +++ b/util/cbmem/cbmem_util.h @@ -20,7 +20,7 @@ extern int cbmem_util_verbose; #define die(x...) \ do { \ fprintf(stderr, x); \ - abort(); \ + exit(1); \ } while (0) struct cbmem_console {