summaryrefslogtreecommitdiffstats
path: root/lib/libjove/kprintf.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-10 15:46:33 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-10 15:46:33 -0400
commit65ba015d6c1f248d36ad01a653bc49637804b15b (patch)
treea77c3fb3ca7ecac8f65eb9638d152f1e90307d0a /lib/libjove/kprintf.c
downloadjove-os-65ba015d6c1f248d36ad01a653bc49637804b15b.tar.gz
jove-os-65ba015d6c1f248d36ad01a653bc49637804b15b.tar.bz2
jove-os-65ba015d6c1f248d36ad01a653bc49637804b15b.zip
working usermode objdir iteration
Diffstat (limited to 'lib/libjove/kprintf.c')
-rw-r--r--lib/libjove/kprintf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libjove/kprintf.c b/lib/libjove/kprintf.c
new file mode 100644
index 0000000..c04756a
--- /dev/null
+++ b/lib/libjove/kprintf.c
@@ -0,0 +1,16 @@
+#include <jove/jove.h>
+#include <jove/syscall.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+void
+jove_kprintf(const char *restrict fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ char buffer[256];
+ vsnprintf(buffer, 256, fmt, ap);
+ va_end(ap);
+
+ for(char *c = buffer; *c; c++) _syscall_debug_putc(*c);
+}