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/open.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/open.go')
-rw-r--r-- | pkg/sentry/strace/open.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/pkg/sentry/strace/open.go b/pkg/sentry/strace/open.go index 5a72a940c..3bf348d7a 100644 --- a/pkg/sentry/strace/open.go +++ b/pkg/sentry/strace/open.go @@ -22,18 +22,9 @@ import ( // OpenMode represents the mode to open(2) a file. var OpenMode = abi.ValueSet{ - { - Value: syscall.O_RDWR, - Name: "O_RDWR", - }, - { - Value: syscall.O_WRONLY, - Name: "O_WRONLY", - }, - { - Value: syscall.O_RDONLY, - Name: "O_RDONLY", - }, + syscall.O_RDWR: "O_RDWR", + syscall.O_WRONLY: "O_WRONLY", + syscall.O_RDONLY: "O_RDONLY", } // OpenFlagSet is the set of open(2) flags. |