Add mode to open operation

This commit is contained in:
pjht 2024-11-16 11:55:40 -06:00
parent 21120d4869
commit 4c67fd074a
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -29,7 +29,7 @@ mod port;
use std::{
collections::HashMap,
os::mikros::{address_space::ACTIVE_SPACE, ipc, syscalls, Errno},
os::mikros::{address_space::ACTIVE_SPACE, ipc, syscalls, Errno, FileOpenMode},
path::{Path, PathBuf},
sync::Arc,
};
@ -48,7 +48,7 @@ struct AhciState {
}
impl dev_driver_rpc::Server for AhciState {
fn open(&self, path: &Path) -> Result<u64, Errno> {
fn open(&self, path: &Path, _mode: FileOpenMode) -> Result<u64, Errno> {
let port = *self.dev_port_map.get(path).ok_or(Errno::ENOENT)?;
let mut files = self.files.write();
files.push((port, 0));