diff options
Diffstat (limited to 'kernel/con.c')
| -rw-r--r-- | kernel/con.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/con.c b/kernel/con.c index b3d2b9d..3b48de1 100644 --- a/kernel/con.c +++ b/kernel/con.c @@ -1,7 +1,7 @@ /* * con.c * - * Basic VGA text console + * Basic VGA text console. Implements printf() and puts(). */ #include <asm/io.h> @@ -58,7 +58,7 @@ void con_init(void) { } /* write a zero-terminated string to console */ -void con_print(char *s) { +int puts(char *s) { uint8_t *p = &vram[pos]; while(*s) { @@ -80,6 +80,9 @@ void con_print(char *s) { /* update the cursor position */ cursorpos(pos); + + /* this always succeeds */ + return 0; } int printf(char *fmt, ...) { @@ -91,6 +94,6 @@ int printf(char *fmt, ...) { ret = vsprintf(buf, fmt, ap); va_end(ap); - con_print(buf); + puts(buf); return ret; } |
