Return result type from syscall and format info on panic.

This commit is contained in:
Drew Galbraith 2024-07-26 16:31:57 -07:00
parent e310eee468
commit 51d40f6db6
4 changed files with 91 additions and 14 deletions

View file

@ -32,7 +32,7 @@ pub fn parse_init_port(port_cap: syscall::zcap) {
num_caps: &mut num_caps as *mut u64,
};
let resp = syscall::syscall(syscall::kZionPortPoll, &req);
if resp != 0 {
if let Err(_) = resp {
break;
}
unsafe {
@ -59,7 +59,7 @@ macro_rules! define_entry {
unsafe {
let err = main();
let req = mammoth::syscall::ZProcessExitReq { code: err };
mammoth::syscall::syscall(mammoth::syscall::kZionProcessExit, &req);
let _ = mammoth::syscall::syscall(mammoth::syscall::kZionProcessExit, &req);
}
unreachable!()
}