summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.xyz>2021-07-20 20:25:29 -0500
committerDanny Holman <dholman@gymli.xyz>2021-07-20 20:25:29 -0500
commitefad89a1b70e265c3706662a8392fd1164c06bd7 (patch)
tree63eaf012353a56bb337572b978af6872bad8628a
parent39b8db42c6660abaa161acb6064093fc8f00f7f5 (diff)
io: prefix a 'k' to print functions
Add a 'k' prefix to the kernel versions of the printf family.
-rw-r--r--include/kernel/io.h4
-rw-r--r--kernel/init.c4
-rw-r--r--kernel/io.c6
3 files changed, 6 insertions, 8 deletions
diff --git a/include/kernel/io.h b/include/kernel/io.h
index 486c7a4..8f5fa59 100644
--- a/include/kernel/io.h
+++ b/include/kernel/io.h
@@ -3,7 +3,7 @@
#include <stdarg.h>
-int vprintf(const char *fmt, va_list args);
-int printf(const char *fmt, ...);
+int vkprintf(const char *fmt, va_list args);
+int kprintf(const char *fmt, ...);
#endif
diff --git a/kernel/init.c b/kernel/init.c
index a7a71d6..195ce92 100644
--- a/kernel/init.c
+++ b/kernel/init.c
@@ -4,7 +4,5 @@
void kernel_main(void) {
tty_init();
- serial_init();
- serial_writestring("Hello world\n");
- printf("Hello world\n");
+ kprintf("Hello world\n");
}
diff --git a/kernel/io.c b/kernel/io.c
index e2bef20..71b01bd 100644
--- a/kernel/io.c
+++ b/kernel/io.c
@@ -18,7 +18,7 @@ char* convert(unsigned int num, int base) {
return ptr;
}
-int vprintf(const char *fmt, va_list args) {
+int vkprintf(const char *fmt, va_list args) {
char *s;
int i;
@@ -60,12 +60,12 @@ int vprintf(const char *fmt, va_list args) {
return 0;
}
-int printf(const char *fmt, ...) {
+int kprintf(const char *fmt, ...) {
va_list args;
int done;
va_start(args, fmt);
- done = vprintf(fmt, args);
+ done = vkprintf(fmt, args);
va_end(args);
return done;