diff --git a/src/main.rs b/src/main.rs index d04034d..db44930 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use std::{ collections::HashMap, - os::mikros::{ipc, syscalls, Errno}, + os::mikros::{ipc, syscalls, Errno, FileOpenMode}, sync::Arc, }; @@ -18,10 +18,10 @@ impl fs_rpc::Server for Serv { Ok(0) } - fn open(&self, path: &std::path::Path, _mount_id: u64) -> Result<(Option, u64), Errno> { + fn open(&self, path: &std::path::Path, mode: FileOpenMode, _mount_id: u64) -> Result<(Option, u64), Errno> { let name = path.to_str().ok_or(Errno::EINVALDAT)?; let device_pid = *self.devices.read().get(name).ok_or(Errno::ENOENT)?; - let fd = dev_driver_rpc::Client::new(device_pid).open(path)?; + let fd = dev_driver_rpc::Client::new(device_pid).open(path, mode)?; Ok((Some(device_pid), fd)) }