]> git.corax.cc Git - corax/commitdiff
Provide a dummy printf() function in klibc
authorMatthias Kruk <m@m10k.eu>
Tue, 14 Jan 2020 11:37:18 +0000 (20:37 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 14 Jan 2020 11:37:18 +0000 (20:37 +0900)
include/stdio.h
kernel/klibc/stdio.c

index 8c60ca994dee657c772abecd7aa49652c52f72be..3fe448da46fb11f7cb9db87053e7fccaf51d7342 100644 (file)
@@ -4,5 +4,6 @@
 #include <sys/types.h>
 
 extern int snprintf(char*, size_t, const char*, ...);
+extern int printf(const char*, ...);
 
 #endif /* STDIO_H */
index f8e596a130e429855a28e724a3a8e69f744387d4..7674e4007fd41b3e0ca6244363a182233e874fc5 100644 (file)
@@ -1,5 +1,6 @@
 #include <config.h>
 #include <corax/types.h>
+#include <corax/errno.h>
 #include <sys/types.h>
 #include <string.h>
 
@@ -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);
+}