add kernel panicking
This commit is contained in:
parent
e9660fbc76
commit
82f4bd2b09
1 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,8 @@ mod vga_buffer;
|
|||
|
||||
use core::panic::PanicInfo;
|
||||
#[panic_handler]
|
||||
fn panic(_info: &PanicInfo) -> ! {
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
println!("{}", info);
|
||||
loop {}
|
||||
}
|
||||
|
||||
|
@ -13,7 +14,7 @@ fn panic(_info: &PanicInfo) -> ! {
|
|||
#[no_mangle]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
println!("Hello World!");
|
||||
|
||||
panic!("Nothing to do.");
|
||||
|
||||
loop {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue