From 9400716f56057d9f2fcd7f7ad033dfcb131105a2 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 25 Jul 2018 17:18:18 +1000 Subject: Added missing prototype for puts() in stdio.h. Implemented a basic serial interface using COM0 which can be accessed with the system call sys_puts as well as the library functions rsputs() and rsprintf(). Renamed puts() in con.c to con_puts() and made the function static to avoid interference with the library function puts(). --- kernel/con.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kernel/con.c') diff --git a/kernel/con.c b/kernel/con.c index c8be80b..2000fbc 100644 --- a/kernel/con.c +++ b/kernel/con.c @@ -1,7 +1,7 @@ /* * con.c * - * Basic VGA text console. Implements printk() and puts(). + * Basic VGA text console. Implements printk(). */ #include @@ -64,7 +64,7 @@ void con_init(void) { } /* write a zero-terminated string to console */ -static int puts(char *s) { +static int con_puts(char *s) { uint8_t *p = &vram[pos]; while(*s) { @@ -100,6 +100,6 @@ int printk(char *fmt, ...) { ret = vsprintf(buf, fmt, ap); va_end(ap); - puts(buf); + con_puts(buf); return ret; } -- cgit v1.3