[PATCH] include: add an X_DEBUG message type

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 13 22:32:35 PDT 2012


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Just a nice-to-have, makes grep a tad easier.

 include/os.h |    1 +
 os/log.c     |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/os.h b/include/os.h
index 48ce329..1e90cc5 100644
--- a/include/os.h
+++ b/include/os.h
@@ -516,6 +516,7 @@ typedef enum {
     X_INFO,			/* Informational message */
     X_NONE,			/* No prefix */
     X_NOT_IMPLEMENTED,		/* Not implemented */
+    X_DEBUG,			/* Debug message */
     X_UNKNOWN = -1		/* unknown -- this must always be last */
 } MessageType;
 
diff --git a/os/log.c b/os/log.c
index 671a01b..5a2e5a8 100644
--- a/os/log.c
+++ b/os/log.c
@@ -164,6 +164,9 @@ asm (".desc ___crashreporter_info__, 0x10");
 #ifndef X_NOT_IMPLEMENTED_STRING
 #define X_NOT_IMPLEMENTED_STRING	"(NI)"
 #endif
+#ifndef X_DEBUG
+#define X_DEBUG_STRING                  "(DB)"
+#endif
 #ifndef X_NONE_STRING
 #define X_NONE_STRING                   ""
 #endif
@@ -361,6 +364,8 @@ LogMessageTypeVerbString(MessageType type, int verb)
 	return X_UNKNOWN_STRING;
     case X_NONE:
 	return X_NONE_STRING;
+    case X_DEBUG:
+	return X_DEBUG_STRING;
     default:
 	return X_UNKNOWN_STRING;
     }
-- 
1.7.7.6



More information about the xorg-devel mailing list