summaryrefslogtreecommitdiff
path: root/kernel/con.c
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-07-25 17:18:18 +1000
committerJake Mannens <jake72360@gmail.com>2018-07-25 17:18:18 +1000
commit9400716f56057d9f2fcd7f7ad033dfcb131105a2 (patch)
treeaf0e8a7fecf0231e8bd77e7470ad0d934b519778 /kernel/con.c
parent45819c035d0b92275de68e559f066cbe50996926 (diff)
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().
Diffstat (limited to 'kernel/con.c')
-rw-r--r--kernel/con.c6
1 files changed, 3 insertions, 3 deletions
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 <asm/io.h>
@@ -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;
}