Skip to contentSkip to conversation

LFCR instead of CRLF on serial console

PATCH Andreas Schwab 1 participant 1 message Nov 29, 2001 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

The serial console code is printing LFCR at the end of the line instead of CRLF. While this makes no difference on a terminal(-emulator), most editors and file viewers (including less) only recognize CRLF as DOS-style end-of-line markers.

drivers/char/serial.c +2 -2
@@ -5812,11 +5812,11 @@
 		 *	Send the character out.
 		 *	If a LF, also do CR...
 		 */
-		serial_out(info, UART_TX, *s);
 		if (*s == 10) {
-			wait_for_xmitr(info);
 			serial_out(info, UART_TX, 13);
+			wait_for_xmitr(info);
 		}
+		serial_out(info, UART_TX, *s);
 	}
 
 	/*

Andreas.

Signature · 4 lines
Andreas Schwab                                  "And now for something
[email protected]				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5