Add FileTableVerb
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "redox_syscall"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
description = "A Rust library to access raw Redox system calls"
|
||||
license = "MIT"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
|
||||
+17
@@ -258,6 +258,23 @@ impl ProcSchemeVerb {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum FileTableVerb {
|
||||
Close = 1,
|
||||
Dup2 = 2,
|
||||
CloseCloExec = 3,
|
||||
}
|
||||
impl FileTableVerb {
|
||||
pub fn try_from_raw(value: u8) -> Option<Self> {
|
||||
Some(match value {
|
||||
1 => Self::Close,
|
||||
2 => Self::Dup2,
|
||||
3 => Self::CloseCloExec,
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[repr(usize)]
|
||||
pub enum SchemeSocketCall {
|
||||
|
||||
Reference in New Issue
Block a user