mirror of
https://github.com/tailix/drivers.git
synced 2024-11-20 11:06:32 -05:00
Add func "drivers_console_vprintf"
This commit is contained in:
parent
393eaaae19
commit
aad813390e
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue