summaryrefslogtreecommitdiff
path: root/kern/printf.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-05-19 19:11:34 +0200
committerRichard Braun <rbraun@sceen.net>2017-05-19 19:11:34 +0200
commit805ba95708f577ea3cfb59f9851ea61ef45abc85 (patch)
tree81e480b1b7d0e730f52ebb5a5668819d15c5e907 /kern/printf.c
parent3c203f5b93f23927a1e046f120a1a9438c5213bc (diff)
kern/console: new module
Diffstat (limited to 'kern/printf.c')
-rw-r--r--kern/printf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kern/printf.c b/kern/printf.c
index 68ae1037..d7a1d100 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -17,6 +17,7 @@
#include <stdio.h>
+#include <kern/console.h>
#include <kern/spinlock.h>
#include <machine/cpu.h>
@@ -25,11 +26,6 @@
*/
#define PRINTF_BUFSIZE 1024
-/*
- * XXX Must be provided by a console driver.
- */
-extern void console_write_byte(char c);
-
static char printf_buffer[PRINTF_BUFSIZE];
static struct spinlock printf_lock;
@@ -58,7 +54,7 @@ vprintf(const char *format, va_list ap)
length = vsnprintf(printf_buffer, sizeof(printf_buffer), format, ap);
for (ptr = printf_buffer; *ptr != '\0'; ptr++) {
- console_write_byte(*ptr);
+ console_write_char(*ptr);
}
spinlock_unlock_intr_restore(&printf_lock, flags);