Add mode to open operation

This commit is contained in:
pjht 2024-11-16 11:53:48 -06:00
parent 8f229b6592
commit 2fad35bcd7
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -1,7 +1,7 @@
use std::{ use std::{
borrow::Cow, borrow::Cow,
collections::HashMap, collections::HashMap,
os::mikros::{ipc, syscalls, Errno}, os::mikros::{ipc, syscalls, Errno, FileOpenMode},
path::{Path, PathBuf}, path::{Path, PathBuf},
sync::Arc, sync::Arc,
}; };
@ -92,7 +92,7 @@ struct Serv {
} }
impl dev_driver_rpc::Server for Serv { impl dev_driver_rpc::Server for Serv {
fn open(&self, path: &Path) -> Result<u64, Errno> { fn open(&self, path: &Path, _mode: FileOpenMode) -> Result<u64, Errno> {
if path == Path::new("ptmx") { if path == Path::new("ptmx") {
let pty = Pty::new(); let pty = Pty::new();
let idx = self.ptys.write().insert(pty); let idx = self.ptys.write().insert(pty);