From de24f6673c3181e5e3474adcd8d8812436f13834 Mon Sep 17 00:00:00 2001 From: WangRunji Date: Thu, 27 Dec 2018 15:56:20 +0800 Subject: [PATCH] remove '\r' --- kernel/src/logging.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/src/logging.rs b/kernel/src/logging.rs index 453bf7b..580315d 100644 --- a/kernel/src/logging.rs +++ b/kernel/src/logging.rs @@ -30,8 +30,8 @@ macro_rules! print { #[macro_export] macro_rules! println { - ($fmt:expr) => (print!(concat!($fmt, "\r\n"))); - ($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\r\n"), $($arg)*)); + ($fmt:expr) => (print!(concat!($fmt, "\n"))); + ($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*)); } /// Add escape sequence to print with color in Linux console @@ -67,7 +67,7 @@ impl Log for SimpleLogger { if self.enabled(record.metadata()) && !DISABLED_TARGET.contains(&record.target()) { // let target = record.target(); // let begin = target.as_bytes().iter().rposition(|&c| c == b':').map(|i| i + 1).unwrap_or(0); - print_in_color(format_args!("[{:>5}] {}\r\n", record.level(), record.args()), Color::from(record.level())); + print_in_color(format_args!("[{:>5}] {}\n", record.level(), record.args()), Color::from(record.level())); } } fn flush(&self) {}