summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_time.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-06-22 22:57:48 +0000
committergVisor bot <gvisor-bot@google.com>2021-06-22 22:57:48 +0000
commitc6031eb481baf57849c45c6ffde27efc89398c4c (patch)
tree1cd27d85a44a8a5fe8f210ef3feed3e35699cb75 /pkg/sentry/syscalls/linux/sys_time.go
parentd909242b0d797db387131912b51373fda7608e95 (diff)
parente1dc1c78e7a523fc64ca28bed60a9a40ea1de46a (diff)
Merge release-20210614.0-14-ge1dc1c78e (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_time.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_time.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_time.go b/pkg/sentry/syscalls/linux/sys_time.go
index 5c3b3dee2..2ec74b33a 100644
--- a/pkg/sentry/syscalls/linux/sys_time.go
+++ b/pkg/sentry/syscalls/linux/sys_time.go
@@ -19,6 +19,7 @@ import (
"time"
"gvisor.dev/gvisor/pkg/abi/linux"
+ "gvisor.dev/gvisor/pkg/errors/linuxerr"
"gvisor.dev/gvisor/pkg/hostarch"
"gvisor.dev/gvisor/pkg/marshal/primitive"
"gvisor.dev/gvisor/pkg/sentry/arch"
@@ -209,11 +210,11 @@ func clockNanosleepUntil(t *kernel.Task, c ktime.Clock, end ktime.Time, rem host
timer.Destroy()
- switch err {
- case syserror.ETIMEDOUT:
+ switch {
+ case linuxerr.Equals(linuxerr.ETIMEDOUT, err):
// Slept for entire timeout.
return nil
- case syserror.ErrInterrupted:
+ case err == syserror.ErrInterrupted:
// Interrupted.
remaining := end.Sub(c.Now())
if remaining <= 0 {