[Skiboot] [PATCH] core/console: use char literals instead of numeric

Oliver O'Halloran oohall at gmail.com
Mon Jul 25 10:44:03 AEST 2016


Save everyone a trip to asciitable.com. I realise everyone has probably
memorised \n and friends, but THAT'S NOT THE POINT.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 core/console.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/console.c b/core/console.c
index e851fcf824a9..730ac245fd94 100644
--- a/core/console.c
+++ b/core/console.c
@@ -258,8 +258,8 @@ ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)
 
 	while(count--) {
 		char c = *(cbuf++);
-		if (c == 10)
-			write_char(13);
+		if (c == '\n')
+			write_char('\r');
 		write_char(c);
 	}
 
-- 
2.5.5



More information about the Skiboot mailing list