Commit 075bb5c6ea7bef0a442d5155b25b273167e67b4a

Authored by Bin Meng
Committed by Tom Rini
1 parent dbe253861a

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

A carriage return needs to execute before a line feed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

... ... @@ -65,6 +65,9 @@
65 65  
66 66 void putc(const char ch)
67 67 {
  68 + if (ch == '\n')
  69 + putc('\r');
  70 +
68 71 if (use_uart) {
69 72 NS16550_t com_port = (NS16550_t)0x3f8;
70 73  
... ... @@ -74,8 +77,6 @@
74 77 } else {
75 78 efi_putc(global_priv, ch);
76 79 }
77   - if (ch == '\n')
78   - putc('\r');
79 80 }
80 81  
81 82 void puts(const char *str)