diff options
author | Michael Brown | 2012-03-26 18:25:08 +0200 |
---|---|---|
committer | Michael Brown | 2012-03-26 18:40:01 +0200 |
commit | e024cd39a877ea1b37b9004dbd8f33448418cb36 (patch) | |
tree | 8bc44239bc5920d06b8381edef5aa37a4784aaf3 /src/include/compiler.h | |
parent | [console] Remove unused "btext" console (diff) | |
download | ipxe-e024cd39a877ea1b37b9004dbd8f33448418cb36.tar.gz ipxe-e024cd39a877ea1b37b9004dbd8f33448418cb36.tar.xz ipxe-e024cd39a877ea1b37b9004dbd8f33448418cb36.zip |
[console] Allow usage to be defined independently for each console
Add the concept of a "console usage", such as "standard output" or
"debug messages". Allow usages to be associated with each console
independently. For example, to send debugging output via the serial
port, while preventing it from appearing on the local console:
#define CONSOLE_SERIAL CONSOLE_USAGE_ALL
#define CONSOLE_PCBIOS ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_DEBUG )
If no usages are explicitly specified, then a default set of usages
will be applied. For example:
#define CONSOLE_SERIAL
will have the same affect as
#define CONSOLE_SERIAL CONSOLE_USAGE_ALL
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r-- | src/include/compiler.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h index 9a751d3b..ed9af237 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -260,19 +260,9 @@ REQUEST_EXPANDED ( CONFIG_SYMBOL ); #ifndef ASSEMBLY -/** printf() for debugging - * - * This function exists so that the DBG() macros can expand to - * printf() calls without dragging the printf() prototype into scope. - * - * As far as the compiler is concerned, dbg_printf() and printf() are - * completely unrelated calls; it's only at the assembly stage that - * references to the dbg_printf symbol are collapsed into references - * to the printf symbol. - */ -extern int __attribute__ (( format ( printf, 1, 2 ) )) -dbg_printf ( const char *fmt, ... ) asm ( "printf" ); - +/** printf() for debugging */ +extern void __attribute__ (( format ( printf, 1, 2 ) )) +dbg_printf ( const char *fmt, ... ); extern void dbg_autocolourise ( unsigned long id ); extern void dbg_decolourise ( void ); extern void dbg_hex_dump_da ( unsigned long dispaddr, |