diff --git a/src/panic_handler.rs b/src/panic_handler.rs index ca2f3b2..15da367 100644 --- a/src/panic_handler.rs +++ b/src/panic_handler.rs @@ -14,21 +14,18 @@ use core::panic::PanicInfo; #[panic_handler] fn panic(info: &PanicInfo<'_>) -> ! { + print!("Kernel panic in "); if let Some(tasking) = TASKING.try_lock() { if let Some(pid) = tasking.current_pid() { print!("PID {}", pid); } else { - print!("Kernel Init"); + print!("kernel init"); } } else { print!("PID Unknown"); } - println!(" {info}"); + println!(": {info}"); #[cfg(debug_assertions)] print_backtrace(); - if let Some(mut tasking) = TASKING.try_lock() { - tasking.exit(); - } else { - exit_qemu(); - } + exit_qemu(); }