diff --git a/include/drivers/console.h b/include/drivers/console.h index d8e108e..0ff2353 100644 --- a/include/drivers/console.h +++ b/include/drivers/console.h @@ -5,6 +5,7 @@ extern "C" { #endif +#include #include void drivers_console_putc(char c); @@ -15,6 +16,7 @@ void drivers_console_write(const char *data, size_t size); __attribute__((format(printf, 1, 2))) void drivers_console_printf(const char *format, ...); +void drivers_console_vprintf(const char *format, va_list va); #ifdef __cplusplus } diff --git a/src/console.c b/src/console.c index 42ff732..d4f5801 100644 --- a/src/console.c +++ b/src/console.c @@ -32,7 +32,7 @@ void drivers_console_print(const char *const s) } } -void drivers_console_printf(const char *format, ...) +void drivers_console_printf(const char *const format, ...) { va_list va; va_start(va, format); @@ -40,6 +40,11 @@ void drivers_console_printf(const char *format, ...) va_end(va); } +void drivers_console_vprintf(const char *const format, va_list va) +{ + kernaux_vfprintf(file_putc, NULL, format, va); +} + void drivers_console_puts(const char *const s) { drivers_console_print(s);