summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/core/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/core/printf.c')
-rw-r--r--contrib/syslinux-4.02/core/printf.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/core/printf.c b/contrib/syslinux-4.02/core/printf.c
new file mode 100644
index 0000000..b1b0466
--- /dev/null
+++ b/contrib/syslinux-4.02/core/printf.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <unistd.h>
+
+#include "core.h"
+
+int printf(const char *format, ...)
+{
+ char buf[1024];
+ va_list ap;
+ int rv;
+
+ va_start(ap, format);
+ rv = vsnprintf(buf, sizeof buf, format, ap);
+ va_end(ap);
+
+ myputs(buf);
+
+ return rv;
+
+}