summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/file.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-12-06 11:42:23 -0800
committerShentubot <shentubot@google.com>2018-12-06 11:43:11 -0800
commit666db00c262c7d6d6359fbaba28e344d015a7823 (patch)
treebe5e9ca85570c04ec5625b79657ab47b0a38aada /pkg/abi/linux/file.go
parent000fa84a3bb1aebeda235c56545c942d7c29003d (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/abi/linux/file.go')
-rw-r--r--pkg/abi/linux/file.go35
1 files changed, 7 insertions, 28 deletions
diff --git a/pkg/abi/linux/file.go b/pkg/abi/linux/file.go
index 8d48e1753..ac49ae9a6 100644
--- a/pkg/abi/linux/file.go
+++ b/pkg/abi/linux/file.go
@@ -223,32 +223,11 @@ var modeExtraBits = abi.FlagSet{
}
var fileType = abi.ValueSet{
- {
- Value: ModeSocket,
- Name: "S_IFSOCK",
- },
- {
- Value: ModeSymlink,
- Name: "S_IFLINK",
- },
- {
- Value: ModeRegular,
- Name: "S_IFREG",
- },
- {
- Value: ModeBlockDevice,
- Name: "S_IFBLK",
- },
- {
- Value: ModeDirectory,
- Name: "S_IFDIR",
- },
- {
- Value: ModeCharacterDevice,
- Name: "S_IFCHR",
- },
- {
- Value: ModeNamedPipe,
- Name: "S_IFIFO",
- },
+ ModeSocket: "S_IFSOCK",
+ ModeSymlink: "S_IFLINK",
+ ModeRegular: "S_IFREG",
+ ModeBlockDevice: "S_IFBLK",
+ ModeDirectory: "S_IFDIR",
+ ModeCharacterDevice: "S_IFCHR",
+ ModeNamedPipe: "S_IFIFO",
}