diff options
author | Michael Pratt <mpratt@google.com> | 2018-12-06 11:42:23 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-06 11:43:11 -0800 |
commit | 666db00c262c7d6d6359fbaba28e344d015a7823 (patch) | |
tree | be5e9ca85570c04ec5625b79657ab47b0a38aada /pkg/sentry/strace/strace.go | |
parent | 000fa84a3bb1aebeda235c56545c942d7c29003d (diff) |
Convert ValueSet to a map
Unlike FlagSet, order doesn't matter here, so it can simply be a map.
PiperOrigin-RevId: 224377910
Change-Id: I15810c698a7f02d8614bf09b59583ab73cba0514
Diffstat (limited to 'pkg/sentry/strace/strace.go')
-rw-r--r-- | pkg/sentry/strace/strace.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/pkg/sentry/strace/strace.go b/pkg/sentry/strace/strace.go index 4286f0df7..e40e0b57c 100644 --- a/pkg/sentry/strace/strace.go +++ b/pkg/sentry/strace/strace.go @@ -50,18 +50,9 @@ var EventMaximumSize uint // ItimerTypes are the possible itimer types. var ItimerTypes = abi.ValueSet{ - { - Value: linux.ITIMER_REAL, - Name: "ITIMER_REAL", - }, - { - Value: linux.ITIMER_VIRTUAL, - Name: "ITIMER_VIRTUAL", - }, - { - Value: linux.ITIMER_PROF, - Name: "ITIMER_PROF", - }, + linux.ITIMER_REAL: "ITIMER_REAL", + linux.ITIMER_VIRTUAL: "ITIMER_VIRTUAL", + linux.ITIMER_PROF: "ITIMER_PROF", } func iovecs(t *kernel.Task, addr usermem.Addr, iovcnt int, printContent bool, maxBytes uint64) string { |