From da22bc9ae07dc358ec3a01d0bc8b312e7ea5c3b6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 12 Sep 2024 17:39:33 +0200 Subject: [PATCH] os: log: replace VErrorFSigSafe() by VErrorF() Since VErrorF() is now signal safe, we can use this one instead. Leaving VErrorFSigSafe() macro for backwards compat with drivers. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xwayland/xwayland-screen.c | 2 +- include/os.h | 4 +--- os/log.c | 8 +------- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 764176df5..8435410c2 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -89,7 +89,7 @@ xwl_give_up(const char *f, ...) va_list args; va_start(args, f); - VErrorFSigSafe(f, args); + VErrorF(f, args); va_end(args); CloseWellKnownConnections(); diff --git a/include/os.h b/include/os.h index 02edbdaf8..3304c15d1 100644 --- a/include/os.h +++ b/include/os.h @@ -395,9 +395,6 @@ extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern _X_EXPORT void -VErrorFSigSafe(const char *f, va_list args) -_X_ATTRIBUTE_PRINTF(1, 0); -extern _X_EXPORT void LogPrintMarkers(void); extern _X_EXPORT void @@ -413,5 +410,6 @@ typedef _sigset_t sigset_t; #define LogVMessageVerbSigSafe(...) LogVMessageVerb(__VA_ARGS__) #define LogMessageVerbSigSafe(...) LogMessageVerb(__VA_ARGS__) #define ErrorFSigSafe(...) ErrorF(__VA_ARGS__) +#define VErrorFSigSafe(...) VErrorF(__VA_ARGS__) #endif /* OS_H */ diff --git a/os/log.c b/os/log.c index 22af59534..131bd7239 100644 --- a/os/log.c +++ b/os/log.c @@ -894,7 +894,7 @@ FatalError(const char *f, ...) va_end(apple_args); } #endif - VErrorFSigSafe(f, args); + VErrorF(f, args); va_end(args); ErrorF("\n"); if (!beenhere) @@ -927,12 +927,6 @@ ErrorF(const char *f, ...) va_end(args); } -void -VErrorFSigSafe(const char *f, va_list args) -{ - LogVMessageVerb(X_ERROR, -1, f, args); -} - void LogPrintMarkers(void) {