From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Thu, 17 Mar 2016 23:59:03 -0700 Subject: [U-Boot] [PATCH 1/2] efi_stub: Move carriage return before line feed in putc() Message-ID: <1458284344-32149-1-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de A carriage return needs to execute before a line feed. Signed-off-by: Bin Meng --- lib/efi/efi_stub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index e138709..8b4bb4e 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -65,6 +65,9 @@ void _debug_uart_init(void) void putc(const char ch) { + if (ch == '\n') + putc('\r'); + if (use_uart) { NS16550_t com_port = (NS16550_t)0x3f8; @@ -74,8 +77,6 @@ void putc(const char ch) } else { efi_putc(global_priv, ch); } - if (ch == '\n') - putc('\r'); } void puts(const char *str) -- 1.8.2.1