Skip to contentSkip to conversation

x86_64: early_print kernel console should send CRLF not LFCR

PATCH New Yinghai Lu 1 participant 1 message May 17, 2007

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86_64: early_print kernel console should send CRLF not LFCR

[PATCH]x86_64: early_print kernel console should send CRLF not LFCR

in
commit d358788f3f30113e49882187d794832905e42592
Author: Russell King <[email protected]>
Date: Mon Mar 20 20:00:09 2006 +0000

Glen Turner reported that writing LFCR rather than the more traditional CRLF causes issues with some terminals.

Since this aflicts many serial drivers, extract the common code to a library function (uart_console_write) and arrange for each driver to supply a "putchar" function.

but early_printk is left out.

Cc Andi Kleen <[email protected]>
Cc Russell King <[email protected]>
arch/x86_64/kernel/early_printk.c +1 -1
index 56eaa25..296d2b0 100644
@@ -91,9 +91,9 @@ static int early_serial_putc(unsigned char ch)
 static void early_serial_write(struct console *con, const char *s, unsigned n)
 {
 	while (*s && n-- > 0) {
-		early_serial_putc(*s);
 		if (*s == '\n')
 			early_serial_putc('\r');
+		early_serial_putc(*s);
 		s++;
 	}
 }