Sync computers

This commit is contained in:
2026-03-01 16:12:02 +01:00
parent 392af94345
commit 041e544330
7 changed files with 59 additions and 41 deletions

View File

@@ -128,9 +128,9 @@ pub fn dealloc(ptr: *mut u8, layout: core::alloc::Layout) {
syscall!(SysCall::Dealloc, ptr as u64, size as u64, align as u64);
}
}
pub fn open<'a, P: Into<Path<'a>>>(path: P) -> u64 {
pub fn open<P: AsRef<Path>>(path: P) -> u64 {
unsafe {
let path_str = path.into().as_str();
let path_str = path.as_ref().as_str();
let ptr = path_str.as_ptr();
let size = path_str.len();
let (fd, ..) = syscall!(SysCall::Open, ptr as u64, size as u64);