From fe8e48fc6d5094fe34783b1040b2ae4ba05349b5 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Thu, 4 Nov 2021 14:52:36 -0700 Subject: [syserr] Move ConvertIntr function to linuxerr package Move ConverIntr out of syserr package and delete an unused function. PiperOrigin-RevId: 407676258 --- pkg/sentry/syscalls/linux/vfs2/poll.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg/sentry/syscalls/linux/vfs2/poll.go') diff --git a/pkg/sentry/syscalls/linux/vfs2/poll.go b/pkg/sentry/syscalls/linux/vfs2/poll.go index 204051cd0..1dcbe0a4d 100644 --- a/pkg/sentry/syscalls/linux/vfs2/poll.go +++ b/pkg/sentry/syscalls/linux/vfs2/poll.go @@ -26,7 +26,6 @@ import ( ktime "gvisor.dev/gvisor/pkg/sentry/kernel/time" "gvisor.dev/gvisor/pkg/sentry/limits" "gvisor.dev/gvisor/pkg/sentry/vfs" - "gvisor.dev/gvisor/pkg/syserr" "gvisor.dev/gvisor/pkg/waiter" ) @@ -188,7 +187,7 @@ func doPoll(t *kernel.Task, addr hostarch.Addr, nfds uint, timeout time.Duration pfd[i].Events |= linux.POLLHUP | linux.POLLERR } remainingTimeout, n, err := pollBlock(t, pfd, timeout) - err = syserr.ConvertIntr(err, linuxerr.EINTR) + err = linuxerr.ConvertIntr(err, linuxerr.EINTR) // The poll entries are copied out regardless of whether // any are set or not. This aligns with the Linux behavior. @@ -298,7 +297,7 @@ func doSelect(t *kernel.Task, nfds int, readFDs, writeFDs, exceptFDs hostarch.Ad // Do the syscall, then count the number of bits set. if _, _, err = pollBlock(t, pfd, timeout); err != nil { - return 0, syserr.ConvertIntr(err, linuxerr.EINTR) + return 0, linuxerr.ConvertIntr(err, linuxerr.EINTR) } // r, w, and e are currently event mask bitsets; unset bits corresponding -- cgit v1.2.3