Change line terminator for println to \r\n
authorKit Rhett Aultman <kit@kitaultman.com>
Sat, 7 Sep 2024 03:31:06 +0000 (23:31 -0400)
committerKit Rhett Aultman <kit@kitaultman.com>
Sat, 7 Sep 2024 03:31:06 +0000 (23:31 -0400)
The VT102 terminal emulation on minicom treats \r and \n as separate
operations, so this makes the logging print prettier there without
impacting the stdio serial of qemu either.

src/uart.rs

index d0d6cc685d44b15a1e5b1ccc3c90206afee5e708..73bbc4168dfb90fd09edfb11ab581ec5f8f8e22e 100644 (file)
@@ -86,6 +86,6 @@ macro_rules! print {
 /// println prints a formatted string to the [CONSOLE] with a trailing newline character.
 #[macro_export]
 macro_rules! println {
-    ($fmt:expr) => ($crate::print!(concat!($fmt, "\n")));
-    ($fmt:expr, $($arg:tt)*) => ($crate::print!(concat!($fmt, "\n"), $($arg)*));
+    ($fmt:expr) => ($crate::print!(concat!($fmt, "\r\n")));
+    ($fmt:expr, $($arg:tt)*) => ($crate::print!(concat!($fmt, "\r\n"), $($arg)*));
 }