[PATCH 4/5] console_simple: Fix newline conversion

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 18 23:41:16 PDT 2018


Newline should be "\r\n" rather than "\n\r"

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/console_simple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/console_simple.c b/common/console_simple.c
index 0825ec07ec..ee87b8c52f 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -31,9 +31,10 @@ void console_putc(unsigned int ch, char c)
 		return;
 	}
 
-	console->putc(console, c);
 	if (c == '\n')
 		console->putc(console, '\r');
+
+	console->putc(console, c);
 }
 EXPORT_SYMBOL(console_putc);
 
-- 
2.17.1




More information about the barebox mailing list