Add fchown, fchmod
This commit is contained in:
10
Cargo.lock
generated
10
Cargo.lock
generated
@@ -13,7 +13,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@@ -35,10 +35,10 @@ name = "kernel"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"alloc_kernel 0.1.0",
|
||||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"goblin 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw-cpuid 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.31",
|
||||
"redox_syscall 0.1.32",
|
||||
"spin 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x86 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -75,7 +75,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.31"
|
||||
version = "0.1.32"
|
||||
|
||||
[[package]]
|
||||
name = "scroll"
|
||||
@@ -97,7 +97,7 @@ dependencies = [
|
||||
|
||||
[metadata]
|
||||
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
|
||||
"checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989"
|
||||
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
|
||||
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
|
||||
"checksum goblin 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81af14056c25d33759862c5ae2035452acb1255bfb1b16db57819f183921e259"
|
||||
"checksum linked_list_allocator 0.4.1 (git+https://github.com/redox-os/linked-list-allocator.git)" = "<none>"
|
||||
|
||||
@@ -280,6 +280,16 @@ impl Scheme for UserScheme {
|
||||
inner.call(SYS_LSEEK, file, position, whence)
|
||||
}
|
||||
|
||||
fn fchmod(&self, file: usize, mode: u16) -> Result<usize> {
|
||||
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
|
||||
inner.call(SYS_FCHMOD, file, mode as usize, 0)
|
||||
}
|
||||
|
||||
fn fchown(&self, file: usize, uid: u32, gid: u32) -> Result<usize> {
|
||||
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
|
||||
inner.call(SYS_FCHOWN, file, uid as usize, gid as usize)
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
2
syscall
2
syscall
Submodule syscall updated: 71c51bdbbb...3c765737a5
Reference in New Issue
Block a user