Add FileTableVerb

This commit is contained in:
R Aadarsh
2026-05-20 21:32:44 +05:30
parent cde72e8f03
commit 2708fc84ac
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -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
View File
@@ -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 {