diff --git a/src/main.rs b/src/main.rs index a708a96..5478991 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::{ fs::File, io::{Read, Seek, SeekFrom}, - os::mikros::{ipc, syscalls, Errno}, + os::mikros::{ipc, syscalls, Errno, FileCreationMode, FileOpenMode, FileWriteMode}, path::Path, sync::{atomic::{AtomicU64, Ordering}, Arc}, }; @@ -55,7 +55,7 @@ struct Serv { } impl dev_driver_rpc::Server for Serv { - fn open(&self, path: &std::path::Path) -> Result { + fn open(&self, path: &std::path::Path, _mode: FileOpenMode) -> Result { let part = *(self.parts.get(path.to_str().unwrap()).ok_or(Errno::EBADF)?); Ok(self.open_files.insert(OpenFile { drive_file: part.0, @@ -281,7 +281,7 @@ fn main() { .unwrap(); let drive_file = vfs_client - .open(Path::new(&format!("/dev/{}", dev_name))) + .open(Path::new(&format!("/dev/{}", dev_name)), FileOpenMode::ReadWrite(FileWriteMode::Start, FileCreationMode::NoCreate)) .unwrap(); for (i, part) in gpt_entries.iter().enumerate() { @@ -314,7 +314,7 @@ fn main() { println!("Disk has MBR"); let drive_file = vfs_client - .open(Path::new(&format!("/dev/{}", dev_name))) + .open(Path::new(&format!("/dev/{}", dev_name)), FileOpenMode::ReadWrite(FileWriteMode::Start, FileCreationMode::NoCreate)) .unwrap(); for (i, part) in mbr_entries.iter().enumerate() {