diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2018-06-20 15:41:37 +0200 |
|---|---|---|
| committer | Tobias Klauser <tobias.klauser@gmail.com> | 2018-06-21 06:47:46 +0000 |
| commit | 85e38cccb4d113862f4fd2c3c4d97927cd84420c (patch) | |
| tree | c39d71d5531a6e50a952044a422f8395419f7c89 /src/syscall/zsyscall_linux_ppc64.go | |
| parent | feeff23556bc82778aab0ed80b576b953f064024 (diff) | |
| download | go-85e38cccb4d113862f4fd2c3c4d97927cd84420c.tar.xz | |
syscall: check faccessat flags parameter on Linux
Port CL 119495 from golang.org/x/sys/unix to the syscall package.
Currently Linux faccessat(2) syscall implementation doesn't support the
flags parameter. As per the discussion in #25845, permit the same flags
as glibc [1].
[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/faccessat.c;h=ea42b2303ff4b2d2d6548ea04376fb265f773436;hb=HEAD
Updates #25845
Change-Id: I132b33275a9cc72b3a97acea5482806c7f47d7f7
Reviewed-on: https://go-review.googlesource.com/120015
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall/zsyscall_linux_ppc64.go')
| -rw-r--r-- | src/syscall/zsyscall_linux_ppc64.go | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/syscall/zsyscall_linux_ppc64.go b/src/syscall/zsyscall_linux_ppc64.go index 2f6db68c47..b76944e96c 100644 --- a/src/syscall/zsyscall_linux_ppc64.go +++ b/src/syscall/zsyscall_linux_ppc64.go @@ -9,6 +9,21 @@ import "unsafe" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func faccessat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func fchmodat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -354,21 +369,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { |
