[PATCH 2/5] console: remove duplicate newline conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the console is not yet fully initialized then console_puts falls
back to print characters using console_putc. console_putc already
does newline conversion, so do not repeat it in console_puts.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/console.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/console.c b/common/console.c
index c40eba6d55..cd37d88cc4 100644
--- a/common/console.c
+++ b/common/console.c
@@ -552,10 +552,9 @@ int console_puts(unsigned int ch, const char *str)
 	}
 
 	while (*s) {
-		if (*s == '\n') {
-			console_putc(ch, '\r');
+		if (*s == '\n')
 			n++;
-		}
+
 		console_putc(ch, *s);
 		n++;
 		s++;
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux