diff --git a/ahcid/src/scheme.rs b/ahcid/src/scheme.rs index 52df564f0a..f36ad7bb02 100644 --- a/ahcid/src/scheme.rs +++ b/ahcid/src/scheme.rs @@ -98,6 +98,17 @@ impl Scheme for DiskScheme { } } + fn fpath(&self, _id: usize, buf: &mut [u8]) -> Result { + //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 { let mut handles = self.handles.lock(); match *handles.get_mut(&id).ok_or(Error::new(EBADF))? { diff --git a/e1000d/src/device.rs b/e1000d/src/device.rs index bfa6d51408..280c2d3197 100644 --- a/e1000d/src/device.rs +++ b/e1000d/src/device.rs @@ -194,6 +194,16 @@ impl Scheme for Intel8254x { Ok(0) } + fn fpath(&self, _id: usize, buf: &mut [u8]) -> Result { + 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 { Ok(0) }