aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/std/syscall.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-07 04:02:40 +0900
committerOphestra <cat@gensokyo.uk>2025-11-07 04:30:06 +0900
commit3d188ef884d6147d579e59eb8f51332bb8959ad5 (patch)
tree4d5bd73ee6e9f5c4fde3824ae2c366ea2ef702f1 /container/std/syscall.go
parent34ccda84b23f381b22496fda89785f4a48802ab6 (diff)
std: separate seccomp constants
This avoids inadvertently using PNRs as syscall numbers. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/std/syscall.go')
-rw-r--r--container/std/syscall.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/container/std/syscall.go b/container/std/syscall.go
index ff8d396e..eb71e071 100644
--- a/container/std/syscall.go
+++ b/container/std/syscall.go
@@ -3,8 +3,8 @@ package std
import "iter"
// Syscalls returns an iterator over all wired syscalls.
-func Syscalls() iter.Seq2[string, int] {
- return func(yield func(string, int) bool) {
+func Syscalls() iter.Seq2[string, ScmpSyscall] {
+ return func(yield func(string, ScmpSyscall) bool) {
for name, num := range syscallNum {
if !yield(name, num) {
return
@@ -19,7 +19,7 @@ func Syscalls() iter.Seq2[string, int] {
}
// SyscallResolveName resolves a syscall number from its string representation.
-func SyscallResolveName(name string) (num int, ok bool) {
+func SyscallResolveName(name string) (num ScmpSyscall, ok bool) {
if num, ok = syscallNum[name]; ok {
return
}