Update to add chmod

This commit is contained in:
Jeremy Soller 2016-11-15 17:08:14 -07:00
parent 37395f36ea
commit 1f29d163b1
11 changed files with 39 additions and 7 deletions

View file

@ -231,6 +231,14 @@ impl Scheme for UserScheme {
result
}
fn chmod(&self, path: &[u8], mode: u16, _uid: u32, _gid: u32) -> Result<usize> {
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
let address = inner.capture(path)?;
let result = inner.call(SYS_CHMOD, address, path.len(), mode as usize);
let _ = inner.release(address);
result
}
fn rmdir(&self, path: &[u8], _uid: u32, _gid: u32) -> Result<usize> {
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
let address = inner.capture(path)?;