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 {
|
match regs.rax {
|
||||||
0 => {
|
0 => {
|
||||||
let rval = if let Some(chr) = char::from_u32(regs.rcx.wrapping_cast()) {
|
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
|
0
|
||||||
} else {
|
} else {
|
||||||
1
|
1
|
||||||
|
@ -50,10 +50,10 @@ macro_rules! print {
|
|||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! println {
|
macro_rules! println {
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\r\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
$crate::serial::_print(format_args!($($arg)*));
|
$crate::serial::_print(format_args!($($arg)*));
|
||||||
$crate::print!("\n");
|
$crate::print!("\r\n");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user