summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_poll.go
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-08-18 19:26:55 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-18 19:28:53 -0700
commitf2822da54293aaf1c161bde62dcfddfc234e4394 (patch)
treed983846a99f38882c48d8e433572e3bb10b8fe99 /pkg/sentry/syscalls/linux/sys_poll.go
parent9da77d00fa682ff504c7ff549985f78b0574c79b (diff)
Move ERESTART* error definitions to syserror package.
This is needed to avoid circular dependencies between the vfs and kernel packages. PiperOrigin-RevId: 327355524
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_poll.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_poll.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_poll.go b/pkg/sentry/syscalls/linux/sys_poll.go
index 3435bdf77..789e2ed5b 100644
--- a/pkg/sentry/syscalls/linux/sys_poll.go
+++ b/pkg/sentry/syscalls/linux/sys_poll.go
@@ -410,7 +410,7 @@ func poll(t *kernel.Task, pfdAddr usermem.Addr, nfds uint, timeout time.Duration
nfds: nfds,
timeout: remainingTimeout,
})
- return 0, kernel.ERESTART_RESTARTBLOCK
+ return 0, syserror.ERESTART_RESTARTBLOCK
}
return n, err
}
@@ -464,7 +464,7 @@ func Ppoll(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscall
// Note that this means that if err is nil but copyErr is not, copyErr is
// ignored. This is consistent with Linux.
if err == syserror.EINTR && copyErr == nil {
- err = kernel.ERESTARTNOHAND
+ err = syserror.ERESTARTNOHAND
}
return n, nil, err
}
@@ -494,7 +494,7 @@ func Select(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal
copyErr := copyOutTimevalRemaining(t, startNs, timeout, timevalAddr)
// See comment in Ppoll.
if err == syserror.EINTR && copyErr == nil {
- err = kernel.ERESTARTNOHAND
+ err = syserror.ERESTARTNOHAND
}
return n, nil, err
}
@@ -539,7 +539,7 @@ func Pselect(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysca
copyErr := copyOutTimespecRemaining(t, startNs, timeout, timespecAddr)
// See comment in Ppoll.
if err == syserror.EINTR && copyErr == nil {
- err = kernel.ERESTARTNOHAND
+ err = syserror.ERESTARTNOHAND
}
return n, nil, err
}