From: Simon Glass Date: Fri, 9 Mar 2012 12:32:56 -0800 Subject: [U-Boot] [PATCH v2 2/4] Enable printf() console if pre-console putc() is available In-Reply-To: <1331325178-14634-1-git-send-email-sjg@chromium.org> References: <1331325178-14634-1-git-send-email-sjg@chromium.org> Message-ID: <1331325178-14634-2-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de At present we skip printf() if there is no hope of it making it to the console. But this check ignores CONFIG_PRE_CONSOLE_PUTC at present. Add a check for that also. Signed-off-by: Simon Glass --- Changes in v2: - Allow printf() output to make it to pre-console putc() common/console.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/console.c b/common/console.c index 1d9fd7f..38d7094 100644 --- a/common/console.c +++ b/common/console.c @@ -447,7 +447,7 @@ int vprintf(const char *fmt, va_list args) uint i; char printbuffer[CONFIG_SYS_PBSIZE]; -#ifndef CONFIG_PRE_CONSOLE_BUFFER +#if !defined(CONFIG_PRE_CONSOLE_BUFFER) && !defined(CONFIG_PRE_CONSOLE_PUTC) if (!gd->have_console) return 0; #endif -- 1.7.7.3