diff options
author | Simon Glass <sjg@chromium.org> | 2015-06-23 15:38:34 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:22 -0600 |
commit | da229e4e57b7d028cf01d52ac70832a90453e289 (patch) | |
tree | 0e84ace88092bf612550f7933b5dd10f3272e03c /common/console.c | |
parent | d6ea5307daf200c0c1f80d241e10bb69a1da2c8c (diff) | |
download | u-boot-da229e4e57b7d028cf01d52ac70832a90453e289.tar.gz |
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: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/common/console.c b/common/console.c index acad8bdca0..ace206ca4f 100644 --- a/common/console.c +++ b/common/console.c @@ -456,6 +456,7 @@ static inline void print_pre_console_buffer(int flushpoint) {} void putc(const char c) { #ifdef CONFIG_SANDBOX + /* sandbox can send characters to stdout before it has a console */ if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { os_putc(c); return; @@ -540,11 +541,6 @@ int printf(const char *fmt, ...) uint i; 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); /* For this to work, printbuffer must be larger than |