summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-01-11 09:01:05 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-01-13 09:03:05 +1000
commitc495a839ace7fcc1f1fe414d3d3ba04f08885434 (patch)
tree9dee5d07d2a3fa60fe682ec6a00d4d3b19726ba0
parentbbb6b8c834e0e1491ca14403b5d0840dd14380d3 (diff)
include: prettify BUG_WARN output
ErrorF output is prefixed with a timestamp, so the previous output would look like this: [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' BUG: getevents.c:842 in scale_to_desktop() Change this to have the prefix on both lines: [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' [ 50.423] BUG: getevents.c:842 in scale_to_desktop() Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
-rw-r--r--include/misc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/misc.h b/include/misc.h
index 3d08511ec..3f57f4b1a 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -364,7 +364,8 @@ extern _X_EXPORT unsigned long serverGeneration;
/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
#define __BUG_WARN_MSG(cond, with_msg, ...) \
do { if (cond) { \
- ErrorF("BUG: triggered 'if (" #cond ")'\nBUG: %s:%d in %s()\n", \
+ ErrorF("BUG: triggered 'if (" #cond ")'\n"); \
+ ErrorF("BUG: %s:%d in %s()\n", \
__FILE__, __LINE__, __func__); \
if (with_msg) ErrorF(__VA_ARGS__); \
xorg_backtrace(); \