mirror of
https://github.com/golang/go
synced 2024-11-07 15:06:16 -07:00
d4b2638234
Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: Ia0534360e4957e58cd9a18429c39d0e32a6addb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/294430 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2013 lines
50 KiB
Go
2013 lines
50 KiB
Go
// mksyscall.pl -openbsd -libc -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_libc.go syscall_openbsd_arm64.go
|
|
// Code generated by the command above; DO NOT EDIT.
|
|
|
|
//go:build openbsd && arm64
|
|
// +build openbsd,arm64
|
|
|
|
package syscall
|
|
|
|
import "unsafe"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
|
|
r0, _, e1 := rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getgroups_trampoline()
|
|
|
|
//go:linkname libc_getgroups libc_getgroups
|
|
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func setgroups(ngid int, gid *_Gid_t) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setgroups_trampoline()
|
|
|
|
//go:linkname libc_setgroups libc_setgroups
|
|
//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
|
|
r0, _, e1 := syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
|
|
wpid = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_wait4_trampoline()
|
|
|
|
//go:linkname libc_wait4 libc_wait4
|
|
//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
fd = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_accept_trampoline()
|
|
|
|
//go:linkname libc_accept libc_accept
|
|
//go:cgo_import_dynamic libc_accept accept "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_bind_trampoline()
|
|
|
|
//go:linkname libc_bind libc_bind
|
|
//go:cgo_import_dynamic libc_bind bind "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_connect_trampoline()
|
|
|
|
//go:linkname libc_connect libc_connect
|
|
//go:cgo_import_dynamic libc_connect connect "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func socket(domain int, typ int, proto int) (fd int, err error) {
|
|
r0, _, e1 := rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
|
|
fd = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_socket_trampoline()
|
|
|
|
//go:linkname libc_socket libc_socket
|
|
//go:cgo_import_dynamic libc_socket socket "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
|
|
_, _, e1 := syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getsockopt_trampoline()
|
|
|
|
//go:linkname libc_getsockopt libc_getsockopt
|
|
//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
|
|
_, _, e1 := syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setsockopt_trampoline()
|
|
|
|
//go:linkname libc_setsockopt libc_setsockopt
|
|
//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getpeername_trampoline()
|
|
|
|
//go:linkname libc_getpeername libc_getpeername
|
|
//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getsockname_trampoline()
|
|
|
|
//go:linkname libc_getsockname libc_getsockname
|
|
//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Shutdown(s int, how int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_shutdown_trampoline()
|
|
|
|
//go:linkname libc_shutdown libc_shutdown
|
|
//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
|
|
_, _, e1 := rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_socketpair_trampoline()
|
|
|
|
//go:linkname libc_socketpair libc_socketpair
|
|
//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(p) > 0 {
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_recvfrom_trampoline()
|
|
|
|
//go:linkname libc_recvfrom libc_recvfrom
|
|
//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(buf) > 0 {
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
_, _, e1 := syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_sendto_trampoline()
|
|
|
|
//go:linkname libc_sendto libc_sendto
|
|
//go:cgo_import_dynamic libc_sendto sendto "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_recvmsg_trampoline()
|
|
|
|
//go:linkname libc_recvmsg libc_recvmsg
|
|
//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_sendmsg_trampoline()
|
|
|
|
//go:linkname libc_sendmsg libc_sendmsg
|
|
//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
|
|
r0, _, e1 := syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_kevent_trampoline()
|
|
|
|
//go:linkname libc_kevent libc_kevent
|
|
//go:cgo_import_dynamic libc_kevent kevent "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func utimes(path string, timeval *[2]Timeval) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_utimes_trampoline()
|
|
|
|
//go:linkname libc_utimes libc_utimes
|
|
//go:cgo_import_dynamic libc_utimes utimes "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func futimes(fd int, timeval *[2]Timeval) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_futimes_trampoline()
|
|
|
|
//go:linkname libc_futimes libc_futimes
|
|
//go:cgo_import_dynamic libc_futimes futimes "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
|
val = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fcntl_trampoline()
|
|
|
|
//go:linkname libc_fcntl libc_fcntl
|
|
//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_pipe2_trampoline), uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_pipe2_trampoline()
|
|
|
|
//go:linkname libc_pipe2 libc_pipe2
|
|
//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
|
|
r0, _, e1 := syscall6(funcPC(libc_accept4_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
|
nfd = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_accept4_trampoline()
|
|
|
|
//go:linkname libc_accept4 libc_accept4
|
|
//go:cgo_import_dynamic libc_accept4 accept4 "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getdents(fd int, buf []byte) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(buf) > 0 {
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_getdents_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getdents_trampoline()
|
|
|
|
//go:linkname libc_getdents libc_getdents
|
|
//go:cgo_import_dynamic libc_getdents getdents "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Access(path string, mode uint32) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_access_trampoline()
|
|
|
|
//go:linkname libc_access libc_access
|
|
//go:cgo_import_dynamic libc_access access "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_adjtime_trampoline()
|
|
|
|
//go:linkname libc_adjtime libc_adjtime
|
|
//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Chdir(path string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_chdir_trampoline()
|
|
|
|
//go:linkname libc_chdir libc_chdir
|
|
//go:cgo_import_dynamic libc_chdir chdir "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Chflags(path string, flags int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_chflags_trampoline()
|
|
|
|
//go:linkname libc_chflags libc_chflags
|
|
//go:cgo_import_dynamic libc_chflags chflags "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Chmod(path string, mode uint32) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_chmod_trampoline()
|
|
|
|
//go:linkname libc_chmod libc_chmod
|
|
//go:cgo_import_dynamic libc_chmod chmod "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Chown(path string, uid int, gid int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_chown_trampoline()
|
|
|
|
//go:linkname libc_chown libc_chown
|
|
//go:cgo_import_dynamic libc_chown chown "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Chroot(path string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_chroot_trampoline()
|
|
|
|
//go:linkname libc_chroot libc_chroot
|
|
//go:cgo_import_dynamic libc_chroot chroot "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Close(fd int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_close_trampoline()
|
|
|
|
//go:linkname libc_close libc_close
|
|
//go:cgo_import_dynamic libc_close close "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Dup(fd int) (nfd int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
|
|
nfd = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_dup_trampoline()
|
|
|
|
//go:linkname libc_dup libc_dup
|
|
//go:cgo_import_dynamic libc_dup dup "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Dup2(from int, to int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_dup2_trampoline()
|
|
|
|
//go:linkname libc_dup2 libc_dup2
|
|
//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fchdir(fd int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fchdir_trampoline()
|
|
|
|
//go:linkname libc_fchdir libc_fchdir
|
|
//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fchflags(fd int, flags int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fchflags_trampoline()
|
|
|
|
//go:linkname libc_fchflags libc_fchflags
|
|
//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fchmod(fd int, mode uint32) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fchmod_trampoline()
|
|
|
|
//go:linkname libc_fchmod libc_fchmod
|
|
//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fchown(fd int, uid int, gid int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fchown_trampoline()
|
|
|
|
//go:linkname libc_fchown libc_fchown
|
|
//go:cgo_import_dynamic libc_fchown fchown "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Flock(fd int, how int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_flock_trampoline()
|
|
|
|
//go:linkname libc_flock libc_flock
|
|
//go:cgo_import_dynamic libc_flock flock "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fpathconf(fd int, name int) (val int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
|
|
val = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fpathconf_trampoline()
|
|
|
|
//go:linkname libc_fpathconf libc_fpathconf
|
|
//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fstat_trampoline()
|
|
|
|
//go:linkname libc_fstat libc_fstat
|
|
//go:cgo_import_dynamic libc_fstat fstat "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fstatfs_trampoline()
|
|
|
|
//go:linkname libc_fstatfs libc_fstatfs
|
|
//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Fsync(fd int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fsync_trampoline()
|
|
|
|
//go:linkname libc_fsync libc_fsync
|
|
//go:cgo_import_dynamic libc_fsync fsync "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Ftruncate(fd int, length int64) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_ftruncate_trampoline()
|
|
|
|
//go:linkname libc_ftruncate libc_ftruncate
|
|
//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getegid() (egid int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
|
|
egid = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_getegid_trampoline()
|
|
|
|
//go:linkname libc_getegid libc_getegid
|
|
//go:cgo_import_dynamic libc_getegid getegid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Geteuid() (uid int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
|
|
uid = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_geteuid_trampoline()
|
|
|
|
//go:linkname libc_geteuid libc_geteuid
|
|
//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getgid() (gid int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
|
|
gid = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_getgid_trampoline()
|
|
|
|
//go:linkname libc_getgid libc_getgid
|
|
//go:cgo_import_dynamic libc_getgid getgid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getpgid(pid int) (pgid int, err error) {
|
|
r0, _, e1 := rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
|
|
pgid = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getpgid_trampoline()
|
|
|
|
//go:linkname libc_getpgid libc_getpgid
|
|
//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getpgrp() (pgrp int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
|
|
pgrp = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_getpgrp_trampoline()
|
|
|
|
//go:linkname libc_getpgrp libc_getpgrp
|
|
//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getpid() (pid int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
|
|
pid = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_getpid_trampoline()
|
|
|
|
//go:linkname libc_getpid libc_getpid
|
|
//go:cgo_import_dynamic libc_getpid getpid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getppid() (ppid int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
|
|
ppid = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_getppid_trampoline()
|
|
|
|
//go:linkname libc_getppid libc_getppid
|
|
//go:cgo_import_dynamic libc_getppid getppid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getpriority(which int, who int) (prio int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
|
|
prio = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getpriority_trampoline()
|
|
|
|
//go:linkname libc_getpriority libc_getpriority
|
|
//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getrlimit(which int, lim *Rlimit) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getrlimit_trampoline()
|
|
|
|
//go:linkname libc_getrlimit libc_getrlimit
|
|
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getrusage_trampoline()
|
|
|
|
//go:linkname libc_getrusage libc_getrusage
|
|
//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getsid(pid int) (sid int, err error) {
|
|
r0, _, e1 := rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
|
|
sid = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getsid_trampoline()
|
|
|
|
//go:linkname libc_getsid libc_getsid
|
|
//go:cgo_import_dynamic libc_getsid getsid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Gettimeofday(tv *Timeval) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tv)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_gettimeofday_trampoline()
|
|
|
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Getuid() (uid int) {
|
|
r0, _, _ := rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
|
uid = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_getuid_trampoline()
|
|
|
|
//go:linkname libc_getuid libc_getuid
|
|
//go:cgo_import_dynamic libc_getuid getuid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Issetugid() (tainted bool) {
|
|
r0, _, _ := syscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
|
|
tainted = bool(r0 != 0)
|
|
return
|
|
}
|
|
|
|
func libc_issetugid_trampoline()
|
|
|
|
//go:linkname libc_issetugid libc_issetugid
|
|
//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Kill(pid int, signum Signal) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_kill_trampoline()
|
|
|
|
//go:linkname libc_kill libc_kill
|
|
//go:cgo_import_dynamic libc_kill kill "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Kqueue() (fd int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
|
|
fd = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_kqueue_trampoline()
|
|
|
|
//go:linkname libc_kqueue libc_kqueue
|
|
//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Lchown(path string, uid int, gid int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_lchown_trampoline()
|
|
|
|
//go:linkname libc_lchown libc_lchown
|
|
//go:cgo_import_dynamic libc_lchown lchown "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Link(path string, link string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
var _p1 *byte
|
|
_p1, err = BytePtrFromString(link)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_link_trampoline()
|
|
|
|
//go:linkname libc_link libc_link
|
|
//go:cgo_import_dynamic libc_link link "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Listen(s int, backlog int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_listen_trampoline()
|
|
|
|
//go:linkname libc_listen libc_listen
|
|
//go:cgo_import_dynamic libc_listen listen "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Lstat(path string, stat *Stat_t) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_lstat_trampoline()
|
|
|
|
//go:linkname libc_lstat libc_lstat
|
|
//go:cgo_import_dynamic libc_lstat lstat "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Mkdir(path string, mode uint32) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_mkdir_trampoline()
|
|
|
|
//go:linkname libc_mkdir libc_mkdir
|
|
//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Mkfifo(path string, mode uint32) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_mkfifo_trampoline()
|
|
|
|
//go:linkname libc_mkfifo libc_mkfifo
|
|
//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Mknod(path string, mode uint32, dev int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_mknod_trampoline()
|
|
|
|
//go:linkname libc_mknod libc_mknod
|
|
//go:cgo_import_dynamic libc_mknod mknod "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_nanosleep_trampoline), uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_nanosleep_trampoline()
|
|
|
|
//go:linkname libc_nanosleep libc_nanosleep
|
|
//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Open(path string, mode int, perm uint32) (fd int, err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
|
fd = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_open_trampoline()
|
|
|
|
//go:linkname libc_open libc_open
|
|
//go:cgo_import_dynamic libc_open open "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Pathconf(path string, name int) (val int, err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
|
val = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_pathconf_trampoline()
|
|
|
|
//go:linkname libc_pathconf libc_pathconf
|
|
//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(p) > 0 {
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_pread_trampoline()
|
|
|
|
//go:linkname libc_pread libc_pread
|
|
//go:cgo_import_dynamic libc_pread pread "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(p) > 0 {
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_pwrite_trampoline()
|
|
|
|
//go:linkname libc_pwrite libc_pwrite
|
|
//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func read(fd int, p []byte) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(p) > 0 {
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_read_trampoline()
|
|
|
|
//go:linkname libc_read libc_read
|
|
//go:cgo_import_dynamic libc_read read "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Readlink(path string, buf []byte) (n int, err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
var _p1 unsafe.Pointer
|
|
if len(buf) > 0 {
|
|
_p1 = unsafe.Pointer(&buf[0])
|
|
} else {
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_readlink_trampoline()
|
|
|
|
//go:linkname libc_readlink libc_readlink
|
|
//go:cgo_import_dynamic libc_readlink readlink "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Rename(from string, to string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(from)
|
|
if err != nil {
|
|
return
|
|
}
|
|
var _p1 *byte
|
|
_p1, err = BytePtrFromString(to)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_rename_trampoline()
|
|
|
|
//go:linkname libc_rename libc_rename
|
|
//go:cgo_import_dynamic libc_rename rename "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Revoke(path string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_revoke_trampoline()
|
|
|
|
//go:linkname libc_revoke libc_revoke
|
|
//go:cgo_import_dynamic libc_revoke revoke "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Rmdir(path string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_rmdir_trampoline()
|
|
|
|
//go:linkname libc_rmdir libc_rmdir
|
|
//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
|
|
_, _, e1 := syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_select_trampoline()
|
|
|
|
//go:linkname libc_select libc_select
|
|
//go:cgo_import_dynamic libc_select select "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setegid(egid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setegid_trampoline()
|
|
|
|
//go:linkname libc_setegid libc_setegid
|
|
//go:cgo_import_dynamic libc_setegid setegid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Seteuid(euid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_seteuid_trampoline()
|
|
|
|
//go:linkname libc_seteuid libc_seteuid
|
|
//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setgid(gid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setgid_trampoline()
|
|
|
|
//go:linkname libc_setgid libc_setgid
|
|
//go:cgo_import_dynamic libc_setgid setgid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setlogin(name string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(name)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setlogin_trampoline()
|
|
|
|
//go:linkname libc_setlogin libc_setlogin
|
|
//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setpgid(pid int, pgid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setpgid_trampoline()
|
|
|
|
//go:linkname libc_setpgid libc_setpgid
|
|
//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setpriority(which int, who int, prio int) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setpriority_trampoline()
|
|
|
|
//go:linkname libc_setpriority libc_setpriority
|
|
//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setregid(rgid int, egid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setregid_trampoline()
|
|
|
|
//go:linkname libc_setregid libc_setregid
|
|
//go:cgo_import_dynamic libc_setregid setregid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setreuid(ruid int, euid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setreuid_trampoline()
|
|
|
|
//go:linkname libc_setreuid libc_setreuid
|
|
//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setrlimit(which int, lim *Rlimit) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setrlimit_trampoline()
|
|
|
|
//go:linkname libc_setrlimit libc_setrlimit
|
|
//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setsid() (pid int, err error) {
|
|
r0, _, e1 := rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
|
|
pid = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setsid_trampoline()
|
|
|
|
//go:linkname libc_setsid libc_setsid
|
|
//go:cgo_import_dynamic libc_setsid setsid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Settimeofday(tp *Timeval) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_settimeofday_trampoline()
|
|
|
|
//go:linkname libc_settimeofday libc_settimeofday
|
|
//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Setuid(uid int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_setuid_trampoline()
|
|
|
|
//go:linkname libc_setuid libc_setuid
|
|
//go:cgo_import_dynamic libc_setuid setuid "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Stat(path string, stat *Stat_t) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_stat_trampoline()
|
|
|
|
//go:linkname libc_stat libc_stat
|
|
//go:cgo_import_dynamic libc_stat stat "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Statfs(path string, stat *Statfs_t) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_statfs_trampoline()
|
|
|
|
//go:linkname libc_statfs libc_statfs
|
|
//go:cgo_import_dynamic libc_statfs statfs "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Symlink(path string, link string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
var _p1 *byte
|
|
_p1, err = BytePtrFromString(link)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_symlink_trampoline()
|
|
|
|
//go:linkname libc_symlink libc_symlink
|
|
//go:cgo_import_dynamic libc_symlink symlink "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Sync() (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_sync_trampoline()
|
|
|
|
//go:linkname libc_sync libc_sync
|
|
//go:cgo_import_dynamic libc_sync sync "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Truncate(path string, length int64) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_truncate_trampoline()
|
|
|
|
//go:linkname libc_truncate libc_truncate
|
|
//go:cgo_import_dynamic libc_truncate truncate "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Umask(newmask int) (oldmask int) {
|
|
r0, _, _ := syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
|
|
oldmask = int(r0)
|
|
return
|
|
}
|
|
|
|
func libc_umask_trampoline()
|
|
|
|
//go:linkname libc_umask libc_umask
|
|
//go:cgo_import_dynamic libc_umask umask "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Unlink(path string) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_unlink_trampoline()
|
|
|
|
//go:linkname libc_unlink libc_unlink
|
|
//go:cgo_import_dynamic libc_unlink unlink "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Unmount(path string, flags int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_unmount_trampoline()
|
|
|
|
//go:linkname libc_unmount libc_unmount
|
|
//go:cgo_import_dynamic libc_unmount unmount "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func write(fd int, p []byte) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(p) > 0 {
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_write_trampoline()
|
|
|
|
//go:linkname libc_write libc_write
|
|
//go:cgo_import_dynamic libc_write write "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
|
|
r0, _, e1 := syscall6X(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
|
|
ret = uintptr(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_mmap_trampoline()
|
|
|
|
//go:linkname libc_mmap libc_mmap
|
|
//go:cgo_import_dynamic libc_mmap mmap "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func munmap(addr uintptr, length uintptr) (err error) {
|
|
_, _, e1 := syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_munmap_trampoline()
|
|
|
|
//go:linkname libc_munmap libc_munmap
|
|
//go:cgo_import_dynamic libc_munmap munmap "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall6(funcPC(libc_utimensat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_utimensat_trampoline()
|
|
|
|
//go:linkname libc_utimensat libc_utimensat
|
|
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func directSyscall(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) (ret uintptr, err error) {
|
|
r0, _, e1 := syscall6X(funcPC(libc_syscall_trampoline), uintptr(trap), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), uintptr(a5))
|
|
ret = uintptr(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_syscall_trampoline()
|
|
|
|
//go:linkname libc_syscall libc_syscall
|
|
//go:cgo_import_dynamic libc_syscall syscall "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|
r0, _, e1 := syscallX(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
|
|
newoffset = int64(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_lseek_trampoline()
|
|
|
|
//go:linkname libc_lseek libc_lseek
|
|
//go:cgo_import_dynamic libc_lseek lseek "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getcwd(buf []byte) (n int, err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(buf) > 0 {
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
r0, _, e1 := syscall(funcPC(libc_getcwd_trampoline), uintptr(_p0), uintptr(len(buf)), 0)
|
|
n = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getcwd_trampoline()
|
|
|
|
//go:linkname libc_getcwd libc_getcwd
|
|
//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(mib) > 0 {
|
|
_p0 = unsafe.Pointer(&mib[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
_, _, e1 := syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_sysctl_trampoline()
|
|
|
|
//go:linkname libc_sysctl libc_sysctl
|
|
//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func fork() (pid int, err error) {
|
|
r0, _, e1 := rawSyscall(funcPC(libc_fork_trampoline), 0, 0, 0)
|
|
pid = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fork_trampoline()
|
|
|
|
//go:linkname libc_fork libc_fork
|
|
//go:cgo_import_dynamic libc_fork fork "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func ioctl(fd int, req int, arg int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_ioctl_trampoline()
|
|
|
|
//go:linkname libc_ioctl libc_ioctl
|
|
//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func execve(path *byte, argv **byte, envp **byte) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_execve_trampoline), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(argv)), uintptr(unsafe.Pointer(envp)))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_execve_trampoline()
|
|
|
|
//go:linkname libc_execve libc_execve
|
|
//go:cgo_import_dynamic libc_execve execve "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func exit(res int) (err error) {
|
|
_, _, e1 := rawSyscall(funcPC(libc_exit_trampoline), uintptr(res), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_exit_trampoline()
|
|
|
|
//go:linkname libc_exit libc_exit
|
|
//go:cgo_import_dynamic libc_exit exit "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
//go:nosplit
|
|
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
|
_, _, e1 := syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_ptrace_trampoline()
|
|
|
|
//go:linkname libc_ptrace libc_ptrace
|
|
//go:cgo_import_dynamic libc_ptrace ptrace "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func getentropy(p []byte) (err error) {
|
|
var _p0 unsafe.Pointer
|
|
if len(p) > 0 {
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
} else {
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
}
|
|
_, _, e1 := rawSyscall(funcPC(libc_getentropy_trampoline), uintptr(_p0), uintptr(len(p)), 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_getentropy_trampoline()
|
|
|
|
//go:linkname libc_getentropy libc_getentropy
|
|
//go:cgo_import_dynamic libc_getentropy getentropy "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall6(funcPC(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_fstatat_trampoline()
|
|
|
|
//go:linkname libc_fstatat libc_fstatat
|
|
//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (val int, err error) {
|
|
r0, _, e1 := syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
|
val = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func unlinkat(fd int, path string, flags int) (err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
_, _, e1 := syscall(funcPC(libc_unlinkat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_unlinkat_trampoline()
|
|
|
|
//go:linkname libc_unlinkat libc_unlinkat
|
|
//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
func openat(fd int, path string, flags int, perm uint32) (fdret int, err error) {
|
|
var _p0 *byte
|
|
_p0, err = BytePtrFromString(path)
|
|
if err != nil {
|
|
return
|
|
}
|
|
r0, _, e1 := syscall6(funcPC(libc_openat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(perm), 0, 0)
|
|
fdret = int(r0)
|
|
if e1 != 0 {
|
|
err = errnoErr(e1)
|
|
}
|
|
return
|
|
}
|
|
|
|
func libc_openat_trampoline()
|
|
|
|
//go:linkname libc_openat libc_openat
|
|
//go:cgo_import_dynamic libc_openat openat "libc.so"
|