summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/unix/io.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/socket/unix/io.go')
-rw-r--r--pkg/sentry/socket/unix/io.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/sentry/socket/unix/io.go b/pkg/sentry/socket/unix/io.go
index 7d6434696..7d80e4393 100644
--- a/pkg/sentry/socket/unix/io.go
+++ b/pkg/sentry/socket/unix/io.go
@@ -17,7 +17,6 @@ package unix
import (
"gvisor.googlesource.com/gvisor/pkg/sentry/safemem"
"gvisor.googlesource.com/gvisor/pkg/sentry/socket/unix/transport"
- "gvisor.googlesource.com/gvisor/pkg/syserr"
"gvisor.googlesource.com/gvisor/pkg/tcpip"
)
@@ -40,7 +39,7 @@ func (w *EndpointWriter) WriteFromBlocks(srcs safemem.BlockSeq) (uint64, error)
return safemem.FromVecWriterFunc{func(bufs [][]byte) (int64, error) {
n, err := w.Endpoint.SendMsg(bufs, w.Control, w.To)
if err != nil {
- return int64(n), syserr.TranslateNetstackError(err).ToError()
+ return int64(n), err.ToError()
}
return int64(n), nil
}}.WriteFromBlocks(srcs)
@@ -82,7 +81,7 @@ func (r *EndpointReader) ReadToBlocks(dsts safemem.BlockSeq) (uint64, error) {
r.Control = c
r.MsgSize = ms
if err != nil {
- return int64(n), syserr.TranslateNetstackError(err).ToError()
+ return int64(n), err.ToError()
}
return int64(n), nil
}}.ReadToBlocks(dsts)