diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-11-19 11:10:00 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-11-19 11:10:00 -0800 |
commit | 709cdd1bfa7aace9c76016a15f55b3005b843cc8 (patch) | |
tree | 831bf12d78da1570976f8a01c6dc105fac1515b0 /com32/include/dprintf.h | |
parent | eea0f4d527b1a66fc78b0310a4dbb54ea08a4e96 (diff) | |
download | syslinux-709cdd1bfa7aace9c76016a15f55b3005b843cc8.tar.gz |
dprintf: a generic debug-to-serial infrastructure
Actually provide real infrastructure for debug-to-serial. Very
useful when debugging fullscreen applications, especially under an
emulator like Qemu.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include/dprintf.h')
-rw-r--r-- | com32/include/dprintf.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/com32/include/dprintf.h b/com32/include/dprintf.h new file mode 100644 index 00000000..4c9682c0 --- /dev/null +++ b/com32/include/dprintf.h @@ -0,0 +1,22 @@ +/* + * dprintf.h + */ + +#ifndef _DPRINTF_H +#define _DPRINTF_H + +#ifdef DEBUG + +#include <stdio.h> + +int dprintf(const char *, ...); +int vdprintf(const char *, va_list); + +#else + +#define dprintf(fmt, ...) ((void)(0)) +#define vdprintf(fmt, ap) ((void)(0)) + +#endif /* DEBUG */ + +#endif /* _DPRINTF_H */ |