This is a rather broad brush, logging all messages in DBG() through the
signal-safe interface instead of just the ones that really need it.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
I've got a patch for upstream to stop the server from preventing
signal-unsafe logging but this is still the fix we need eventually. Note
that the sigsafe printing API isn't as powerful as normal printf, so we'll
have to go through each debug message and audit it for the features the
server doesn't do yet (currently, this is includes field width specifiers)

Also, because it's not visible from this diff context,
LogMessageVerbSigSafe() is expanded to xf86MsgVerb on ABI < 18.

 src/xf86Wacom.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index 36be9d7..2475550 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -61,9 +61,9 @@
 #define DBG(lvl, priv, ...) \
        do { \
                if ((lvl) <= priv->debugLevel) { \
-                       xf86Msg(X_INFO, "%s (%d:%s): ", \
+                       LogMessageVerbSigSafe(X_INFO, -1, "%s (%d:%s): ", \
                                ((WacomDeviceRec*)priv)->name, lvl, __func__); \
-                       xf86Msg(X_NONE, __VA_ARGS__); \
+                       LogMessageVerbSigSafe(X_NONE, -1, __VA_ARGS__); \
                } \
        } while (0)
 #else
-- 
1.7.11.2


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to