summaryrefslogtreecommitdiff
path: root/deva/output.h
diff options
context:
space:
mode:
authorneal <neal>2004-11-17 16:21:37 +0000
committerneal <neal>2004-11-17 16:21:37 +0000
commit1742c541aba8b5b4a9677ae532e96ea07c9fa526 (patch)
treeb905847f6c033b0e797f8fd348b74ded2847c301 /deva/output.h
parent84e98be73efcf23492488cc5209c5b0685f5ccbd (diff)
deva/
2004-11-17 Neal H. Walfield <neal@gnu.org> * output.h (debug): Include program_name and __FUNCTION__ in output. laden/ 2004-11-17 Neal H. Walfield <neal@gnu.org> * output.h (debug): Include program_name and __FUNCTION__ in output. physmem/ 2004-11-17 Neal H. Walfield <neal@gnu.org> * output.h (debug): Include program_name and __FUNCTION__ in output. * physmem.c (create_bootstrap_caps): First argument to debug must be a constant format string. task/ 2004-11-17 Neal H. Walfield <neal@gnu.org> * output.h (debug): Include program_name and __FUNCTION__ in output. wortel/ 2004-11-17 Neal H. Walfield <neal@gnu.org> * output.h (debug): Include program_name and __FUNCTION__ in output.
Diffstat (limited to 'deva/output.h')
-rw-r--r--deva/output.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/deva/output.h b/deva/output.h
index be117e3..ae4c67a 100644
--- a/deva/output.h
+++ b/deva/output.h
@@ -34,20 +34,20 @@ int printf (const char *fmt, ...);
void __attribute__((__noreturn__)) shutdown (void);
+/* The program name. */
+extern char program_name[];
+
/* True if debug mode is enabled. */
extern int output_debug;
/* Print a debug message. */
-#define debug(...) \
+#define debug(fmt, ...) \
({ \
if (output_debug) \
- printf (__VA_ARGS__); \
+ printf ("%s:%s: " fmt, program_name, \
+ __FUNCTION__, __VA_ARGS__); \
})
-
-/* The program name. */
-extern char program_name[];
-
/* Print an error message and fail. */
#define panic(...) \
({ \