diff options
author | Adin Scannell <ascannell@google.com> | 2019-07-09 16:16:46 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-09 16:18:02 -0700 |
commit | cceef9d2cfbf72a7ae4feac2e53e46179c33155d (patch) | |
tree | cefb01757e2363d09851f576a7a160bb2f4797e1 /pkg/sentry/syscalls/linux/sys_pipe.go | |
parent | 6db3f8d54c0225e6b6c3d8eef30b4b61498848b7 (diff) |
Cleanup straggling syscall dependencies.
PiperOrigin-RevId: 257293198
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_pipe.go')
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_pipe.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_pipe.go b/pkg/sentry/syscalls/linux/sys_pipe.go index 576022dd5..418d7fa5f 100644 --- a/pkg/sentry/syscalls/linux/sys_pipe.go +++ b/pkg/sentry/syscalls/linux/sys_pipe.go @@ -15,20 +15,19 @@ package linux import ( - "syscall" - "gvisor.dev/gvisor/pkg/abi/linux" "gvisor.dev/gvisor/pkg/sentry/arch" "gvisor.dev/gvisor/pkg/sentry/fs" "gvisor.dev/gvisor/pkg/sentry/kernel" "gvisor.dev/gvisor/pkg/sentry/kernel/pipe" "gvisor.dev/gvisor/pkg/sentry/usermem" + "gvisor.dev/gvisor/pkg/syserror" ) // pipe2 implements the actual system call with flags. func pipe2(t *kernel.Task, addr usermem.Addr, flags uint) (uintptr, error) { if flags&^(linux.O_NONBLOCK|linux.O_CLOEXEC) != 0 { - return 0, syscall.EINVAL + return 0, syserror.EINVAL } r, w := pipe.NewConnectedPipe(t, pipe.DefaultPipeSize, usermem.PageSize) @@ -49,7 +48,7 @@ func pipe2(t *kernel.Task, addr usermem.Addr, flags uint) (uintptr, error) { // The files are not closed in this case, the exact semantics // of this error case are not well defined, but they could have // already been observed by user space. - return 0, syscall.EFAULT + return 0, syserror.EFAULT } return 0, nil } |