mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
internal/syscall/unix: fix number of params for unlinkat
This reverts the change to Unlinkat done in CL 659415, as it appears to be wrong. While at it, let's unify argument formatting for better readability (and also so those parameters are easier to count). Change-Id: I092105f85de107e0495afed3cd66c039343250f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/659357 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
48240ad3f9
commit
f233739850
@ -35,7 +35,11 @@ func Unlinkat(dirfd int, path string, flags int) error {
|
||||
return err
|
||||
}
|
||||
|
||||
_, _, errno := syscall6(uintptr(unsafe.Pointer(&procUnlinkat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0)
|
||||
_, _, errno := syscall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3,
|
||||
uintptr(dirfd),
|
||||
uintptr(unsafe.Pointer(p)),
|
||||
uintptr(flags),
|
||||
0, 0, 0)
|
||||
if errno != 0 {
|
||||
return errno
|
||||
}
|
||||
@ -49,7 +53,12 @@ func Openat(dirfd int, path string, flags int, perm uint32) (int, error) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
fd, _, errno := syscall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(p)), uintptr(flags), uintptr(perm), 0, 0)
|
||||
fd, _, errno := syscall6(uintptr(unsafe.Pointer(&procOpenat)), 4,
|
||||
uintptr(dirfd),
|
||||
uintptr(unsafe.Pointer(p)),
|
||||
uintptr(flags),
|
||||
uintptr(perm),
|
||||
0, 0)
|
||||
if errno != 0 {
|
||||
return 0, errno
|
||||
}
|
||||
@ -63,7 +72,12 @@ func Fstatat(dirfd int, path string, stat *syscall.Stat_t, flags int) error {
|
||||
return err
|
||||
}
|
||||
|
||||
_, _, errno := syscall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(p)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
_, _, errno := syscall6(uintptr(unsafe.Pointer(&procFstatat)), 4,
|
||||
uintptr(dirfd),
|
||||
uintptr(unsafe.Pointer(p)),
|
||||
uintptr(unsafe.Pointer(stat)),
|
||||
uintptr(flags),
|
||||
0, 0)
|
||||
if errno != 0 {
|
||||
return errno
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user