mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 01:43:22 +00:00
Rename eval to syscall test and fix return value
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
d2cb607e3c
commit
f674874e91
@ -146,11 +146,16 @@ pub fn panic_handler() {
|
||||
// println!("---END BACKTRACE---");
|
||||
// }
|
||||
}
|
||||
|
||||
/// The exit code of x86 QEMU. In `qemu-system-x86_64` the exit code will be
|
||||
/// `(code << 1) | 1`. So you could never let QEMU invoke `exit(0)`. Check
|
||||
/// if the result is `0b01` instead.
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[repr(u32)]
|
||||
pub enum QemuExitCode {
|
||||
Success = 0x10,
|
||||
Failed = 0x11,
|
||||
Success = 0b0,
|
||||
Failed = 0b1,
|
||||
}
|
||||
|
||||
pub fn exit_qemu(exit_code: QemuExitCode) -> ! {
|
||||
|
Reference in New Issue
Block a user