From 26b7afc890e23af19fe6662fd27f46b47e9feea9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 2 Jul 2025 00:32:48 +0900 Subject: sandbox/seccomp: prepare -> export Export makes a lot more sense, and also matches the libseccomp function. Signed-off-by: Ophestra --- sandbox/seccomp/proc.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sandbox/seccomp/proc.go') diff --git a/sandbox/seccomp/proc.go b/sandbox/seccomp/proc.go index 51c3bce8..e4ce1853 100644 --- a/sandbox/seccomp/proc.go +++ b/sandbox/seccomp/proc.go @@ -13,10 +13,10 @@ const ( ) // New returns an inactive Encoder instance. -func New(rules []NativeRule, flags PrepareFlag) *Encoder { return &Encoder{newExporter(rules, flags)} } +func New(rules []NativeRule, flags ExportFlag) *Encoder { return &Encoder{newExporter(rules, flags)} } // Load loads a filter into the kernel. -func Load(rules []NativeRule, flags PrepareFlag) error { return Prepare(-1, rules, flags) } +func Load(rules []NativeRule, flags ExportFlag) error { return Export(-1, rules, flags) } /* An Encoder writes a BPF program to an output stream. @@ -46,14 +46,14 @@ func (e *Encoder) Close() error { } // NewFile returns an instance of exporter implementing [proc.File]. -func NewFile(rules []NativeRule, flags PrepareFlag) proc.File { +func NewFile(rules []NativeRule, flags ExportFlag) proc.File { return &File{rules: rules, flags: flags} } // File implements [proc.File] and provides access to the read end of exporter pipe. type File struct { rules []NativeRule - flags PrepareFlag + flags ExportFlag proc.BaseFile } -- cgit v1.3.1