Skip to content

Commit 575dc67

Browse files
syscall: update syscall_as_str to match new syscalls
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent 639adee commit 575dc67

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/aero_syscall/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,10 @@ pub fn syscall_as_str(syscall: usize) -> &'static str {
218218
prelude::SYS_IPC_RECV => "ipc_recv",
219219
prelude::SYS_IPC_DISCOVER_ROOT => "ipc_discover_root",
220220
prelude::SYS_IPC_BECOME_ROOT => "ipc_become_root",
221+
prelude::SYS_STAT => "stat",
222+
prelude::SYS_FSTAT => "fstat",
221223

222-
_ => unreachable!("unknown syscall"),
224+
_ => unreachable!("unknown syscall {syscall}"),
223225
}
224226
}
225227

@@ -441,7 +443,7 @@ pub fn syscall_result_as_usize(result: Result<usize, AeroSyscallError>) -> usize
441443

442444
/// Inner helper function that converts the syscall result value into the
443445
/// Rust [`Result`] type.
444-
fn isize_as_syscall_result(value: isize) -> Result<usize, AeroSyscallError> {
446+
pub fn isize_as_syscall_result(value: isize) -> Result<usize, AeroSyscallError> {
445447
if value >= 0 {
446448
Ok(value as usize)
447449
} else {

0 commit comments

Comments
 (0)