U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] efi_stub: Move carriage return before line feed in putc()
Date: Thu, 17 Mar 2016 23:59:03 -0700	[thread overview]
Message-ID: <1458284344-32149-1-git-send-email-bmeng.cn@gmail.com> (raw)

A carriage return needs to execute before a line feed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 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

             reply	other threads:[~2016-03-18  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  6:59 Bin Meng [this message]
2016-03-18  6:59 ` [U-Boot] [PATCH 2/2] debug_uart: Remove duplicated carriage return handling Bin Meng
2016-03-18 13:26   ` Tom Rini
2016-03-27 22:27   ` [U-Boot] [U-Boot, " Tom Rini
2016-03-18 13:26 ` [U-Boot] [PATCH 1/2] efi_stub: Move carriage return before line feed in putc() Tom Rini
2016-03-27 22:27 ` [U-Boot] [U-Boot, " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458284344-32149-1-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox