Add mode to open operation
This commit is contained in:
parent
8f229b6592
commit
2fad35bcd7
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user