summaryrefslogtreecommitdiffstats
path: root/pbl/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbl/console.c')
-rw-r--r--pbl/console.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/pbl/console.c b/pbl/console.c
new file mode 100644
index 000000000..3875e2aaf
--- /dev/null
+++ b/pbl/console.c
@@ -0,0 +1,32 @@
+#include <common.h>
+#include <debug_ll.h>
+
+int printf(const char *fmt, ...)
+{
+ va_list args;
+ uint i;
+ char printbuffer[CFG_PBSIZE];
+
+ va_start(args, fmt);
+ i = vsprintf(printbuffer, fmt, args);
+ va_end(args);
+
+ puts_ll(printbuffer);
+
+ return i;
+}
+
+int pr_print(int level, const char *fmt, ...)
+{
+ va_list args;
+ uint i;
+ char printbuffer[CFG_PBSIZE];
+
+ va_start(args, fmt);
+ i = vsprintf(printbuffer, fmt, args);
+ va_end(args);
+
+ puts_ll(printbuffer);
+
+ return i;
+}