@@ -20,6 +20,7 @@ import (
2020 rspec "github.com/opencontainers/runtime-spec/specs-go"
2121)
2222
23+ // FromOCILinuxSeccomp converts an seccomp configuration from an OCI runtime spec.
2324func FromOCILinuxSeccomp (o * rspec.LinuxSeccomp ) * LinuxSeccomp {
2425 var errno * OptionalUInt32
2526 if o .DefaultErrnoRet != nil {
@@ -47,6 +48,7 @@ func FromOCILinuxSeccomp(o *rspec.LinuxSeccomp) *LinuxSeccomp {
4748 }
4849}
4950
51+ // FromOCILinuxSyscalls converts seccomp syscalls configuration from an OCI runtime spec.
5052func FromOCILinuxSyscalls (o []rspec.LinuxSyscall ) []* LinuxSyscall {
5153 syscalls := make ([]* LinuxSyscall , len (o ))
5254
@@ -67,6 +69,7 @@ func FromOCILinuxSyscalls(o []rspec.LinuxSyscall) []*LinuxSyscall {
6769 return syscalls
6870}
6971
72+ // FromOCILinuxSeccompArgs converts seccomp syscall args from an OCI runtime spec.
7073func FromOCILinuxSeccompArgs (o []rspec.LinuxSeccompArg ) []* LinuxSeccompArg {
7174 args := make ([]* LinuxSeccompArg , len (o ))
7275
@@ -82,6 +85,7 @@ func FromOCILinuxSeccompArgs(o []rspec.LinuxSeccompArg) []*LinuxSeccompArg {
8285 return args
8386}
8487
88+ // ToOCILinuxSyscalls converts seccomp syscalls configuration to an OCI runtime spec.
8589func ToOCILinuxSyscalls (o []* LinuxSyscall ) []rspec.LinuxSyscall {
8690 syscalls := make ([]rspec.LinuxSyscall , len (o ))
8791
@@ -103,6 +107,7 @@ func ToOCILinuxSyscalls(o []*LinuxSyscall) []rspec.LinuxSyscall {
103107 return syscalls
104108}
105109
110+ // ToOCILinuxSeccompArgs converts seccomp syscall args to an OCI runtime spec.
106111func ToOCILinuxSeccompArgs (o []* LinuxSeccompArg ) []rspec.LinuxSeccompArg {
107112 args := make ([]rspec.LinuxSeccompArg , len (o ))
108113
0 commit comments