Skip to content
Snippets Groups Projects
Commit da229e4e authored by Simon Glass's avatar Simon Glass
Browse files

sandbox: Drop special-case sandbox console code


At present printf() skips output if it can see there is no console. This
is really just an optimisation, and is not necessary. Also it is currently
incorrect in some cases. Rather than update the logic, just remove it so
that we don't need to keep it in sync.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent d6ea5307
No related branches found
No related tags found
No related merge requests found
...@@ -456,6 +456,7 @@ static inline void print_pre_console_buffer(int flushpoint) {} ...@@ -456,6 +456,7 @@ static inline void print_pre_console_buffer(int flushpoint) {}
void putc(const char c) void putc(const char c)
{ {
#ifdef CONFIG_SANDBOX #ifdef CONFIG_SANDBOX
/* sandbox can send characters to stdout before it has a console */
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
os_putc(c); os_putc(c);
return; return;
...@@ -540,11 +541,6 @@ int printf(const char *fmt, ...) ...@@ -540,11 +541,6 @@ int printf(const char *fmt, ...)
uint i; uint i;
char printbuffer[CONFIG_SYS_PBSIZE]; char printbuffer[CONFIG_SYS_PBSIZE];
#if !defined(CONFIG_SANDBOX) && !defined(CONFIG_PRE_CONSOLE_BUFFER)
if (!gd->have_console)
return 0;
#endif
va_start(args, fmt); va_start(args, fmt);
/* For this to work, printbuffer must be larger than /* For this to work, printbuffer must be larger than
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment