aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/dprintf.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-11-19 11:10:00 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-11-19 11:10:00 -0800
commit709cdd1bfa7aace9c76016a15f55b3005b843cc8 (patch)
tree831bf12d78da1570976f8a01c6dc105fac1515b0 /com32/lib/dprintf.c
parenteea0f4d527b1a66fc78b0310a4dbb54ea08a4e96 (diff)
downloadsyslinux-709cdd1bfa7aace9c76016a15f55b3005b843cc8.tar.gz
syslinux-709cdd1bfa7aace9c76016a15f55b3005b843cc8.tar.xz
syslinux-709cdd1bfa7aace9c76016a15f55b3005b843cc8.zip
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/lib/dprintf.c')
-rw-r--r--com32/lib/dprintf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/com32/lib/dprintf.c b/com32/lib/dprintf.c
new file mode 100644
index 00000000..96170237
--- /dev/null
+++ b/com32/lib/dprintf.c
@@ -0,0 +1,17 @@
+/*
+ * dprintf.c
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int dprintf(const char *format, ...)
+{
+ va_list ap;
+ int rv;
+
+ va_start(ap, format);
+ rv = vdprintf(stdout, format, ap);
+ va_end(ap);
+ return rv;
+}