Pass through fcntl

This commit is contained in:
Jeremy Soller
2016-11-15 17:09:28 -07:00
parent a9c7a4e773
commit 0dd2befe4d

View File

@@ -284,6 +284,11 @@ impl Scheme for UserScheme {
inner.call(SYS_LSEEK, file, position, whence)
}
fn fcntl(&self, file: usize, cmd: usize, arg: usize) -> Result<usize> {
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
inner.call(SYS_FCNTL, file, cmd, arg)
}
fn fevent(&self, file: usize, flags: usize) -> Result<usize> {
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
inner.call(SYS_FEVENT, file, flags, 0)