summaryrefslogtreecommitdiffhomepage
path: root/pkg/syserr/syserr.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/syserr/syserr.go')
-rw-r--r--pkg/syserr/syserr.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/syserr/syserr.go b/pkg/syserr/syserr.go
index fb77ac8bd..7d0a5125b 100644
--- a/pkg/syserr/syserr.go
+++ b/pkg/syserr/syserr.go
@@ -22,6 +22,7 @@ import (
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/abi/linux/errno"
+ "gvisor.dev/gvisor/pkg/errors/linuxerr"
"gvisor.dev/gvisor/pkg/syserror"
)
@@ -54,7 +55,7 @@ func New(message string, linuxTranslation errno.Errno) *Error {
// enables proper blocking semantics. This should temporary address the
// class of blocking bugs that keep popping up with the current state of
// the error space.
- if e == syserror.EWOULDBLOCK {
+ if err.errno == linuxerr.EWOULDBLOCK.Errno() {
e = syserror.ErrWouldBlock
}
linuxBackwardsTranslations[err.errno] = linuxBackwardsTranslation{err: e, ok: true}