mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
Add LogMessageVerbSigSafe() for logging messages while in signal context
[whot: edited to use varargs, squashed commit below] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> os: fix vararg length calculation Make %u and %x sizeof(unsigned int), %p sizeof(void*). This is printf behaviour and we can't guarantee that void* is uint64_t anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
704b847abf
commit
164b38c72f
2 changed files with 138 additions and 4 deletions
|
|
@ -49,6 +49,7 @@ SOFTWARE.
|
|||
|
||||
#include "misc.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SCREEN_SAVER_ON 0
|
||||
|
|
@ -604,6 +605,12 @@ _X_ATTRIBUTE_PRINTF(3, 4);
|
|||
extern _X_EXPORT void
|
||||
LogMessage(MessageType type, const char *format, ...)
|
||||
_X_ATTRIBUTE_PRINTF(2, 3);
|
||||
extern _X_EXPORT void
|
||||
LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
|
||||
_X_ATTRIBUTE_PRINTF(3, 4);
|
||||
extern _X_EXPORT void
|
||||
LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
|
||||
_X_ATTRIBUTE_PRINTF(3, 0);
|
||||
|
||||
extern _X_EXPORT void
|
||||
LogVHdrMessageVerb(MessageType type, int verb,
|
||||
|
|
|
|||
Loading…
Reference in a new issue