From 8668383fdde6fc6a1e8e44100506e761f754d6bd Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Tue, 14 Jan 2020 20:37:18 +0900 Subject: [PATCH] Provide a dummy printf() function in klibc --- include/stdio.h | 1 + kernel/klibc/stdio.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/stdio.h b/include/stdio.h index 8c60ca9..3fe448d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -4,5 +4,6 @@ #include extern int snprintf(char*, size_t, const char*, ...); +extern int printf(const char*, ...); #endif /* STDIO_H */ diff --git a/kernel/klibc/stdio.c b/kernel/klibc/stdio.c index f8e596a..7674e40 100644 --- a/kernel/klibc/stdio.c +++ b/kernel/klibc/stdio.c @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -811,3 +812,13 @@ gtfo: #undef ADD_FLAG #undef SET_STATE } + +int printf(const char *fmt, ...) +{ + /* + * FIXME: Implement printf() properly once all of the + * necessary ingredients are in place + */ + + return(-ENOSYS); +} -- 2.47.3