Convert \n to \r\n on serial output
This commit is contained in:
parent
f7c5b3aad4
commit
1ceb2e1607
@ -244,7 +244,11 @@ extern "C" fn syscall_handler() {
|
||||
match regs.rax {
|
||||
0 => {
|
||||
let rval = if let Some(chr) = char::from_u32(regs.rcx.wrapping_cast()) {
|
||||
print!("{}", chr);
|
||||
if chr == '\n' {
|
||||
print!("\r\n");
|
||||
} else {
|
||||
print!("{}", chr);
|
||||
}
|
||||
0
|
||||
} else {
|
||||
1
|
||||
|
@ -50,10 +50,10 @@ macro_rules! print {
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => ($crate::print!("\n"));
|
||||
() => ($crate::print!("\r\n"));
|
||||
($($arg:tt)*) => ({
|
||||
$crate::serial::_print(format_args!($($arg)*));
|
||||
$crate::print!("\n");
|
||||
$crate::print!("\r\n");
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user