diff --git a/unix/syscall_darwin.go b/unix/syscall_darwin.go index bacbb2eb9..b65017cd1 100644 --- a/unix/syscall_darwin.go +++ b/unix/syscall_darwin.go @@ -108,17 +108,8 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) ( return nil, err } - _, _, e1 := Syscall6( - SYS_GETATTRLIST, - uintptr(unsafe.Pointer(_p0)), - uintptr(unsafe.Pointer(&attrList)), - uintptr(unsafe.Pointer(&attrBuf[0])), - uintptr(len(attrBuf)), - uintptr(options), - 0, - ) - if e1 != 0 { - return nil, e1 + if err := getattrlist(_p0, unsafe.Pointer(&attrList), unsafe.Pointer(&attrBuf[0]), uintptr(len(attrBuf)), int(options)); err != nil { + return nil, err } size := *(*uint32)(unsafe.Pointer(&attrBuf[0])) @@ -151,6 +142,8 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) ( return } +//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) + //sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { diff --git a/unix/zsyscall_darwin_386.1_12.go b/unix/zsyscall_darwin_386.1_12.go index 5bf0bd378..7e5f8bac7 100644 --- a/unix/zsyscall_darwin_386.1_12.go +++ b/unix/zsyscall_darwin_386.1_12.go @@ -511,6 +511,20 @@ func libc_ptrace_trampoline() //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_getattrlist_trampoline() + +//go:linkname libc_getattrlist libc_getattrlist +//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib" +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_386.go b/unix/zsyscall_darwin_386.go index 65446dfca..e8c292a77 100644 --- a/unix/zsyscall_darwin_386.go +++ b/unix/zsyscall_darwin_386.go @@ -387,6 +387,16 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_386.s b/unix/zsyscall_darwin_386.s index 77c0e56f7..c89d4185a 100644 --- a/unix/zsyscall_darwin_386.s +++ b/unix/zsyscall_darwin_386.s @@ -66,6 +66,8 @@ TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) +TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0 + JMP libc_getattrlist(SB) TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 JMP libc_pipe(SB) TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 diff --git a/unix/zsyscall_darwin_amd64.1_12.go b/unix/zsyscall_darwin_amd64.1_12.go index 8839157d2..2fb7d4d00 100644 --- a/unix/zsyscall_darwin_amd64.1_12.go +++ b/unix/zsyscall_darwin_amd64.1_12.go @@ -511,6 +511,20 @@ func libc_ptrace_trampoline() //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_getattrlist_trampoline() + +//go:linkname libc_getattrlist libc_getattrlist +//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib" +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_amd64.go b/unix/zsyscall_darwin_amd64.go index 53f1795e2..a50ce42fe 100644 --- a/unix/zsyscall_darwin_amd64.go +++ b/unix/zsyscall_darwin_amd64.go @@ -387,6 +387,16 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_amd64.s b/unix/zsyscall_darwin_amd64.s index 732a31a07..a3ecb21aa 100644 --- a/unix/zsyscall_darwin_amd64.s +++ b/unix/zsyscall_darwin_amd64.s @@ -66,6 +66,8 @@ TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) +TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0 + JMP libc_getattrlist(SB) TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 JMP libc_pipe(SB) TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 diff --git a/unix/zsyscall_darwin_arm.1_12.go b/unix/zsyscall_darwin_arm.1_12.go index f20d88f3e..eadd5b3ea 100644 --- a/unix/zsyscall_darwin_arm.1_12.go +++ b/unix/zsyscall_darwin_arm.1_12.go @@ -511,6 +511,20 @@ func libc_ptrace_trampoline() //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_getattrlist_trampoline() + +//go:linkname libc_getattrlist libc_getattrlist +//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib" +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_arm.go b/unix/zsyscall_darwin_arm.go index 65eb4c281..97cbdff1f 100644 --- a/unix/zsyscall_darwin_arm.go +++ b/unix/zsyscall_darwin_arm.go @@ -387,6 +387,16 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_arm.s b/unix/zsyscall_darwin_arm.s index 4048e1b13..1dc9c0024 100644 --- a/unix/zsyscall_darwin_arm.s +++ b/unix/zsyscall_darwin_arm.s @@ -66,6 +66,8 @@ TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) +TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0 + JMP libc_getattrlist(SB) TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 JMP libc_pipe(SB) TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0 diff --git a/unix/zsyscall_darwin_arm64.1_12.go b/unix/zsyscall_darwin_arm64.1_12.go index 68571d9d0..849603faa 100644 --- a/unix/zsyscall_darwin_arm64.1_12.go +++ b/unix/zsyscall_darwin_arm64.1_12.go @@ -511,6 +511,20 @@ func libc_ptrace_trampoline() //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_getattrlist_trampoline() + +//go:linkname libc_getattrlist libc_getattrlist +//go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib" +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_arm64.go b/unix/zsyscall_darwin_arm64.go index c85bf314b..f5cafc93d 100644 --- a/unix/zsyscall_darwin_arm64.go +++ b/unix/zsyscall_darwin_arm64.go @@ -387,6 +387,16 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { + _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) diff --git a/unix/zsyscall_darwin_arm64.s b/unix/zsyscall_darwin_arm64.s index e9f4bab5a..4dd9ac59b 100644 --- a/unix/zsyscall_darwin_arm64.s +++ b/unix/zsyscall_darwin_arm64.s @@ -66,6 +66,8 @@ TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) +TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0 + JMP libc_getattrlist(SB) TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0 JMP libc_pipe(SB) TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0