Add func "drivers_console_vprintf"

This commit is contained in:
Alex Kotov 2022-12-09 07:27:31 +04:00
parent 393eaaae19
commit aad813390e
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,7 @@
extern "C" {
#endif
#include <stdarg.h>
#include <stddef.h>
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
}

View File

@ -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);