unix: add OpenTree on linux
This syscall is not yet described in linux man pages
(https://github.com/mkerrisk/man-pages.git)
but it was attempts to do it (https://lwn.net/Articles/829496/)
This syscall appeared in linux kernel v5.2
Change-Id: If44aa74c4ddd200831011c6c4bf4bd4fee440785
Reviewed-on: https://go-review.googlesource.com/c/sys/+/397094
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/zsyscall_linux.go b/unix/zsyscall_linux.go
index 78d7452..ca65ac8 100644
--- a/unix/zsyscall_linux.go
+++ b/unix/zsyscall_linux.go
@@ -1215,6 +1215,22 @@
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func OpenTree(dfd int, fileName string, flags uint) (r int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fileName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_OPEN_TREE, uintptr(dfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ r = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)