Add mode to open operation
This commit is contained in:
parent
21120d4869
commit
4c67fd074a
@ -29,7 +29,7 @@ mod port;
|
|||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
os::mikros::{address_space::ACTIVE_SPACE, ipc, syscalls, Errno},
|
os::mikros::{address_space::ACTIVE_SPACE, ipc, syscalls, Errno, FileOpenMode},
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
@ -48,7 +48,7 @@ struct AhciState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl dev_driver_rpc::Server for 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 port = *self.dev_port_map.get(path).ok_or(Errno::ENOENT)?;
|
||||||
let mut files = self.files.write();
|
let mut files = self.files.write();
|
||||||
files.push((port, 0));
|
files.push((port, 0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user