From 95f15d3a8ffb2dd7b920e784ee02ea9c51b78843 Mon Sep 17 00:00:00 2001 From: Ibuki Omatsu Date: Mon, 21 Jul 2025 13:52:41 +0000 Subject: [PATCH] feat: Add FsCall. --- Cargo.toml | 2 +- src/flag.rs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 009ddac0a5..fb4bde326a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "redox_syscall" -version = "0.5.14" +version = "0.5.15" description = "A Rust library to access raw Redox system calls" license = "MIT" authors = ["Jeremy Soller "] diff --git a/src/flag.rs b/src/flag.rs index c5fc7cf14e..2656602def 100644 --- a/src/flag.rs +++ b/src/flag.rs @@ -221,6 +221,21 @@ impl ProcSchemeVerb { } } +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[repr(usize)] +#[non_exhaustive] +pub enum FsCall { + Connect = 0, +} +impl FsCall { + pub fn try_from_raw(raw: usize) -> Option { + Some(match raw { + 0 => Self::Connect, + _ => return None, + }) + } +} + bitflags! { pub struct PtraceFlags: u64 { /// Stop before a syscall is handled. Send PTRACE_FLAG_IGNORE to not