2022-08-26 00:05:39 +00:00
|
|
|
// Code generated by mkmerge; DO NOT EDIT.
|
2022-07-07 20:11:50 +00:00
|
|
|
|
|
|
|
//go:build linux
|
|
|
|
// +build linux
|
|
|
|
|
|
|
|
package unix
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
|
|
|
|
fd = int(r0)
|
|
|
|
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)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_FCHMODAT, 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Readlinkat(dirfd int, 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 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 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 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(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
|
|
|
|
wpid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-08-26 00:05:39 +00:00
|
|
|
func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-07-07 20:11:50 +00:00
|
|
|
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
|
|
|
|
ret = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
|
|
|
|
ret = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(arg2)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
|
|
|
|
ret = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(arg3)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(arg4)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
|
|
|
|
ret = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(payload) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&payload[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
|
|
|
|
ret = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(keyType)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(restriction)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(arg)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(source)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(target)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 *byte
|
|
|
|
_p2, err = BytePtrFromString(fstype)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-08-26 00:05:39 +00:00
|
|
|
func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(pathname)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-07-07 20:11:50 +00:00
|
|
|
func Acct(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(keyType)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(description)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(payload) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&payload[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
|
|
|
|
id = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Adjtimex(buf *Timex) (state int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
|
|
|
|
state = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ClockGetres(clockid int32, res *Timespec) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ClockGettime(clockid int32, time *Timespec) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Close(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func CloseRange(first uint, last uint, flags uint) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func DeleteModule(name string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(name)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Dup(oldfd int) (fd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Dup3(oldfd int, newfd int, flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func EpollCreate1(flag int) (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
|
|
|
_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Eventfd(initval uint, flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Exit(code int) {
|
|
|
|
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchdir(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchmod(fd int, mode uint32) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fdatasync(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
|
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func FinitModule(fd int, params string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(params)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
|
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Flock(fd int, how int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fremovexattr(fd int, attr string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fsync(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-08-26 00:05:39 +00:00
|
|
|
func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
|
|
|
|
fsfd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fsopen(fsName string, flags int) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(fsName)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(pathName)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-07-07 20:11:50 +00:00
|
|
|
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(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpgid(pid int) (pgid int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
|
|
|
|
pgid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpid() (pid int) {
|
|
|
|
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
|
|
|
pid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getppid() (ppid int) {
|
|
|
|
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
|
|
|
ppid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
|
|
|
|
prio = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getrandom(buf []byte, flags int) (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(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getsid(pid int) (sid int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
|
|
|
sid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Gettid() (tid int) {
|
|
|
|
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
|
|
|
tid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InitModule(moduleImage []byte, params string) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(moduleImage) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&moduleImage[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(params)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(pathname)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
|
|
|
watchdesc = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InotifyInit1(flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
|
|
|
|
success = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Kill(pid int, sig syscall.Signal) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Klogctl(typ 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(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Listxattr(path string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Llistxattr(path string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Lremovexattr(path string, attr string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(data) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&data[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func MemfdCreate(name string, flags int) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(name)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MKDIRAT, 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 Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-08-26 00:05:39 +00:00
|
|
|
func MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(fromPathName)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(toPathName)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_MOVE_MOUNT, uintptr(fromDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(toDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-07-07 20:11:50 +00:00
|
|
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-08-26 00:05:39 +00:00
|
|
|
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
|
|
|
|
|
2022-07-07 20:11:50 +00:00
|
|
|
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)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func PivotRoot(newroot string, putold string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(newroot)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(putold)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
|
|
|
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Removexattr(path string, attr string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(keyType)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(description)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 *byte
|
|
|
|
_p2, err = BytePtrFromString(callback)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
|
|
|
|
id = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setdomainname(p []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Sethostname(p []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setpgid(pid int, pgid int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setsid() (pid int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
|
|
|
|
pid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Settimeofday(tv *Timeval) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setns(fd int, nstype int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(data) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&data[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
|
|
|
newfd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Sync() {
|
|
|
|
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Syncfs(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Sysinfo(info *Sysinfo_t) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func TimerfdCreate(clockid int, flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
|
|
|
|
_, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Times(tms *Tms) (ticks uintptr, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
|
|
|
|
ticks = uintptr(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Umask(mask int) (oldmask int) {
|
|
|
|
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
|
|
|
oldmask = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Uname(buf *Utsname) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Unmount(target string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(target)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Unshare(flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_UNSHARE, 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 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(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func exitThread(code int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func readlen(fd int, p *byte, np int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
|
|
|
|
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, p *byte, np int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func readv(fd int, iovs []Iovec) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(iovs) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&iovs[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func writev(fd int, iovs []Iovec) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(iovs) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&iovs[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(iovs) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&iovs[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(iovs) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&iovs[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(iovs) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&iovs[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(iovs) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&iovs[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func munmap(addr uintptr, length uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Madvise(b []byte, advice int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mprotect(b []byte, prot int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mlock(b []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mlockall(flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_MLOCKALL, 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 Msync(b []byte, flags int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Munlock(b []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Munlockall() (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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 Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_FACCESSAT2, 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 nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(pathname)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(localIov) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&localIov[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(remoteIov) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&remoteIov[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(localIov) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&localIov[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(remoteIov) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&remoteIov[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func PidfdOpen(pid int, flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-08-26 00:05:39 +00:00
|
|
|
func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_PIDFD_SEND_SIGNAL, uintptr(pidfd), uintptr(sig), uintptr(unsafe.Pointer(info)), uintptr(flags), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-07-07 20:11:50 +00:00
|
|
|
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
|
|
|
|
ret = uintptr(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
|
|
|
result = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func shmdt(addr uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func shmget(key int, size int, flag int) (id int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
|
|
|
|
id = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
2022-08-26 00:05:39 +00:00
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func getitimer(which int, currValue *Itimerval) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
2022-11-04 02:21:49 +00:00
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) {
|
|
|
|
_, _, e1 := RawSyscall6(SYS_RT_SIGPROCMASK, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oldset)), uintptr(sigsetsize), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|