From 64593971d79bf22127d6c152d42dfcf777e25b0b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 12 Jun 2025 17:18:27 -0700 Subject: [PATCH] Revert "xfre86: drop xf86Msg() in favor of LogMessageVerb()" This reverts commit a136ce3d57831e8ffc476be2bd8c075291b02965. Part-of: --- hw/xfree86/common/xf86.h | 4 +++- hw/xfree86/common/xf86Helper.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index dae11fb9f..bdb73781d 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -248,6 +248,9 @@ extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); extern _X_EXPORT void +xf86Msg(MessageType type, const char *format, ...) +_X_ATTRIBUTE_PRINTF(2, 3); +extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT void @@ -396,6 +399,5 @@ xf86UpdateDesktopDimensions(void); /* only for backwards (source) compatibility */ #define xf86MsgVerb LogMessageVerb -#define xf86Msg(type, ...) LogMessageVerb(type, 1, __VA_ARGS__) #endif /* _XF86_H */ diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 76041262d..7aced73ef 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1095,6 +1095,17 @@ xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...) va_end(ap); } +/* Print non-driver messages with verbose level of 1 (default) */ +void +xf86Msg(MessageType type, const char *format, ...) +{ + va_list ap; + + va_start(ap, format); + LogVMessageVerb(type, 1, format, ap); + va_end(ap); +} + /* Just like ErrorF, but with the verbose level checked */ void xf86ErrorFVerb(int verb, const char *format, ...)