Skip to content
Snippets Groups Projects
Commit 075bb5c6 authored by Bin Meng's avatar Bin Meng Committed by Tom Rini
Browse files

efi_stub: Move carriage return before line feed in putc()


A carriage return needs to execute before a line feed.

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent dbe25386
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,9 @@ void _debug_uart_init(void) ...@@ -65,6 +65,9 @@ void _debug_uart_init(void)
void putc(const char ch) void putc(const char ch)
{ {
if (ch == '\n')
putc('\r');
if (use_uart) { if (use_uart) {
NS16550_t com_port = (NS16550_t)0x3f8; NS16550_t com_port = (NS16550_t)0x3f8;
...@@ -74,8 +77,6 @@ void putc(const char ch) ...@@ -74,8 +77,6 @@ void putc(const char ch)
} else { } else {
efi_putc(global_priv, ch); efi_putc(global_priv, ch);
} }
if (ch == '\n')
putc('\r');
} }
void puts(const char *str) void puts(const char *str)
......
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