diff --git a/kernel/src/kmain.rs b/kernel/src/kmain.rs index 76dcedf2..f4f0c65a 100644 --- a/kernel/src/kmain.rs +++ b/kernel/src/kmain.rs @@ -61,11 +61,14 @@ pub fn kmain(cmdline: &str, bootstrap: Option<&'static [u8]>) -> ! { } } - let byte = sc.receive(); - if byte == b'\r' { - sc.send(b'\n'); + match sc.receive() { + b'\r' => { + sc.send(b'\n'); + } + byte => { + sc.send(byte); + } } - sc.send(byte); } } }