MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / mount

Function mount

euralios_std/src/syscalls.rs:579–598  ·  view source on GitHub ↗
(path: &str, mut handle: CommHandle)

Source from the content-addressed store, hash-verified

577}
578
579pub fn mount(path: &str, mut handle: CommHandle) -> Result<(), SyscallError> {
580 let error: u64;
581 unsafe {
582 asm!("syscall",
583 // RAX contains | handle (32) | empty (24) | syscall (8)
584 in("rax") SYSCALL_MOUNT | ((handle.take() as u64) << 32),
585 // RDI contains pointer to string data
586 in("rdi") path.as_ptr() as usize,
587 // RSI contains string length
588 in("rsi") path.len(),
589 lateout("rax") error,
590 out("rcx") _,
591 out("r11") _);
592 }
593 if error == 0 {
594 Ok(())
595 } else {
596 Err(SyscallError(error))
597 }
598}
599
600pub fn list_mounts() -> Result<(MemoryHandle, u64), SyscallError> {
601 let error: u64;

Callers

nothing calls this directly

Calls 1

SyscallErrorClass · 0.85

Tested by

no test coverage detected