Commit 1e701391 authored by Jeremy Soller's avatar Jeremy Soller

Add path implementation for e1000d and ahcid

parent 35cd7e4c
......@@ -98,6 +98,17 @@ impl Scheme for DiskScheme {
}
}
fn fpath(&self, _id: usize, buf: &mut [u8]) -> Result<usize> {
//TODO: Get path
let mut i = 0;
let scheme_path = b"disk:";
while i < buf.len() && i < scheme_path.len() {
buf[i] = scheme_path[i];
i += 1;
}
Ok(i)
}
fn read(&self, id: usize, buf: &mut [u8]) -> Result<usize> {
let mut handles = self.handles.lock();
match *handles.get_mut(&id).ok_or(Error::new(EBADF))? {
......
......@@ -194,6 +194,16 @@ impl Scheme for Intel8254x {
Ok(0)
}
fn fpath(&self, _id: usize, buf: &mut [u8]) -> Result<usize> {
let mut i = 0;
let scheme_path = b"network:";
while i < buf.len() && i < scheme_path.len() {
buf[i] = scheme_path[i];
i += 1;
}
Ok(i)
}
fn fsync(&self, _id: usize) -> Result<usize> {
Ok(0)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment