From 92c178b6a30a827c48db46ff4238501ec406a28e Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Tue, 22 Nov 2022 12:53:09 -0800 Subject: [PATCH] create-diff-object: use errx() instead of err() Otherwise on recent distros it appends the errno to the error message, like: create-diff-object: ERROR: x86.o: kpatch_regenerate_special_section: 2633: Found 1 unsupported static call(s) in the patched code. Use KPATCH_STATIC_CALL() instead.: Success which is not what we want in most cases. Signed-off-by: Josh Poimboeuf --- kpatch-build/create-diff-object.c | 2 +- kpatch-build/log.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 155cbb2..f44640c 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -56,7 +56,7 @@ #define DIFF_FATAL(format, ...) \ ({ \ fprintf(stderr, "ERROR: %s: " format "\n", childobj, ##__VA_ARGS__); \ - err(EXIT_STATUS_DIFF_FATAL, "unreconcilable difference"); \ + errx(EXIT_STATUS_DIFF_FATAL, "unreconcilable difference"); \ }) char *childobj; diff --git a/kpatch-build/log.h b/kpatch-build/log.h index eefa0fc..dbdc212 100644 --- a/kpatch-build/log.h +++ b/kpatch-build/log.h @@ -9,7 +9,7 @@ extern enum loglevel loglevel; extern char *childobj; #define ERROR(format, ...) \ - err(EXIT_STATUS_ERROR, "ERROR: %s: %s: %d: " format, childobj, __FUNCTION__, __LINE__, ##__VA_ARGS__) + errx(EXIT_STATUS_ERROR, "ERROR: %s: %s: %d: " format, childobj, __FUNCTION__, __LINE__, ##__VA_ARGS__) #define log_debug(format, ...) log(DEBUG, format, ##__VA_ARGS__) #define log_normal(format, ...) log(NORMAL, "%s: " format, childobj, ##__VA_ARGS__)