summaryrefslogtreecommitdiff
path: root/kern/printf.c
diff options
context:
space:
mode:
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);