summaryrefslogtreecommitdiff
path: root/include/os.h
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-04-06 08:28:40 -0700
committerKeith Packard <keithp@keithp.com>2012-07-02 22:34:32 -0700
commit164b38c72fe9c69d13ea4f9c46d4ccc46566d826 (patch)
treead76b14f240a7cf7f442b3b4e4937ff8b75e7aaf /include/os.h
parent704b847abfd29e9adde27127a15a963414f8bcf4 (diff)
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>
Diffstat (limited to 'include/os.h')
-rw-r--r--include/os.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h
index 276eb5213..b3f9088c5 100644
--- a/include/os.h
+++ b/include/os.h
@@ -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,