diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-07-02 21:31:29 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-07-02 21:31:29 +0900 |
| commit | eec021cc4b4eb42bc9c8311755826828bfba1996 (patch) | |
| tree | 5dfe107c31ee525b13af275f8261982e916c331a /sandbox/seccomp/syscall.go | |
| parent | a1d98823f8d17b49b432508d071b62ccd426f1ce (diff) | |
hakurei: move container helpers toplevel
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox/seccomp/syscall.go')
| -rw-r--r-- | sandbox/seccomp/syscall.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/sandbox/seccomp/syscall.go b/sandbox/seccomp/syscall.go deleted file mode 100644 index 36a988aa..00000000 --- a/sandbox/seccomp/syscall.go +++ /dev/null @@ -1,28 +0,0 @@ -package seccomp - -import "iter" - -// Syscalls returns an iterator over all wired syscalls. -func Syscalls() iter.Seq2[string, int] { - return func(yield func(string, int) bool) { - for name, num := range syscallNum { - if !yield(name, num) { - return - } - } - for name, num := range syscallNumExtra { - if !yield(name, num) { - return - } - } - } -} - -// SyscallResolveName resolves a syscall number from its string representation. -func SyscallResolveName(name string) (num int, ok bool) { - if num, ok = syscallNum[name]; ok { - return - } - num, ok = syscallNumExtra[name] - return -} |
