Fix last commit for exit_in_qemu

master
Jiajie Chen 6 years ago
parent b2585eb3bd
commit d285adf277

@ -7,6 +7,6 @@ pub fn id() -> usize {
0
}
pub fn exit_in_qemu(error_code: u8) -> ! {
pub unsafe fn exit_in_qemu(error_code: u8) -> ! {
unimplemented!()
}

@ -36,6 +36,6 @@ pub fn halt() {
unsafe { riscv::asm::wfi() }
}
pub fn exit_in_qemu(error_code: u8) -> ! {
pub unsafe fn exit_in_qemu(error_code: u8) -> ! {
super::sbi::shutdown()
}

@ -117,7 +117,9 @@ const LINUX_REBOOT_CMD_HALT: u32 = 0xcdef0123;
pub fn sys_reboot(magic: u32, magic2: u32, cmd: u32, arg: *const u8) -> SysResult {
// we will skip verifying magic
if cmd == LINUX_REBOOT_CMD_HALT {
cpu::exit_in_qemu(1);
unsafe {
cpu::exit_in_qemu(1);
}
}
Ok(0)
}

Loading…
Cancel
Save