aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@basename.se>2019-01-03 16:22:23 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-01-26 09:31:18 +0100
commit3d7ad96eb0aa453b26e3685ffd5975697a1d06e2 (patch)
treef432cb4a43b523bcf6ad9f48cd3fba4855400f5e /sys
parent66ff894ef51e506037882bd6e24e5cc5ec258448 (diff)
sys/openbsd: add openat${null,zero}
Diffstat (limited to 'sys')
-rw-r--r--sys/openbsd/gen/amd64.go14
-rw-r--r--sys/openbsd/sys.txt3
2 files changed, 16 insertions, 1 deletions
diff --git a/sys/openbsd/gen/amd64.go b/sys/openbsd/gen/amd64.go
index 421871564..0f4905f33 100644
--- a/sys/openbsd/gen/amd64.go
+++ b/sys/openbsd/gen/amd64.go
@@ -1031,6 +1031,18 @@ var syscalls_amd64 = []*Syscall{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 65536, 128, 128, 128, 32768, 131072, 64}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 321, Name: "openat$null", CallName: "openat", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 8}}, Val: 18446744073709551516},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 10}, Kind: 2, Values: []string{"/dev/null\x00"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 65536, 128, 128, 128, 32768, 131072, 64}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 8}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 321, Name: "openat$zero", CallName: "openat", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 8}}, Val: 18446744073709551516},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 10}, Kind: 2, Values: []string{"/dev/zero\x00"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 65536, 128, 128, 128, 32768, 131072, 64}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 8}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
{NR: 263, Name: "pipe", CallName: "pipe", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pipefd", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
}},
@@ -1890,4 +1902,4 @@ var consts_amd64 = []ConstValue{
{Name: "__MAP_NOREPLACE", Value: 2048},
}
-const revision_amd64 = "1fb3c14be5aef9eaeff451056b396f2846fa99a2"
+const revision_amd64 = "023de49add0ad7066aed10a35ae617c49a4591cb"
diff --git a/sys/openbsd/sys.txt b/sys/openbsd/sys.txt
index daa77cc00..67af2b16f 100644
--- a/sys/openbsd/sys.txt
+++ b/sys/openbsd/sys.txt
@@ -108,6 +108,9 @@ wait4(pid pid, status ptr[out, int32, opt], options flags[wait_options], ru ptr[
pledge(promises ptr[in, string], execpromises ptr[in, string])
unveil(path ptr[in, filename], permissions ptr[in, string[unveil_permissions]])
+openat$null(fd const[AT_FDCWD], file ptr[in, string["/dev/null"]], flags flags[open_flags], mode const[0]) fd
+openat$zero(fd const[AT_FDCWD], file ptr[in, string["/dev/zero"]], flags flags[open_flags], mode const[0]) fd
+
pollfd {
fd fd
events flags[pollfd_events, int16]