diff options
Diffstat (limited to 'lib/libjove/kprintf.c')
-rw-r--r-- | lib/libjove/kprintf.c | 16 |
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); +} |