From 666db00c262c7d6d6359fbaba28e344d015a7823 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 6 Dec 2018 11:42:23 -0800 Subject: 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 --- pkg/sentry/strace/strace.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'pkg/sentry/strace/strace.go') 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 { -- cgit v1.2.3