mirror of https://github.com/docker/cli.git
vendor: golang.org/x/sys v0.0.0-20220405210540-1e041c57c461
full diff: da31bd327a...1e041c57c4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
165c5da00d
commit
acf6aee911
|
@ -35,7 +35,7 @@ require (
|
||||||
github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a
|
github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a
|
||||||
github.com/tonistiigi/go-rosetta v0.0.0-20200727161949-f79598599c5d
|
github.com/tonistiigi/go-rosetta v0.0.0-20200727161949-f79598599c5d
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0
|
github.com/xeipuuv/gojsonschema v1.2.0
|
||||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
|
golang.org/x/sys v0.0.0-20220405210540-1e041c57c461
|
||||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
|
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
|
||||||
golang.org/x/text v0.3.7
|
golang.org/x/text v0.3.7
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
|
|
|
@ -561,8 +561,9 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||||
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
|
|
||||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220405210540-1e041c57c461 h1:kHVeDEnfKn3T238CvrUcz6KeEsFHVaKh4kMTt6Wsysg=
|
||||||
|
golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
|
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
|
||||||
|
|
|
@ -194,3 +194,26 @@ func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
|
||||||
// identical so pass *IfreqData directly.
|
// identical so pass *IfreqData directly.
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an
|
||||||
|
// existing KCM socket, returning a structure containing the file descriptor of
|
||||||
|
// the new socket.
|
||||||
|
func IoctlKCMClone(fd int) (*KCMClone, error) {
|
||||||
|
var info KCMClone
|
||||||
|
if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &info, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlKCMAttach attaches a TCP socket and associated BPF program file
|
||||||
|
// descriptor to a multiplexor.
|
||||||
|
func IoctlKCMAttach(fd int, info KCMAttach) error {
|
||||||
|
return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
|
||||||
|
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
|
||||||
|
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
|
||||||
|
}
|
||||||
|
|
|
@ -205,6 +205,7 @@ struct ltchars {
|
||||||
#include <linux/bpf.h>
|
#include <linux/bpf.h>
|
||||||
#include <linux/can.h>
|
#include <linux/can.h>
|
||||||
#include <linux/can/error.h>
|
#include <linux/can/error.h>
|
||||||
|
#include <linux/can/netlink.h>
|
||||||
#include <linux/can/raw.h>
|
#include <linux/can/raw.h>
|
||||||
#include <linux/capability.h>
|
#include <linux/capability.h>
|
||||||
#include <linux/cryptouser.h>
|
#include <linux/cryptouser.h>
|
||||||
|
@ -231,6 +232,7 @@ struct ltchars {
|
||||||
#include <linux/if_packet.h>
|
#include <linux/if_packet.h>
|
||||||
#include <linux/if_xdp.h>
|
#include <linux/if_xdp.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
#include <linux/kcm.h>
|
||||||
#include <linux/kexec.h>
|
#include <linux/kexec.h>
|
||||||
#include <linux/keyctl.h>
|
#include <linux/keyctl.h>
|
||||||
#include <linux/landlock.h>
|
#include <linux/landlock.h>
|
||||||
|
@ -503,6 +505,7 @@ ccflags="$@"
|
||||||
$2 ~ /^O?XTABS$/ ||
|
$2 ~ /^O?XTABS$/ ||
|
||||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||||
$2 ~ /^IN_/ ||
|
$2 ~ /^IN_/ ||
|
||||||
|
$2 ~ /^KCM/ ||
|
||||||
$2 ~ /^LANDLOCK_/ ||
|
$2 ~ /^LANDLOCK_/ ||
|
||||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||||
|
@ -597,8 +600,10 @@ ccflags="$@"
|
||||||
$2 ~ /^DEVLINK_/ ||
|
$2 ~ /^DEVLINK_/ ||
|
||||||
$2 ~ /^ETHTOOL_/ ||
|
$2 ~ /^ETHTOOL_/ ||
|
||||||
$2 ~ /^LWTUNNEL_IP/ ||
|
$2 ~ /^LWTUNNEL_IP/ ||
|
||||||
|
$2 ~ /^ITIMER_/ ||
|
||||||
$2 !~ "WMESGLEN" &&
|
$2 !~ "WMESGLEN" &&
|
||||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||||
|
$2 ~ /^P_/ ||
|
||||||
$2 ~/^PPPIOC/ ||
|
$2 ~/^PPPIOC/ ||
|
||||||
$2 ~ /^FAN_|FANOTIFY_/ ||
|
$2 ~ /^FAN_|FANOTIFY_/ ||
|
||||||
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
|
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
|
||||||
|
|
|
@ -215,18 +215,12 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||||
// Recvmsg not implemented on AIX
|
// Recvmsg not implemented on AIX
|
||||||
sa := new(SockaddrUnix)
|
return -1, -1, -1, ENOSYS
|
||||||
return -1, -1, -1, sa, ENOSYS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
|
||||||
// SendmsgN not implemented on AIX
|
// SendmsgN not implemented on AIX
|
||||||
return -1, ENOSYS
|
return -1, ENOSYS
|
||||||
}
|
}
|
||||||
|
@ -458,8 +452,8 @@ func Fsync(fd int) error {
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys lstat(path string, stat *Stat_t) (err error)
|
//sys lstat(path string, stat *Stat_t) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = pread64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
|
|
|
@ -325,10 +325,9 @@ func GetsockoptString(fd, level, opt int) (string, error) {
|
||||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
|
|
||||||
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||||
var msg Msghdr
|
var msg Msghdr
|
||||||
var rsa RawSockaddrAny
|
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||||
msg.Name = (*byte)(unsafe.Pointer(&rsa))
|
|
||||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||||
var iov Iovec
|
var iov Iovec
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
|
@ -352,29 +351,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
||||||
}
|
}
|
||||||
oobn = int(msg.Controllen)
|
oobn = int(msg.Controllen)
|
||||||
recvflags = int(msg.Flags)
|
recvflags = int(msg.Flags)
|
||||||
// source address is only specified if the socket is unconnected
|
|
||||||
if rsa.Addr.Family != AF_UNSPEC {
|
|
||||||
from, err = anyToSockaddr(fd, &rsa)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
|
|
||||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
|
||||||
var ptr unsafe.Pointer
|
|
||||||
var salen _Socklen
|
|
||||||
if to != nil {
|
|
||||||
ptr, salen, err = to.sockaddr()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var msg Msghdr
|
var msg Msghdr
|
||||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||||
msg.Namelen = uint32(salen)
|
msg.Namelen = uint32(salen)
|
||||||
|
@ -571,12 +553,7 @@ func UtimesNano(path string, ts []Timespec) error {
|
||||||
if len(ts) != 2 {
|
if len(ts) != 2 {
|
||||||
return EINVAL
|
return EINVAL
|
||||||
}
|
}
|
||||||
// Darwin setattrlist can set nanosecond timestamps
|
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
err := setattrlistTimes(path, ts, 0)
|
|
||||||
if err != ENOSYS {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -596,10 +573,6 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
||||||
if len(ts) != 2 {
|
if len(ts) != 2 {
|
||||||
return EINVAL
|
return EINVAL
|
||||||
}
|
}
|
||||||
err := setattrlistTimes(path, ts, flags)
|
|
||||||
if err != ENOSYS {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
|
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,16 +141,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
||||||
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
|
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
|
||||||
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
|
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
|
||||||
|
|
||||||
type attrList struct {
|
|
||||||
bitmapCount uint16
|
|
||||||
_ uint16
|
|
||||||
CommonAttr uint32
|
|
||||||
VolAttr uint32
|
|
||||||
DirAttr uint32
|
|
||||||
FileAttr uint32
|
|
||||||
Forkattr uint32
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe(p *[2]int32) (err error)
|
//sysnb pipe(p *[2]int32) (err error)
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
func Pipe(p []int) (err error) {
|
||||||
|
@ -282,36 +272,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
||||||
return flistxattr(fd, xattrPointer(dest), len(dest), 0)
|
return flistxattr(fd, xattrPointer(dest), len(dest), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
||||||
_p0, err := BytePtrFromString(path)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
var attrList attrList
|
|
||||||
attrList.bitmapCount = ATTR_BIT_MAP_COUNT
|
|
||||||
attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
|
|
||||||
|
|
||||||
// order is mtime, atime: the opposite of Chtimes
|
|
||||||
attributes := [2]Timespec{times[1], times[0]}
|
|
||||||
options := 0
|
|
||||||
if flags&AT_SYMLINK_NOFOLLOW != 0 {
|
|
||||||
options |= FSOPT_NOFOLLOW
|
|
||||||
}
|
|
||||||
return setattrlist(
|
|
||||||
_p0,
|
|
||||||
unsafe.Pointer(&attrList),
|
|
||||||
unsafe.Pointer(&attributes),
|
|
||||||
unsafe.Sizeof(attributes),
|
|
||||||
options)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
|
|
||||||
|
|
||||||
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
|
|
||||||
// Darwin doesn't support SYS_UTIMENSAT
|
|
||||||
return ENOSYS
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapped
|
* Wrapped
|
||||||
|
@ -546,8 +507,8 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Pathconf(path string, name int) (val int, err error)
|
//sys Pathconf(path string, name int) (val int, err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
//sys pread(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||||
|
|
|
@ -125,12 +125,12 @@ func Pipe2(p []int, flags int) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
|
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
|
||||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
return extpread(fd, p, 0, offset)
|
return extpread(fd, p, 0, offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
|
//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
|
||||||
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
return extpwrite(fd, p, 0, offset)
|
return extpwrite(fd, p, 0, offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,11 +169,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|
||||||
// used on Darwin for UtimesNano
|
|
||||||
return ENOSYS
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||||
|
|
|
@ -194,11 +194,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|
||||||
// used on Darwin for UtimesNano
|
|
||||||
return ENOSYS
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||||
|
@ -638,8 +633,8 @@ func PtraceSingleStep(pid int) (err error) {
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Pathconf(path string, name int) (val int, err error)
|
//sys Pathconf(path string, name int) (val int, err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
//sys pread(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||||
|
|
|
@ -14,6 +14,7 @@ package unix
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -249,6 +250,13 @@ func Getwd() (wd string, err error) {
|
||||||
if n < 1 || n > len(buf) || buf[n-1] != 0 {
|
if n < 1 || n > len(buf) || buf[n-1] != 0 {
|
||||||
return "", EINVAL
|
return "", EINVAL
|
||||||
}
|
}
|
||||||
|
// In some cases, Linux can return a path that starts with the
|
||||||
|
// "(unreachable)" prefix, which can potentially be a valid relative
|
||||||
|
// path. To work around that, return ENOENT if path is not absolute.
|
||||||
|
if buf[0] != '/' {
|
||||||
|
return "", ENOENT
|
||||||
|
}
|
||||||
|
|
||||||
return string(buf[0 : n-1]), nil
|
return string(buf[0 : n-1]), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,6 +366,8 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
|
||||||
|
|
||||||
func Mkfifo(path string, mode uint32) error {
|
func Mkfifo(path string, mode uint32) error {
|
||||||
return Mknod(path, mode|S_IFIFO, 0)
|
return Mknod(path, mode|S_IFIFO, 0)
|
||||||
}
|
}
|
||||||
|
@ -1489,10 +1499,9 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
|
||||||
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
|
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
|
||||||
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
|
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
|
||||||
|
|
||||||
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||||
var msg Msghdr
|
var msg Msghdr
|
||||||
var rsa RawSockaddrAny
|
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||||
msg.Name = (*byte)(unsafe.Pointer(&rsa))
|
|
||||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||||
var iov Iovec
|
var iov Iovec
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
|
@ -1523,28 +1532,10 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
||||||
}
|
}
|
||||||
oobn = int(msg.Controllen)
|
oobn = int(msg.Controllen)
|
||||||
recvflags = int(msg.Flags)
|
recvflags = int(msg.Flags)
|
||||||
// source address is only specified if the socket is unconnected
|
|
||||||
if rsa.Addr.Family != AF_UNSPEC {
|
|
||||||
from, err = anyToSockaddr(fd, &rsa)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
|
||||||
var ptr unsafe.Pointer
|
|
||||||
var salen _Socklen
|
|
||||||
if to != nil {
|
|
||||||
var err error
|
|
||||||
ptr, salen, err = to.sockaddr()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var msg Msghdr
|
var msg Msghdr
|
||||||
msg.Name = (*byte)(ptr)
|
msg.Name = (*byte)(ptr)
|
||||||
msg.Namelen = uint32(salen)
|
msg.Namelen = uint32(salen)
|
||||||
|
@ -1869,6 +1860,7 @@ func Getpgrp() (pid int) {
|
||||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||||
|
//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
|
||||||
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
||||||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||||
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||||
|
@ -2308,17 +2300,63 @@ type RemoteIovec struct {
|
||||||
|
|
||||||
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
|
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
|
||||||
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
|
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
|
||||||
|
//sys PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL
|
||||||
|
|
||||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||||
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
||||||
//sys shmdt(addr uintptr) (err error)
|
//sys shmdt(addr uintptr) (err error)
|
||||||
//sys shmget(key int, size int, flag int) (id int, err error)
|
//sys shmget(key int, size int, flag int) (id int, err error)
|
||||||
|
|
||||||
|
//sys getitimer(which int, currValue *Itimerval) (err error)
|
||||||
|
//sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
|
||||||
|
|
||||||
|
// MakeItimerval creates an Itimerval from interval and value durations.
|
||||||
|
func MakeItimerval(interval, value time.Duration) Itimerval {
|
||||||
|
return Itimerval{
|
||||||
|
Interval: NsecToTimeval(interval.Nanoseconds()),
|
||||||
|
Value: NsecToTimeval(value.Nanoseconds()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// A value which may be passed to the which parameter for Getitimer and
|
||||||
|
// Setitimer.
|
||||||
|
type ItimerWhich int
|
||||||
|
|
||||||
|
// Possible which values for Getitimer and Setitimer.
|
||||||
|
const (
|
||||||
|
ItimerReal ItimerWhich = ITIMER_REAL
|
||||||
|
ItimerVirtual ItimerWhich = ITIMER_VIRTUAL
|
||||||
|
ItimerProf ItimerWhich = ITIMER_PROF
|
||||||
|
)
|
||||||
|
|
||||||
|
// Getitimer wraps getitimer(2) to return the current value of the timer
|
||||||
|
// specified by which.
|
||||||
|
func Getitimer(which ItimerWhich) (Itimerval, error) {
|
||||||
|
var it Itimerval
|
||||||
|
if err := getitimer(int(which), &it); err != nil {
|
||||||
|
return Itimerval{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return it, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.
|
||||||
|
// It returns the previous value of the timer.
|
||||||
|
//
|
||||||
|
// If the Itimerval argument is the zero value, the timer will be disarmed.
|
||||||
|
func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
||||||
|
var prev Itimerval
|
||||||
|
if err := setitimer(int(which), &it, &prev); err != nil {
|
||||||
|
return Itimerval{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return prev, nil
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unimplemented
|
* Unimplemented
|
||||||
*/
|
*/
|
||||||
// AfsSyscall
|
// AfsSyscall
|
||||||
// Alarm
|
|
||||||
// ArchPrctl
|
// ArchPrctl
|
||||||
// Brk
|
// Brk
|
||||||
// ClockNanosleep
|
// ClockNanosleep
|
||||||
|
@ -2334,7 +2372,6 @@ type RemoteIovec struct {
|
||||||
// GetMempolicy
|
// GetMempolicy
|
||||||
// GetRobustList
|
// GetRobustList
|
||||||
// GetThreadArea
|
// GetThreadArea
|
||||||
// Getitimer
|
|
||||||
// Getpmsg
|
// Getpmsg
|
||||||
// IoCancel
|
// IoCancel
|
||||||
// IoDestroy
|
// IoDestroy
|
||||||
|
@ -2412,5 +2449,4 @@ type RemoteIovec struct {
|
||||||
// Vfork
|
// Vfork
|
||||||
// Vhangup
|
// Vhangup
|
||||||
// Vserver
|
// Vserver
|
||||||
// Waitid
|
|
||||||
// _Sysctl
|
// _Sysctl
|
||||||
|
|
|
@ -35,8 +35,8 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||||
|
@ -173,14 +173,6 @@ const (
|
||||||
_SENDMMSG = 20
|
_SENDMMSG = 20
|
||||||
)
|
)
|
||||||
|
|
||||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
|
||||||
fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
|
|
||||||
if e != 0 {
|
|
||||||
err = e
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
if e != 0 {
|
if e != 0 {
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
|
||||||
|
// +build linux
|
||||||
|
// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
|
||||||
|
// values.
|
||||||
|
|
||||||
|
//sys Alarm(seconds uint) (remaining uint, err error)
|
|
@ -28,9 +28,10 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||||
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
|
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys MemfdSecret(flags int) (fd int, err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
|
|
||||||
|
@ -62,7 +63,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||||
//sys Truncate(path string, length int64) (err error)
|
//sys Truncate(path string, length int64) (err error)
|
||||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -27,7 +27,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
return newoffset, nil
|
return newoffset, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
@ -97,8 +96,8 @@ func Utime(path string, buf *Utimbuf) error {
|
||||||
|
|
||||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
//sys utimes(path string, times *[2]Timeval) (err error)
|
||||||
|
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||||
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,9 @@ import "unsafe"
|
||||||
//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys MemfdSecret(flags int) (fd int, err error)
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
|
|
||||||
|
@ -66,7 +67,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -21,8 +21,8 @@ package unix
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||||
//sys Truncate(path string, length int64) (err error)
|
//sys Truncate(path string, length int64) (err error)
|
||||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -25,8 +25,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||||
|
@ -41,7 +41,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -27,8 +27,8 @@ import (
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||||
|
@ -43,7 +43,6 @@ import (
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -26,8 +26,8 @@ package unix
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||||
|
@ -45,7 +45,6 @@ package unix
|
||||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||||
//sys Truncate(path string, length int64) (err error)
|
//sys Truncate(path string, length int64) (err error)
|
||||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -22,8 +22,8 @@ import "unsafe"
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
|
|
||||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||||
|
@ -65,7 +65,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -26,8 +26,8 @@ import (
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||||
|
@ -145,15 +145,6 @@ const (
|
||||||
netSendMMsg = 20
|
netSendMMsg = 20
|
||||||
)
|
)
|
||||||
|
|
||||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
|
|
||||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
|
|
||||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
|
|
||||||
if err != 0 {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
return int(fd), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
|
||||||
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
|
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
|
||||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
|
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
|
||||||
|
|
|
@ -23,8 +23,8 @@ package unix
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||||
|
@ -42,7 +42,6 @@ package unix
|
||||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||||
//sys Truncate(path string, length int64) (err error)
|
//sys Truncate(path string, length int64) (err error)
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
|
|
@ -163,11 +163,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
return -1, ENOSYS
|
return -1, ENOSYS
|
||||||
}
|
}
|
||||||
|
|
||||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|
||||||
// used on Darwin for UtimesNano
|
|
||||||
return ENOSYS
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||||
|
@ -313,8 +308,8 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Pathconf(path string, name int) (val int, err error)
|
//sys Pathconf(path string, name int) (val int, err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
//sys pread(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||||
|
|
|
@ -149,11 +149,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|
||||||
// used on Darwin for UtimesNano
|
|
||||||
return ENOSYS
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||||
|
@ -274,8 +269,8 @@ func Uname(uname *Utsname) error {
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Pathconf(path string, name int) (val int, err error)
|
//sys Pathconf(path string, name int) (val int, err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
//sys pread(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||||
|
|
|
@ -451,10 +451,9 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||||
|
|
||||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
|
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
|
||||||
|
|
||||||
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||||
var msg Msghdr
|
var msg Msghdr
|
||||||
var rsa RawSockaddrAny
|
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||||
msg.Name = (*byte)(unsafe.Pointer(&rsa))
|
|
||||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||||
var iov Iovec
|
var iov Iovec
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
|
@ -476,29 +475,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
oobn = int(msg.Accrightslen)
|
oobn = int(msg.Accrightslen)
|
||||||
// source address is only specified if the socket is unconnected
|
|
||||||
if rsa.Addr.Family != AF_UNSPEC {
|
|
||||||
from, err = anyToSockaddr(fd, &rsa)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
|
||||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
|
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
|
||||||
|
|
||||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||||
var ptr unsafe.Pointer
|
|
||||||
var salen _Socklen
|
|
||||||
if to != nil {
|
|
||||||
ptr, salen, err = to.sockaddr()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var msg Msghdr
|
var msg Msghdr
|
||||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||||
msg.Namelen = uint32(salen)
|
msg.Namelen = uint32(salen)
|
||||||
|
@ -661,8 +643,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||||
//sys Pathconf(path string, name int) (val int, err error)
|
//sys Pathconf(path string, name int) (val int, err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
//sys pread(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||||
//sys Rename(from string, to string) (err error)
|
//sys Rename(from string, to string) (err error)
|
||||||
|
@ -755,8 +737,20 @@ type fileObjCookie struct {
|
||||||
type EventPort struct {
|
type EventPort struct {
|
||||||
port int
|
port int
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
fds map[uintptr]interface{}
|
fds map[uintptr]*fileObjCookie
|
||||||
paths map[string]*fileObjCookie
|
paths map[string]*fileObjCookie
|
||||||
|
// The user cookie presents an interesting challenge from a memory management perspective.
|
||||||
|
// There are two paths by which we can discover that it is no longer in use:
|
||||||
|
// 1. The user calls port_dissociate before any events fire
|
||||||
|
// 2. An event fires and we return it to the user
|
||||||
|
// The tricky situation is if the event has fired in the kernel but
|
||||||
|
// the user hasn't requested/received it yet.
|
||||||
|
// If the user wants to port_dissociate before the event has been processed,
|
||||||
|
// we should handle things gracefully. To do so, we need to keep an extra
|
||||||
|
// reference to the cookie around until the event is processed
|
||||||
|
// thus the otherwise seemingly extraneous "cookies" map
|
||||||
|
// The key of this map is a pointer to the corresponding &fCookie.cookie
|
||||||
|
cookies map[*interface{}]*fileObjCookie
|
||||||
}
|
}
|
||||||
|
|
||||||
// PortEvent is an abstraction of the port_event C struct.
|
// PortEvent is an abstraction of the port_event C struct.
|
||||||
|
@ -781,8 +775,9 @@ func NewEventPort() (*EventPort, error) {
|
||||||
}
|
}
|
||||||
e := &EventPort{
|
e := &EventPort{
|
||||||
port: port,
|
port: port,
|
||||||
fds: make(map[uintptr]interface{}),
|
fds: make(map[uintptr]*fileObjCookie),
|
||||||
paths: make(map[string]*fileObjCookie),
|
paths: make(map[string]*fileObjCookie),
|
||||||
|
cookies: make(map[*interface{}]*fileObjCookie),
|
||||||
}
|
}
|
||||||
return e, nil
|
return e, nil
|
||||||
}
|
}
|
||||||
|
@ -797,9 +792,13 @@ func NewEventPort() (*EventPort, error) {
|
||||||
func (e *EventPort) Close() error {
|
func (e *EventPort) Close() error {
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
defer e.mu.Unlock()
|
defer e.mu.Unlock()
|
||||||
|
err := Close(e.port)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
e.fds = nil
|
e.fds = nil
|
||||||
e.paths = nil
|
e.paths = nil
|
||||||
return Close(e.port)
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PathIsWatched checks to see if path is associated with this EventPort.
|
// PathIsWatched checks to see if path is associated with this EventPort.
|
||||||
|
@ -836,6 +835,7 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
e.paths[path] = fCookie
|
e.paths[path] = fCookie
|
||||||
|
e.cookies[&fCookie.cookie] = fCookie
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -848,11 +848,19 @@ func (e *EventPort) DissociatePath(path string) error {
|
||||||
return fmt.Errorf("%v is not associated with this Event Port", path)
|
return fmt.Errorf("%v is not associated with this Event Port", path)
|
||||||
}
|
}
|
||||||
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
|
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
|
||||||
if err != nil {
|
// If the path is no longer associated with this event port (ENOENT)
|
||||||
|
// we should delete it from our map. We can still return ENOENT to the caller.
|
||||||
|
// But we need to save the cookie
|
||||||
|
if err != nil && err != ENOENT {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err == nil {
|
||||||
|
// dissociate was successful, safe to delete the cookie
|
||||||
|
fCookie := e.paths[path]
|
||||||
|
delete(e.cookies, &fCookie.cookie)
|
||||||
|
}
|
||||||
delete(e.paths, path)
|
delete(e.paths, path)
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssociateFd wraps calls to port_associate(3c) on file descriptors.
|
// AssociateFd wraps calls to port_associate(3c) on file descriptors.
|
||||||
|
@ -862,12 +870,13 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
|
||||||
if _, found := e.fds[fd]; found {
|
if _, found := e.fds[fd]; found {
|
||||||
return fmt.Errorf("%v is already associated with this Event Port", fd)
|
return fmt.Errorf("%v is already associated with this Event Port", fd)
|
||||||
}
|
}
|
||||||
pcookie := &cookie
|
fCookie := &fileObjCookie{nil, cookie}
|
||||||
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
|
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
e.fds[fd] = pcookie
|
e.fds[fd] = fCookie
|
||||||
|
e.cookies[&fCookie.cookie] = fCookie
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -880,11 +889,16 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
|
||||||
return fmt.Errorf("%v is not associated with this Event Port", fd)
|
return fmt.Errorf("%v is not associated with this Event Port", fd)
|
||||||
}
|
}
|
||||||
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
|
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
|
||||||
if err != nil {
|
if err != nil && err != ENOENT {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err == nil {
|
||||||
|
// dissociate was successful, safe to delete the cookie
|
||||||
|
fCookie := e.fds[fd]
|
||||||
|
delete(e.cookies, &fCookie.cookie)
|
||||||
|
}
|
||||||
delete(e.fds, fd)
|
delete(e.fds, fd)
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
|
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
|
||||||
|
@ -912,26 +926,48 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
p := new(PortEvent)
|
p := new(PortEvent)
|
||||||
p.Events = pe.Events
|
|
||||||
p.Source = pe.Source
|
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
defer e.mu.Unlock()
|
defer e.mu.Unlock()
|
||||||
switch pe.Source {
|
e.peIntToExt(pe, p)
|
||||||
case PORT_SOURCE_FD:
|
|
||||||
p.Fd = uintptr(pe.Object)
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(pe.User))
|
|
||||||
p.Cookie = *cookie
|
|
||||||
delete(e.fds, p.Fd)
|
|
||||||
case PORT_SOURCE_FILE:
|
|
||||||
p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
|
|
||||||
p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(pe.User))
|
|
||||||
p.Cookie = *cookie
|
|
||||||
delete(e.paths, p.Path)
|
|
||||||
}
|
|
||||||
return p, nil
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
|
||||||
|
// NOTE: Always call this function while holding the e.mu mutex
|
||||||
|
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
|
||||||
|
peExt.Events = peInt.Events
|
||||||
|
peExt.Source = peInt.Source
|
||||||
|
cookie := (*interface{})(unsafe.Pointer(peInt.User))
|
||||||
|
peExt.Cookie = *cookie
|
||||||
|
switch peInt.Source {
|
||||||
|
case PORT_SOURCE_FD:
|
||||||
|
delete(e.cookies, cookie)
|
||||||
|
peExt.Fd = uintptr(peInt.Object)
|
||||||
|
// Only remove the fds entry if it exists and this cookie matches
|
||||||
|
if fobj, ok := e.fds[peExt.Fd]; ok {
|
||||||
|
if &fobj.cookie == cookie {
|
||||||
|
delete(e.fds, peExt.Fd)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case PORT_SOURCE_FILE:
|
||||||
|
if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
|
||||||
|
// Use our stashed reference rather than using unsafe on what we got back
|
||||||
|
// the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
|
||||||
|
peExt.fobj = fCookie.fobj
|
||||||
|
} else {
|
||||||
|
panic("mismanaged memory")
|
||||||
|
}
|
||||||
|
delete(e.cookies, cookie)
|
||||||
|
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
|
||||||
|
// Only remove the paths entry if it exists and this cookie matches
|
||||||
|
if fobj, ok := e.paths[peExt.Path]; ok {
|
||||||
|
if &fobj.cookie == cookie {
|
||||||
|
delete(e.paths, peExt.Path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Pending wraps port_getn(3c) and returns how many events are pending.
|
// Pending wraps port_getn(3c) and returns how many events are pending.
|
||||||
func (e *EventPort) Pending() (int, error) {
|
func (e *EventPort) Pending() (int, error) {
|
||||||
var n uint32 = 0
|
var n uint32 = 0
|
||||||
|
@ -962,21 +998,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
defer e.mu.Unlock()
|
defer e.mu.Unlock()
|
||||||
for i := 0; i < int(got); i++ {
|
for i := 0; i < int(got); i++ {
|
||||||
s[i].Events = ps[i].Events
|
e.peIntToExt(&ps[i], &s[i])
|
||||||
s[i].Source = ps[i].Source
|
|
||||||
switch ps[i].Source {
|
|
||||||
case PORT_SOURCE_FD:
|
|
||||||
s[i].Fd = uintptr(ps[i].Object)
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
|
|
||||||
s[i].Cookie = *cookie
|
|
||||||
delete(e.fds, s[i].Fd)
|
|
||||||
case PORT_SOURCE_FILE:
|
|
||||||
s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
|
|
||||||
s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
|
|
||||||
s[i].Cookie = *cookie
|
|
||||||
delete(e.paths, s[i].Path)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return int(got), err
|
return int(got), err
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,30 @@ func Write(fd int, p []byte) (n int, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
n, err = pread(fd, p, offset)
|
||||||
|
if raceenabled {
|
||||||
|
if n > 0 {
|
||||||
|
raceWriteRange(unsafe.Pointer(&p[0]), n)
|
||||||
|
}
|
||||||
|
if err == nil {
|
||||||
|
raceAcquire(unsafe.Pointer(&ioSync))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
if raceenabled {
|
||||||
|
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||||
|
}
|
||||||
|
n, err = pwrite(fd, p, offset)
|
||||||
|
if raceenabled && n > 0 {
|
||||||
|
raceReadRange(unsafe.Pointer(&p[0]), n)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// For testing: clients can set this flag to force
|
// For testing: clients can set this flag to force
|
||||||
// creation of IPv6 sockets to return EAFNOSUPPORT.
|
// creation of IPv6 sockets to return EAFNOSUPPORT.
|
||||||
var SocketDisableIPv6 bool
|
var SocketDisableIPv6 bool
|
||||||
|
@ -313,6 +337,33 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
||||||
|
var rsa RawSockaddrAny
|
||||||
|
n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
|
||||||
|
// source address is only specified if the socket is unconnected
|
||||||
|
if rsa.Addr.Family != AF_UNSPEC {
|
||||||
|
from, err = anyToSockaddr(fd, &rsa)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
||||||
|
_, err = SendmsgN(fd, p, oob, to, flags)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||||
|
var ptr unsafe.Pointer
|
||||||
|
var salen _Socklen
|
||||||
|
if to != nil {
|
||||||
|
ptr, salen, err = to.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sendmsgN(fd, p, oob, ptr, salen, flags)
|
||||||
|
}
|
||||||
|
|
||||||
func Send(s int, buf []byte, flags int) (err error) {
|
func Send(s int, buf []byte, flags int) (err error) {
|
||||||
return sendto(s, buf, flags, nil, 0)
|
return sendto(s, buf, flags, nil, 0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,8 @@ const (
|
||||||
AF_KEY = 0xf
|
AF_KEY = 0xf
|
||||||
AF_LLC = 0x1a
|
AF_LLC = 0x1a
|
||||||
AF_LOCAL = 0x1
|
AF_LOCAL = 0x1
|
||||||
AF_MAX = 0x2d
|
AF_MAX = 0x2e
|
||||||
|
AF_MCTP = 0x2d
|
||||||
AF_MPLS = 0x1c
|
AF_MPLS = 0x1c
|
||||||
AF_NETBEUI = 0xd
|
AF_NETBEUI = 0xd
|
||||||
AF_NETLINK = 0x10
|
AF_NETLINK = 0x10
|
||||||
|
@ -259,6 +260,17 @@ const (
|
||||||
BUS_USB = 0x3
|
BUS_USB = 0x3
|
||||||
BUS_VIRTUAL = 0x6
|
BUS_VIRTUAL = 0x6
|
||||||
CAN_BCM = 0x2
|
CAN_BCM = 0x2
|
||||||
|
CAN_CTRLMODE_3_SAMPLES = 0x4
|
||||||
|
CAN_CTRLMODE_BERR_REPORTING = 0x10
|
||||||
|
CAN_CTRLMODE_CC_LEN8_DLC = 0x100
|
||||||
|
CAN_CTRLMODE_FD = 0x20
|
||||||
|
CAN_CTRLMODE_FD_NON_ISO = 0x80
|
||||||
|
CAN_CTRLMODE_LISTENONLY = 0x2
|
||||||
|
CAN_CTRLMODE_LOOPBACK = 0x1
|
||||||
|
CAN_CTRLMODE_ONE_SHOT = 0x8
|
||||||
|
CAN_CTRLMODE_PRESUME_ACK = 0x40
|
||||||
|
CAN_CTRLMODE_TDC_AUTO = 0x200
|
||||||
|
CAN_CTRLMODE_TDC_MANUAL = 0x400
|
||||||
CAN_EFF_FLAG = 0x80000000
|
CAN_EFF_FLAG = 0x80000000
|
||||||
CAN_EFF_ID_BITS = 0x1d
|
CAN_EFF_ID_BITS = 0x1d
|
||||||
CAN_EFF_MASK = 0x1fffffff
|
CAN_EFF_MASK = 0x1fffffff
|
||||||
|
@ -336,6 +348,7 @@ const (
|
||||||
CAN_RTR_FLAG = 0x40000000
|
CAN_RTR_FLAG = 0x40000000
|
||||||
CAN_SFF_ID_BITS = 0xb
|
CAN_SFF_ID_BITS = 0xb
|
||||||
CAN_SFF_MASK = 0x7ff
|
CAN_SFF_MASK = 0x7ff
|
||||||
|
CAN_TERMINATION_DISABLED = 0x0
|
||||||
CAN_TP16 = 0x3
|
CAN_TP16 = 0x3
|
||||||
CAN_TP20 = 0x4
|
CAN_TP20 = 0x4
|
||||||
CAP_AUDIT_CONTROL = 0x1e
|
CAP_AUDIT_CONTROL = 0x1e
|
||||||
|
@ -1267,9 +1280,14 @@ const (
|
||||||
IP_XFRM_POLICY = 0x11
|
IP_XFRM_POLICY = 0x11
|
||||||
ISOFS_SUPER_MAGIC = 0x9660
|
ISOFS_SUPER_MAGIC = 0x9660
|
||||||
ISTRIP = 0x20
|
ISTRIP = 0x20
|
||||||
|
ITIMER_PROF = 0x2
|
||||||
|
ITIMER_REAL = 0x0
|
||||||
|
ITIMER_VIRTUAL = 0x1
|
||||||
IUTF8 = 0x4000
|
IUTF8 = 0x4000
|
||||||
IXANY = 0x800
|
IXANY = 0x800
|
||||||
JFFS2_SUPER_MAGIC = 0x72b6
|
JFFS2_SUPER_MAGIC = 0x72b6
|
||||||
|
KCMPROTO_CONNECTED = 0x0
|
||||||
|
KCM_RECV_DISABLE = 0x1
|
||||||
KEXEC_ARCH_386 = 0x30000
|
KEXEC_ARCH_386 = 0x30000
|
||||||
KEXEC_ARCH_68K = 0x40000
|
KEXEC_ARCH_68K = 0x40000
|
||||||
KEXEC_ARCH_AARCH64 = 0xb70000
|
KEXEC_ARCH_AARCH64 = 0xb70000
|
||||||
|
@ -2117,6 +2135,10 @@ const (
|
||||||
PTRACE_SYSCALL_INFO_NONE = 0x0
|
PTRACE_SYSCALL_INFO_NONE = 0x0
|
||||||
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
|
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
|
||||||
PTRACE_TRACEME = 0x0
|
PTRACE_TRACEME = 0x0
|
||||||
|
P_ALL = 0x0
|
||||||
|
P_PGID = 0x2
|
||||||
|
P_PID = 0x1
|
||||||
|
P_PIDFD = 0x3
|
||||||
QNX4_SUPER_MAGIC = 0x2f
|
QNX4_SUPER_MAGIC = 0x2f
|
||||||
QNX6_SUPER_MAGIC = 0x68191122
|
QNX6_SUPER_MAGIC = 0x68191122
|
||||||
RAMFS_MAGIC = 0x858458f6
|
RAMFS_MAGIC = 0x858458f6
|
||||||
|
@ -2442,6 +2464,9 @@ const (
|
||||||
SIOCGSTAMPNS = 0x8907
|
SIOCGSTAMPNS = 0x8907
|
||||||
SIOCGSTAMPNS_OLD = 0x8907
|
SIOCGSTAMPNS_OLD = 0x8907
|
||||||
SIOCGSTAMP_OLD = 0x8906
|
SIOCGSTAMP_OLD = 0x8906
|
||||||
|
SIOCKCMATTACH = 0x89e0
|
||||||
|
SIOCKCMCLONE = 0x89e2
|
||||||
|
SIOCKCMUNATTACH = 0x89e1
|
||||||
SIOCOUTQNSD = 0x894b
|
SIOCOUTQNSD = 0x894b
|
||||||
SIOCPROTOPRIVATE = 0x89e0
|
SIOCPROTOPRIVATE = 0x89e0
|
||||||
SIOCRTMSG = 0x890d
|
SIOCRTMSG = 0x890d
|
||||||
|
|
|
@ -975,7 +975,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = &p[0]
|
_p0 = &p[0]
|
||||||
|
@ -992,7 +992,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = &p[0]
|
_p0 = &p[0]
|
||||||
|
|
|
@ -931,7 +931,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = &p[0]
|
_p0 = &p[0]
|
||||||
|
@ -946,7 +946,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = &p[0]
|
_p0 = &p[0]
|
||||||
|
|
|
@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
|
||||||
_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var libc_setattrlist_trampoline_addr uintptr
|
var libc_utimensat_trampoline_addr uintptr
|
||||||
|
|
||||||
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
@ -1698,7 +1703,7 @@ var libc_pathconf_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1719,7 +1724,7 @@ var libc_pread_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
|
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_setattrlist(SB)
|
JMP libc_utimensat(SB)
|
||||||
|
|
||||||
GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
|
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_fcntl(SB)
|
JMP libc_fcntl(SB)
|
||||||
|
|
|
@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
|
||||||
_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var libc_setattrlist_trampoline_addr uintptr
|
var libc_utimensat_trampoline_addr uintptr
|
||||||
|
|
||||||
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
@ -1698,7 +1703,7 @@ var libc_pathconf_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1719,7 +1724,7 @@ var libc_pread_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
|
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_setattrlist(SB)
|
JMP libc_utimensat(SB)
|
||||||
|
|
||||||
GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
|
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_fcntl(SB)
|
JMP libc_fcntl(SB)
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -231,6 +231,16 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
|
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)
|
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
|
||||||
ret = int(r0)
|
ret = int(r0)
|
||||||
|
@ -1205,6 +1215,22 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
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)
|
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -1992,6 +2018,16 @@ func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||||
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
|
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
|
||||||
ret = uintptr(r0)
|
ret = uintptr(r0)
|
||||||
|
@ -2032,3 +2068,23 @@ func shmget(key int, size int, flag int) (id int, err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
|
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && 386
|
//go:build linux && 386
|
||||||
|
@ -200,7 +200,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -217,7 +217,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -524,3 +524,14 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
|
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && amd64
|
//go:build linux && amd64
|
||||||
|
@ -215,6 +215,17 @@ func Listen(s int, n int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func MemfdSecret(flags int) (fd int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_MEMFD_SECRET, 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 Pause() (err error) {
|
func Pause() (err error) {
|
||||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
@ -225,7 +236,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -242,7 +253,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -444,17 +455,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -691,3 +691,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -46,17 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -549,7 +538,7 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -566,7 +555,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -180,7 +180,18 @@ func Listen(s int, n int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func MemfdSecret(flags int) (fd int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_MEMFD_SECRET, 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 pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -197,7 +208,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -389,17 +400,6 @@ func Truncate(path string, length int64) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
|
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && mips
|
//go:build linux && mips
|
||||||
|
@ -150,7 +150,7 @@ func Listen(s int, n int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -167,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -344,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -702,3 +691,14 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
|
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && mips64
|
//go:build linux && mips64
|
||||||
|
@ -180,7 +180,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -399,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -696,3 +685,14 @@ func stat(path string, st *stat_t) (err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -399,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
|
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && mipsle
|
//go:build linux && mipsle
|
||||||
|
@ -150,7 +150,7 @@ func Listen(s int, n int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -167,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -344,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -702,3 +691,14 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go
|
// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && ppc
|
//go:build linux && ppc
|
||||||
|
@ -210,7 +210,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -227,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -409,17 +409,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -707,3 +696,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
|
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && ppc64
|
//go:build linux && ppc64
|
||||||
|
@ -240,7 +240,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -257,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -475,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -753,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
|
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && ppc64le
|
//go:build linux && ppc64le
|
||||||
|
@ -240,7 +240,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -257,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -475,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -753,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ func Listen(s int, n int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -369,17 +369,6 @@ func Truncate(path string, length int64) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
|
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && s390x
|
//go:build linux && s390x
|
||||||
|
@ -210,7 +210,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -227,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -533,3 +533,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
|
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux && sparc64
|
//go:build linux && sparc64
|
||||||
|
@ -220,7 +220,7 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -237,7 +237,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -455,17 +455,6 @@ func Truncate(path string, length int64) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
|
@ -697,3 +686,14 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Alarm(seconds uint) (remaining uint, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||||
|
remaining = uint(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = unsafe.Pointer(&p[0])
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
|
|
@ -227,8 +227,8 @@ import (
|
||||||
//go:linkname procOpenat libc_openat
|
//go:linkname procOpenat libc_openat
|
||||||
//go:linkname procPathconf libc_pathconf
|
//go:linkname procPathconf libc_pathconf
|
||||||
//go:linkname procPause libc_pause
|
//go:linkname procPause libc_pause
|
||||||
//go:linkname procPread libc_pread
|
//go:linkname procpread libc_pread
|
||||||
//go:linkname procPwrite libc_pwrite
|
//go:linkname procpwrite libc_pwrite
|
||||||
//go:linkname procread libc_read
|
//go:linkname procread libc_read
|
||||||
//go:linkname procReadlink libc_readlink
|
//go:linkname procReadlink libc_readlink
|
||||||
//go:linkname procRename libc_rename
|
//go:linkname procRename libc_rename
|
||||||
|
@ -364,8 +364,8 @@ var (
|
||||||
procOpenat,
|
procOpenat,
|
||||||
procPathconf,
|
procPathconf,
|
||||||
procPause,
|
procPause,
|
||||||
procPread,
|
procpread,
|
||||||
procPwrite,
|
procpwrite,
|
||||||
procread,
|
procread,
|
||||||
procReadlink,
|
procReadlink,
|
||||||
procRename,
|
procRename,
|
||||||
|
@ -1380,12 +1380,12 @@ func Pause() (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = &p[0]
|
_p0 = &p[0]
|
||||||
}
|
}
|
||||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
|
||||||
n = int(r0)
|
n = int(r0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = e1
|
err = e1
|
||||||
|
@ -1395,12 +1395,12 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// 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) {
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(p) > 0 {
|
if len(p) > 0 {
|
||||||
_p0 = &p[0]
|
_p0 = &p[0]
|
||||||
}
|
}
|
||||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
|
||||||
n = int(r0)
|
n = int(r0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = e1
|
err = e1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -240,6 +240,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -250,6 +254,13 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ [116]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -255,6 +255,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -265,6 +269,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -231,6 +231,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -241,6 +245,13 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ [116]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -234,6 +234,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -244,6 +248,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -236,6 +236,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -246,6 +250,13 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Code int32
|
||||||
|
Errno int32
|
||||||
|
_ [116]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -237,6 +237,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -247,6 +251,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Code int32
|
||||||
|
Errno int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -237,6 +237,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -247,6 +251,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Code int32
|
||||||
|
Errno int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -236,6 +236,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -246,6 +250,13 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Code int32
|
||||||
|
Errno int32
|
||||||
|
_ [116]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -243,6 +243,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -253,6 +257,13 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ [116]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -244,6 +244,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -254,6 +258,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -244,6 +244,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -254,6 +258,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -262,6 +262,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -272,6 +276,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -210,8 +210,8 @@ type PtraceFpregs struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type PtracePer struct {
|
type PtracePer struct {
|
||||||
_ [0]uint64
|
Control_regs [3]uint64
|
||||||
_ [32]byte
|
_ [8]byte
|
||||||
Starting_addr uint64
|
Starting_addr uint64
|
||||||
Ending_addr uint64
|
Ending_addr uint64
|
||||||
Perc_atmid uint16
|
Perc_atmid uint16
|
||||||
|
@ -257,6 +257,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x80000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x2000
|
POLLRDHUP = 0x2000
|
||||||
)
|
)
|
||||||
|
@ -267,6 +271,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -239,6 +239,10 @@ type EpollEvent struct {
|
||||||
Pad int32
|
Pad int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
OPEN_TREE_CLOEXEC = 0x400000
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
POLLRDHUP = 0x800
|
POLLRDHUP = 0x800
|
||||||
)
|
)
|
||||||
|
@ -249,6 +253,14 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
type Siginfo struct {
|
||||||
|
Signo int32
|
||||||
|
Errno int32
|
||||||
|
Code int32
|
||||||
|
_ int32
|
||||||
|
_ [112]byte
|
||||||
|
}
|
||||||
|
|
||||||
type Termios struct {
|
type Termios struct {
|
||||||
Iflag uint32
|
Iflag uint32
|
||||||
Oflag uint32
|
Oflag uint32
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
errorspkg "errors"
|
errorspkg "errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
@ -86,11 +87,9 @@ func StringToUTF16(s string) []uint16 {
|
||||||
// s, with a terminating NUL added. If s contains a NUL byte at any
|
// s, with a terminating NUL added. If s contains a NUL byte at any
|
||||||
// location, it returns (nil, syscall.EINVAL).
|
// location, it returns (nil, syscall.EINVAL).
|
||||||
func UTF16FromString(s string) ([]uint16, error) {
|
func UTF16FromString(s string) ([]uint16, error) {
|
||||||
for i := 0; i < len(s); i++ {
|
if strings.IndexByte(s, 0) != -1 {
|
||||||
if s[i] == 0 {
|
|
||||||
return nil, syscall.EINVAL
|
return nil, syscall.EINVAL
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return utf16.Encode([]rune(s + "\x00")), nil
|
return utf16.Encode([]rune(s + "\x00")), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,8 +185,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||||
//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
|
//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
|
||||||
//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
|
//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
|
||||||
//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
|
//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
|
||||||
//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
|
//sys readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = ReadFile
|
||||||
//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
|
//sys writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = WriteFile
|
||||||
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
|
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
|
||||||
//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
|
//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
|
||||||
//sys CloseHandle(handle Handle) (err error)
|
//sys CloseHandle(handle Handle) (err error)
|
||||||
|
@ -549,12 +548,6 @@ func Read(fd Handle, p []byte) (n int, err error) {
|
||||||
}
|
}
|
||||||
return 0, e
|
return 0, e
|
||||||
}
|
}
|
||||||
if raceenabled {
|
|
||||||
if done > 0 {
|
|
||||||
raceWriteRange(unsafe.Pointer(&p[0]), int(done))
|
|
||||||
}
|
|
||||||
raceAcquire(unsafe.Pointer(&ioSync))
|
|
||||||
}
|
|
||||||
return int(done), nil
|
return int(done), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,12 +560,31 @@ func Write(fd Handle, p []byte) (n int, err error) {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return 0, e
|
return 0, e
|
||||||
}
|
}
|
||||||
if raceenabled && done > 0 {
|
|
||||||
raceReadRange(unsafe.Pointer(&p[0]), int(done))
|
|
||||||
}
|
|
||||||
return int(done), nil
|
return int(done), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ReadFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {
|
||||||
|
err := readFile(fd, p, done, overlapped)
|
||||||
|
if raceenabled {
|
||||||
|
if *done > 0 {
|
||||||
|
raceWriteRange(unsafe.Pointer(&p[0]), int(*done))
|
||||||
|
}
|
||||||
|
raceAcquire(unsafe.Pointer(&ioSync))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func WriteFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {
|
||||||
|
if raceenabled {
|
||||||
|
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||||
|
}
|
||||||
|
err := writeFile(fd, p, done, overlapped)
|
||||||
|
if raceenabled && *done > 0 {
|
||||||
|
raceReadRange(unsafe.Pointer(&p[0]), int(*done))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
var ioSync int64
|
var ioSync int64
|
||||||
|
|
||||||
func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
|
func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
|
||||||
|
|
|
@ -2761,7 +2761,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(buf) > 0 {
|
if len(buf) > 0 {
|
||||||
_p0 = &buf[0]
|
_p0 = &buf[0]
|
||||||
|
@ -3203,7 +3203,7 @@ func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
if len(buf) > 0 {
|
if len(buf) > 0 {
|
||||||
_p0 = &buf[0]
|
_p0 = &buf[0]
|
||||||
|
|
|
@ -266,7 +266,7 @@ golang.org/x/net/internal/socks
|
||||||
golang.org/x/net/internal/timeseries
|
golang.org/x/net/internal/timeseries
|
||||||
golang.org/x/net/proxy
|
golang.org/x/net/proxy
|
||||||
golang.org/x/net/trace
|
golang.org/x/net/trace
|
||||||
# golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
|
# golang.org/x/sys v0.0.0-20220405210540-1e041c57c461
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/sys/execabs
|
golang.org/x/sys/execabs
|
||||||
golang.org/x/sys/internal/unsafeheader
|
golang.org/x/sys/internal/unsafeheader
|
||||||
|
|
Loading…
Reference in New Issue