vendor: golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
full diff: 2334cc1a13...aee5d888a8
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
v0.8
parent
c3f78d3e8a
commit
72522d1740
2
go.mod
2
go.mod
|
@ -59,7 +59,7 @@ require (
|
|||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
|
||||
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
|
||||
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
|
||||
// genproto: the actual version is replaced in replace()
|
||||
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece
|
||||
|
|
2
go.sum
2
go.sum
|
@ -1111,6 +1111,8 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIA
|
|||
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f h1:6Sc1XOXTulBN6imkqo6XoAXDEzoQ4/ro6xy7Vn8+rOM=
|
||||
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 h1:YEu4SMq7D0cmT7CBbXfcH0NZeuChAXwsHe/9XueUO6o=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
|
|
@ -16,3 +16,9 @@ func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
|
|||
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
|
||||
return err
|
||||
}
|
||||
|
||||
// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
|
||||
func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
|
||||
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ includes_Darwin='
|
|||
#define _DARWIN_USE_64_BIT_INODE
|
||||
#include <stdint.h>
|
||||
#include <sys/attr.h>
|
||||
#include <sys/clonefile.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/ptrace.h>
|
||||
|
@ -516,6 +517,7 @@ ccflags="$@"
|
|||
$2 ~ /^CP_/ ||
|
||||
$2 ~ /^CPUSTATES$/ ||
|
||||
$2 ~ /^ALG_/ ||
|
||||
$2 ~ /^FI(CLONE|DEDUPERANGE)/ ||
|
||||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||
|
||||
$2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|[GS]ETFLAGS)/ ||
|
||||
$2 ~ /^FS_VERITY_/ ||
|
||||
|
|
|
@ -56,7 +56,7 @@ func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {
|
|||
return n, err
|
||||
}
|
||||
|
||||
//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) = libsocket.accept4
|
||||
|
||||
func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
|
||||
var rsa RawSockaddrAny
|
||||
|
@ -75,3 +75,16 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) error {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -112,6 +112,31 @@ func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
// IoctlFileClone performs an FICLONERANGE ioctl operation to clone the range of
|
||||
// data conveyed in value to the file associated with the file descriptor
|
||||
// destFd. See the ioctl_ficlonerange(2) man page for details.
|
||||
func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
|
||||
err := ioctl(destFd, FICLONERANGE, uintptr(unsafe.Pointer(value)))
|
||||
runtime.KeepAlive(value)
|
||||
return err
|
||||
}
|
||||
|
||||
// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
|
||||
// associated with the file description srcFd to the file associated with the
|
||||
// file descriptor destFd. See the ioctl_ficlone(2) man page for details.
|
||||
func IoctlFileClone(destFd, srcFd int) error {
|
||||
return ioctl(destFd, FICLONE, uintptr(srcFd))
|
||||
}
|
||||
|
||||
// IoctlFileClone performs an FIDEDUPERANGE ioctl operation to share the range of
|
||||
// data conveyed in value with the file associated with the file descriptor
|
||||
// destFd. See the ioctl_fideduperange(2) man page for details.
|
||||
func IoctlFileDedupeRange(destFd int, value *FileDedupeRange) error {
|
||||
err := ioctl(destFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(value)))
|
||||
runtime.KeepAlive(value)
|
||||
return err
|
||||
}
|
||||
|
||||
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
||||
|
||||
func Link(oldpath string, newpath string) (err error) {
|
||||
|
|
|
@ -232,6 +232,8 @@ const (
|
|||
CLOCK_THREAD_CPUTIME_ID = 0x10
|
||||
CLOCK_UPTIME_RAW = 0x8
|
||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||
CLONE_NOFOLLOW = 0x1
|
||||
CLONE_NOOWNERCOPY = 0x2
|
||||
CR0 = 0x0
|
||||
CR1 = 0x1000
|
||||
CR2 = 0x2000
|
||||
|
|
|
@ -232,6 +232,8 @@ const (
|
|||
CLOCK_THREAD_CPUTIME_ID = 0x10
|
||||
CLOCK_UPTIME_RAW = 0x8
|
||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||
CLONE_NOFOLLOW = 0x1
|
||||
CLONE_NOOWNERCOPY = 0x2
|
||||
CR0 = 0x0
|
||||
CR1 = 0x1000
|
||||
CR2 = 0x2000
|
||||
|
|
|
@ -232,6 +232,8 @@ const (
|
|||
CLOCK_THREAD_CPUTIME_ID = 0x10
|
||||
CLOCK_UPTIME_RAW = 0x8
|
||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||
CLONE_NOFOLLOW = 0x1
|
||||
CLONE_NOOWNERCOPY = 0x2
|
||||
CR0 = 0x0
|
||||
CR1 = 0x1000
|
||||
CR2 = 0x2000
|
||||
|
|
|
@ -232,6 +232,8 @@ const (
|
|||
CLOCK_THREAD_CPUTIME_ID = 0x10
|
||||
CLOCK_UPTIME_RAW = 0x8
|
||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||
CLONE_NOFOLLOW = 0x1
|
||||
CLONE_NOOWNERCOPY = 0x2
|
||||
CR0 = 0x0
|
||||
CR1 = 0x1000
|
||||
CR2 = 0x2000
|
||||
|
|
|
@ -686,6 +686,7 @@ const (
|
|||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FIDEDUPERANGE = 0xc0189436
|
||||
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
|
||||
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
|
||||
FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x40049409
|
||||
FICLONERANGE = 0x4020940d
|
||||
FLUSHO = 0x1000
|
||||
FP_XSTATE_MAGIC2 = 0x46505845
|
||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x40049409
|
||||
FICLONERANGE = 0x4020940d
|
||||
FLUSHO = 0x1000
|
||||
FP_XSTATE_MAGIC2 = 0x46505845
|
||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x40049409
|
||||
FICLONERANGE = 0x4020940d
|
||||
FLUSHO = 0x1000
|
||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||
FS_IOC_GETFLAGS = 0x80046601
|
||||
|
|
|
@ -73,6 +73,8 @@ const (
|
|||
EXTRA_MAGIC = 0x45585401
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x40049409
|
||||
FICLONERANGE = 0x4020940d
|
||||
FLUSHO = 0x1000
|
||||
FPSIMD_MAGIC = 0x46508001
|
||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x2000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40046601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x2000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40086601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x2000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40086601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x2000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40046601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000000
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x800000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40086601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000000
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x800000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40086601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x40049409
|
||||
FICLONERANGE = 0x4020940d
|
||||
FLUSHO = 0x1000
|
||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||
FS_IOC_GETFLAGS = 0x80086601
|
||||
|
|
|
@ -71,6 +71,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x40049409
|
||||
FICLONERANGE = 0x4020940d
|
||||
FLUSHO = 0x1000
|
||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||
FS_IOC_GETFLAGS = 0x80086601
|
||||
|
|
|
@ -75,6 +75,8 @@ const (
|
|||
EXTPROC = 0x10000
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x1000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40086601
|
||||
|
|
|
@ -13,20 +13,23 @@ import (
|
|||
//go:cgo_import_dynamic libc_preadv preadv "libc.so"
|
||||
//go:cgo_import_dynamic libc_writev writev "libc.so"
|
||||
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
|
||||
//go:cgo_import_dynamic libc_accept4 accept4 "libc.so"
|
||||
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
|
||||
|
||||
//go:linkname procreadv libc_readv
|
||||
//go:linkname procpreadv libc_preadv
|
||||
//go:linkname procwritev libc_writev
|
||||
//go:linkname procpwritev libc_pwritev
|
||||
//go:linkname procaccept4 libc_accept4
|
||||
//go:linkname procpipe2 libc_pipe2
|
||||
|
||||
var (
|
||||
procreadv,
|
||||
procpreadv,
|
||||
procwritev,
|
||||
procpwritev,
|
||||
procaccept4 syscallFunc
|
||||
procaccept4,
|
||||
procpipe2 syscallFunc
|
||||
)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
@ -99,3 +102,13 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -76,6 +76,21 @@ type Fsid struct {
|
|||
Val [2]int32
|
||||
}
|
||||
|
||||
type FileCloneRange struct {
|
||||
Src_fd int64
|
||||
Src_offset uint64
|
||||
Src_length uint64
|
||||
Dest_offset uint64
|
||||
}
|
||||
|
||||
type FileDedupeRange struct {
|
||||
Src_offset uint64
|
||||
Src_length uint64
|
||||
Dest_count uint16
|
||||
Reserved1 uint16
|
||||
Reserved2 uint32
|
||||
}
|
||||
|
||||
type FscryptPolicy struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
|
|
|
@ -381,7 +381,7 @@ golang.org/x/net/trace
|
|||
golang.org/x/sync/errgroup
|
||||
golang.org/x/sync/semaphore
|
||||
golang.org/x/sync/singleflight
|
||||
# golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f
|
||||
# golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
|
||||
golang.org/x/sys/cpu
|
||||
golang.org/x/sys/internal/unsafeheader
|
||||
golang.org/x/sys/unix
|
||||
|
|
Loading…
Reference in New Issue