Commit fe9338c9 authored by Nagy Tibor's avatar Nagy Tibor

ihdad: Implement fpath

Fixes the output of sys:/iostat.
The correct implementation is TODO like most of the scheme related code in this driver.
parent f1d3aa64
......@@ -992,7 +992,7 @@ impl SchemeMut for IntelHDA {
// TODO:
if uid == 0 {
Ok(flags)
Ok(0)
} else {
Err(Error::new(EACCES))
}
......@@ -1030,4 +1030,16 @@ impl SchemeMut for IntelHDA {
handles.remove(&_id).ok_or(Error::new(EBADF)).and(Ok(0))
}
fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result<usize> {
//let mut handles = self.handles.lock();
//let handle = handles.get_mut(&id).ok_or(Error::new(EBADF))?;
let mut i = 0;
let scheme_path = b"audio:";
while i < buf.len() && i < scheme_path.len() {
buf[i] = scheme_path[i];
i += 1;
}
Ok(i)
}
}
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