diff options
author | Tom Rini <trini@konsulko.com> | 2025-05-02 13:57:26 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-02 13:57:26 -0600 |
commit | 6cc812f8cc55c132458c7da5b9fb7666315cbe8c (patch) | |
tree | 297fb9e724f252a3fdb46ee28348e66ff7c05a96 /common/console.c | |
parent | 4ca87fd18c1b718be423755939a6e5b1688869f5 (diff) | |
parent | 7703cfe025cbbb2277498483304b4db958521d9e (diff) |
Merge patch series "video: Enhancements related to truetype and console"
Simon Glass <sjg@chromium.org> says:
This series includes some precursor patches needed for forthcoming expo
enhancements.
- truetype support for multiple lines
- make white-on-black a runtime option
- support drawing a rectangle
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/console.c b/common/console.c index 275da2f264d..48586fd2166 100644 --- a/common/console.c +++ b/common/console.c @@ -359,6 +359,24 @@ void console_puts_select_stderr(bool serial_only, const char *s) console_puts_select(stderr, serial_only, s); } +int console_printf_select_stderr(bool serial_only, const char *fmt, ...) +{ + char buf[CONFIG_SYS_PBSIZE]; + va_list args; + int ret; + + va_start(args, fmt); + + /* For this to work, buf must be larger than anything we ever want to + * print. + */ + ret = vscnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + console_puts_select_stderr(serial_only, buf); + + return ret; +} + static void console_puts(int file, const char *s) { int i; |