Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8902bfc authored by Yinghai Lu's avatar Yinghai Lu Committed by Linus Torvalds
Browse files

x86_64: early_print kernel console should send CRLF not LFCR



In
	commit d358788f
	Author: Russell King <rmk@dyn-67.arm.linux.org.uk>
	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 afflicts 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.

Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 39427d6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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)
static void early_serial_write(struct console *con, const char *s, unsigned n)
{
{
	while (*s && n-- > 0) {
	while (*s && n-- > 0) {
		early_serial_putc(*s);
		if (*s == '\n')
		if (*s == '\n')
			early_serial_putc('\r');
			early_serial_putc('\r');
		early_serial_putc(*s);
		s++;
		s++;
	}
	}
}
}