From 82608164f66dda428189bdc3610f027820408b49 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 9 Aug 2025 17:36:36 +0900 Subject: container/params: remove confusingly named error Signed-off-by: Ophestra --- container/params.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'container/params.go') diff --git a/container/params.go b/container/params.go index e4328a7b..a5b4f2f1 100644 --- a/container/params.go +++ b/container/params.go @@ -5,11 +5,11 @@ import ( "errors" "os" "strconv" + "syscall" ) var ( - ErrNotSet = errors.New("environment variable not set") - ErrInvalid = errors.New("bad file descriptor") + ErrNotSet = errors.New("environment variable not set") ) // Setup appends the read end of a pipe for setup params transmission and returns its fd. @@ -35,7 +35,7 @@ func Receive(key string, e any, v **os.File) (func() error, error) { } else { setup = os.NewFile(uintptr(fd), "setup") if setup == nil { - return nil, ErrInvalid + return nil, syscall.EBADF } if v != nil { *v = setup -- cgit v1.3.1