mirror of
				https://github.com/cheat/cheat.git
				synced 2025-11-04 07:45:28 +01:00 
			
		
		
		
	fix: removed colorization on non-tty
Fixes a bug whereby `cheat` would apply ANSI colorization even when outputting into a non-TTY.
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								vendor/github.com/dlclark/regexp2/.DS_Store
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								vendor/github.com/dlclark/regexp2/.DS_Store
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										5
									
								
								vendor/github.com/mattn/go-isatty/go.mod
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/mattn/go-isatty/go.mod
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
module github.com/mattn/go-isatty
 | 
			
		||||
 | 
			
		||||
require golang.org/x/sys v0.0.0-20191008105621-543471e840be
 | 
			
		||||
 | 
			
		||||
go 1.14
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/mattn/go-isatty/go.sum
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/mattn/go-isatty/go.sum
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
 | 
			
		||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 | 
			
		||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
 | 
			
		||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
// +build linux
 | 
			
		||||
// +build !appengine,!ppc64,!ppc64le
 | 
			
		||||
// +build android
 | 
			
		||||
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
@@ -16,3 +15,9 @@ func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
 | 
			
		||||
	return err == 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										15
									
								
								vendor/github.com/mattn/go-isatty/isatty_appengine.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/github.com/mattn/go-isatty/isatty_appengine.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,15 +0,0 @@
 | 
			
		||||
// +build appengine
 | 
			
		||||
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
// IsTerminal returns true if the file descriptor is terminal which
 | 
			
		||||
// is always false on on appengine classic which is a sandboxed PaaS.
 | 
			
		||||
func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								vendor/github.com/mattn/go-isatty/isatty_bsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/mattn/go-isatty/isatty_bsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -16,3 +16,9 @@ func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
 | 
			
		||||
	return err == 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,19 +0,0 @@
 | 
			
		||||
// +build linux
 | 
			
		||||
// +build ppc64 ppc64le
 | 
			
		||||
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
 | 
			
		||||
	syscall "golang.org/x/sys/unix"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const ioctlReadTermios = syscall.TCGETS
 | 
			
		||||
 | 
			
		||||
// IsTerminal return true if the file descriptor is terminal.
 | 
			
		||||
func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	var termios syscall.Termios
 | 
			
		||||
	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
 | 
			
		||||
	return err == 0
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								vendor/github.com/mattn/go-isatty/isatty_others.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/mattn/go-isatty/isatty_others.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,9 +1,14 @@
 | 
			
		||||
// +build !windows
 | 
			
		||||
// +build !appengine
 | 
			
		||||
// +build appengine js nacl
 | 
			
		||||
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// IsTerminal returns true if the file descriptor is terminal which
 | 
			
		||||
// is always false on js and appengine classic which is a sandboxed PaaS.
 | 
			
		||||
func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								vendor/github.com/mattn/go-isatty/isatty_plan9.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								vendor/github.com/mattn/go-isatty/isatty_plan9.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
// +build plan9
 | 
			
		||||
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// IsTerminal returns true if the given file descriptor is a terminal.
 | 
			
		||||
func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	path, err := syscall.Fd2path(fd)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
	return path == "/dev/cons" || path == "/mnt/term/dev/cons"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								vendor/github.com/mattn/go-isatty/isatty_solaris.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/mattn/go-isatty/isatty_solaris.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -14,3 +14,9 @@ func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
 | 
			
		||||
	return err == nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								vendor/github.com/mattn/go-isatty/isatty_tcgets.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								vendor/github.com/mattn/go-isatty/isatty_tcgets.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
// +build linux aix
 | 
			
		||||
// +build !appengine
 | 
			
		||||
// +build !android
 | 
			
		||||
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
import "golang.org/x/sys/unix"
 | 
			
		||||
 | 
			
		||||
// IsTerminal return true if the file descriptor is terminal.
 | 
			
		||||
func IsTerminal(fd uintptr) bool {
 | 
			
		||||
	_, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
 | 
			
		||||
	return err == nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal. This is also always false on this environment.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	return false
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										39
									
								
								vendor/github.com/mattn/go-isatty/isatty_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								vendor/github.com/mattn/go-isatty/isatty_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -4,6 +4,7 @@
 | 
			
		||||
package isatty
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"errors"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unicode/utf16"
 | 
			
		||||
@@ -11,15 +12,18 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	fileNameInfo uintptr = 2
 | 
			
		||||
	fileTypePipe         = 3
 | 
			
		||||
	objectNameInfo uintptr = 1
 | 
			
		||||
	fileNameInfo           = 2
 | 
			
		||||
	fileTypePipe           = 3
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	kernel32                         = syscall.NewLazyDLL("kernel32.dll")
 | 
			
		||||
	ntdll                            = syscall.NewLazyDLL("ntdll.dll")
 | 
			
		||||
	procGetConsoleMode               = kernel32.NewProc("GetConsoleMode")
 | 
			
		||||
	procGetFileInformationByHandleEx = kernel32.NewProc("GetFileInformationByHandleEx")
 | 
			
		||||
	procGetFileType                  = kernel32.NewProc("GetFileType")
 | 
			
		||||
	procNtQueryObject                = ntdll.NewProc("NtQueryObject")
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
@@ -45,7 +49,10 @@ func isCygwinPipeName(name string) bool {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if token[0] != `\msys` && token[0] != `\cygwin` {
 | 
			
		||||
	if token[0] != `\msys` &&
 | 
			
		||||
		token[0] != `\cygwin` &&
 | 
			
		||||
		token[0] != `\Device\NamedPipe\msys` &&
 | 
			
		||||
		token[0] != `\Device\NamedPipe\cygwin` {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -68,11 +75,35 @@ func isCygwinPipeName(name string) bool {
 | 
			
		||||
	return true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// getFileNameByHandle use the undocomented ntdll NtQueryObject to get file full name from file handler
 | 
			
		||||
// since GetFileInformationByHandleEx is not avilable under windows Vista and still some old fashion
 | 
			
		||||
// guys are using Windows XP, this is a workaround for those guys, it will also work on system from
 | 
			
		||||
// Windows vista to 10
 | 
			
		||||
// see https://stackoverflow.com/a/18792477 for details
 | 
			
		||||
func getFileNameByHandle(fd uintptr) (string, error) {
 | 
			
		||||
	if procNtQueryObject == nil {
 | 
			
		||||
		return "", errors.New("ntdll.dll: NtQueryObject not supported")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var buf [4 + syscall.MAX_PATH]uint16
 | 
			
		||||
	var result int
 | 
			
		||||
	r, _, e := syscall.Syscall6(procNtQueryObject.Addr(), 5,
 | 
			
		||||
		fd, objectNameInfo, uintptr(unsafe.Pointer(&buf)), uintptr(2*len(buf)), uintptr(unsafe.Pointer(&result)), 0)
 | 
			
		||||
	if r != 0 {
 | 
			
		||||
		return "", e
 | 
			
		||||
	}
 | 
			
		||||
	return string(utf16.Decode(buf[4 : 4+buf[0]/2])), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
 | 
			
		||||
// terminal.
 | 
			
		||||
func IsCygwinTerminal(fd uintptr) bool {
 | 
			
		||||
	if procGetFileInformationByHandleEx == nil {
 | 
			
		||||
		return false
 | 
			
		||||
		name, err := getFileNameByHandle(fd)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return false
 | 
			
		||||
		}
 | 
			
		||||
		return isCygwinPipeName(name)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Cygwin/msys's pty is a pipe.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								vendor/golang.org/x/sys/unix/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/golang.org/x/sys/unix/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -14,7 +14,7 @@ migrating the build system to use containers so the builds are reproducible.
 | 
			
		||||
This is being done on an OS-by-OS basis. Please update this documentation as
 | 
			
		||||
components of the build system change.
 | 
			
		||||
 | 
			
		||||
### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
 | 
			
		||||
### Old Build System (currently for `GOOS != "linux"`)
 | 
			
		||||
 | 
			
		||||
The old build system generates the Go files based on the C header files
 | 
			
		||||
present on your system. This means that files
 | 
			
		||||
@@ -32,9 +32,9 @@ To build the files for your current OS and architecture, make sure GOOS and
 | 
			
		||||
GOARCH are set correctly and run `mkall.sh`. This will generate the files for
 | 
			
		||||
your specific system. Running `mkall.sh -n` shows the commands that will be run.
 | 
			
		||||
 | 
			
		||||
Requirements: bash, perl, go
 | 
			
		||||
Requirements: bash, go
 | 
			
		||||
 | 
			
		||||
### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
 | 
			
		||||
### New Build System (currently for `GOOS == "linux"`)
 | 
			
		||||
 | 
			
		||||
The new build system uses a Docker container to generate the go files directly
 | 
			
		||||
from source checkouts of the kernel and various system libraries. This means
 | 
			
		||||
@@ -52,14 +52,14 @@ system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
 | 
			
		||||
then generate all of the files for all of the GOOS/GOARCH pairs in the new build
 | 
			
		||||
system. Running `mkall.sh -n` shows the commands that will be run.
 | 
			
		||||
 | 
			
		||||
Requirements: bash, perl, go, docker
 | 
			
		||||
Requirements: bash, go, docker
 | 
			
		||||
 | 
			
		||||
## Component files
 | 
			
		||||
 | 
			
		||||
This section describes the various files used in the code generation process.
 | 
			
		||||
It also contains instructions on how to modify these files to add a new
 | 
			
		||||
architecture/OS or to add additional syscalls, types, or constants. Note that
 | 
			
		||||
if you are using the new build system, the scripts cannot be called normally.
 | 
			
		||||
if you are using the new build system, the scripts/programs cannot be called normally.
 | 
			
		||||
They must be called from within the docker container.
 | 
			
		||||
 | 
			
		||||
### asm files
 | 
			
		||||
@@ -81,8 +81,8 @@ each GOOS/GOARCH pair.
 | 
			
		||||
 | 
			
		||||
### mksysnum
 | 
			
		||||
 | 
			
		||||
Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
 | 
			
		||||
for the old system). This script takes in a list of header files containing the
 | 
			
		||||
Mksysnum is a Go program located at `${GOOS}/mksysnum.go` (or `mksysnum_${GOOS}.go`
 | 
			
		||||
for the old system). This program takes in a list of header files containing the
 | 
			
		||||
syscall number declarations and parses them to produce the corresponding list of
 | 
			
		||||
Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
 | 
			
		||||
constants.
 | 
			
		||||
@@ -92,14 +92,14 @@ new installation of the target OS (or updating the source checkouts for the
 | 
			
		||||
new build system). However, depending on the OS, you make need to update the
 | 
			
		||||
parsing in mksysnum.
 | 
			
		||||
 | 
			
		||||
### mksyscall.pl
 | 
			
		||||
### mksyscall.go
 | 
			
		||||
 | 
			
		||||
The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
 | 
			
		||||
hand-written Go files which implement system calls (for unix, the specific OS,
 | 
			
		||||
or the specific OS/Architecture pair respectively) that need special handling
 | 
			
		||||
and list `//sys` comments giving prototypes for ones that can be generated.
 | 
			
		||||
 | 
			
		||||
The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
 | 
			
		||||
The mksyscall.go program takes the `//sys` and `//sysnb` comments and converts
 | 
			
		||||
them into syscalls. This requires the name of the prototype in the comment to
 | 
			
		||||
match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
 | 
			
		||||
prototype can be exported (capitalized) or not.
 | 
			
		||||
@@ -160,7 +160,7 @@ signal numbers, and constants. Generated by `mkerrors.sh` (see above).
 | 
			
		||||
### `zsyscall_${GOOS}_${GOARCH}.go`
 | 
			
		||||
 | 
			
		||||
A file containing all the generated syscalls for a specific GOOS and GOARCH.
 | 
			
		||||
Generated by `mksyscall.pl` (see above).
 | 
			
		||||
Generated by `mksyscall.go` (see above).
 | 
			
		||||
 | 
			
		||||
### `zsysnum_${GOOS}_${GOARCH}.go`
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										42
									
								
								vendor/golang.org/x/sys/unix/affinity_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										42
									
								
								vendor/golang.org/x/sys/unix/affinity_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -7,6 +7,7 @@
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"math/bits"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -79,46 +80,7 @@ func (s *CPUSet) IsSet(cpu int) bool {
 | 
			
		||||
func (s *CPUSet) Count() int {
 | 
			
		||||
	c := 0
 | 
			
		||||
	for _, b := range s {
 | 
			
		||||
		c += onesCount64(uint64(b))
 | 
			
		||||
		c += bits.OnesCount64(uint64(b))
 | 
			
		||||
	}
 | 
			
		||||
	return c
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// onesCount64 is a copy of Go 1.9's math/bits.OnesCount64.
 | 
			
		||||
// Once this package can require Go 1.9, we can delete this
 | 
			
		||||
// and update the caller to use bits.OnesCount64.
 | 
			
		||||
func onesCount64(x uint64) int {
 | 
			
		||||
	const m0 = 0x5555555555555555 // 01010101 ...
 | 
			
		||||
	const m1 = 0x3333333333333333 // 00110011 ...
 | 
			
		||||
	const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ...
 | 
			
		||||
	const m3 = 0x00ff00ff00ff00ff // etc.
 | 
			
		||||
	const m4 = 0x0000ffff0000ffff
 | 
			
		||||
 | 
			
		||||
	// Implementation: Parallel summing of adjacent bits.
 | 
			
		||||
	// See "Hacker's Delight", Chap. 5: Counting Bits.
 | 
			
		||||
	// The following pattern shows the general approach:
 | 
			
		||||
	//
 | 
			
		||||
	//   x = x>>1&(m0&m) + x&(m0&m)
 | 
			
		||||
	//   x = x>>2&(m1&m) + x&(m1&m)
 | 
			
		||||
	//   x = x>>4&(m2&m) + x&(m2&m)
 | 
			
		||||
	//   x = x>>8&(m3&m) + x&(m3&m)
 | 
			
		||||
	//   x = x>>16&(m4&m) + x&(m4&m)
 | 
			
		||||
	//   x = x>>32&(m5&m) + x&(m5&m)
 | 
			
		||||
	//   return int(x)
 | 
			
		||||
	//
 | 
			
		||||
	// Masking (& operations) can be left away when there's no
 | 
			
		||||
	// danger that a field's sum will carry over into the next
 | 
			
		||||
	// field: Since the result cannot be > 64, 8 bits is enough
 | 
			
		||||
	// and we can ignore the masks for the shifts by 8 and up.
 | 
			
		||||
	// Per "Hacker's Delight", the first line can be simplified
 | 
			
		||||
	// more, but it saves at best one instruction, so we leave
 | 
			
		||||
	// it alone for clarity.
 | 
			
		||||
	const m = 1<<64 - 1
 | 
			
		||||
	x = x>>1&(m0&m) + x&(m0&m)
 | 
			
		||||
	x = x>>2&(m1&m) + x&(m1&m)
 | 
			
		||||
	x = (x>>4 + x) & (m2 & m)
 | 
			
		||||
	x += x >> 8
 | 
			
		||||
	x += x >> 16
 | 
			
		||||
	x += x >> 32
 | 
			
		||||
	return int(x) & (1<<7 - 1)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
// Copyright 2018 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.
 | 
			
		||||
 | 
			
		||||
// +build !gccgo
 | 
			
		||||
 | 
			
		||||
#include "textflag.h"
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// System call support for ARM64, FreeBSD
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
// Just jump to package syscall's implementation for all these functions.
 | 
			
		||||
// The runtime may know about them.
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	JMP	syscall·Syscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	JMP	syscall·Syscall6(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall9(SB),NOSPLIT,$0-104
 | 
			
		||||
	JMP	syscall·Syscall9(SB)
 | 
			
		||||
 | 
			
		||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	JMP	syscall·RawSyscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·RawSyscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	JMP	syscall·RawSyscall6(SB)
 | 
			
		||||
							
								
								
									
										54
									
								
								vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build riscv64,!gccgo
 | 
			
		||||
 | 
			
		||||
#include "textflag.h"
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// System calls for linux/riscv64.
 | 
			
		||||
//
 | 
			
		||||
// Where available, just jump to package syscall's implementation of
 | 
			
		||||
// these functions.
 | 
			
		||||
 | 
			
		||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	JMP	syscall·Syscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	JMP	syscall·Syscall6(SB)
 | 
			
		||||
 | 
			
		||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
 | 
			
		||||
	CALL	runtime·entersyscall(SB)
 | 
			
		||||
	MOV	a1+8(FP), A0
 | 
			
		||||
	MOV	a2+16(FP), A1
 | 
			
		||||
	MOV	a3+24(FP), A2
 | 
			
		||||
	MOV	$0, A3
 | 
			
		||||
	MOV	$0, A4
 | 
			
		||||
	MOV	$0, A5
 | 
			
		||||
	MOV	$0, A6
 | 
			
		||||
	MOV	trap+0(FP), A7	// syscall entry
 | 
			
		||||
	ECALL
 | 
			
		||||
	MOV	A0, r1+32(FP)	// r1
 | 
			
		||||
	MOV	A1, r2+40(FP)	// r2
 | 
			
		||||
	CALL	runtime·exitsyscall(SB)
 | 
			
		||||
	RET
 | 
			
		||||
 | 
			
		||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	JMP	syscall·RawSyscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	JMP	syscall·RawSyscall6(SB)
 | 
			
		||||
 | 
			
		||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
 | 
			
		||||
	MOV	a1+8(FP), A0
 | 
			
		||||
	MOV	a2+16(FP), A1
 | 
			
		||||
	MOV	a3+24(FP), A2
 | 
			
		||||
	MOV	ZERO, A3
 | 
			
		||||
	MOV	ZERO, A4
 | 
			
		||||
	MOV	ZERO, A5
 | 
			
		||||
	MOV	trap+0(FP), A7	// syscall entry
 | 
			
		||||
	ECALL
 | 
			
		||||
	MOV	A0, r1+32(FP)
 | 
			
		||||
	MOV	A1, r2+40(FP)
 | 
			
		||||
	RET
 | 
			
		||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build !gccgo
 | 
			
		||||
 | 
			
		||||
#include "textflag.h"
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// System call support for ARM64, NetBSD
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
// Just jump to package syscall's implementation for all these functions.
 | 
			
		||||
// The runtime may know about them.
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	B	syscall·Syscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	B	syscall·Syscall6(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall9(SB),NOSPLIT,$0-104
 | 
			
		||||
	B	syscall·Syscall9(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·RawSyscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	B	syscall·RawSyscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·RawSyscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	B	syscall·RawSyscall6(SB)
 | 
			
		||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build !gccgo
 | 
			
		||||
 | 
			
		||||
#include "textflag.h"
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// System call support for arm64, OpenBSD
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
// Just jump to package syscall's implementation for all these functions.
 | 
			
		||||
// The runtime may know about them.
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	JMP	syscall·Syscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	JMP	syscall·Syscall6(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·Syscall9(SB),NOSPLIT,$0-104
 | 
			
		||||
	JMP	syscall·Syscall9(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·RawSyscall(SB),NOSPLIT,$0-56
 | 
			
		||||
	JMP	syscall·RawSyscall(SB)
 | 
			
		||||
 | 
			
		||||
TEXT	·RawSyscall6(SB),NOSPLIT,$0-80
 | 
			
		||||
	JMP	syscall·RawSyscall6(SB)
 | 
			
		||||
							
								
								
									
										91
									
								
								vendor/golang.org/x/sys/unix/dirent.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										91
									
								
								vendor/golang.org/x/sys/unix/dirent.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,16 +2,101 @@
 | 
			
		||||
// Use of this source code is governed by a BSD-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
 | 
			
		||||
// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
 | 
			
		||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "syscall"
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
// readInt returns the size-bytes unsigned integer in native byte order at offset off.
 | 
			
		||||
func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
 | 
			
		||||
	if len(b) < int(off+size) {
 | 
			
		||||
		return 0, false
 | 
			
		||||
	}
 | 
			
		||||
	if isBigEndian {
 | 
			
		||||
		return readIntBE(b[off:], size), true
 | 
			
		||||
	}
 | 
			
		||||
	return readIntLE(b[off:], size), true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func readIntBE(b []byte, size uintptr) uint64 {
 | 
			
		||||
	switch size {
 | 
			
		||||
	case 1:
 | 
			
		||||
		return uint64(b[0])
 | 
			
		||||
	case 2:
 | 
			
		||||
		_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
 | 
			
		||||
		return uint64(b[1]) | uint64(b[0])<<8
 | 
			
		||||
	case 4:
 | 
			
		||||
		_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
 | 
			
		||||
		return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
 | 
			
		||||
	case 8:
 | 
			
		||||
		_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
 | 
			
		||||
		return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
 | 
			
		||||
			uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
 | 
			
		||||
	default:
 | 
			
		||||
		panic("syscall: readInt with unsupported size")
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func readIntLE(b []byte, size uintptr) uint64 {
 | 
			
		||||
	switch size {
 | 
			
		||||
	case 1:
 | 
			
		||||
		return uint64(b[0])
 | 
			
		||||
	case 2:
 | 
			
		||||
		_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
 | 
			
		||||
		return uint64(b[0]) | uint64(b[1])<<8
 | 
			
		||||
	case 4:
 | 
			
		||||
		_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
 | 
			
		||||
		return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
 | 
			
		||||
	case 8:
 | 
			
		||||
		_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
 | 
			
		||||
		return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
 | 
			
		||||
			uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
 | 
			
		||||
	default:
 | 
			
		||||
		panic("syscall: readInt with unsupported size")
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ParseDirent parses up to max directory entries in buf,
 | 
			
		||||
// appending the names to names. It returns the number of
 | 
			
		||||
// bytes consumed from buf, the number of entries added
 | 
			
		||||
// to names, and the new names slice.
 | 
			
		||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
 | 
			
		||||
	return syscall.ParseDirent(buf, max, names)
 | 
			
		||||
	origlen := len(buf)
 | 
			
		||||
	count = 0
 | 
			
		||||
	for max != 0 && len(buf) > 0 {
 | 
			
		||||
		reclen, ok := direntReclen(buf)
 | 
			
		||||
		if !ok || reclen > uint64(len(buf)) {
 | 
			
		||||
			return origlen, count, names
 | 
			
		||||
		}
 | 
			
		||||
		rec := buf[:reclen]
 | 
			
		||||
		buf = buf[reclen:]
 | 
			
		||||
		ino, ok := direntIno(rec)
 | 
			
		||||
		if !ok {
 | 
			
		||||
			break
 | 
			
		||||
		}
 | 
			
		||||
		if ino == 0 { // File absent in directory.
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
 | 
			
		||||
		namlen, ok := direntNamlen(rec)
 | 
			
		||||
		if !ok || namoff+namlen > uint64(len(rec)) {
 | 
			
		||||
			break
 | 
			
		||||
		}
 | 
			
		||||
		name := rec[namoff : namoff+namlen]
 | 
			
		||||
		for i, c := range name {
 | 
			
		||||
			if c == 0 {
 | 
			
		||||
				name = name[:i]
 | 
			
		||||
				break
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		// Check for useless names before allocating a string.
 | 
			
		||||
		if string(name) == "." || string(name) == ".." {
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		max--
 | 
			
		||||
		count++
 | 
			
		||||
		names = append(names, string(name))
 | 
			
		||||
	}
 | 
			
		||||
	return origlen - len(buf), count, names
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/golang.org/x/sys/unix/endian_little.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/golang.org/x/sys/unix/endian_little.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
// Use of this source code is governed by a BSD-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
//
 | 
			
		||||
// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
 | 
			
		||||
// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/golang.org/x/sys/unix/fcntl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/golang.org/x/sys/unix/fcntl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
// Use of this source code is governed by a BSD-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
 | 
			
		||||
// +build darwin dragonfly freebsd linux netbsd openbsd
 | 
			
		||||
// +build dragonfly freebsd linux netbsd openbsd
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vendor/golang.org/x/sys/unix/fcntl_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								vendor/golang.org/x/sys/unix/fcntl_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
 | 
			
		||||
func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
 | 
			
		||||
	return fcntl(int(fd), cmd, arg)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
 | 
			
		||||
func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
 | 
			
		||||
	_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								vendor/golang.org/x/sys/unix/ioctl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								vendor/golang.org/x/sys/unix/ioctl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -6,7 +6,19 @@
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "runtime"
 | 
			
		||||
import (
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
 | 
			
		||||
//
 | 
			
		||||
@@ -14,7 +26,7 @@ import "runtime"
 | 
			
		||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	// TODO: if we get the chance, remove the req parameter and
 | 
			
		||||
	// hardcode TIOCSWINSZ.
 | 
			
		||||
	err := ioctlSetWinsize(fd, req, value)
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
	runtime.KeepAlive(value)
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
@@ -24,7 +36,30 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
// The req value will usually be TCSETA or TIOCSETA.
 | 
			
		||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	// TODO: if we get the chance, remove the req parameter.
 | 
			
		||||
	err := ioctlSetTermios(fd, req, value)
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
	runtime.KeepAlive(value)
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
//
 | 
			
		||||
// A few ioctl requests use the return value as an output parameter;
 | 
			
		||||
// for those, IoctlRetInt should be used instead of this function.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										83
									
								
								vendor/golang.org/x/sys/unix/mkall.sh
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										83
									
								
								vendor/golang.org/x/sys/unix/mkall.sh
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -17,6 +17,7 @@ mksysctl=""
 | 
			
		||||
zsysctl="zsysctl_$GOOSARCH.go"
 | 
			
		||||
mksysnum=
 | 
			
		||||
mktypes=
 | 
			
		||||
mkasm=
 | 
			
		||||
run="sh"
 | 
			
		||||
cmd=""
 | 
			
		||||
 | 
			
		||||
@@ -45,8 +46,8 @@ case "$#" in
 | 
			
		||||
	exit 2
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
 | 
			
		||||
	# Use then new build system
 | 
			
		||||
if [[ "$GOOS" = "linux" ]]; then
 | 
			
		||||
	# Use the Docker-based build system
 | 
			
		||||
	# Files generated through docker (use $cmd so you can Ctl-C the build or run)
 | 
			
		||||
	$cmd docker build --tag generate:$GOOS $GOOS
 | 
			
		||||
	$cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
 | 
			
		||||
@@ -61,112 +62,130 @@ _* | *_ | _)
 | 
			
		||||
	;;
 | 
			
		||||
aix_ppc)
 | 
			
		||||
	mkerrors="$mkerrors -maix32"
 | 
			
		||||
	mksyscall="./mksyscall_aix_ppc.pl -aix"
 | 
			
		||||
	mksyscall="go run mksyscall_aix_ppc.go -aix"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
aix_ppc64)
 | 
			
		||||
	mkerrors="$mkerrors -maix64"
 | 
			
		||||
	mksyscall="./mksyscall_aix_ppc64.pl -aix"
 | 
			
		||||
	mksyscall="go run mksyscall_aix_ppc64.go -aix"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
darwin_386)
 | 
			
		||||
	mkerrors="$mkerrors -m32"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32"
 | 
			
		||||
	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
 | 
			
		||||
	mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	mkasm="go run mkasm_darwin.go"
 | 
			
		||||
	;;
 | 
			
		||||
darwin_amd64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
 | 
			
		||||
	mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	mkasm="go run mkasm_darwin.go"
 | 
			
		||||
	;;
 | 
			
		||||
darwin_arm)
 | 
			
		||||
	mkerrors="$mkerrors"
 | 
			
		||||
	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32"
 | 
			
		||||
	mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	mkasm="go run mkasm_darwin.go"
 | 
			
		||||
	;;
 | 
			
		||||
darwin_arm64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
 | 
			
		||||
	mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	mkasm="go run mkasm_darwin.go"
 | 
			
		||||
	;;
 | 
			
		||||
dragonfly_amd64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksyscall="go run mksyscall.go -dragonfly"
 | 
			
		||||
	mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
freebsd_386)
 | 
			
		||||
	mkerrors="$mkerrors -m32"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32"
 | 
			
		||||
	mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
freebsd_amd64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
freebsd_arm)
 | 
			
		||||
	mkerrors="$mkerrors"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32 -arm"
 | 
			
		||||
	mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
 | 
			
		||||
	# Let the type of C char be signed for making the bare syscall
 | 
			
		||||
	# API consistent across platforms.
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
 | 
			
		||||
	;;
 | 
			
		||||
linux_sparc64)
 | 
			
		||||
	GOOSARCH_in=syscall_linux_sparc64.go
 | 
			
		||||
	unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
 | 
			
		||||
freebsd_arm64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksysnum="./mksysnum_linux.pl $unistd_h"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
netbsd_386)
 | 
			
		||||
	mkerrors="$mkerrors -m32"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32 -netbsd"
 | 
			
		||||
	mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
netbsd_amd64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksyscall="go run mksyscall.go -netbsd"
 | 
			
		||||
	mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
netbsd_arm)
 | 
			
		||||
	mkerrors="$mkerrors"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32 -netbsd -arm"
 | 
			
		||||
	mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	# Let the type of C char be signed for making the bare syscall
 | 
			
		||||
	# API consistent across platforms.
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
 | 
			
		||||
	;;
 | 
			
		||||
netbsd_arm64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksyscall="go run mksyscall.go -netbsd"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
openbsd_386)
 | 
			
		||||
	mkerrors="$mkerrors -m32"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32 -openbsd"
 | 
			
		||||
	mksysctl="./mksysctl_openbsd.pl"
 | 
			
		||||
	mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
 | 
			
		||||
	mksysctl="go run mksysctl_openbsd.go"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
openbsd_amd64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksyscall="go run mksyscall.go -openbsd"
 | 
			
		||||
	mksysctl="./mksysctl_openbsd.pl"
 | 
			
		||||
	mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
 | 
			
		||||
	mksysctl="go run mksysctl_openbsd.go"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
	;;
 | 
			
		||||
openbsd_arm)
 | 
			
		||||
	mkerrors="$mkerrors"
 | 
			
		||||
	mksyscall="go run mksyscall.go -l32 -openbsd -arm"
 | 
			
		||||
	mksysctl="./mksysctl_openbsd.pl"
 | 
			
		||||
	mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
 | 
			
		||||
	mksysctl="go run mksysctl_openbsd.go"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	# Let the type of C char be signed for making the bare syscall
 | 
			
		||||
	# API consistent across platforms.
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
 | 
			
		||||
	;;
 | 
			
		||||
openbsd_arm64)
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksyscall="go run mksyscall.go -openbsd"
 | 
			
		||||
	mksysctl="go run mksysctl_openbsd.go"
 | 
			
		||||
	mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
 | 
			
		||||
	# Let the type of C char be signed for making the bare syscall
 | 
			
		||||
	# API consistent across platforms.
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
 | 
			
		||||
	;;
 | 
			
		||||
solaris_amd64)
 | 
			
		||||
	mksyscall="./mksyscall_solaris.pl"
 | 
			
		||||
	mksyscall="go run mksyscall_solaris.go"
 | 
			
		||||
	mkerrors="$mkerrors -m64"
 | 
			
		||||
	mksysnum=
 | 
			
		||||
	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
 | 
			
		||||
@@ -191,6 +210,13 @@ esac
 | 
			
		||||
			if [ "$GOOSARCH" == "aix_ppc64" ]; then
 | 
			
		||||
				# aix/ppc64 script generates files instead of writing to stdin.
 | 
			
		||||
				echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
 | 
			
		||||
			elif [ "$GOOS" == "darwin" ]; then
 | 
			
		||||
			        # pre-1.12, direct syscalls
 | 
			
		||||
			        echo "$mksyscall -tags $GOOS,$GOARCH,!go1.12 $syscall_goos syscall_darwin_${GOARCH}.1_11.go $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.1_11.go";
 | 
			
		||||
			        # 1.12 and later, syscalls via libSystem
 | 
			
		||||
				echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
 | 
			
		||||
				# 1.13 and later, syscalls via libSystem (including syscallPtr)
 | 
			
		||||
				echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
 | 
			
		||||
			else
 | 
			
		||||
				echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
 | 
			
		||||
			fi
 | 
			
		||||
@@ -198,7 +224,6 @@ esac
 | 
			
		||||
	esac
 | 
			
		||||
	if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
 | 
			
		||||
	if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
 | 
			
		||||
	if [ -n "$mktypes" ]; then
 | 
			
		||||
		echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
 | 
			
		||||
	fi
 | 
			
		||||
	if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; fi
 | 
			
		||||
	if [ -n "$mkasm" ]; then echo "$mkasm $GOARCH"; fi
 | 
			
		||||
) | $run
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										92
									
								
								vendor/golang.org/x/sys/unix/mkerrors.sh
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										92
									
								
								vendor/golang.org/x/sys/unix/mkerrors.sh
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -17,12 +17,10 @@ if test -z "$GOARCH" -o -z "$GOOS"; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Check that we are using the new build system if we should
 | 
			
		||||
if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
 | 
			
		||||
	if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
 | 
			
		||||
		echo 1>&2 "In the new build system, mkerrors should not be called directly."
 | 
			
		||||
		echo 1>&2 "See README.md"
 | 
			
		||||
		exit 1
 | 
			
		||||
	fi
 | 
			
		||||
if [[ "$GOOS" = "linux" ]] && [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
 | 
			
		||||
	echo 1>&2 "In the Docker based build system, mkerrors should not be called directly."
 | 
			
		||||
	echo 1>&2 "See README.md"
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ "$GOOS" = "aix" ]]; then
 | 
			
		||||
@@ -62,6 +60,7 @@ includes_Darwin='
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/event.h>
 | 
			
		||||
#include <sys/ptrace.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/sockio.h>
 | 
			
		||||
#include <sys/sysctl.h>
 | 
			
		||||
@@ -82,6 +81,7 @@ includes_Darwin='
 | 
			
		||||
includes_DragonFly='
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/event.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/sockio.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
@@ -105,6 +105,7 @@ includes_FreeBSD='
 | 
			
		||||
#include <sys/param.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/event.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/sockio.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
@@ -181,49 +182,68 @@ struct ltchars {
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/time.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/signalfd.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/xattr.h>
 | 
			
		||||
#include <linux/bpf.h>
 | 
			
		||||
#include <linux/can.h>
 | 
			
		||||
#include <linux/capability.h>
 | 
			
		||||
#include <linux/cryptouser.h>
 | 
			
		||||
#include <linux/errqueue.h>
 | 
			
		||||
#include <linux/falloc.h>
 | 
			
		||||
#include <linux/fanotify.h>
 | 
			
		||||
#include <linux/filter.h>
 | 
			
		||||
#include <linux/fs.h>
 | 
			
		||||
#include <linux/genetlink.h>
 | 
			
		||||
#include <linux/hdreg.h>
 | 
			
		||||
#include <linux/icmpv6.h>
 | 
			
		||||
#include <linux/if.h>
 | 
			
		||||
#include <linux/if_addr.h>
 | 
			
		||||
#include <linux/if_alg.h>
 | 
			
		||||
#include <linux/if_arp.h>
 | 
			
		||||
#include <linux/if_ether.h>
 | 
			
		||||
#include <linux/if_ppp.h>
 | 
			
		||||
#include <linux/if_tun.h>
 | 
			
		||||
#include <linux/if_packet.h>
 | 
			
		||||
#include <linux/if_addr.h>
 | 
			
		||||
#include <linux/falloc.h>
 | 
			
		||||
#include <linux/filter.h>
 | 
			
		||||
#include <linux/fs.h>
 | 
			
		||||
#include <linux/if_xdp.h>
 | 
			
		||||
#include <linux/kexec.h>
 | 
			
		||||
#include <linux/keyctl.h>
 | 
			
		||||
#include <linux/loop.h>
 | 
			
		||||
#include <linux/magic.h>
 | 
			
		||||
#include <linux/memfd.h>
 | 
			
		||||
#include <linux/module.h>
 | 
			
		||||
#include <linux/netfilter/nfnetlink.h>
 | 
			
		||||
#include <linux/netlink.h>
 | 
			
		||||
#include <linux/net_namespace.h>
 | 
			
		||||
#include <linux/nsfs.h>
 | 
			
		||||
#include <linux/perf_event.h>
 | 
			
		||||
#include <linux/ptrace.h>
 | 
			
		||||
#include <linux/random.h>
 | 
			
		||||
#include <linux/reboot.h>
 | 
			
		||||
#include <linux/rtc.h>
 | 
			
		||||
#include <linux/rtnetlink.h>
 | 
			
		||||
#include <linux/ptrace.h>
 | 
			
		||||
#include <linux/sched.h>
 | 
			
		||||
#include <linux/seccomp.h>
 | 
			
		||||
#include <linux/sockios.h>
 | 
			
		||||
#include <linux/wait.h>
 | 
			
		||||
#include <linux/icmpv6.h>
 | 
			
		||||
#include <linux/serial.h>
 | 
			
		||||
#include <linux/can.h>
 | 
			
		||||
#include <linux/vm_sockets.h>
 | 
			
		||||
#include <linux/sockios.h>
 | 
			
		||||
#include <linux/taskstats.h>
 | 
			
		||||
#include <linux/genetlink.h>
 | 
			
		||||
#include <linux/tipc.h>
 | 
			
		||||
#include <linux/vm_sockets.h>
 | 
			
		||||
#include <linux/wait.h>
 | 
			
		||||
#include <linux/watchdog.h>
 | 
			
		||||
#include <linux/hdreg.h>
 | 
			
		||||
#include <linux/rtc.h>
 | 
			
		||||
#include <linux/if_xdp.h>
 | 
			
		||||
 | 
			
		||||
#include <mtd/ubi-user.h>
 | 
			
		||||
#include <net/route.h>
 | 
			
		||||
 | 
			
		||||
#if defined(__sparc__)
 | 
			
		||||
// On sparc{,64}, the kernel defines struct termios2 itself which clashes with the
 | 
			
		||||
// definition in glibc. As only the error constants are needed here, include the
 | 
			
		||||
// generic termibits.h (which is included by termbits.h on sparc).
 | 
			
		||||
#include <asm-generic/termbits.h>
 | 
			
		||||
#else
 | 
			
		||||
#include <asm/termbits.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef MSG_FASTOPEN
 | 
			
		||||
#define MSG_FASTOPEN    0x20000000
 | 
			
		||||
@@ -252,15 +272,10 @@ struct ltchars {
 | 
			
		||||
#define FS_KEY_DESC_PREFIX_SIZE         8
 | 
			
		||||
#define FS_MAX_KEY_SIZE                 64
 | 
			
		||||
 | 
			
		||||
// XDP socket constants do not appear to be picked up otherwise.
 | 
			
		||||
// Copied from samples/bpf/xdpsock_user.c.
 | 
			
		||||
#ifndef SOL_XDP
 | 
			
		||||
#define SOL_XDP 283
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef AF_XDP
 | 
			
		||||
#define AF_XDP 44
 | 
			
		||||
#endif
 | 
			
		||||
// The code generator produces -0x1 for (~0), but an unsigned value is necessary
 | 
			
		||||
// for the tipc_subscr timeout __u32 field.
 | 
			
		||||
#undef TIPC_WAIT_FOREVER
 | 
			
		||||
#define TIPC_WAIT_FOREVER 0xffffffff
 | 
			
		||||
'
 | 
			
		||||
 | 
			
		||||
includes_NetBSD='
 | 
			
		||||
@@ -270,6 +285,7 @@ includes_NetBSD='
 | 
			
		||||
#include <sys/extattr.h>
 | 
			
		||||
#include <sys/mman.h>
 | 
			
		||||
#include <sys/mount.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/sockio.h>
 | 
			
		||||
#include <sys/sysctl.h>
 | 
			
		||||
@@ -296,6 +312,7 @@ includes_OpenBSD='
 | 
			
		||||
#include <sys/event.h>
 | 
			
		||||
#include <sys/mman.h>
 | 
			
		||||
#include <sys/mount.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/sockio.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
@@ -332,6 +349,7 @@ includes_OpenBSD='
 | 
			
		||||
includes_SunOS='
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <sys/sockio.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
@@ -424,6 +442,7 @@ ccflags="$@"
 | 
			
		||||
		$2 == "XCASE" ||
 | 
			
		||||
		$2 == "ALTWERASE" ||
 | 
			
		||||
		$2 == "NOKERNINFO" ||
 | 
			
		||||
		$2 == "NFDBITS" ||
 | 
			
		||||
		$2 ~ /^PAR/ ||
 | 
			
		||||
		$2 ~ /^SIG[^_]/ ||
 | 
			
		||||
		$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
 | 
			
		||||
@@ -433,7 +452,9 @@ ccflags="$@"
 | 
			
		||||
		$2 ~ /^TC[IO](ON|OFF)$/ ||
 | 
			
		||||
		$2 ~ /^IN_/ ||
 | 
			
		||||
		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
 | 
			
		||||
		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
 | 
			
		||||
		$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
 | 
			
		||||
		$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
 | 
			
		||||
		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
 | 
			
		||||
		$2 ~ /^TP_STATUS_/ ||
 | 
			
		||||
		$2 ~ /^FALLOC_/ ||
 | 
			
		||||
		$2 == "ICMPV6_FILTER" ||
 | 
			
		||||
@@ -446,8 +467,9 @@ ccflags="$@"
 | 
			
		||||
		$2 ~ /^SYSCTL_VERS/ ||
 | 
			
		||||
		$2 !~ "MNT_BITS" &&
 | 
			
		||||
		$2 ~ /^(MS|MNT|UMOUNT)_/ ||
 | 
			
		||||
		$2 ~ /^NS_GET_/ ||
 | 
			
		||||
		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
 | 
			
		||||
		$2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
 | 
			
		||||
		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
 | 
			
		||||
		$2 ~ /^KEXEC_/ ||
 | 
			
		||||
		$2 ~ /^LINUX_REBOOT_CMD_/ ||
 | 
			
		||||
		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
 | 
			
		||||
@@ -466,14 +488,15 @@ ccflags="$@"
 | 
			
		||||
		$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
 | 
			
		||||
		$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
 | 
			
		||||
		$2 ~ /^CLONE_[A-Z_]+/ ||
 | 
			
		||||
		$2 !~ /^(BPF_TIMEVAL)$/ &&
 | 
			
		||||
		$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
 | 
			
		||||
		$2 ~ /^(BPF|DLT)_/ ||
 | 
			
		||||
		$2 ~ /^CLOCK_/ ||
 | 
			
		||||
		$2 ~ /^(CLOCK|TIMER)_/ ||
 | 
			
		||||
		$2 ~ /^CAN_/ ||
 | 
			
		||||
		$2 ~ /^CAP_/ ||
 | 
			
		||||
		$2 ~ /^ALG_/ ||
 | 
			
		||||
		$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
 | 
			
		||||
		$2 ~ /^GRND_/ ||
 | 
			
		||||
		$2 ~ /^RND/ ||
 | 
			
		||||
		$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
 | 
			
		||||
		$2 ~ /^KEYCTL_/ ||
 | 
			
		||||
		$2 ~ /^PERF_EVENT_IOC_/ ||
 | 
			
		||||
@@ -499,9 +522,12 @@ ccflags="$@"
 | 
			
		||||
		$2 ~ /^NFN/ ||
 | 
			
		||||
		$2 ~ /^XDP_/ ||
 | 
			
		||||
		$2 ~ /^(HDIO|WIN|SMART)_/ ||
 | 
			
		||||
		$2 ~ /^CRYPTO_/ ||
 | 
			
		||||
		$2 ~ /^TIPC_/ ||
 | 
			
		||||
		$2 !~ "WMESGLEN" &&
 | 
			
		||||
		$2 ~ /^W[A-Z0-9]+$/ ||
 | 
			
		||||
		$2 ~/^PPPIOC/ ||
 | 
			
		||||
		$2 ~ /^FAN_|FANOTIFY_/ ||
 | 
			
		||||
		$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
 | 
			
		||||
		$2 ~ /^__WCOREFLAG$/ {next}
 | 
			
		||||
		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										384
									
								
								vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										384
									
								
								vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,384 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2018 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.
 | 
			
		||||
 | 
			
		||||
# This program reads a file containing function prototypes
 | 
			
		||||
# (like syscall_aix.go) and generates system call bodies.
 | 
			
		||||
# The prototypes are marked by lines beginning with "//sys"
 | 
			
		||||
# and read like func declarations if //sys is replaced by func, but:
 | 
			
		||||
#	* The parameter lists must give a name for each argument.
 | 
			
		||||
#	  This includes return parameters.
 | 
			
		||||
#	* The parameter lists must give a type for each argument:
 | 
			
		||||
#	  the (x, y, z int) shorthand is not allowed.
 | 
			
		||||
#	* If the return parameter is an error number, it must be named err.
 | 
			
		||||
#	* If go func name needs to be different than its libc name,
 | 
			
		||||
#	* or the function is not in libc, name could be specified
 | 
			
		||||
#	* at the end, after "=" sign, like
 | 
			
		||||
#	  //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
my $cmdline = "mksyscall_aix_ppc.pl " . join(' ', @ARGV);
 | 
			
		||||
my $errors = 0;
 | 
			
		||||
my $_32bit = "";
 | 
			
		||||
my $tags = "";  # build tags
 | 
			
		||||
my $aix = 0;
 | 
			
		||||
my $solaris = 0;
 | 
			
		||||
 | 
			
		||||
binmode STDOUT;
 | 
			
		||||
 | 
			
		||||
if($ARGV[0] eq "-b32") {
 | 
			
		||||
	$_32bit = "big-endian";
 | 
			
		||||
	shift;
 | 
			
		||||
} elsif($ARGV[0] eq "-l32") {
 | 
			
		||||
	$_32bit = "little-endian";
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
if($ARGV[0] eq "-aix") {
 | 
			
		||||
	$aix = 1;
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
if($ARGV[0] eq "-tags") {
 | 
			
		||||
	shift;
 | 
			
		||||
	$tags = $ARGV[0];
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($ARGV[0] =~ /^-/) {
 | 
			
		||||
	print STDERR "usage: mksyscall_aix.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parseparamlist($) {
 | 
			
		||||
	my ($list) = @_;
 | 
			
		||||
	$list =~ s/^\s*//;
 | 
			
		||||
	$list =~ s/\s*$//;
 | 
			
		||||
	if($list eq "") {
 | 
			
		||||
		return ();
 | 
			
		||||
	}
 | 
			
		||||
	return split(/\s*,\s*/, $list);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parseparam($) {
 | 
			
		||||
	my ($p) = @_;
 | 
			
		||||
	if($p !~ /^(\S*) (\S*)$/) {
 | 
			
		||||
		print STDERR "$ARGV:$.: malformed parameter: $p\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		return ("xx", "int");
 | 
			
		||||
	}
 | 
			
		||||
	return ($1, $2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $package = "";
 | 
			
		||||
my $text = "";
 | 
			
		||||
my $c_extern = "/*\n#include <stdint.h>\n#include <stddef.h>\n";
 | 
			
		||||
my @vars = ();
 | 
			
		||||
while(<>) {
 | 
			
		||||
	chomp;
 | 
			
		||||
	s/\s+/ /g;
 | 
			
		||||
	s/^\s+//;
 | 
			
		||||
	s/\s+$//;
 | 
			
		||||
	$package = $1 if !$package && /^package (\S+)$/;
 | 
			
		||||
	my $nonblock = /^\/\/sysnb /;
 | 
			
		||||
	next if !/^\/\/sys / && !$nonblock;
 | 
			
		||||
 | 
			
		||||
	# Line must be of the form
 | 
			
		||||
	# func Open(path string, mode int, perm int) (fd int, err error)
 | 
			
		||||
	# Split into name, in params, out params.
 | 
			
		||||
	if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
 | 
			
		||||
		print STDERR "$ARGV:$.: malformed //sys declaration\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		next;
 | 
			
		||||
	}
 | 
			
		||||
	my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
 | 
			
		||||
 | 
			
		||||
	# Split argument lists on comma.
 | 
			
		||||
	my @in = parseparamlist($in);
 | 
			
		||||
	my @out = parseparamlist($out);
 | 
			
		||||
 | 
			
		||||
	$in = join(', ', @in);
 | 
			
		||||
	$out = join(', ', @out);
 | 
			
		||||
 | 
			
		||||
	# Try in vain to keep people from editing this file.
 | 
			
		||||
	# The theory is that they jump into the middle of the file
 | 
			
		||||
	# without reading the header.
 | 
			
		||||
	$text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
 | 
			
		||||
 | 
			
		||||
	# Check if value return, err return available
 | 
			
		||||
	my $errvar = "";
 | 
			
		||||
	my $retvar = "";
 | 
			
		||||
	my $rettype = "";
 | 
			
		||||
	foreach my $p (@out) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type eq "error") {
 | 
			
		||||
			$errvar = $name;
 | 
			
		||||
		} else {
 | 
			
		||||
			$retvar = $name;
 | 
			
		||||
			$rettype = $type;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# System call name.
 | 
			
		||||
	#if($func ne "fcntl") {
 | 
			
		||||
 | 
			
		||||
	if($sysname eq "") {
 | 
			
		||||
		$sysname = "$func";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$sysname =~ s/([a-z])([A-Z])/${1}_$2/g;
 | 
			
		||||
	$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
 | 
			
		||||
 | 
			
		||||
	my $C_rettype = "";
 | 
			
		||||
	if($rettype eq "unsafe.Pointer") {
 | 
			
		||||
		$C_rettype = "uintptr_t";
 | 
			
		||||
	} elsif($rettype eq "uintptr") {
 | 
			
		||||
		$C_rettype = "uintptr_t";
 | 
			
		||||
	} elsif($rettype =~ /^_/) {
 | 
			
		||||
		$C_rettype = "uintptr_t";
 | 
			
		||||
	} elsif($rettype eq "int") {
 | 
			
		||||
		$C_rettype = "int";
 | 
			
		||||
	} elsif($rettype eq "int32") {
 | 
			
		||||
		$C_rettype = "int";
 | 
			
		||||
	} elsif($rettype eq "int64") {
 | 
			
		||||
		$C_rettype = "long long";
 | 
			
		||||
	} elsif($rettype eq "uint32") {
 | 
			
		||||
		$C_rettype = "unsigned int";
 | 
			
		||||
	} elsif($rettype eq "uint64") {
 | 
			
		||||
		$C_rettype = "unsigned long long";
 | 
			
		||||
	} else {
 | 
			
		||||
		$C_rettype = "int";
 | 
			
		||||
	}
 | 
			
		||||
	if($sysname eq "exit") {
 | 
			
		||||
		$C_rettype = "void";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Change types to c
 | 
			
		||||
	my @c_in = ();
 | 
			
		||||
	foreach my $p (@in) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type =~ /^\*/) {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
			} elsif($type eq "string") {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type =~ /^\[\](.*)/) {
 | 
			
		||||
			push @c_in, "uintptr_t", "size_t";
 | 
			
		||||
		} elsif($type eq "unsafe.Pointer") {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type eq "uintptr") {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type =~ /^_/) {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type eq "int") {
 | 
			
		||||
			push @c_in, "int";
 | 
			
		||||
		} elsif($type eq "int32") {
 | 
			
		||||
			push @c_in, "int";
 | 
			
		||||
		} elsif($type eq "int64") {
 | 
			
		||||
			push @c_in, "long long";
 | 
			
		||||
		} elsif($type eq "uint32") {
 | 
			
		||||
			push @c_in, "unsigned int";
 | 
			
		||||
		} elsif($type eq "uint64") {
 | 
			
		||||
			push @c_in, "unsigned long long";
 | 
			
		||||
		} else {
 | 
			
		||||
			push @c_in, "int";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ($func ne "fcntl" && $func ne "FcntlInt" && $func ne "readlen" && $func ne "writelen") {
 | 
			
		||||
		# Imports of system calls from libc
 | 
			
		||||
		$c_extern .= "$C_rettype $sysname";
 | 
			
		||||
		my $c_in = join(', ', @c_in);
 | 
			
		||||
		$c_extern .= "($c_in);\n";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# So file name.
 | 
			
		||||
	if($aix) {
 | 
			
		||||
		if($modname eq "") {
 | 
			
		||||
			$modname = "libc.a/shr_64.o";
 | 
			
		||||
		} else {
 | 
			
		||||
			print STDERR "$func: only syscall using libc are available\n";
 | 
			
		||||
			$errors = 1;
 | 
			
		||||
			next;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	my $strconvfunc = "C.CString";
 | 
			
		||||
	my $strconvtype = "*byte";
 | 
			
		||||
 | 
			
		||||
	# Go function header.
 | 
			
		||||
	if($out ne "") {
 | 
			
		||||
		$out = " ($out)";
 | 
			
		||||
	}
 | 
			
		||||
	if($text ne "") {
 | 
			
		||||
		$text .= "\n"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out ;
 | 
			
		||||
 | 
			
		||||
	# Prepare arguments to call.
 | 
			
		||||
	my @args = ();
 | 
			
		||||
	my $n = 0;
 | 
			
		||||
	my $arg_n = 0;
 | 
			
		||||
	foreach my $p (@in) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type =~ /^\*/) {
 | 
			
		||||
			push @args, "C.uintptr_t(uintptr(unsafe.Pointer($name)))";
 | 
			
		||||
		} elsif($type eq "string" && $errvar ne "") {
 | 
			
		||||
			$text .= "\t_p$n := uintptr(unsafe.Pointer($strconvfunc($name)))\n";
 | 
			
		||||
			push @args, "C.uintptr_t(_p$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "string") {
 | 
			
		||||
			print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
 | 
			
		||||
			$text .= "\t_p$n := uintptr(unsafe.Pointer($strconvfunc($name)))\n";
 | 
			
		||||
			push @args, "C.uintptr_t(_p$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type =~ /^\[\](.*)/) {
 | 
			
		||||
			# Convert slice into pointer, length.
 | 
			
		||||
			# Have to be careful not to take address of &a[0] if len == 0:
 | 
			
		||||
			# pass nil in that case.
 | 
			
		||||
			$text .= "\tvar _p$n *$1\n";
 | 
			
		||||
			$text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
 | 
			
		||||
			push @args, "C.uintptr_t(uintptr(unsafe.Pointer(_p$n)))";
 | 
			
		||||
			$n++;
 | 
			
		||||
			$text .= "\tvar _p$n int\n";
 | 
			
		||||
			$text .= "\t_p$n = len($name)\n";
 | 
			
		||||
			push @args, "C.size_t(_p$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "int64" && $_32bit ne "") {
 | 
			
		||||
			if($_32bit eq "big-endian") {
 | 
			
		||||
				push @args, "uintptr($name >> 32)", "uintptr($name)";
 | 
			
		||||
			} else {
 | 
			
		||||
				push @args, "uintptr($name)", "uintptr($name >> 32)";
 | 
			
		||||
			}
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "bool") {
 | 
			
		||||
			$text .= "\tvar _p$n uint32\n";
 | 
			
		||||
			$text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
 | 
			
		||||
			push @args, "_p$n";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type =~ /^_/) {
 | 
			
		||||
			push @args, "C.uintptr_t(uintptr($name))";
 | 
			
		||||
		} elsif($type eq "unsafe.Pointer") {
 | 
			
		||||
			push @args, "C.uintptr_t(uintptr($name))";
 | 
			
		||||
		} elsif($type eq "int") {
 | 
			
		||||
			if (($arg_n == 2) && (($func eq "readlen") || ($func eq "writelen"))) {
 | 
			
		||||
				push @args, "C.size_t($name)";
 | 
			
		||||
			} elsif ($arg_n == 0 && $func eq "fcntl") {
 | 
			
		||||
				push @args, "C.uintptr_t($name)";
 | 
			
		||||
			} elsif (($arg_n == 2) && (($func eq "fcntl") || ($func eq "FcntlInt"))) {
 | 
			
		||||
				push @args, "C.uintptr_t($name)";
 | 
			
		||||
			} else {
 | 
			
		||||
				push @args, "C.int($name)";
 | 
			
		||||
			}
 | 
			
		||||
		} elsif($type eq "int32") {
 | 
			
		||||
			push @args, "C.int($name)";
 | 
			
		||||
		} elsif($type eq "int64") {
 | 
			
		||||
			push @args, "C.longlong($name)";
 | 
			
		||||
		} elsif($type eq "uint32") {
 | 
			
		||||
			push @args, "C.uint($name)";
 | 
			
		||||
		} elsif($type eq "uint64") {
 | 
			
		||||
			push @args, "C.ulonglong($name)";
 | 
			
		||||
		} elsif($type eq "uintptr") {
 | 
			
		||||
			push @args, "C.uintptr_t($name)";
 | 
			
		||||
		} else {
 | 
			
		||||
			push @args, "C.int($name)";
 | 
			
		||||
		}
 | 
			
		||||
		$arg_n++;
 | 
			
		||||
	}
 | 
			
		||||
	my $nargs = @args;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	# Determine which form to use; pad args with zeros.
 | 
			
		||||
	if ($nonblock) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	my $args = join(', ', @args);
 | 
			
		||||
	my $call = "";
 | 
			
		||||
	if ($sysname eq "exit") {
 | 
			
		||||
		if ($errvar ne "") {
 | 
			
		||||
			$call .= "er :=";
 | 
			
		||||
		} else {
 | 
			
		||||
			$call .= "";
 | 
			
		||||
		}
 | 
			
		||||
	}  elsif ($errvar ne "") {
 | 
			
		||||
		$call .= "r0,er :=";
 | 
			
		||||
	}  elsif ($retvar ne "") {
 | 
			
		||||
		$call .= "r0,_ :=";
 | 
			
		||||
	}  else {
 | 
			
		||||
		$call .= ""
 | 
			
		||||
	}
 | 
			
		||||
	$call .= "C.$sysname($args)";
 | 
			
		||||
 | 
			
		||||
	# Assign return values.
 | 
			
		||||
	my $body = "";
 | 
			
		||||
	my $failexpr = "";
 | 
			
		||||
 | 
			
		||||
	for(my $i=0; $i<@out; $i++) {
 | 
			
		||||
		my $p = $out[$i];
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		my $reg = "";
 | 
			
		||||
		if($name eq "err") {
 | 
			
		||||
			$reg = "e1";
 | 
			
		||||
		} else {
 | 
			
		||||
			$reg = "r0";
 | 
			
		||||
		}
 | 
			
		||||
		if($reg ne "e1" ) {
 | 
			
		||||
						$body .= "\t$name = $type($reg)\n";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# verify return
 | 
			
		||||
	if ($sysname ne "exit" && $errvar ne "") {
 | 
			
		||||
		if ($C_rettype =~ /^uintptr/) {
 | 
			
		||||
			$body .= "\tif \(uintptr\(r0\) ==\^uintptr\(0\) && er != nil\) {\n";
 | 
			
		||||
			$body .= "\t\t$errvar = er\n";
 | 
			
		||||
			$body .= "\t}\n";
 | 
			
		||||
		} else {
 | 
			
		||||
			$body .= "\tif \(r0 ==-1 && er != nil\) {\n";
 | 
			
		||||
			$body .= "\t\t$errvar = er\n";
 | 
			
		||||
			$body .= "\t}\n";
 | 
			
		||||
		}
 | 
			
		||||
	} elsif ($errvar ne "") {
 | 
			
		||||
		$body .= "\tif \(er != nil\) {\n";
 | 
			
		||||
		$body .= "\t\t$errvar = er\n";
 | 
			
		||||
		$body .= "\t}\n";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$text .= "\t$call\n";
 | 
			
		||||
	$text .= $body;
 | 
			
		||||
 | 
			
		||||
	$text .= "\treturn\n";
 | 
			
		||||
	$text .= "}\n";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($errors) {
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $cmdline
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $tags
 | 
			
		||||
 | 
			
		||||
package $package
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
$c_extern
 | 
			
		||||
*/
 | 
			
		||||
import "C"
 | 
			
		||||
import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
 | 
			
		||||
 | 
			
		||||
chomp($_=<<EOF);
 | 
			
		||||
 | 
			
		||||
$text
 | 
			
		||||
EOF
 | 
			
		||||
print $_;
 | 
			
		||||
exit 0;
 | 
			
		||||
							
								
								
									
										579
									
								
								vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										579
									
								
								vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,579 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2018 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.
 | 
			
		||||
 | 
			
		||||
# This program reads a file containing function prototypes
 | 
			
		||||
# (like syscall_aix.go) and generates system call bodies.
 | 
			
		||||
# The prototypes are marked by lines beginning with "//sys"
 | 
			
		||||
# and read like func declarations if //sys is replaced by func, but:
 | 
			
		||||
#	* The parameter lists must give a name for each argument.
 | 
			
		||||
#	  This includes return parameters.
 | 
			
		||||
#	* The parameter lists must give a type for each argument:
 | 
			
		||||
#	  the (x, y, z int) shorthand is not allowed.
 | 
			
		||||
#	* If the return parameter is an error number, it must be named err.
 | 
			
		||||
#	* If go func name needs to be different than its libc name,
 | 
			
		||||
#	* or the function is not in libc, name could be specified
 | 
			
		||||
#	* at the end, after "=" sign, like
 | 
			
		||||
#	  //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
 | 
			
		||||
 | 
			
		||||
# This program will generate three files and handle both gc and gccgo implementation:
 | 
			
		||||
#   - zsyscall_aix_ppc64.go: the common part of each implementation (error handler, pointer creation)
 | 
			
		||||
#   - zsyscall_aix_ppc64_gc.go: gc part with //go_cgo_import_dynamic and a call to syscall6
 | 
			
		||||
#   - zsyscall_aix_ppc64_gccgo.go: gccgo part with C function and conversion to C type.
 | 
			
		||||
 | 
			
		||||
# The generated code looks like this
 | 
			
		||||
#
 | 
			
		||||
# zsyscall_aix_ppc64.go
 | 
			
		||||
# func asyscall(...) (n int, err error) {
 | 
			
		||||
#	  // Pointer Creation
 | 
			
		||||
#	  r1, e1 := callasyscall(...)
 | 
			
		||||
#	  // Type Conversion
 | 
			
		||||
#	  // Error Handler
 | 
			
		||||
#	  return
 | 
			
		||||
# }
 | 
			
		||||
#
 | 
			
		||||
# zsyscall_aix_ppc64_gc.go
 | 
			
		||||
# //go:cgo_import_dynamic libc_asyscall asyscall "libc.a/shr_64.o"
 | 
			
		||||
# //go:linkname libc_asyscall libc_asyscall
 | 
			
		||||
# var asyscall syscallFunc
 | 
			
		||||
#
 | 
			
		||||
# func callasyscall(...) (r1 uintptr, e1 Errno) {
 | 
			
		||||
#	  r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_asyscall)), "nb_args", ... )
 | 
			
		||||
#	  return
 | 
			
		||||
# }
 | 
			
		||||
#
 | 
			
		||||
# zsyscall_aix_ppc64_ggcgo.go
 | 
			
		||||
# /*
 | 
			
		||||
#  int asyscall(...)
 | 
			
		||||
#
 | 
			
		||||
# */
 | 
			
		||||
# import "C"
 | 
			
		||||
#
 | 
			
		||||
# func callasyscall(...) (r1 uintptr, e1 Errno) {
 | 
			
		||||
#	  r1 = uintptr(C.asyscall(...))
 | 
			
		||||
#	  e1 = syscall.GetErrno()
 | 
			
		||||
#	  return
 | 
			
		||||
# }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
my $cmdline = "mksyscall_aix_ppc64.pl " . join(' ', @ARGV);
 | 
			
		||||
my $errors = 0;
 | 
			
		||||
my $_32bit = "";
 | 
			
		||||
my $tags = "";  # build tags
 | 
			
		||||
my $aix = 0;
 | 
			
		||||
my $solaris = 0;
 | 
			
		||||
 | 
			
		||||
binmode STDOUT;
 | 
			
		||||
 | 
			
		||||
if($ARGV[0] eq "-b32") {
 | 
			
		||||
	$_32bit = "big-endian";
 | 
			
		||||
	shift;
 | 
			
		||||
} elsif($ARGV[0] eq "-l32") {
 | 
			
		||||
	$_32bit = "little-endian";
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
if($ARGV[0] eq "-aix") {
 | 
			
		||||
	$aix = 1;
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
if($ARGV[0] eq "-tags") {
 | 
			
		||||
	shift;
 | 
			
		||||
	$tags = $ARGV[0];
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($ARGV[0] =~ /^-/) {
 | 
			
		||||
	print STDERR "usage: mksyscall_aix.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parseparamlist($) {
 | 
			
		||||
	my ($list) = @_;
 | 
			
		||||
	$list =~ s/^\s*//;
 | 
			
		||||
	$list =~ s/\s*$//;
 | 
			
		||||
	if($list eq "") {
 | 
			
		||||
		return ();
 | 
			
		||||
	}
 | 
			
		||||
	return split(/\s*,\s*/, $list);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parseparam($) {
 | 
			
		||||
	my ($p) = @_;
 | 
			
		||||
	if($p !~ /^(\S*) (\S*)$/) {
 | 
			
		||||
		print STDERR "$ARGV:$.: malformed parameter: $p\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		return ("xx", "int");
 | 
			
		||||
	}
 | 
			
		||||
	return ($1, $2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $package = "";
 | 
			
		||||
# GCCGO
 | 
			
		||||
my $textgccgo = "";
 | 
			
		||||
my $c_extern = "/*\n#include <stdint.h>\n";
 | 
			
		||||
# GC
 | 
			
		||||
my $textgc = "";
 | 
			
		||||
my $dynimports = "";
 | 
			
		||||
my $linknames = "";
 | 
			
		||||
my @vars = ();
 | 
			
		||||
# COMMUN
 | 
			
		||||
my $textcommon = "";
 | 
			
		||||
 | 
			
		||||
while(<>) {
 | 
			
		||||
	chomp;
 | 
			
		||||
	s/\s+/ /g;
 | 
			
		||||
	s/^\s+//;
 | 
			
		||||
	s/\s+$//;
 | 
			
		||||
	$package = $1 if !$package && /^package (\S+)$/;
 | 
			
		||||
	my $nonblock = /^\/\/sysnb /;
 | 
			
		||||
	next if !/^\/\/sys / && !$nonblock;
 | 
			
		||||
 | 
			
		||||
	# Line must be of the form
 | 
			
		||||
	# func Open(path string, mode int, perm int) (fd int, err error)
 | 
			
		||||
	# Split into name, in params, out params.
 | 
			
		||||
	if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
 | 
			
		||||
		print STDERR "$ARGV:$.: malformed //sys declaration\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		next;
 | 
			
		||||
	}
 | 
			
		||||
	my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
 | 
			
		||||
 | 
			
		||||
	# Split argument lists on comma.
 | 
			
		||||
	my @in = parseparamlist($in);
 | 
			
		||||
	my @out = parseparamlist($out);
 | 
			
		||||
 | 
			
		||||
	$in = join(', ', @in);
 | 
			
		||||
	$out = join(', ', @out);
 | 
			
		||||
 | 
			
		||||
	if($sysname eq "") {
 | 
			
		||||
		$sysname = "$func";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	my $onlyCommon = 0;
 | 
			
		||||
	if ($func eq "readlen" || $func eq "writelen" || $func eq "FcntlInt" || $func eq "FcntlFlock") {
 | 
			
		||||
		# This function call another syscall which is already implemented.
 | 
			
		||||
		# Therefore, the gc and gccgo part must not be generated.
 | 
			
		||||
		$onlyCommon = 1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Try in vain to keep people from editing this file.
 | 
			
		||||
	# The theory is that they jump into the middle of the file
 | 
			
		||||
	# without reading the header.
 | 
			
		||||
 | 
			
		||||
	$textcommon .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
 | 
			
		||||
	if (!$onlyCommon) {
 | 
			
		||||
		$textgccgo .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
 | 
			
		||||
		$textgc .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	# Check if value return, err return available
 | 
			
		||||
	my $errvar = "";
 | 
			
		||||
	my $retvar = "";
 | 
			
		||||
	my $rettype = "";
 | 
			
		||||
	foreach my $p (@out) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type eq "error") {
 | 
			
		||||
			$errvar = $name;
 | 
			
		||||
		} else {
 | 
			
		||||
			$retvar = $name;
 | 
			
		||||
			$rettype = $type;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	$sysname =~ s/([a-z])([A-Z])/${1}_$2/g;
 | 
			
		||||
	$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
 | 
			
		||||
 | 
			
		||||
	# GCCGO Prototype return type
 | 
			
		||||
	my $C_rettype = "";
 | 
			
		||||
	if($rettype eq "unsafe.Pointer") {
 | 
			
		||||
		$C_rettype = "uintptr_t";
 | 
			
		||||
	} elsif($rettype eq "uintptr") {
 | 
			
		||||
		$C_rettype = "uintptr_t";
 | 
			
		||||
	} elsif($rettype =~ /^_/) {
 | 
			
		||||
		$C_rettype = "uintptr_t";
 | 
			
		||||
	} elsif($rettype eq "int") {
 | 
			
		||||
		$C_rettype = "int";
 | 
			
		||||
	} elsif($rettype eq "int32") {
 | 
			
		||||
		$C_rettype = "int";
 | 
			
		||||
	} elsif($rettype eq "int64") {
 | 
			
		||||
		$C_rettype = "long long";
 | 
			
		||||
	} elsif($rettype eq "uint32") {
 | 
			
		||||
		$C_rettype = "unsigned int";
 | 
			
		||||
	} elsif($rettype eq "uint64") {
 | 
			
		||||
		$C_rettype = "unsigned long long";
 | 
			
		||||
	} else {
 | 
			
		||||
		$C_rettype = "int";
 | 
			
		||||
	}
 | 
			
		||||
	if($sysname eq "exit") {
 | 
			
		||||
		$C_rettype = "void";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# GCCGO Prototype arguments type
 | 
			
		||||
	my @c_in = ();
 | 
			
		||||
	foreach my $i (0 .. $#in) {
 | 
			
		||||
		my ($name, $type) = parseparam($in[$i]);
 | 
			
		||||
		if($type =~ /^\*/) {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
			} elsif($type eq "string") {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type =~ /^\[\](.*)/) {
 | 
			
		||||
			push @c_in, "uintptr_t", "size_t";
 | 
			
		||||
		} elsif($type eq "unsafe.Pointer") {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type eq "uintptr") {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type =~ /^_/) {
 | 
			
		||||
			push @c_in, "uintptr_t";
 | 
			
		||||
		} elsif($type eq "int") {
 | 
			
		||||
			if (($i == 0 || $i == 2) && $func eq "fcntl"){
 | 
			
		||||
				# These fcntl arguments needs to be uintptr to be able to call FcntlInt and FcntlFlock
 | 
			
		||||
				push @c_in, "uintptr_t";
 | 
			
		||||
			} else {
 | 
			
		||||
				push @c_in, "int";
 | 
			
		||||
			}
 | 
			
		||||
		} elsif($type eq "int32") {
 | 
			
		||||
			push @c_in, "int";
 | 
			
		||||
		} elsif($type eq "int64") {
 | 
			
		||||
			push @c_in, "long long";
 | 
			
		||||
		} elsif($type eq "uint32") {
 | 
			
		||||
			push @c_in, "unsigned int";
 | 
			
		||||
		} elsif($type eq "uint64") {
 | 
			
		||||
			push @c_in, "unsigned long long";
 | 
			
		||||
		} else {
 | 
			
		||||
			push @c_in, "int";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (!$onlyCommon){
 | 
			
		||||
		# GCCGO Prototype Generation
 | 
			
		||||
		# Imports of system calls from libc
 | 
			
		||||
		$c_extern .= "$C_rettype $sysname";
 | 
			
		||||
		my $c_in = join(', ', @c_in);
 | 
			
		||||
		$c_extern .= "($c_in);\n";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# GC Library name
 | 
			
		||||
	if($modname eq "") {
 | 
			
		||||
		$modname = "libc.a/shr_64.o";
 | 
			
		||||
	} else {
 | 
			
		||||
		print STDERR "$func: only syscall using libc are available\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		next;
 | 
			
		||||
	}
 | 
			
		||||
	my $sysvarname = "libc_${sysname}";
 | 
			
		||||
 | 
			
		||||
	if (!$onlyCommon){
 | 
			
		||||
		# GC Runtime import of function to allow cross-platform builds.
 | 
			
		||||
		$dynimports .= "//go:cgo_import_dynamic ${sysvarname} ${sysname} \"$modname\"\n";
 | 
			
		||||
		# GC Link symbol to proc address variable.
 | 
			
		||||
		$linknames .= "//go:linkname ${sysvarname} ${sysvarname}\n";
 | 
			
		||||
		# GC Library proc address variable.
 | 
			
		||||
		push @vars, $sysvarname;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	my $strconvfunc ="BytePtrFromString";
 | 
			
		||||
	my $strconvtype = "*byte";
 | 
			
		||||
 | 
			
		||||
	# Go function header.
 | 
			
		||||
	if($out ne "") {
 | 
			
		||||
		$out = " ($out)";
 | 
			
		||||
	}
 | 
			
		||||
	if($textcommon ne "") {
 | 
			
		||||
		$textcommon .= "\n"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$textcommon .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out ;
 | 
			
		||||
 | 
			
		||||
	# Prepare arguments to call.
 | 
			
		||||
	my @argscommun = (); # Arguments in the commun part
 | 
			
		||||
	my @argscall = ();   # Arguments for call prototype
 | 
			
		||||
	my @argsgc = ();     # Arguments for gc call (with syscall6)
 | 
			
		||||
	my @argsgccgo = ();  # Arguments for gccgo call (with C.name_of_syscall)
 | 
			
		||||
	my $n = 0;
 | 
			
		||||
	my $arg_n = 0;
 | 
			
		||||
	foreach my $p (@in) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type =~ /^\*/) {
 | 
			
		||||
			push @argscommun, "uintptr(unsafe.Pointer($name))";
 | 
			
		||||
			push @argscall, "$name uintptr";
 | 
			
		||||
			push @argsgc, "$name";
 | 
			
		||||
			push @argsgccgo, "C.uintptr_t($name)";
 | 
			
		||||
		} elsif($type eq "string" && $errvar ne "") {
 | 
			
		||||
			$textcommon .= "\tvar _p$n $strconvtype\n";
 | 
			
		||||
			$textcommon .= "\t_p$n, $errvar = $strconvfunc($name)\n";
 | 
			
		||||
			$textcommon .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
 | 
			
		||||
 | 
			
		||||
			push @argscommun, "uintptr(unsafe.Pointer(_p$n))";
 | 
			
		||||
			push @argscall, "_p$n uintptr ";
 | 
			
		||||
			push @argsgc, "_p$n";
 | 
			
		||||
			push @argsgccgo, "C.uintptr_t(_p$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "string") {
 | 
			
		||||
			print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
 | 
			
		||||
			$textcommon .= "\tvar _p$n $strconvtype\n";
 | 
			
		||||
			$textcommon .= "\t_p$n, $errvar = $strconvfunc($name)\n";
 | 
			
		||||
			$textcommon .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
 | 
			
		||||
 | 
			
		||||
			push @argscommun, "uintptr(unsafe.Pointer(_p$n))";
 | 
			
		||||
			push @argscall, "_p$n uintptr";
 | 
			
		||||
			push @argsgc, "_p$n";
 | 
			
		||||
			push @argsgccgo, "C.uintptr_t(_p$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type =~ /^\[\](.*)/) {
 | 
			
		||||
			# Convert slice into pointer, length.
 | 
			
		||||
			# Have to be careful not to take address of &a[0] if len == 0:
 | 
			
		||||
			# pass nil in that case.
 | 
			
		||||
			$textcommon .= "\tvar _p$n *$1\n";
 | 
			
		||||
			$textcommon .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
 | 
			
		||||
			push @argscommun, "uintptr(unsafe.Pointer(_p$n))", "len($name)";
 | 
			
		||||
			push @argscall, "_p$n uintptr", "_lenp$n int";
 | 
			
		||||
			push @argsgc, "_p$n", "uintptr(_lenp$n)";
 | 
			
		||||
			push @argsgccgo, "C.uintptr_t(_p$n)", "C.size_t(_lenp$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "int64" && $_32bit ne "") {
 | 
			
		||||
			print STDERR "$ARGV:$.: $func uses int64 with 32 bits mode. Case not yet implemented\n";
 | 
			
		||||
			# if($_32bit eq "big-endian") {
 | 
			
		||||
			# 	push @args, "uintptr($name >> 32)", "uintptr($name)";
 | 
			
		||||
			# } else {
 | 
			
		||||
			# 	push @args, "uintptr($name)", "uintptr($name >> 32)";
 | 
			
		||||
			# }
 | 
			
		||||
			# $n++;
 | 
			
		||||
		} elsif($type eq "bool") {
 | 
			
		||||
			print STDERR "$ARGV:$.: $func uses bool. Case not yet implemented\n";
 | 
			
		||||
			# $text .= "\tvar _p$n uint32\n";
 | 
			
		||||
			# $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
 | 
			
		||||
			# push @args, "_p$n";
 | 
			
		||||
			# $n++;
 | 
			
		||||
		} elsif($type =~ /^_/ ||$type eq "unsafe.Pointer") {
 | 
			
		||||
			push @argscommun, "uintptr($name)";
 | 
			
		||||
			push @argscall, "$name uintptr";
 | 
			
		||||
			push @argsgc, "$name";
 | 
			
		||||
			push @argsgccgo, "C.uintptr_t($name)";
 | 
			
		||||
		} elsif($type eq "int") {
 | 
			
		||||
			if (($arg_n == 0 || $arg_n == 2) && ($func eq "fcntl" || $func eq "FcntlInt" || $func eq "FcntlFlock")) {
 | 
			
		||||
				# These fcntl arguments need to be uintptr to be able to call FcntlInt and FcntlFlock
 | 
			
		||||
				push @argscommun, "uintptr($name)";
 | 
			
		||||
				push @argscall, "$name uintptr";
 | 
			
		||||
				push @argsgc, "$name";
 | 
			
		||||
				push @argsgccgo, "C.uintptr_t($name)";
 | 
			
		||||
			} else {
 | 
			
		||||
				push @argscommun, "$name";
 | 
			
		||||
				push @argscall, "$name int";
 | 
			
		||||
				push @argsgc, "uintptr($name)";
 | 
			
		||||
				push @argsgccgo, "C.int($name)";
 | 
			
		||||
			}
 | 
			
		||||
		} elsif($type eq "int32") {
 | 
			
		||||
			push @argscommun, "$name";
 | 
			
		||||
			push @argscall, "$name int32";
 | 
			
		||||
			push @argsgc, "uintptr($name)";
 | 
			
		||||
			push @argsgccgo, "C.int($name)";
 | 
			
		||||
		} elsif($type eq "int64") {
 | 
			
		||||
			push @argscommun, "$name";
 | 
			
		||||
			push @argscall, "$name int64";
 | 
			
		||||
			push @argsgc, "uintptr($name)";
 | 
			
		||||
			push @argsgccgo, "C.longlong($name)";
 | 
			
		||||
		} elsif($type eq "uint32") {
 | 
			
		||||
			push @argscommun, "$name";
 | 
			
		||||
			push @argscall, "$name uint32";
 | 
			
		||||
			push @argsgc, "uintptr($name)";
 | 
			
		||||
			push @argsgccgo, "C.uint($name)";
 | 
			
		||||
		} elsif($type eq "uint64") {
 | 
			
		||||
			push @argscommun, "$name";
 | 
			
		||||
			push @argscall, "$name uint64";
 | 
			
		||||
			push @argsgc, "uintptr($name)";
 | 
			
		||||
			push @argsgccgo, "C.ulonglong($name)";
 | 
			
		||||
		} elsif($type eq "uintptr") {
 | 
			
		||||
			push @argscommun, "$name";
 | 
			
		||||
			push @argscall, "$name uintptr";
 | 
			
		||||
			push @argsgc, "$name";
 | 
			
		||||
			push @argsgccgo, "C.uintptr_t($name)";
 | 
			
		||||
		} else {
 | 
			
		||||
			push @argscommun, "int($name)";
 | 
			
		||||
			push @argscall, "$name int";
 | 
			
		||||
			push @argsgc, "uintptr($name)";
 | 
			
		||||
			push @argsgccgo, "C.int($name)";
 | 
			
		||||
		}
 | 
			
		||||
		$arg_n++;
 | 
			
		||||
	}
 | 
			
		||||
	my $nargs = @argsgc;
 | 
			
		||||
 | 
			
		||||
	# COMMUN function generation
 | 
			
		||||
	my $argscommun = join(', ', @argscommun);
 | 
			
		||||
	my $callcommun = "call$sysname($argscommun)";
 | 
			
		||||
	my @ret = ("_", "_");
 | 
			
		||||
	my $body = "";
 | 
			
		||||
	my $do_errno = 0;
 | 
			
		||||
	for(my $i=0; $i<@out; $i++) {
 | 
			
		||||
		my $p = $out[$i];
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		my $reg = "";
 | 
			
		||||
		if($name eq "err") {
 | 
			
		||||
			$reg = "e1";
 | 
			
		||||
			$ret[1] = $reg;
 | 
			
		||||
			$do_errno = 1;
 | 
			
		||||
		} else {
 | 
			
		||||
			$reg = "r0";
 | 
			
		||||
			$ret[0] = $reg;
 | 
			
		||||
		}
 | 
			
		||||
		if($type eq "bool") {
 | 
			
		||||
			$reg = "$reg != 0";
 | 
			
		||||
		}
 | 
			
		||||
		if($reg ne "e1") {
 | 
			
		||||
			$body .= "\t$name = $type($reg)\n";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if ($ret[0] eq "_"  && $ret[1] eq "_") {
 | 
			
		||||
		$textcommon .= "\t$callcommun\n";
 | 
			
		||||
	} else {
 | 
			
		||||
		$textcommon .= "\t$ret[0], $ret[1] := $callcommun\n";
 | 
			
		||||
	}
 | 
			
		||||
	$textcommon .= $body;
 | 
			
		||||
 | 
			
		||||
	if ($do_errno) {
 | 
			
		||||
		$textcommon .= "\tif e1 != 0 {\n";
 | 
			
		||||
		$textcommon .= "\t\terr = errnoErr(e1)\n";
 | 
			
		||||
		$textcommon .= "\t}\n";
 | 
			
		||||
	}
 | 
			
		||||
	$textcommon .= "\treturn\n";
 | 
			
		||||
	$textcommon .= "}\n";
 | 
			
		||||
 | 
			
		||||
	if ($onlyCommon){
 | 
			
		||||
		next
 | 
			
		||||
	}
 | 
			
		||||
	# CALL Prototype
 | 
			
		||||
	my $callProto = sprintf "func call%s(%s) (r1 uintptr, e1 Errno) {\n", $sysname, join(', ', @argscall);
 | 
			
		||||
 | 
			
		||||
	# GC function generation
 | 
			
		||||
	my $asm = "syscall6";
 | 
			
		||||
	if ($nonblock) {
 | 
			
		||||
		$asm = "rawSyscall6";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(@argsgc <= 6) {
 | 
			
		||||
		while(@argsgc < 6) {
 | 
			
		||||
			push @argsgc, "0";
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		print STDERR "$ARGV:$.: too many arguments to system call\n";
 | 
			
		||||
	}
 | 
			
		||||
	my $argsgc = join(', ', @argsgc);
 | 
			
		||||
	my $callgc = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $argsgc)";
 | 
			
		||||
 | 
			
		||||
	$textgc .= $callProto;
 | 
			
		||||
	$textgc .= "\tr1, _, e1 = $callgc\n";
 | 
			
		||||
	$textgc .= "\treturn\n}\n";
 | 
			
		||||
 | 
			
		||||
	# GCCGO function generation
 | 
			
		||||
	my $argsgccgo = join(', ', @argsgccgo);
 | 
			
		||||
	my $callgccgo = "C.$sysname($argsgccgo)";
 | 
			
		||||
	$textgccgo .= $callProto;
 | 
			
		||||
	$textgccgo .= "\tr1 = uintptr($callgccgo)\n";
 | 
			
		||||
	$textgccgo .= "\te1 = syscall.GetErrno()\n";
 | 
			
		||||
	$textgccgo .= "\treturn\n}\n";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($errors) {
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Print zsyscall_aix_ppc64.go
 | 
			
		||||
open(my $fcommun, '>', 'zsyscall_aix_ppc64.go');
 | 
			
		||||
my $tofcommun = <<EOF;
 | 
			
		||||
// $cmdline
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $tags
 | 
			
		||||
 | 
			
		||||
package $package
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
$tofcommun .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
 | 
			
		||||
 | 
			
		||||
$tofcommun .=<<EOF;
 | 
			
		||||
 | 
			
		||||
$textcommon
 | 
			
		||||
EOF
 | 
			
		||||
print $fcommun $tofcommun;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Print zsyscall_aix_ppc64_gc.go
 | 
			
		||||
open(my $fgc, '>', 'zsyscall_aix_ppc64_gc.go');
 | 
			
		||||
my $tofgc = <<EOF;
 | 
			
		||||
// $cmdline
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $tags
 | 
			
		||||
// +build !gccgo
 | 
			
		||||
 | 
			
		||||
package $package
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
$tofgc .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
 | 
			
		||||
 | 
			
		||||
my $vardecls = "\t" . join(",\n\t", @vars);
 | 
			
		||||
$vardecls .= " syscallFunc";
 | 
			
		||||
 | 
			
		||||
$tofgc .=<<EOF;
 | 
			
		||||
$dynimports
 | 
			
		||||
$linknames
 | 
			
		||||
type syscallFunc uintptr
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
$vardecls
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Implemented in runtime/syscall_aix.go.
 | 
			
		||||
func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
 | 
			
		||||
$textgc
 | 
			
		||||
EOF
 | 
			
		||||
print $fgc $tofgc;
 | 
			
		||||
 | 
			
		||||
# Print zsyscall_aix_ppc64_gc.go
 | 
			
		||||
open(my $fgccgo, '>', 'zsyscall_aix_ppc64_gccgo.go');
 | 
			
		||||
my $tofgccgo = <<EOF;
 | 
			
		||||
// $cmdline
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $tags
 | 
			
		||||
// +build gccgo
 | 
			
		||||
 | 
			
		||||
package $package
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
$c_extern
 | 
			
		||||
*/
 | 
			
		||||
import "C"
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
$tofgccgo .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
 | 
			
		||||
 | 
			
		||||
$tofgccgo .=<<EOF;
 | 
			
		||||
 | 
			
		||||
$textgccgo
 | 
			
		||||
EOF
 | 
			
		||||
print $fgccgo $tofgccgo;
 | 
			
		||||
exit 0;
 | 
			
		||||
							
								
								
									
										294
									
								
								vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										294
									
								
								vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,294 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2009 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.
 | 
			
		||||
 | 
			
		||||
# This program reads a file containing function prototypes
 | 
			
		||||
# (like syscall_solaris.go) and generates system call bodies.
 | 
			
		||||
# The prototypes are marked by lines beginning with "//sys"
 | 
			
		||||
# and read like func declarations if //sys is replaced by func, but:
 | 
			
		||||
#	* The parameter lists must give a name for each argument.
 | 
			
		||||
#	  This includes return parameters.
 | 
			
		||||
#	* The parameter lists must give a type for each argument:
 | 
			
		||||
#	  the (x, y, z int) shorthand is not allowed.
 | 
			
		||||
#	* If the return parameter is an error number, it must be named err.
 | 
			
		||||
#	* If go func name needs to be different than its libc name,
 | 
			
		||||
#	* or the function is not in libc, name could be specified
 | 
			
		||||
#	* at the end, after "=" sign, like
 | 
			
		||||
#	  //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
 | 
			
		||||
my $errors = 0;
 | 
			
		||||
my $_32bit = "";
 | 
			
		||||
my $tags = "";  # build tags
 | 
			
		||||
 | 
			
		||||
binmode STDOUT;
 | 
			
		||||
 | 
			
		||||
if($ARGV[0] eq "-b32") {
 | 
			
		||||
	$_32bit = "big-endian";
 | 
			
		||||
	shift;
 | 
			
		||||
} elsif($ARGV[0] eq "-l32") {
 | 
			
		||||
	$_32bit = "little-endian";
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
if($ARGV[0] eq "-tags") {
 | 
			
		||||
	shift;
 | 
			
		||||
	$tags = $ARGV[0];
 | 
			
		||||
	shift;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($ARGV[0] =~ /^-/) {
 | 
			
		||||
	print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parseparamlist($) {
 | 
			
		||||
	my ($list) = @_;
 | 
			
		||||
	$list =~ s/^\s*//;
 | 
			
		||||
	$list =~ s/\s*$//;
 | 
			
		||||
	if($list eq "") {
 | 
			
		||||
		return ();
 | 
			
		||||
	}
 | 
			
		||||
	return split(/\s*,\s*/, $list);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parseparam($) {
 | 
			
		||||
	my ($p) = @_;
 | 
			
		||||
	if($p !~ /^(\S*) (\S*)$/) {
 | 
			
		||||
		print STDERR "$ARGV:$.: malformed parameter: $p\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		return ("xx", "int");
 | 
			
		||||
	}
 | 
			
		||||
	return ($1, $2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $package = "";
 | 
			
		||||
my $text = "";
 | 
			
		||||
my $dynimports = "";
 | 
			
		||||
my $linknames = "";
 | 
			
		||||
my @vars = ();
 | 
			
		||||
while(<>) {
 | 
			
		||||
	chomp;
 | 
			
		||||
	s/\s+/ /g;
 | 
			
		||||
	s/^\s+//;
 | 
			
		||||
	s/\s+$//;
 | 
			
		||||
	$package = $1 if !$package && /^package (\S+)$/;
 | 
			
		||||
	my $nonblock = /^\/\/sysnb /;
 | 
			
		||||
	next if !/^\/\/sys / && !$nonblock;
 | 
			
		||||
 | 
			
		||||
	# Line must be of the form
 | 
			
		||||
	#	func Open(path string, mode int, perm int) (fd int, err error)
 | 
			
		||||
	# Split into name, in params, out params.
 | 
			
		||||
	if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
 | 
			
		||||
		print STDERR "$ARGV:$.: malformed //sys declaration\n";
 | 
			
		||||
		$errors = 1;
 | 
			
		||||
		next;
 | 
			
		||||
	}
 | 
			
		||||
	my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
 | 
			
		||||
 | 
			
		||||
	# Split argument lists on comma.
 | 
			
		||||
	my @in = parseparamlist($in);
 | 
			
		||||
	my @out = parseparamlist($out);
 | 
			
		||||
 | 
			
		||||
	# Try in vain to keep people from editing this file.
 | 
			
		||||
	# The theory is that they jump into the middle of the file
 | 
			
		||||
	# without reading the header.
 | 
			
		||||
	$text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
 | 
			
		||||
 | 
			
		||||
	# So file name.
 | 
			
		||||
	if($modname eq "") {
 | 
			
		||||
		$modname = "libc";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# System call name.
 | 
			
		||||
	if($sysname eq "") {
 | 
			
		||||
		$sysname = "$func";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# System call pointer variable name.
 | 
			
		||||
	my $sysvarname = "proc$sysname";
 | 
			
		||||
 | 
			
		||||
	my $strconvfunc = "BytePtrFromString";
 | 
			
		||||
	my $strconvtype = "*byte";
 | 
			
		||||
 | 
			
		||||
	$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
 | 
			
		||||
 | 
			
		||||
	# Runtime import of function to allow cross-platform builds.
 | 
			
		||||
	$dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
 | 
			
		||||
	# Link symbol to proc address variable.
 | 
			
		||||
	$linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
 | 
			
		||||
	# Library proc address variable.
 | 
			
		||||
	push @vars, $sysvarname;
 | 
			
		||||
 | 
			
		||||
	# Go function header.
 | 
			
		||||
	$out = join(', ', @out);
 | 
			
		||||
	if($out ne "") {
 | 
			
		||||
		$out = " ($out)";
 | 
			
		||||
	}
 | 
			
		||||
	if($text ne "") {
 | 
			
		||||
		$text .= "\n"
 | 
			
		||||
	}
 | 
			
		||||
	$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
 | 
			
		||||
 | 
			
		||||
	# Check if err return available
 | 
			
		||||
	my $errvar = "";
 | 
			
		||||
	foreach my $p (@out) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type eq "error") {
 | 
			
		||||
			$errvar = $name;
 | 
			
		||||
			last;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Prepare arguments to Syscall.
 | 
			
		||||
	my @args = ();
 | 
			
		||||
	my $n = 0;
 | 
			
		||||
	foreach my $p (@in) {
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		if($type =~ /^\*/) {
 | 
			
		||||
			push @args, "uintptr(unsafe.Pointer($name))";
 | 
			
		||||
		} elsif($type eq "string" && $errvar ne "") {
 | 
			
		||||
			$text .= "\tvar _p$n $strconvtype\n";
 | 
			
		||||
			$text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
 | 
			
		||||
			$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
 | 
			
		||||
			push @args, "uintptr(unsafe.Pointer(_p$n))";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "string") {
 | 
			
		||||
			print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
 | 
			
		||||
			$text .= "\tvar _p$n $strconvtype\n";
 | 
			
		||||
			$text .= "\t_p$n, _ = $strconvfunc($name)\n";
 | 
			
		||||
			push @args, "uintptr(unsafe.Pointer(_p$n))";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type =~ /^\[\](.*)/) {
 | 
			
		||||
			# Convert slice into pointer, length.
 | 
			
		||||
			# Have to be careful not to take address of &a[0] if len == 0:
 | 
			
		||||
			# pass nil in that case.
 | 
			
		||||
			$text .= "\tvar _p$n *$1\n";
 | 
			
		||||
			$text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
 | 
			
		||||
			push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} elsif($type eq "int64" && $_32bit ne "") {
 | 
			
		||||
			if($_32bit eq "big-endian") {
 | 
			
		||||
				push @args, "uintptr($name >> 32)", "uintptr($name)";
 | 
			
		||||
			} else {
 | 
			
		||||
				push @args, "uintptr($name)", "uintptr($name >> 32)";
 | 
			
		||||
			}
 | 
			
		||||
		} elsif($type eq "bool") {
 | 
			
		||||
 			$text .= "\tvar _p$n uint32\n";
 | 
			
		||||
			$text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
 | 
			
		||||
			push @args, "uintptr(_p$n)";
 | 
			
		||||
			$n++;
 | 
			
		||||
		} else {
 | 
			
		||||
			push @args, "uintptr($name)";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	my $nargs = @args;
 | 
			
		||||
 | 
			
		||||
	# Determine which form to use; pad args with zeros.
 | 
			
		||||
	my $asm = "sysvicall6";
 | 
			
		||||
	if ($nonblock) {
 | 
			
		||||
		$asm = "rawSysvicall6";
 | 
			
		||||
	}
 | 
			
		||||
	if(@args <= 6) {
 | 
			
		||||
		while(@args < 6) {
 | 
			
		||||
			push @args, "0";
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		print STDERR "$ARGV:$.: too many arguments to system call\n";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Actual call.
 | 
			
		||||
	my $args = join(', ', @args);
 | 
			
		||||
	my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
 | 
			
		||||
 | 
			
		||||
	# Assign return values.
 | 
			
		||||
	my $body = "";
 | 
			
		||||
	my $failexpr = "";
 | 
			
		||||
	my @ret = ("_", "_", "_");
 | 
			
		||||
	my @pout= ();
 | 
			
		||||
	my $do_errno = 0;
 | 
			
		||||
	for(my $i=0; $i<@out; $i++) {
 | 
			
		||||
		my $p = $out[$i];
 | 
			
		||||
		my ($name, $type) = parseparam($p);
 | 
			
		||||
		my $reg = "";
 | 
			
		||||
		if($name eq "err") {
 | 
			
		||||
			$reg = "e1";
 | 
			
		||||
			$ret[2] = $reg;
 | 
			
		||||
			$do_errno = 1;
 | 
			
		||||
		} else {
 | 
			
		||||
			$reg = sprintf("r%d", $i);
 | 
			
		||||
			$ret[$i] = $reg;
 | 
			
		||||
		}
 | 
			
		||||
		if($type eq "bool") {
 | 
			
		||||
			$reg = "$reg != 0";
 | 
			
		||||
		}
 | 
			
		||||
		if($type eq "int64" && $_32bit ne "") {
 | 
			
		||||
			# 64-bit number in r1:r0 or r0:r1.
 | 
			
		||||
			if($i+2 > @out) {
 | 
			
		||||
				print STDERR "$ARGV:$.: not enough registers for int64 return\n";
 | 
			
		||||
			}
 | 
			
		||||
			if($_32bit eq "big-endian") {
 | 
			
		||||
				$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
 | 
			
		||||
			} else {
 | 
			
		||||
				$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
 | 
			
		||||
			}
 | 
			
		||||
			$ret[$i] = sprintf("r%d", $i);
 | 
			
		||||
			$ret[$i+1] = sprintf("r%d", $i+1);
 | 
			
		||||
		}
 | 
			
		||||
		if($reg ne "e1") {
 | 
			
		||||
			$body .= "\t$name = $type($reg)\n";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
 | 
			
		||||
		$text .= "\t$call\n";
 | 
			
		||||
	} else {
 | 
			
		||||
		$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
 | 
			
		||||
	}
 | 
			
		||||
	$text .= $body;
 | 
			
		||||
 | 
			
		||||
	if ($do_errno) {
 | 
			
		||||
		$text .= "\tif e1 != 0 {\n";
 | 
			
		||||
		$text .= "\t\terr = e1\n";
 | 
			
		||||
		$text .= "\t}\n";
 | 
			
		||||
	}
 | 
			
		||||
	$text .= "\treturn\n";
 | 
			
		||||
	$text .= "}\n";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($errors) {
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $cmdline
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $tags
 | 
			
		||||
 | 
			
		||||
package $package
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
 | 
			
		||||
 | 
			
		||||
my $vardecls = "\t" . join(",\n\t", @vars);
 | 
			
		||||
$vardecls .= " syscallFunc";
 | 
			
		||||
 | 
			
		||||
chomp($_=<<EOF);
 | 
			
		||||
 | 
			
		||||
$dynimports
 | 
			
		||||
$linknames
 | 
			
		||||
var (
 | 
			
		||||
$vardecls
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
$text
 | 
			
		||||
EOF
 | 
			
		||||
print $_;
 | 
			
		||||
exit 0;
 | 
			
		||||
							
								
								
									
										265
									
								
								vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										265
									
								
								vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,265 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
 | 
			
		||||
# Copyright 2011 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.
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Parse the header files for OpenBSD and generate a Go usable sysctl MIB.
 | 
			
		||||
#
 | 
			
		||||
# Build a MIB with each entry being an array containing the level, type and
 | 
			
		||||
# a hash that will contain additional entries if the current entry is a node.
 | 
			
		||||
# We then walk this MIB and create a flattened sysctl name to OID hash.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
 | 
			
		||||
	print STDERR "GOARCH or GOOS not defined in environment\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $debug = 0;
 | 
			
		||||
my %ctls = ();
 | 
			
		||||
 | 
			
		||||
my @headers = qw (
 | 
			
		||||
	sys/sysctl.h
 | 
			
		||||
	sys/socket.h
 | 
			
		||||
	sys/tty.h
 | 
			
		||||
	sys/malloc.h
 | 
			
		||||
	sys/mount.h
 | 
			
		||||
	sys/namei.h
 | 
			
		||||
	sys/sem.h
 | 
			
		||||
	sys/shm.h
 | 
			
		||||
	sys/vmmeter.h
 | 
			
		||||
	uvm/uvmexp.h
 | 
			
		||||
	uvm/uvm_param.h
 | 
			
		||||
	uvm/uvm_swap_encrypt.h
 | 
			
		||||
	ddb/db_var.h
 | 
			
		||||
	net/if.h
 | 
			
		||||
	net/if_pfsync.h
 | 
			
		||||
	net/pipex.h
 | 
			
		||||
	netinet/in.h
 | 
			
		||||
	netinet/icmp_var.h
 | 
			
		||||
	netinet/igmp_var.h
 | 
			
		||||
	netinet/ip_ah.h
 | 
			
		||||
	netinet/ip_carp.h
 | 
			
		||||
	netinet/ip_divert.h
 | 
			
		||||
	netinet/ip_esp.h
 | 
			
		||||
	netinet/ip_ether.h
 | 
			
		||||
	netinet/ip_gre.h
 | 
			
		||||
	netinet/ip_ipcomp.h
 | 
			
		||||
	netinet/ip_ipip.h
 | 
			
		||||
	netinet/pim_var.h
 | 
			
		||||
	netinet/tcp_var.h
 | 
			
		||||
	netinet/udp_var.h
 | 
			
		||||
	netinet6/in6.h
 | 
			
		||||
	netinet6/ip6_divert.h
 | 
			
		||||
	netinet6/pim6_var.h
 | 
			
		||||
	netinet/icmp6.h
 | 
			
		||||
	netmpls/mpls.h
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
my @ctls = qw (
 | 
			
		||||
	kern
 | 
			
		||||
	vm
 | 
			
		||||
	fs
 | 
			
		||||
	net
 | 
			
		||||
	#debug				# Special handling required
 | 
			
		||||
	hw
 | 
			
		||||
	#machdep			# Arch specific
 | 
			
		||||
	user
 | 
			
		||||
	ddb
 | 
			
		||||
	#vfs				# Special handling required
 | 
			
		||||
	fs.posix
 | 
			
		||||
	kern.forkstat
 | 
			
		||||
	kern.intrcnt
 | 
			
		||||
	kern.malloc
 | 
			
		||||
	kern.nchstats
 | 
			
		||||
	kern.seminfo
 | 
			
		||||
	kern.shminfo
 | 
			
		||||
	kern.timecounter
 | 
			
		||||
	kern.tty
 | 
			
		||||
	kern.watchdog
 | 
			
		||||
	net.bpf
 | 
			
		||||
	net.ifq
 | 
			
		||||
	net.inet
 | 
			
		||||
	net.inet.ah
 | 
			
		||||
	net.inet.carp
 | 
			
		||||
	net.inet.divert
 | 
			
		||||
	net.inet.esp
 | 
			
		||||
	net.inet.etherip
 | 
			
		||||
	net.inet.gre
 | 
			
		||||
	net.inet.icmp
 | 
			
		||||
	net.inet.igmp
 | 
			
		||||
	net.inet.ip
 | 
			
		||||
	net.inet.ip.ifq
 | 
			
		||||
	net.inet.ipcomp
 | 
			
		||||
	net.inet.ipip
 | 
			
		||||
	net.inet.mobileip
 | 
			
		||||
	net.inet.pfsync
 | 
			
		||||
	net.inet.pim
 | 
			
		||||
	net.inet.tcp
 | 
			
		||||
	net.inet.udp
 | 
			
		||||
	net.inet6
 | 
			
		||||
	net.inet6.divert
 | 
			
		||||
	net.inet6.ip6
 | 
			
		||||
	net.inet6.icmp6
 | 
			
		||||
	net.inet6.pim6
 | 
			
		||||
	net.inet6.tcp6
 | 
			
		||||
	net.inet6.udp6
 | 
			
		||||
	net.mpls
 | 
			
		||||
	net.mpls.ifq
 | 
			
		||||
	net.key
 | 
			
		||||
	net.pflow
 | 
			
		||||
	net.pfsync
 | 
			
		||||
	net.pipex
 | 
			
		||||
	net.rt
 | 
			
		||||
	vm.swapencrypt
 | 
			
		||||
	#vfsgenctl			# Special handling required
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
# Node name "fixups"
 | 
			
		||||
my %ctl_map = (
 | 
			
		||||
	"ipproto" => "net.inet",
 | 
			
		||||
	"net.inet.ipproto" => "net.inet",
 | 
			
		||||
	"net.inet6.ipv6proto" => "net.inet6",
 | 
			
		||||
	"net.inet6.ipv6" => "net.inet6.ip6",
 | 
			
		||||
	"net.inet.icmpv6" => "net.inet6.icmp6",
 | 
			
		||||
	"net.inet6.divert6" => "net.inet6.divert",
 | 
			
		||||
	"net.inet6.tcp6" => "net.inet.tcp",
 | 
			
		||||
	"net.inet6.udp6" => "net.inet.udp",
 | 
			
		||||
	"mpls" => "net.mpls",
 | 
			
		||||
	"swpenc" => "vm.swapencrypt"
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
# Node mappings
 | 
			
		||||
my %node_map = (
 | 
			
		||||
	"net.inet.ip.ifq" => "net.ifq",
 | 
			
		||||
	"net.inet.pfsync" => "net.pfsync",
 | 
			
		||||
	"net.mpls.ifq" => "net.ifq"
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
my $ctlname;
 | 
			
		||||
my %mib = ();
 | 
			
		||||
my %sysctl = ();
 | 
			
		||||
my $node;
 | 
			
		||||
 | 
			
		||||
sub debug() {
 | 
			
		||||
	print STDERR "$_[0]\n" if $debug;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Walk the MIB and build a sysctl name to OID mapping.
 | 
			
		||||
sub build_sysctl() {
 | 
			
		||||
	my ($node, $name, $oid) = @_;
 | 
			
		||||
	my %node = %{$node};
 | 
			
		||||
	my @oid = @{$oid};
 | 
			
		||||
 | 
			
		||||
	foreach my $key (sort keys %node) {
 | 
			
		||||
		my @node = @{$node{$key}};
 | 
			
		||||
		my $nodename = $name.($name ne '' ? '.' : '').$key;
 | 
			
		||||
		my @nodeoid = (@oid, $node[0]);
 | 
			
		||||
		if ($node[1] eq 'CTLTYPE_NODE') {
 | 
			
		||||
			if (exists $node_map{$nodename}) {
 | 
			
		||||
				$node = \%mib;
 | 
			
		||||
				$ctlname = $node_map{$nodename};
 | 
			
		||||
				foreach my $part (split /\./, $ctlname) {
 | 
			
		||||
					$node = \%{@{$$node{$part}}[2]};
 | 
			
		||||
				}
 | 
			
		||||
			} else {
 | 
			
		||||
				$node = $node[2];
 | 
			
		||||
			}
 | 
			
		||||
			&build_sysctl($node, $nodename, \@nodeoid);
 | 
			
		||||
		} elsif ($node[1] ne '') {
 | 
			
		||||
			$sysctl{$nodename} = \@nodeoid;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
foreach my $ctl (@ctls) {
 | 
			
		||||
	$ctls{$ctl} = $ctl;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Build MIB
 | 
			
		||||
foreach my $header (@headers) {
 | 
			
		||||
	&debug("Processing $header...");
 | 
			
		||||
	open HEADER, "/usr/include/$header" ||
 | 
			
		||||
	    print STDERR "Failed to open $header\n";
 | 
			
		||||
	while (<HEADER>) {
 | 
			
		||||
		if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
 | 
			
		||||
		    $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
 | 
			
		||||
		    $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
 | 
			
		||||
			if ($1 eq 'CTL_NAMES') {
 | 
			
		||||
				# Top level.
 | 
			
		||||
				$node = \%mib;
 | 
			
		||||
			} else {
 | 
			
		||||
				# Node.
 | 
			
		||||
				my $nodename = lc($2);
 | 
			
		||||
				if ($header =~ /^netinet\//) {
 | 
			
		||||
					$ctlname = "net.inet.$nodename";
 | 
			
		||||
				} elsif ($header =~ /^netinet6\//) {
 | 
			
		||||
					$ctlname = "net.inet6.$nodename";
 | 
			
		||||
				} elsif ($header =~ /^net\//) {
 | 
			
		||||
					$ctlname = "net.$nodename";
 | 
			
		||||
				} else {
 | 
			
		||||
					$ctlname = "$nodename";
 | 
			
		||||
					$ctlname =~ s/^(fs|net|kern)_/$1\./;
 | 
			
		||||
				}
 | 
			
		||||
				if (exists $ctl_map{$ctlname}) {
 | 
			
		||||
					$ctlname = $ctl_map{$ctlname};
 | 
			
		||||
				}
 | 
			
		||||
				if (not exists $ctls{$ctlname}) {
 | 
			
		||||
					&debug("Ignoring $ctlname...");
 | 
			
		||||
					next;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				# Walk down from the top of the MIB.
 | 
			
		||||
				$node = \%mib;
 | 
			
		||||
				foreach my $part (split /\./, $ctlname) {
 | 
			
		||||
					if (not exists $$node{$part}) {
 | 
			
		||||
						&debug("Missing node $part");
 | 
			
		||||
						$$node{$part} = [ 0, '', {} ];
 | 
			
		||||
					}
 | 
			
		||||
					$node = \%{@{$$node{$part}}[2]};
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			# Populate current node with entries.
 | 
			
		||||
			my $i = -1;
 | 
			
		||||
			while (defined($_) && $_ !~ /^}/) {
 | 
			
		||||
				$_ = <HEADER>;
 | 
			
		||||
				$i++ if $_ =~ /{.*}/;
 | 
			
		||||
				next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
 | 
			
		||||
				$$node{$1} = [ $i, $2, {} ];
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	close HEADER;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
&build_sysctl(\%mib, "", []);
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// mksysctl_openbsd.pl
 | 
			
		||||
// Code generated by the command above; DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
 | 
			
		||||
 | 
			
		||||
package unix;
 | 
			
		||||
 | 
			
		||||
type mibentry struct {
 | 
			
		||||
	ctlname string
 | 
			
		||||
	ctloid []_C_int
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var sysctlMib = []mibentry {
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
foreach my $name (sort keys %sysctl) {
 | 
			
		||||
	my @oid = @{$sysctl{$name}};
 | 
			
		||||
	print "\t{ \"$name\", []_C_int{ ", join(', ', @oid), " } }, \n";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
}
 | 
			
		||||
EOF
 | 
			
		||||
							
								
								
									
										39
									
								
								vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,39 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2009 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.
 | 
			
		||||
#
 | 
			
		||||
# Generate system call table for Darwin from sys/syscall.h
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
 | 
			
		||||
	print STDERR "GOARCH or GOOS not defined in environment\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $command
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
while(<>){
 | 
			
		||||
	if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
 | 
			
		||||
		my $name = $1;
 | 
			
		||||
		my $num = $2;
 | 
			
		||||
		$name =~ y/a-z/A-Z/;
 | 
			
		||||
		print "	SYS_$name = $num;"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
)
 | 
			
		||||
EOF
 | 
			
		||||
							
								
								
									
										50
									
								
								vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,50 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2009 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.
 | 
			
		||||
#
 | 
			
		||||
# Generate system call table for DragonFly from master list
 | 
			
		||||
# (for example, /usr/src/sys/kern/syscalls.master).
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
 | 
			
		||||
	print STDERR "GOARCH or GOOS not defined in environment\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $command
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
while(<>){
 | 
			
		||||
	if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
 | 
			
		||||
		my $num = $1;
 | 
			
		||||
		my $proto = $2;
 | 
			
		||||
		my $name = "SYS_$3";
 | 
			
		||||
		$name =~ y/a-z/A-Z/;
 | 
			
		||||
 | 
			
		||||
		# There are multiple entries for enosys and nosys, so comment them out.
 | 
			
		||||
		if($name =~ /^SYS_E?NOSYS$/){
 | 
			
		||||
			$name = "// $name";
 | 
			
		||||
		}
 | 
			
		||||
		if($name eq 'SYS_SYS_EXIT'){
 | 
			
		||||
			$name = 'SYS_EXIT';
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		print "	$name = $num;  // $proto\n";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
)
 | 
			
		||||
EOF
 | 
			
		||||
							
								
								
									
										50
									
								
								vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,50 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2009 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.
 | 
			
		||||
#
 | 
			
		||||
# Generate system call table for FreeBSD from master list
 | 
			
		||||
# (for example, /usr/src/sys/kern/syscalls.master).
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
 | 
			
		||||
	print STDERR "GOARCH or GOOS not defined in environment\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $command
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
while(<>){
 | 
			
		||||
	if(/^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$/){
 | 
			
		||||
		my $num = $1;
 | 
			
		||||
		my $proto = $2;
 | 
			
		||||
		my $name = "SYS_$3";
 | 
			
		||||
		$name =~ y/a-z/A-Z/;
 | 
			
		||||
 | 
			
		||||
		# There are multiple entries for enosys and nosys, so comment them out.
 | 
			
		||||
		if($name =~ /^SYS_E?NOSYS$/){
 | 
			
		||||
			$name = "// $name";
 | 
			
		||||
		}
 | 
			
		||||
		if($name eq 'SYS_SYS_EXIT'){
 | 
			
		||||
			$name = 'SYS_EXIT';
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		print "	$name = $num;  // $proto\n";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
)
 | 
			
		||||
EOF
 | 
			
		||||
							
								
								
									
										58
									
								
								vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										58
									
								
								vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,58 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2009 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.
 | 
			
		||||
#
 | 
			
		||||
# Generate system call table for OpenBSD from master list
 | 
			
		||||
# (for example, /usr/src/sys/kern/syscalls.master).
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
 | 
			
		||||
	print STDERR "GOARCH or GOOS not defined in environment\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $command
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
my $line = '';
 | 
			
		||||
while(<>){
 | 
			
		||||
	if($line =~ /^(.*)\\$/) {
 | 
			
		||||
		# Handle continuation
 | 
			
		||||
		$line = $1;
 | 
			
		||||
		$_ =~ s/^\s+//;
 | 
			
		||||
		$line .= $_;
 | 
			
		||||
	} else {
 | 
			
		||||
		# New line
 | 
			
		||||
		$line = $_;
 | 
			
		||||
	}
 | 
			
		||||
	next if $line =~ /\\$/;
 | 
			
		||||
	if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
 | 
			
		||||
		my $num = $1;
 | 
			
		||||
		my $proto = $6;
 | 
			
		||||
		my $compat = $8;
 | 
			
		||||
		my $name = "$7_$9";
 | 
			
		||||
 | 
			
		||||
		$name = "$7_$11" if $11 ne '';
 | 
			
		||||
		$name =~ y/a-z/A-Z/;
 | 
			
		||||
 | 
			
		||||
		if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
 | 
			
		||||
			print "	$name = $num;  // $proto\n";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
)
 | 
			
		||||
EOF
 | 
			
		||||
							
								
								
									
										50
									
								
								vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,50 +0,0 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# Copyright 2009 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.
 | 
			
		||||
#
 | 
			
		||||
# Generate system call table for OpenBSD from master list
 | 
			
		||||
# (for example, /usr/src/sys/kern/syscalls.master).
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
 | 
			
		||||
	print STDERR "GOARCH or GOOS not defined in environment\n";
 | 
			
		||||
	exit 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
my $command = "mksysnum_openbsd.pl " . join(' ', @ARGV);
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
// $command
 | 
			
		||||
// Code generated by the command above; see README.md. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
while(<>){
 | 
			
		||||
	if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
 | 
			
		||||
		my $num = $1;
 | 
			
		||||
		my $proto = $3;
 | 
			
		||||
		my $name = $4;
 | 
			
		||||
		$name =~ y/a-z/A-Z/;
 | 
			
		||||
 | 
			
		||||
		# There are multiple entries for enosys and nosys, so comment them out.
 | 
			
		||||
		if($name =~ /^SYS_E?NOSYS$/){
 | 
			
		||||
			$name = "// $name";
 | 
			
		||||
		}
 | 
			
		||||
		if($name eq 'SYS_SYS_EXIT'){
 | 
			
		||||
			$name = 'SYS_EXIT';
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		print "	$name = $num;  // $proto\n";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print <<EOF;
 | 
			
		||||
)
 | 
			
		||||
EOF
 | 
			
		||||
@@ -2,9 +2,6 @@
 | 
			
		||||
// Use of this source code is governed by a BSD-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
 | 
			
		||||
// +build openbsd
 | 
			
		||||
// +build 386 amd64 arm
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
							
								
								
									
										12
									
								
								vendor/golang.org/x/sys/unix/readdirent_getdents.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								vendor/golang.org/x/sys/unix/readdirent_getdents.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build aix dragonfly freebsd linux netbsd openbsd
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
// ReadDirent reads directory entries from fd and writes them into buf.
 | 
			
		||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
	return Getdents(fd, buf)
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										19
									
								
								vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
// ReadDirent reads directory entries from fd and writes them into buf.
 | 
			
		||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
	// Final argument is (basep *uintptr) and the syscall doesn't take nil.
 | 
			
		||||
	// 64 bits should be enough. (32 bits isn't even on 386). Since the
 | 
			
		||||
	// actual system call is getdirentries64, 64 is a good guess.
 | 
			
		||||
	// TODO(rsc): Can we use a single global basep for all calls?
 | 
			
		||||
	var base = (*uintptr)(unsafe.Pointer(new(uint64)))
 | 
			
		||||
	return Getdirentries(fd, buf, base)
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										28
									
								
								vendor/golang.org/x/sys/unix/sockcmsg_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/golang.org/x/sys/unix/sockcmsg_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,17 +8,33 @@
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "unsafe"
 | 
			
		||||
import (
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Round the length of a raw sockaddr up to align it properly.
 | 
			
		||||
func cmsgAlignOf(salen int) int {
 | 
			
		||||
	salign := SizeofPtr
 | 
			
		||||
	// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
 | 
			
		||||
	// Solaris kernels still require 32-bit aligned access to
 | 
			
		||||
	// network subsystem.
 | 
			
		||||
	if darwin64Bit || dragonfly64Bit || solaris64Bit {
 | 
			
		||||
		salign = 4
 | 
			
		||||
 | 
			
		||||
	switch runtime.GOOS {
 | 
			
		||||
	case "aix":
 | 
			
		||||
		// There is no alignment on AIX.
 | 
			
		||||
		salign = 1
 | 
			
		||||
	case "darwin", "dragonfly", "solaris", "illumos":
 | 
			
		||||
		// NOTE: It seems like 64-bit Darwin, DragonFly BSD,
 | 
			
		||||
		// illumos, and Solaris kernels still require 32-bit
 | 
			
		||||
		// aligned access to network subsystem.
 | 
			
		||||
		if SizeofPtr == 8 {
 | 
			
		||||
			salign = 4
 | 
			
		||||
		}
 | 
			
		||||
	case "netbsd", "openbsd":
 | 
			
		||||
		// NetBSD and OpenBSD armv7 require 64-bit alignment.
 | 
			
		||||
		if runtime.GOARCH == "arm" {
 | 
			
		||||
			salign = 8
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return (salen + salign - 1) & ^(salign - 1)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								vendor/golang.org/x/sys/unix/syscall.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/golang.org/x/sys/unix/syscall.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -50,5 +50,4 @@ func BytePtrFromString(s string) (*byte, error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Single-word zero for use when we need a valid pointer to 0 bytes.
 | 
			
		||||
// See mkunix.pl.
 | 
			
		||||
var _zero uintptr
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										105
									
								
								vendor/golang.org/x/sys/unix/syscall_aix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										105
									
								
								vendor/golang.org/x/sys/unix/syscall_aix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -13,10 +13,7 @@
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Wrapped
 | 
			
		||||
@@ -230,7 +227,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 | 
			
		||||
 | 
			
		||||
		// Some versions of AIX have a bug in getsockname (see IV78655).
 | 
			
		||||
		// We can't rely on sa.Len being set correctly.
 | 
			
		||||
		n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
 | 
			
		||||
		n := SizeofSockaddrUnix - 3 // subtract leading Family, Len, terminating NUL.
 | 
			
		||||
		for i := 0; i < n; i++ {
 | 
			
		||||
			if pp.Path[i] == 0 {
 | 
			
		||||
				n = i
 | 
			
		||||
@@ -271,13 +268,36 @@ func Gettimeofday(tv *Timeval) (err error) {
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TODO
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	return -1, ENOSYS
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	reclen, ok := direntReclen(buf)
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return 0, false
 | 
			
		||||
	}
 | 
			
		||||
	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	getdirent(fd int, buf []byte) (n int, err error)
 | 
			
		||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
func Getdents(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
	return getdirent(fd, buf)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -330,49 +350,12 @@ func (w WaitStatus) Signal() Signal {
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) Continued() bool { return w&0x01000000 != 0 }
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) CoreDump() bool { return w&0x200 != 0 }
 | 
			
		||||
func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) TrapCause() int { return -1 }
 | 
			
		||||
 | 
			
		||||
//sys	ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
 | 
			
		||||
// There is no way to create a custom fcntl and to keep //sys fcntl easily,
 | 
			
		||||
// Therefore, the programmer must call dup2 instead of fcntl in this case.
 | 
			
		||||
@@ -385,10 +368,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
 | 
			
		||||
//sys	fcntl(fd int, cmd int, arg int) (val int, err error)
 | 
			
		||||
 | 
			
		||||
func Flock(fd int, how int) (err error) {
 | 
			
		||||
	return syscall.Flock(fd, how)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Direct access
 | 
			
		||||
 */
 | 
			
		||||
@@ -444,8 +423,6 @@ func Flock(fd int, how int) (err error) {
 | 
			
		||||
//sysnb	Times(tms *Tms) (ticks uintptr, err error)
 | 
			
		||||
//sysnb	Umask(mask int) (oldmask int)
 | 
			
		||||
//sysnb	Uname(buf *Utsname) (err error)
 | 
			
		||||
//TODO umount
 | 
			
		||||
// //sys	Unmount(target string, flags int) (err error) = umount
 | 
			
		||||
//sys   Unlink(path string) (err error)
 | 
			
		||||
//sys   Unlinkat(dirfd int, path string, flags int) (err error)
 | 
			
		||||
//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 | 
			
		||||
@@ -456,8 +433,8 @@ func Flock(fd int, how int) (err error) {
 | 
			
		||||
//sys	Dup2(oldfd int, newfd int) (err error)
 | 
			
		||||
//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64
 | 
			
		||||
//sys	Fchown(fd int, uid int, gid int) (err error)
 | 
			
		||||
//sys	Fstat(fd int, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat
 | 
			
		||||
//sys	fstat(fd int, stat *Stat_t) (err error)
 | 
			
		||||
//sys	fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat
 | 
			
		||||
//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
 | 
			
		||||
//sys	Ftruncate(fd int, length int64) (err error)
 | 
			
		||||
//sysnb	Getegid() (egid int)
 | 
			
		||||
@@ -466,18 +443,17 @@ func Flock(fd int, how int) (err error) {
 | 
			
		||||
//sysnb	Getuid() (uid int)
 | 
			
		||||
//sys	Lchown(path string, uid int, gid 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	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
 | 
			
		||||
//TODO Select
 | 
			
		||||
// //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)
 | 
			
		||||
//sysnb	Setregid(rgid int, egid int) (err error)
 | 
			
		||||
//sysnb	Setreuid(ruid int, euid int) (err error)
 | 
			
		||||
//sys	Shutdown(fd int, how int) (err error)
 | 
			
		||||
//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 | 
			
		||||
//sys	Stat(path string, stat *Stat_t) (err error)
 | 
			
		||||
//sys	stat(path string, statptr *Stat_t) (err error)
 | 
			
		||||
//sys	Statfs(path string, buf *Statfs_t) (err error)
 | 
			
		||||
//sys	Truncate(path string, length int64) (err error)
 | 
			
		||||
 | 
			
		||||
@@ -493,8 +469,10 @@ func Flock(fd int, how int) (err error) {
 | 
			
		||||
//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
 | 
			
		||||
//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, 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	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 | 
			
		||||
 | 
			
		||||
// In order to use msghdr structure with Control, Controllen, nrecvmsg and nsendmsg must be used.
 | 
			
		||||
//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = nrecvmsg
 | 
			
		||||
//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg
 | 
			
		||||
 | 
			
		||||
//sys	munmap(addr uintptr, length uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
@@ -545,3 +523,14 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 | 
			
		||||
//sys	gettimeofday(tv *Timeval, tzp *Timezone) (err error)
 | 
			
		||||
//sysnb	Time(t *Time_t) (tt Time_t, err error)
 | 
			
		||||
//sys	Utime(path string, buf *Utimbuf) (err error)
 | 
			
		||||
 | 
			
		||||
//sys	Getsystemcfg(label int) (n uint64)
 | 
			
		||||
 | 
			
		||||
//sys	umount(target string) (err error)
 | 
			
		||||
func Unmount(target string, flags int) (err error) {
 | 
			
		||||
	if flags != 0 {
 | 
			
		||||
		// AIX doesn't have any flags for umount.
 | 
			
		||||
		return ENOSYS
 | 
			
		||||
	}
 | 
			
		||||
	return umount(target)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -29,6 +29,26 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Fstat(fd int, stat *Stat_t) error {
 | 
			
		||||
	return fstat(fd, stat)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
 | 
			
		||||
	return fstatat(dirfd, path, stat, flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Lstat(path string, stat *Stat_t) error {
 | 
			
		||||
	return lstat(path, stat)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Stat(path string, statptr *Stat_t) error {
 | 
			
		||||
	return stat(path, statptr)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										51
									
								
								vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										51
									
								
								vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -29,6 +29,57 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// In order to only have Timespec structure, type of Stat_t's fields
 | 
			
		||||
// Atim, Mtim and Ctim is changed from StTimespec to Timespec during
 | 
			
		||||
// ztypes generation.
 | 
			
		||||
// On ppc64, Timespec.Nsec is an int64 while StTimespec.Nsec is an
 | 
			
		||||
// int32, so the fields' value must be modified.
 | 
			
		||||
func fixStatTimFields(stat *Stat_t) {
 | 
			
		||||
	stat.Atim.Nsec >>= 32
 | 
			
		||||
	stat.Mtim.Nsec >>= 32
 | 
			
		||||
	stat.Ctim.Nsec >>= 32
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Fstat(fd int, stat *Stat_t) error {
 | 
			
		||||
	err := fstat(fd, stat)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	fixStatTimFields(stat)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
 | 
			
		||||
	err := fstatat(dirfd, path, stat, flags)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	fixStatTimFields(stat)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Lstat(path string, stat *Stat_t) error {
 | 
			
		||||
	err := lstat(path, stat)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	fixStatTimFields(stat)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Stat(path string, statptr *Stat_t) error {
 | 
			
		||||
	err := stat(path, statptr)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	fixStatTimFields(statptr)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								vendor/golang.org/x/sys/unix/syscall_bsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/golang.org/x/sys/unix/syscall_bsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -63,15 +63,6 @@ func Setgroups(gids []int) (err error) {
 | 
			
		||||
	return setgroups(len(a), &a[0])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
	// Final argument is (basep *uintptr) and the syscall doesn't take nil.
 | 
			
		||||
	// 64 bits should be enough. (32 bits isn't even on 386). Since the
 | 
			
		||||
	// actual system call is getdirentries64, 64 is a good guess.
 | 
			
		||||
	// TODO(rsc): Can we use a single global basep for all calls?
 | 
			
		||||
	var base = (*uintptr)(unsafe.Pointer(new(uint64)))
 | 
			
		||||
	return Getdirentries(fd, buf, base)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Wait status is 7 bits at bottom, either 0 (exited),
 | 
			
		||||
// 0x7F (stopped), or a signal number that caused an exit.
 | 
			
		||||
// The 0x80 bit is whether there was a core dump.
 | 
			
		||||
@@ -86,6 +77,7 @@ const (
 | 
			
		||||
	shift = 8
 | 
			
		||||
 | 
			
		||||
	exited  = 0
 | 
			
		||||
	killed  = 9
 | 
			
		||||
	stopped = 0x7F
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -112,6 +104,8 @@ func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) Killed() bool { return w&mask == killed && syscall.Signal(w>>shift) != SIGKILL }
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
 | 
			
		||||
 | 
			
		||||
func (w WaitStatus) StopSignal() syscall.Signal {
 | 
			
		||||
@@ -419,8 +413,6 @@ func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err e
 | 
			
		||||
	return kevent(kq, change, len(changes), event, len(events), timeout)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
 | 
			
		||||
// sysctlmib translates name to mib number and appends any additional args.
 | 
			
		||||
func sysctlmib(name string, args ...int) ([]_C_int, error) {
 | 
			
		||||
	// Translate name to mib number.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,go1.12,!go1.13
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	// To implement this using libSystem we'd need syscall_syscallPtr for
 | 
			
		||||
	// fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
 | 
			
		||||
	// back to raw syscalls for this func on Go 1.12.
 | 
			
		||||
	var p unsafe.Pointer
 | 
			
		||||
	if len(buf) > 0 {
 | 
			
		||||
		p = unsafe.Pointer(&buf[0])
 | 
			
		||||
	} else {
 | 
			
		||||
		p = unsafe.Pointer(&_zero)
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
 | 
			
		||||
	n = int(r0)
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		return n, errnoErr(e1)
 | 
			
		||||
	}
 | 
			
		||||
	return n, nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										103
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,103 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,go1.13
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
//sys	closedir(dir uintptr) (err error)
 | 
			
		||||
//sys	readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
 | 
			
		||||
 | 
			
		||||
func fdopendir(fd int) (dir uintptr, err error) {
 | 
			
		||||
	r0, _, e1 := syscall_syscallPtr(funcPC(libc_fdopendir_trampoline), uintptr(fd), 0, 0)
 | 
			
		||||
	dir = uintptr(r0)
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = errnoErr(e1)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func libc_fdopendir_trampoline()
 | 
			
		||||
 | 
			
		||||
//go:linkname libc_fdopendir libc_fdopendir
 | 
			
		||||
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
 | 
			
		||||
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	// Simulate Getdirentries using fdopendir/readdir_r/closedir.
 | 
			
		||||
	const ptrSize = unsafe.Sizeof(uintptr(0))
 | 
			
		||||
 | 
			
		||||
	// We store the number of entries to skip in the seek
 | 
			
		||||
	// offset of fd. See issue #31368.
 | 
			
		||||
	// It's not the full required semantics, but should handle the case
 | 
			
		||||
	// of calling Getdirentries or ReadDirent repeatedly.
 | 
			
		||||
	// It won't handle assigning the results of lseek to *basep, or handle
 | 
			
		||||
	// the directory being edited underfoot.
 | 
			
		||||
	skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return 0, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// We need to duplicate the incoming file descriptor
 | 
			
		||||
	// because the caller expects to retain control of it, but
 | 
			
		||||
	// fdopendir expects to take control of its argument.
 | 
			
		||||
	// Just Dup'ing the file descriptor is not enough, as the
 | 
			
		||||
	// result shares underlying state. Use Openat to make a really
 | 
			
		||||
	// new file descriptor referring to the same directory.
 | 
			
		||||
	fd2, err := Openat(fd, ".", O_RDONLY, 0)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return 0, err
 | 
			
		||||
	}
 | 
			
		||||
	d, err := fdopendir(fd2)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		Close(fd2)
 | 
			
		||||
		return 0, err
 | 
			
		||||
	}
 | 
			
		||||
	defer closedir(d)
 | 
			
		||||
 | 
			
		||||
	var cnt int64
 | 
			
		||||
	for {
 | 
			
		||||
		var entry Dirent
 | 
			
		||||
		var entryp *Dirent
 | 
			
		||||
		e := readdir_r(d, &entry, &entryp)
 | 
			
		||||
		if e != 0 {
 | 
			
		||||
			return n, errnoErr(e)
 | 
			
		||||
		}
 | 
			
		||||
		if entryp == nil {
 | 
			
		||||
			break
 | 
			
		||||
		}
 | 
			
		||||
		if skip > 0 {
 | 
			
		||||
			skip--
 | 
			
		||||
			cnt++
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		reclen := int(entry.Reclen)
 | 
			
		||||
		if reclen > len(buf) {
 | 
			
		||||
			// Not enough room. Return for now.
 | 
			
		||||
			// The counter will let us know where we should start up again.
 | 
			
		||||
			// Note: this strategy for suspending in the middle and
 | 
			
		||||
			// restarting is O(n^2) in the length of the directory. Oh well.
 | 
			
		||||
			break
 | 
			
		||||
		}
 | 
			
		||||
		// Copy entry into return buffer.
 | 
			
		||||
		s := struct {
 | 
			
		||||
			ptr unsafe.Pointer
 | 
			
		||||
			siz int
 | 
			
		||||
			cap int
 | 
			
		||||
		}{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen}
 | 
			
		||||
		copy(buf, *(*[]byte)(unsafe.Pointer(&s)))
 | 
			
		||||
		buf = buf[reclen:]
 | 
			
		||||
		n += reclen
 | 
			
		||||
		cnt++
 | 
			
		||||
	}
 | 
			
		||||
	// Set the seek offset of the input fd to record
 | 
			
		||||
	// how many files we've already returned.
 | 
			
		||||
	_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return n, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return n, nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										132
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										132
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -77,7 +77,18 @@ func nametomib(name string) (mib []_C_int, err error) {
 | 
			
		||||
	return buf[0 : n/siz], nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys   ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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) }
 | 
			
		||||
 | 
			
		||||
@@ -108,17 +119,8 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	_, _, e1 := Syscall6(
 | 
			
		||||
		SYS_GETATTRLIST,
 | 
			
		||||
		uintptr(unsafe.Pointer(_p0)),
 | 
			
		||||
		uintptr(unsafe.Pointer(&attrList)),
 | 
			
		||||
		uintptr(unsafe.Pointer(&attrBuf[0])),
 | 
			
		||||
		uintptr(len(attrBuf)),
 | 
			
		||||
		uintptr(options),
 | 
			
		||||
		0,
 | 
			
		||||
	)
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		return nil, e1
 | 
			
		||||
	if err := getattrlist(_p0, unsafe.Pointer(&attrList), unsafe.Pointer(&attrBuf[0]), uintptr(len(attrBuf)), int(options)); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
 | 
			
		||||
 | 
			
		||||
@@ -151,6 +153,25 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
 | 
			
		||||
 | 
			
		||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
 | 
			
		||||
	mib, err := sysctlmib(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	n := uintptr(SizeofClockinfo)
 | 
			
		||||
	var ci Clockinfo
 | 
			
		||||
	if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if n != SizeofClockinfo {
 | 
			
		||||
		return nil, EIO
 | 
			
		||||
	}
 | 
			
		||||
	return &ci, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sysnb pipe() (r int, w int, err error)
 | 
			
		||||
 | 
			
		||||
func Pipe(p []int) (err error) {
 | 
			
		||||
@@ -168,12 +189,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 | 
			
		||||
		_p0 = unsafe.Pointer(&buf[0])
 | 
			
		||||
		bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
 | 
			
		||||
	n = int(r0)
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = e1
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
	return getfsstat(_p0, bufsize, flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func xattrPointer(dest []byte) *byte {
 | 
			
		||||
@@ -298,21 +314,16 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
 | 
			
		||||
	if flags&AT_SYMLINK_NOFOLLOW != 0 {
 | 
			
		||||
		options |= FSOPT_NOFOLLOW
 | 
			
		||||
	}
 | 
			
		||||
	_, _, e1 := Syscall6(
 | 
			
		||||
		SYS_SETATTRLIST,
 | 
			
		||||
		uintptr(unsafe.Pointer(_p0)),
 | 
			
		||||
		uintptr(unsafe.Pointer(&attrList)),
 | 
			
		||||
		uintptr(unsafe.Pointer(&attributes)),
 | 
			
		||||
		uintptr(unsafe.Sizeof(attributes)),
 | 
			
		||||
		uintptr(options),
 | 
			
		||||
		0,
 | 
			
		||||
	)
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		return e1
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
	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
 | 
			
		||||
@@ -328,43 +339,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
 | 
			
		||||
 | 
			
		||||
//sys	ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Uname(uname *Utsname) error {
 | 
			
		||||
	mib := []_C_int{CTL_KERN, KERN_OSTYPE}
 | 
			
		||||
	n := unsafe.Sizeof(uname.Sysname)
 | 
			
		||||
@@ -411,6 +385,18 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	var length = int64(count)
 | 
			
		||||
	err = sendfile(infd, outfd, *offset, &length, nil, 0)
 | 
			
		||||
	written = int(length)
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Exposed directly
 | 
			
		||||
 */
 | 
			
		||||
@@ -421,6 +407,7 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Chmod(path string, mode uint32) (err error)
 | 
			
		||||
//sys	Chown(path string, uid int, gid int) (err error)
 | 
			
		||||
//sys	Chroot(path string) (err error)
 | 
			
		||||
//sys	ClockGettime(clockid int32, time *Timespec) (err error)
 | 
			
		||||
//sys	Close(fd int) (err error)
 | 
			
		||||
//sys	Dup(fd int) (nfd int, err error)
 | 
			
		||||
//sys	Dup2(from int, to int) (err error)
 | 
			
		||||
@@ -435,12 +422,8 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
 | 
			
		||||
//sys	Flock(fd int, how int) (err error)
 | 
			
		||||
//sys	Fpathconf(fd int, name int) (val int, err error)
 | 
			
		||||
//sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 | 
			
		||||
//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
 | 
			
		||||
//sys	Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
 | 
			
		||||
//sys	Fsync(fd int) (err error)
 | 
			
		||||
//sys	Ftruncate(fd int, length int64) (err error)
 | 
			
		||||
//sys	Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
 | 
			
		||||
//sys	Getdtablesize() (size int)
 | 
			
		||||
//sysnb	Getegid() (egid int)
 | 
			
		||||
//sysnb	Geteuid() (uid int)
 | 
			
		||||
@@ -460,7 +443,6 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Link(path string, link string) (err error)
 | 
			
		||||
//sys	Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
 | 
			
		||||
//sys	Listen(s int, backlog int) (err error)
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 | 
			
		||||
//sys	Mkdir(path string, mode uint32) (err error)
 | 
			
		||||
//sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
 | 
			
		||||
//sys	Mkfifo(path string, mode uint32) (err error)
 | 
			
		||||
@@ -478,7 +460,7 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Revoke(path string) (err error)
 | 
			
		||||
//sys	Rmdir(path string) (err error)
 | 
			
		||||
//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
 | 
			
		||||
//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
 | 
			
		||||
//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
 | 
			
		||||
//sys	Setegid(egid int) (err error)
 | 
			
		||||
//sysnb	Seteuid(euid int) (err error)
 | 
			
		||||
//sysnb	Setgid(gid int) (err error)
 | 
			
		||||
@@ -492,8 +474,6 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sysnb	Setsid() (pid int, err error)
 | 
			
		||||
//sysnb	Settimeofday(tp *Timeval) (err error)
 | 
			
		||||
//sysnb	Setuid(uid int) (err error)
 | 
			
		||||
//sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 | 
			
		||||
//sys	Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
 | 
			
		||||
//sys	Symlink(path string, link string) (err error)
 | 
			
		||||
//sys	Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
 | 
			
		||||
//sys	Sync() (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,386,!go1.12
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
//sys  Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
 | 
			
		||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,9 +8,11 @@ package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
//sys   ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
 | 
			
		||||
}
 | 
			
		||||
@@ -44,21 +46,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	var length = uint64(count)
 | 
			
		||||
 | 
			
		||||
	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
 | 
			
		||||
 | 
			
		||||
	written = int(length)
 | 
			
		||||
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = e1
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 | 
			
		||||
@@ -66,3 +59,11 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 | 
			
		||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
 | 
			
		||||
// of darwin/386 the syscall is called sysctl instead of __sysctl.
 | 
			
		||||
const SYS___SYSCTL = SYS_SYSCTL
 | 
			
		||||
 | 
			
		||||
//sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 | 
			
		||||
//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
 | 
			
		||||
//sys	Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
 | 
			
		||||
//sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 | 
			
		||||
//sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 | 
			
		||||
//sys	Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,amd64,!go1.12
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
//sys  Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
 | 
			
		||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,9 +8,11 @@ package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
//sys   ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: sec, Nsec: nsec}
 | 
			
		||||
}
 | 
			
		||||
@@ -44,21 +46,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	var length = uint64(count)
 | 
			
		||||
 | 
			
		||||
	_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
 | 
			
		||||
 | 
			
		||||
	written = int(length)
 | 
			
		||||
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = e1
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 | 
			
		||||
@@ -66,3 +59,11 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 | 
			
		||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
 | 
			
		||||
// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
 | 
			
		||||
const SYS___SYSCTL = SYS_SYSCTL
 | 
			
		||||
 | 
			
		||||
//sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 | 
			
		||||
//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
 | 
			
		||||
//sys	Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
 | 
			
		||||
//sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 | 
			
		||||
//sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 | 
			
		||||
//sys	Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,386,!go1.12
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	return 0, ENOSYS
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										34
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -6,9 +6,16 @@ package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
 | 
			
		||||
	return ENOTSUP
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
 | 
			
		||||
	return ENOTSUP
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
 | 
			
		||||
}
 | 
			
		||||
@@ -42,21 +49,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	var length = uint64(count)
 | 
			
		||||
 | 
			
		||||
	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
 | 
			
		||||
 | 
			
		||||
	written = int(length)
 | 
			
		||||
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = e1
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
 | 
			
		||||
@@ -64,3 +62,11 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 | 
			
		||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
 | 
			
		||||
// of darwin/arm the syscall is called sysctl instead of __sysctl.
 | 
			
		||||
const SYS___SYSCTL = SYS_SYSCTL
 | 
			
		||||
 | 
			
		||||
//sys	Fstat(fd int, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
 | 
			
		||||
//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
 | 
			
		||||
//sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Stat(path string, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Statfs(path string, stat *Statfs_t) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,arm64,!go1.12
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	return 0, ENOSYS
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										34
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,9 +8,16 @@ package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
 | 
			
		||||
	return ENOTSUP
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
 | 
			
		||||
	return ENOTSUP
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: sec, Nsec: nsec}
 | 
			
		||||
}
 | 
			
		||||
@@ -44,21 +51,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	var length = uint64(count)
 | 
			
		||||
 | 
			
		||||
	_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
 | 
			
		||||
 | 
			
		||||
	written = int(length)
 | 
			
		||||
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = e1
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
 | 
			
		||||
@@ -66,3 +64,11 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 | 
			
		||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
 | 
			
		||||
// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
 | 
			
		||||
const SYS___SYSCTL = SYS_SYSCTL
 | 
			
		||||
 | 
			
		||||
//sys	Fstat(fd int, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
 | 
			
		||||
//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
 | 
			
		||||
//sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Stat(path string, stat *Stat_t) (err error)
 | 
			
		||||
//sys	Statfs(path string, stat *Statfs_t) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										33
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
// Copyright 2018 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.
 | 
			
		||||
 | 
			
		||||
// +build darwin,go1.12
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
// Implemented in the runtime package (runtime/sys_darwin.go)
 | 
			
		||||
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
 | 
			
		||||
func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
 | 
			
		||||
 | 
			
		||||
//go:linkname syscall_syscall syscall.syscall
 | 
			
		||||
//go:linkname syscall_syscall6 syscall.syscall6
 | 
			
		||||
//go:linkname syscall_syscall6X syscall.syscall6X
 | 
			
		||||
//go:linkname syscall_syscall9 syscall.syscall9
 | 
			
		||||
//go:linkname syscall_rawSyscall syscall.rawSyscall
 | 
			
		||||
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
 | 
			
		||||
//go:linkname syscall_syscallPtr syscall.syscallPtr
 | 
			
		||||
 | 
			
		||||
// Find the entry point for f. See comments in runtime/proc.go for the
 | 
			
		||||
// function of the same name.
 | 
			
		||||
//go:nosplit
 | 
			
		||||
func funcPC(f func()) uintptr {
 | 
			
		||||
	return **(**uintptr)(unsafe.Pointer(&f))
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										66
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										66
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -14,6 +14,8 @@ package unix
 | 
			
		||||
 | 
			
		||||
import "unsafe"
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
 | 
			
		||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
 | 
			
		||||
type SockaddrDatalink struct {
 | 
			
		||||
	Len    uint8
 | 
			
		||||
@@ -57,6 +59,22 @@ func nametomib(name string) (mib []_C_int, err error) {
 | 
			
		||||
	return buf[0 : n/siz], nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	namlen, ok := direntNamlen(buf)
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return 0, false
 | 
			
		||||
	}
 | 
			
		||||
	return (16 + namlen + 1 + 7) &^ 7, true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sysnb pipe() (r int, w int, err error)
 | 
			
		||||
 | 
			
		||||
func Pipe(p []int) (err error) {
 | 
			
		||||
@@ -134,43 +152,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
 | 
			
		||||
 | 
			
		||||
//sys	ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
 | 
			
		||||
	err := sysctl(mib, old, oldlen, nil, 0)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -234,6 +215,13 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Exposed directly
 | 
			
		||||
 */
 | 
			
		||||
@@ -262,6 +250,7 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
 | 
			
		||||
//sys	Fsync(fd int) (err error)
 | 
			
		||||
//sys	Ftruncate(fd int, length int64) (err error)
 | 
			
		||||
//sys	Getdents(fd int, buf []byte) (n int, err error)
 | 
			
		||||
//sys	Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
 | 
			
		||||
//sys	Getdtablesize() (size int)
 | 
			
		||||
//sysnb	Getegid() (egid int)
 | 
			
		||||
@@ -297,10 +286,11 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	read(fd int, p []byte) (n int, err error)
 | 
			
		||||
//sys	Readlink(path string, buf []byte) (n int, err error)
 | 
			
		||||
//sys	Rename(from string, to string) (err error)
 | 
			
		||||
//sys	Renameat(fromfd int, from string, tofd int, to string) (err error)
 | 
			
		||||
//sys	Revoke(path string) (err error)
 | 
			
		||||
//sys	Rmdir(path string) (err error)
 | 
			
		||||
//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
 | 
			
		||||
//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
 | 
			
		||||
//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
 | 
			
		||||
//sysnb	Setegid(egid int) (err error)
 | 
			
		||||
//sysnb	Seteuid(euid int) (err error)
 | 
			
		||||
//sysnb	Setgid(gid int) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										174
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										174
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -36,6 +36,8 @@ var (
 | 
			
		||||
// INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
 | 
			
		||||
const _ino64First = 1200031
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
 | 
			
		||||
func supportsABI(ver uint32) bool {
 | 
			
		||||
	osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
 | 
			
		||||
	return osreldate >= ver
 | 
			
		||||
@@ -82,6 +84,18 @@ func nametomib(name string) (mib []_C_int, err error) {
 | 
			
		||||
	return buf[0 : n/siz], nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Pipe(p []int) (err error) {
 | 
			
		||||
	return Pipe2(p, 0)
 | 
			
		||||
}
 | 
			
		||||
@@ -189,43 +203,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
 | 
			
		||||
 | 
			
		||||
//sys   ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Uname(uname *Utsname) error {
 | 
			
		||||
	mib := []_C_int{CTL_KERN, KERN_OSTYPE}
 | 
			
		||||
	n := unsafe.Sizeof(uname.Sysname)
 | 
			
		||||
@@ -362,7 +339,21 @@ func Getdents(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	if supportsABI(_ino64First) {
 | 
			
		||||
		return getdirentries_freebsd12(fd, buf, basep)
 | 
			
		||||
		if basep == nil || unsafe.Sizeof(*basep) == 8 {
 | 
			
		||||
			return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
 | 
			
		||||
		}
 | 
			
		||||
		// The freebsd12 syscall needs a 64-bit base. On 32-bit machines
 | 
			
		||||
		// we can't just use the basep passed in. See #32498.
 | 
			
		||||
		var base uint64 = uint64(*basep)
 | 
			
		||||
		n, err = getdirentries_freebsd12(fd, buf, &base)
 | 
			
		||||
		*basep = uintptr(base)
 | 
			
		||||
		if base>>32 != 0 {
 | 
			
		||||
			// We can't stuff the base back into a uintptr, so any
 | 
			
		||||
			// future calls would be suspect. Generate an error.
 | 
			
		||||
			// EIO is allowed by getdirentries.
 | 
			
		||||
			err = EIO
 | 
			
		||||
		}
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// The old syscall entries are smaller than the new. Use 1/4 of the original
 | 
			
		||||
@@ -404,22 +395,22 @@ func roundup(x, y int) int {
 | 
			
		||||
 | 
			
		||||
func (s *Stat_t) convertFrom(old *stat_freebsd11_t) {
 | 
			
		||||
	*s = Stat_t{
 | 
			
		||||
		Dev:      uint64(old.Dev),
 | 
			
		||||
		Ino:      uint64(old.Ino),
 | 
			
		||||
		Nlink:    uint64(old.Nlink),
 | 
			
		||||
		Mode:     old.Mode,
 | 
			
		||||
		Uid:      old.Uid,
 | 
			
		||||
		Gid:      old.Gid,
 | 
			
		||||
		Rdev:     uint64(old.Rdev),
 | 
			
		||||
		Atim:     old.Atim,
 | 
			
		||||
		Mtim:     old.Mtim,
 | 
			
		||||
		Ctim:     old.Ctim,
 | 
			
		||||
		Birthtim: old.Birthtim,
 | 
			
		||||
		Size:     old.Size,
 | 
			
		||||
		Blocks:   old.Blocks,
 | 
			
		||||
		Blksize:  old.Blksize,
 | 
			
		||||
		Flags:    old.Flags,
 | 
			
		||||
		Gen:      uint64(old.Gen),
 | 
			
		||||
		Dev:     uint64(old.Dev),
 | 
			
		||||
		Ino:     uint64(old.Ino),
 | 
			
		||||
		Nlink:   uint64(old.Nlink),
 | 
			
		||||
		Mode:    old.Mode,
 | 
			
		||||
		Uid:     old.Uid,
 | 
			
		||||
		Gid:     old.Gid,
 | 
			
		||||
		Rdev:    uint64(old.Rdev),
 | 
			
		||||
		Atim:    old.Atim,
 | 
			
		||||
		Mtim:    old.Mtim,
 | 
			
		||||
		Ctim:    old.Ctim,
 | 
			
		||||
		Btim:    old.Btim,
 | 
			
		||||
		Size:    old.Size,
 | 
			
		||||
		Blocks:  old.Blocks,
 | 
			
		||||
		Blksize: old.Blksize,
 | 
			
		||||
		Flags:   old.Flags,
 | 
			
		||||
		Gen:     uint64(old.Gen),
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -500,6 +491,77 @@ func convertFromDirents11(buf []byte, old []byte) int {
 | 
			
		||||
	return dstPos
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	ptrace(request int, pid int, addr uintptr, data int) (err error)
 | 
			
		||||
 | 
			
		||||
func PtraceAttach(pid int) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_ATTACH, pid, 0, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceCont(pid int, signal int) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_CONT, pid, 1, signal)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceDetach(pid int) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_DETACH, pid, 1, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceGetRegs(pid int, regsout *Reg) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
 | 
			
		||||
	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint(countin)}
 | 
			
		||||
	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
 | 
			
		||||
	return int(ioDesc.Len), err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceLwpEvents(pid int, enable int) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceLwpInfo(pid int, info uintptr) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
 | 
			
		||||
	return PtraceIO(PIOD_READ_D, pid, addr, out, SizeofLong)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
 | 
			
		||||
	return PtraceIO(PIOD_READ_I, pid, addr, out, SizeofLong)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
 | 
			
		||||
	return PtraceIO(PIOD_WRITE_D, pid, addr, data, SizeofLong)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
 | 
			
		||||
	return PtraceIO(PIOD_WRITE_I, pid, addr, data, SizeofLong)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceSetRegs(pid int, regs *Reg) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func PtraceSingleStep(pid int) (err error) {
 | 
			
		||||
	return ptrace(PTRACE_SINGLESTEP, pid, 1, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Exposed directly
 | 
			
		||||
 */
 | 
			
		||||
@@ -548,7 +610,7 @@ func convertFromDirents11(buf []byte, old []byte) int {
 | 
			
		||||
//sys	Fsync(fd int) (err error)
 | 
			
		||||
//sys	Ftruncate(fd int, length int64) (err error)
 | 
			
		||||
//sys	getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
 | 
			
		||||
//sys	getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error)
 | 
			
		||||
//sys	getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error)
 | 
			
		||||
//sys	Getdtablesize() (size int)
 | 
			
		||||
//sysnb	Getegid() (egid int)
 | 
			
		||||
//sysnb	Geteuid() (uid int)
 | 
			
		||||
@@ -591,7 +653,7 @@ func convertFromDirents11(buf []byte, old []byte) int {
 | 
			
		||||
//sys	Revoke(path string) (err error)
 | 
			
		||||
//sys	Rmdir(path string) (err error)
 | 
			
		||||
//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
 | 
			
		||||
//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
 | 
			
		||||
//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
 | 
			
		||||
//sysnb	Setegid(egid int) (err error)
 | 
			
		||||
//sysnb	Seteuid(euid int) (err error)
 | 
			
		||||
//sysnb	Setgid(gid int) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -33,6 +33,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										56
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
// Copyright 2018 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.
 | 
			
		||||
 | 
			
		||||
// +build arm64,freebsd
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: sec, Nsec: nsec}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func setTimeval(sec, usec int64) Timeval {
 | 
			
		||||
	return Timeval{Sec: sec, Usec: usec}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
 | 
			
		||||
	k.Ident = uint64(fd)
 | 
			
		||||
	k.Filter = int16(mode)
 | 
			
		||||
	k.Flags = uint16(flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (iov *Iovec) SetLen(length int) {
 | 
			
		||||
	iov.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	var writtenOut uint64 = 0
 | 
			
		||||
	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
 | 
			
		||||
 | 
			
		||||
	written = int(writtenOut)
 | 
			
		||||
 | 
			
		||||
	if e1 != 0 {
 | 
			
		||||
		err = e1
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 | 
			
		||||
							
								
								
									
										359
									
								
								vendor/golang.org/x/sys/unix/syscall_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										359
									
								
								vendor/golang.org/x/sys/unix/syscall_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -13,7 +13,7 @@ package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/binary"
 | 
			
		||||
	"net"
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
@@ -38,6 +38,20 @@ func Creat(path string, mode uint32) (fd int, err error) {
 | 
			
		||||
	return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
 | 
			
		||||
//sys	fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
 | 
			
		||||
 | 
			
		||||
func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (err error) {
 | 
			
		||||
	if pathname == "" {
 | 
			
		||||
		return fanotifyMark(fd, flags, mask, dirFd, nil)
 | 
			
		||||
	}
 | 
			
		||||
	p, err := BytePtrFromString(pathname)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	return fanotifyMark(fd, flags, mask, dirFd, p)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	fchmodat(dirfd int, path string, mode uint32) (err error)
 | 
			
		||||
 | 
			
		||||
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
 | 
			
		||||
@@ -57,6 +71,17 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlRetInt performs an ioctl operation specified by req on a device
 | 
			
		||||
// associated with opened file descriptor fd, and returns a non-negative
 | 
			
		||||
// integer that is returned by the ioctl syscall.
 | 
			
		||||
func IoctlRetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
 | 
			
		||||
	if err != 0 {
 | 
			
		||||
		return 0, err
 | 
			
		||||
	}
 | 
			
		||||
	return int(ret), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlSetPointerInt performs an ioctl operation which sets an
 | 
			
		||||
// integer value on fd, using the specified request number. The ioctl
 | 
			
		||||
// argument is called with a pointer to the integer value, rather than
 | 
			
		||||
@@ -66,37 +91,21 @@ func IoctlSetPointerInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
func IoctlSetRTCTime(fd int, value *RTCTime) error {
 | 
			
		||||
	err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
	runtime.KeepAlive(value)
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
func IoctlGetUint32(fd int, req uint) (uint32, error) {
 | 
			
		||||
	var value uint32
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
 | 
			
		||||
	var value RTCTime
 | 
			
		||||
	err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -732,7 +741,7 @@ const px_proto_oe = 0
 | 
			
		||||
 | 
			
		||||
type SockaddrPPPoE struct {
 | 
			
		||||
	SID    uint16
 | 
			
		||||
	Remote net.HardwareAddr
 | 
			
		||||
	Remote []byte
 | 
			
		||||
	Dev    string
 | 
			
		||||
	raw    RawSockaddrPPPoX
 | 
			
		||||
}
 | 
			
		||||
@@ -766,6 +775,70 @@ func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {
 | 
			
		||||
	return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SockaddrTIPC implements the Sockaddr interface for AF_TIPC type sockets.
 | 
			
		||||
// For more information on TIPC, see: http://tipc.sourceforge.net/.
 | 
			
		||||
type SockaddrTIPC struct {
 | 
			
		||||
	// Scope is the publication scopes when binding service/service range.
 | 
			
		||||
	// Should be set to TIPC_CLUSTER_SCOPE or TIPC_NODE_SCOPE.
 | 
			
		||||
	Scope int
 | 
			
		||||
 | 
			
		||||
	// Addr is the type of address used to manipulate a socket. Addr must be
 | 
			
		||||
	// one of:
 | 
			
		||||
	//  - *TIPCSocketAddr: "id" variant in the C addr union
 | 
			
		||||
	//  - *TIPCServiceRange: "nameseq" variant in the C addr union
 | 
			
		||||
	//  - *TIPCServiceName: "name" variant in the C addr union
 | 
			
		||||
	//
 | 
			
		||||
	// If nil, EINVAL will be returned when the structure is used.
 | 
			
		||||
	Addr TIPCAddr
 | 
			
		||||
 | 
			
		||||
	raw RawSockaddrTIPC
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TIPCAddr is implemented by types that can be used as an address for
 | 
			
		||||
// SockaddrTIPC. It is only implemented by *TIPCSocketAddr, *TIPCServiceRange,
 | 
			
		||||
// and *TIPCServiceName.
 | 
			
		||||
type TIPCAddr interface {
 | 
			
		||||
	tipcAddrtype() uint8
 | 
			
		||||
	tipcAddr() [12]byte
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (sa *TIPCSocketAddr) tipcAddr() [12]byte {
 | 
			
		||||
	var out [12]byte
 | 
			
		||||
	copy(out[:], (*(*[unsafe.Sizeof(TIPCSocketAddr{})]byte)(unsafe.Pointer(sa)))[:])
 | 
			
		||||
	return out
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (sa *TIPCSocketAddr) tipcAddrtype() uint8 { return TIPC_SOCKET_ADDR }
 | 
			
		||||
 | 
			
		||||
func (sa *TIPCServiceRange) tipcAddr() [12]byte {
 | 
			
		||||
	var out [12]byte
 | 
			
		||||
	copy(out[:], (*(*[unsafe.Sizeof(TIPCServiceRange{})]byte)(unsafe.Pointer(sa)))[:])
 | 
			
		||||
	return out
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (sa *TIPCServiceRange) tipcAddrtype() uint8 { return TIPC_SERVICE_RANGE }
 | 
			
		||||
 | 
			
		||||
func (sa *TIPCServiceName) tipcAddr() [12]byte {
 | 
			
		||||
	var out [12]byte
 | 
			
		||||
	copy(out[:], (*(*[unsafe.Sizeof(TIPCServiceName{})]byte)(unsafe.Pointer(sa)))[:])
 | 
			
		||||
	return out
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (sa *TIPCServiceName) tipcAddrtype() uint8 { return TIPC_SERVICE_ADDR }
 | 
			
		||||
 | 
			
		||||
func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
 | 
			
		||||
	if sa.Addr == nil {
 | 
			
		||||
		return nil, 0, EINVAL
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	sa.raw.Family = AF_TIPC
 | 
			
		||||
	sa.raw.Scope = int8(sa.Scope)
 | 
			
		||||
	sa.raw.Addrtype = sa.Addr.tipcAddrtype()
 | 
			
		||||
	sa.raw.Addr = sa.Addr.tipcAddr()
 | 
			
		||||
 | 
			
		||||
	return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 | 
			
		||||
	switch rsa.Addr.Family {
 | 
			
		||||
	case AF_NETLINK:
 | 
			
		||||
@@ -883,7 +956,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 | 
			
		||||
		}
 | 
			
		||||
		sa := &SockaddrPPPoE{
 | 
			
		||||
			SID:    binary.BigEndian.Uint16(pp[6:8]),
 | 
			
		||||
			Remote: net.HardwareAddr(pp[8:14]),
 | 
			
		||||
			Remote: pp[8:14],
 | 
			
		||||
		}
 | 
			
		||||
		for i := 14; i < 14+IFNAMSIZ; i++ {
 | 
			
		||||
			if pp[i] == 0 {
 | 
			
		||||
@@ -891,6 +964,27 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 | 
			
		||||
				break
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return sa, nil
 | 
			
		||||
	case AF_TIPC:
 | 
			
		||||
		pp := (*RawSockaddrTIPC)(unsafe.Pointer(rsa))
 | 
			
		||||
 | 
			
		||||
		sa := &SockaddrTIPC{
 | 
			
		||||
			Scope: int(pp.Scope),
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Determine which union variant is present in pp.Addr by checking
 | 
			
		||||
		// pp.Addrtype.
 | 
			
		||||
		switch pp.Addrtype {
 | 
			
		||||
		case TIPC_SERVICE_RANGE:
 | 
			
		||||
			sa.Addr = (*TIPCServiceRange)(unsafe.Pointer(&pp.Addr))
 | 
			
		||||
		case TIPC_SERVICE_ADDR:
 | 
			
		||||
			sa.Addr = (*TIPCServiceName)(unsafe.Pointer(&pp.Addr))
 | 
			
		||||
		case TIPC_SOCKET_ADDR:
 | 
			
		||||
			sa.Addr = (*TIPCSocketAddr)(unsafe.Pointer(&pp.Addr))
 | 
			
		||||
		default:
 | 
			
		||||
			return nil, EINVAL
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return sa, nil
 | 
			
		||||
	}
 | 
			
		||||
	return nil, EAFNOSUPPORT
 | 
			
		||||
@@ -977,10 +1071,50 @@ func GetsockoptString(fd, level, opt int) (string, error) {
 | 
			
		||||
	return string(buf[:vallen-1]), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) {
 | 
			
		||||
	var value TpacketStats
 | 
			
		||||
	vallen := _Socklen(SizeofTpacketStats)
 | 
			
		||||
	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func GetsockoptTpacketStatsV3(fd, level, opt int) (*TpacketStatsV3, error) {
 | 
			
		||||
	var value TpacketStatsV3
 | 
			
		||||
	vallen := _Socklen(SizeofTpacketStatsV3)
 | 
			
		||||
	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a
 | 
			
		||||
// socket to filter incoming packets.  See 'man 7 socket' for usage information.
 | 
			
		||||
func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(fprog), unsafe.Sizeof(*fprog))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) error {
 | 
			
		||||
	var p unsafe.Pointer
 | 
			
		||||
	if len(filter) > 0 {
 | 
			
		||||
		p = unsafe.Pointer(&filter[0])
 | 
			
		||||
	}
 | 
			
		||||
	return setsockopt(fd, level, opt, p, uintptr(len(filter)*SizeofCanFilter))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptTpacketReq(fd, level, opt int, tp *TpacketReq) error {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
 | 
			
		||||
 | 
			
		||||
// KeyctlInt calls keyctl commands in which each argument is an int.
 | 
			
		||||
@@ -1088,6 +1222,34 @@ func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error
 | 
			
		||||
	return keyctlDH(KEYCTL_DH_COMPUTE, params, buffer)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// KeyctlRestrictKeyring implements the KEYCTL_RESTRICT_KEYRING command. This
 | 
			
		||||
// command limits the set of keys that can be linked to the keyring, regardless
 | 
			
		||||
// of keyring permissions. The command requires the "setattr" permission.
 | 
			
		||||
//
 | 
			
		||||
// When called with an empty keyType the command locks the keyring, preventing
 | 
			
		||||
// any further keys from being linked to the keyring.
 | 
			
		||||
//
 | 
			
		||||
// The "asymmetric" keyType defines restrictions requiring key payloads to be
 | 
			
		||||
// DER encoded X.509 certificates signed by keys in another keyring. Restrictions
 | 
			
		||||
// for "asymmetric" include "builtin_trusted", "builtin_and_secondary_trusted",
 | 
			
		||||
// "key_or_keyring:<key>", and "key_or_keyring:<key>:chain".
 | 
			
		||||
//
 | 
			
		||||
// As of Linux 4.12, only the "asymmetric" keyType defines type-specific
 | 
			
		||||
// restrictions.
 | 
			
		||||
//
 | 
			
		||||
// See the full documentation at:
 | 
			
		||||
// http://man7.org/linux/man-pages/man3/keyctl_restrict_keyring.3.html
 | 
			
		||||
// http://man7.org/linux/man-pages/man2/keyctl.2.html
 | 
			
		||||
func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error {
 | 
			
		||||
	if keyType == "" {
 | 
			
		||||
		return keyctlRestrictKeyring(KEYCTL_RESTRICT_KEYRING, ringid)
 | 
			
		||||
	}
 | 
			
		||||
	return keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (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) {
 | 
			
		||||
	var msg Msghdr
 | 
			
		||||
	var rsa RawSockaddrAny
 | 
			
		||||
@@ -1331,8 +1493,12 @@ func PtraceSyscall(pid int, signal int) (err error) {
 | 
			
		||||
 | 
			
		||||
func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
 | 
			
		||||
 | 
			
		||||
func PtraceInterrupt(pid int) (err error) { return ptrace(PTRACE_INTERRUPT, pid, 0, 0) }
 | 
			
		||||
 | 
			
		||||
func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
 | 
			
		||||
 | 
			
		||||
func PtraceSeize(pid int) (err error) { return ptrace(PTRACE_SEIZE, pid, 0, 0) }
 | 
			
		||||
 | 
			
		||||
func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
 | 
			
		||||
 | 
			
		||||
//sys	reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
 | 
			
		||||
@@ -1341,8 +1507,20 @@ func Reboot(cmd int) (err error) {
 | 
			
		||||
	return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
	return Getdents(fd, buf)
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	reclen, ok := direntReclen(buf)
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return 0, false
 | 
			
		||||
	}
 | 
			
		||||
	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
 | 
			
		||||
@@ -1360,6 +1538,13 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
 | 
			
		||||
	return mount(source, target, fstype, flags, datap)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Sendto
 | 
			
		||||
// Recvfrom
 | 
			
		||||
// Socketpair
 | 
			
		||||
@@ -1370,10 +1555,13 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
 | 
			
		||||
//sys	Acct(path string) (err error)
 | 
			
		||||
//sys	AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
 | 
			
		||||
//sys	Adjtimex(buf *Timex) (state int, err error)
 | 
			
		||||
//sys	Capget(hdr *CapUserHeader, data *CapUserData) (err error)
 | 
			
		||||
//sys	Capset(hdr *CapUserHeader, data *CapUserData) (err error)
 | 
			
		||||
//sys	Chdir(path string) (err error)
 | 
			
		||||
//sys	Chroot(path string) (err error)
 | 
			
		||||
//sys	ClockGetres(clockid int32, res *Timespec) (err error)
 | 
			
		||||
//sys	ClockGettime(clockid int32, time *Timespec) (err error)
 | 
			
		||||
//sys	ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
 | 
			
		||||
//sys	Close(fd int) (err error)
 | 
			
		||||
//sys	CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
 | 
			
		||||
//sys	DeleteModule(name string, flags int) (err error)
 | 
			
		||||
@@ -1434,7 +1622,6 @@ func Getpgrp() (pid int) {
 | 
			
		||||
//sys	Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
 | 
			
		||||
//sys	read(fd int, p []byte) (n int, err error)
 | 
			
		||||
//sys	Removexattr(path string, attr string) (err error)
 | 
			
		||||
//sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
 | 
			
		||||
//sys	Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
 | 
			
		||||
//sys	RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
 | 
			
		||||
//sys	Setdomainname(p []byte) (err error)
 | 
			
		||||
@@ -1457,8 +1644,13 @@ func Setgid(uid int) (err error) {
 | 
			
		||||
	return EOPNOTSUPP
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
 | 
			
		||||
	return signalfd(fd, sigmask, _C__NSIG/8, flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	Setpriority(which int, who int, prio int) (err error)
 | 
			
		||||
//sys	Setxattr(path string, attr string, data []byte, flags int) (err error)
 | 
			
		||||
//sys	signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) = SYS_SIGNALFD4
 | 
			
		||||
//sys	Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
 | 
			
		||||
//sys	Sync()
 | 
			
		||||
//sys	Syncfs(fd int) (err error)
 | 
			
		||||
@@ -1503,15 +1695,12 @@ func Munmap(b []byte) (err error) {
 | 
			
		||||
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
 | 
			
		||||
// using the specified flags.
 | 
			
		||||
func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
 | 
			
		||||
	n, _, errno := Syscall6(
 | 
			
		||||
		SYS_VMSPLICE,
 | 
			
		||||
		uintptr(fd),
 | 
			
		||||
		uintptr(unsafe.Pointer(&iovs[0])),
 | 
			
		||||
		uintptr(len(iovs)),
 | 
			
		||||
		uintptr(flags),
 | 
			
		||||
		0,
 | 
			
		||||
		0,
 | 
			
		||||
	)
 | 
			
		||||
	var p unsafe.Pointer
 | 
			
		||||
	if len(iovs) > 0 {
 | 
			
		||||
		p = unsafe.Pointer(&iovs[0])
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	n, _, errno := Syscall6(SYS_VMSPLICE, uintptr(fd), uintptr(p), uintptr(len(iovs)), uintptr(flags), 0, 0)
 | 
			
		||||
	if errno != 0 {
 | 
			
		||||
		return 0, syscall.Errno(errno)
 | 
			
		||||
	}
 | 
			
		||||
@@ -1590,6 +1779,93 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
 | 
			
		||||
	return EACCES
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
 | 
			
		||||
//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
 | 
			
		||||
 | 
			
		||||
// fileHandle is the argument to nameToHandleAt and openByHandleAt. We
 | 
			
		||||
// originally tried to generate it via unix/linux/types.go with "type
 | 
			
		||||
// fileHandle C.struct_file_handle" but that generated empty structs
 | 
			
		||||
// for mips64 and mips64le. Instead, hard code it for now (it's the
 | 
			
		||||
// same everywhere else) until the mips64 generator issue is fixed.
 | 
			
		||||
type fileHandle struct {
 | 
			
		||||
	Bytes uint32
 | 
			
		||||
	Type  int32
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// FileHandle represents the C struct file_handle used by
 | 
			
		||||
// name_to_handle_at (see NameToHandleAt) and open_by_handle_at (see
 | 
			
		||||
// OpenByHandleAt).
 | 
			
		||||
type FileHandle struct {
 | 
			
		||||
	*fileHandle
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewFileHandle constructs a FileHandle.
 | 
			
		||||
func NewFileHandle(handleType int32, handle []byte) FileHandle {
 | 
			
		||||
	const hdrSize = unsafe.Sizeof(fileHandle{})
 | 
			
		||||
	buf := make([]byte, hdrSize+uintptr(len(handle)))
 | 
			
		||||
	copy(buf[hdrSize:], handle)
 | 
			
		||||
	fh := (*fileHandle)(unsafe.Pointer(&buf[0]))
 | 
			
		||||
	fh.Type = handleType
 | 
			
		||||
	fh.Bytes = uint32(len(handle))
 | 
			
		||||
	return FileHandle{fh}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (fh *FileHandle) Size() int   { return int(fh.fileHandle.Bytes) }
 | 
			
		||||
func (fh *FileHandle) Type() int32 { return fh.fileHandle.Type }
 | 
			
		||||
func (fh *FileHandle) Bytes() []byte {
 | 
			
		||||
	n := fh.Size()
 | 
			
		||||
	if n == 0 {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
	return (*[1 << 30]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type)) + 4))[:n:n]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
 | 
			
		||||
// a handle for a path name.
 | 
			
		||||
func NameToHandleAt(dirfd int, path string, flags int) (handle FileHandle, mountID int, err error) {
 | 
			
		||||
	var mid _C_int
 | 
			
		||||
	// Try first with a small buffer, assuming the handle will
 | 
			
		||||
	// only be 32 bytes.
 | 
			
		||||
	size := uint32(32 + unsafe.Sizeof(fileHandle{}))
 | 
			
		||||
	didResize := false
 | 
			
		||||
	for {
 | 
			
		||||
		buf := make([]byte, size)
 | 
			
		||||
		fh := (*fileHandle)(unsafe.Pointer(&buf[0]))
 | 
			
		||||
		fh.Bytes = size - uint32(unsafe.Sizeof(fileHandle{}))
 | 
			
		||||
		err = nameToHandleAt(dirfd, path, fh, &mid, flags)
 | 
			
		||||
		if err == EOVERFLOW {
 | 
			
		||||
			if didResize {
 | 
			
		||||
				// We shouldn't need to resize more than once
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			didResize = true
 | 
			
		||||
			size = fh.Bytes + uint32(unsafe.Sizeof(fileHandle{}))
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
		return FileHandle{fh}, int(mid), nil
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OpenByHandleAt wraps the open_by_handle_at system call; it opens a
 | 
			
		||||
// file via a handle as previously returned by NameToHandleAt.
 | 
			
		||||
func OpenByHandleAt(mountFD int, handle FileHandle, flags int) (fd int, err error) {
 | 
			
		||||
	return openByHandleAt(mountFD, handle.fileHandle, flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Klogset wraps the sys_syslog system call; it sets console_loglevel to
 | 
			
		||||
// the value specified by arg and passes a dummy pointer to bufp.
 | 
			
		||||
func Klogset(typ int, arg int) (err error) {
 | 
			
		||||
	var p unsafe.Pointer
 | 
			
		||||
	_, _, errno := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(p), uintptr(arg))
 | 
			
		||||
	if errno != 0 {
 | 
			
		||||
		return errnoErr(errno)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Unimplemented
 | 
			
		||||
 */
 | 
			
		||||
@@ -1597,8 +1873,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
 | 
			
		||||
// Alarm
 | 
			
		||||
// ArchPrctl
 | 
			
		||||
// Brk
 | 
			
		||||
// Capget
 | 
			
		||||
// Capset
 | 
			
		||||
// ClockNanosleep
 | 
			
		||||
// ClockSettime
 | 
			
		||||
// Clone
 | 
			
		||||
@@ -1678,7 +1952,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
 | 
			
		||||
// Shmdt
 | 
			
		||||
// Shmget
 | 
			
		||||
// Sigaltstack
 | 
			
		||||
// Signalfd
 | 
			
		||||
// Swapoff
 | 
			
		||||
// Swapon
 | 
			
		||||
// Sysfs
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -68,6 +68,7 @@ func Pipe2(p []int, flags int) (err error) {
 | 
			
		||||
//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	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	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
 | 
			
		||||
//sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32
 | 
			
		||||
//sys	Setfsuid(uid int) (err error) = SYS_SETFSUID32
 | 
			
		||||
@@ -371,6 +372,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -20,15 +20,30 @@ package unix
 | 
			
		||||
//sysnb	Getgid() (gid int)
 | 
			
		||||
//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
 | 
			
		||||
//sysnb	Getuid() (uid int)
 | 
			
		||||
//sysnb	InotifyInit() (fd int, err error)
 | 
			
		||||
//sysnb	inotifyInit() (fd int, err error)
 | 
			
		||||
 | 
			
		||||
func InotifyInit() (fd int, err error) {
 | 
			
		||||
	// First try inotify_init1, because Android's seccomp policy blocks the latter.
 | 
			
		||||
	fd, err = InotifyInit1(0)
 | 
			
		||||
	if err == ENOSYS {
 | 
			
		||||
		fd, err = inotifyInit()
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	Ioperm(from int, num int, on int) (err error)
 | 
			
		||||
//sys	Iopl(level int) (err error)
 | 
			
		||||
//sys	Lchown(path string, uid int, gid int) (err error)
 | 
			
		||||
//sys	Listen(s int, n int) (err error)
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error)
 | 
			
		||||
 | 
			
		||||
func Lstat(path string, stat *Stat_t) (err error) {
 | 
			
		||||
	return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	Pause() (err error)
 | 
			
		||||
//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	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) {
 | 
			
		||||
@@ -148,6 +163,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										32
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -19,12 +19,18 @@ func setTimeval(sec, usec int64) Timeval {
 | 
			
		||||
	return Timeval{Sec: int32(sec), Usec: int32(usec)}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sysnb	pipe(p *[2]_C_int) (err error)
 | 
			
		||||
 | 
			
		||||
func Pipe(p []int) (err error) {
 | 
			
		||||
	if len(p) != 2 {
 | 
			
		||||
		return EINVAL
 | 
			
		||||
	}
 | 
			
		||||
	var pp [2]_C_int
 | 
			
		||||
	// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
 | 
			
		||||
	err = pipe2(&pp, 0)
 | 
			
		||||
	if err == ENOSYS {
 | 
			
		||||
		err = pipe(&pp)
 | 
			
		||||
	}
 | 
			
		||||
	p[0] = int(pp[0])
 | 
			
		||||
	p[1] = int(pp[1])
 | 
			
		||||
	return
 | 
			
		||||
@@ -89,6 +95,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 | 
			
		||||
//sys	Listen(s int, n int) (err error)
 | 
			
		||||
//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 | 
			
		||||
//sys	Pause() (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	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
 | 
			
		||||
//sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32
 | 
			
		||||
@@ -245,6 +252,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
@@ -257,3 +268,24 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 | 
			
		||||
	}
 | 
			
		||||
	return poll(&fds[0], len(fds), timeout)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
 | 
			
		||||
 | 
			
		||||
func SyncFileRange(fd int, off int64, n int64, flags int) error {
 | 
			
		||||
	// The sync_file_range and arm_sync_file_range syscalls differ only in the
 | 
			
		||||
	// order of their arguments.
 | 
			
		||||
	return armSyncFileRange(fd, flags, off, n)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
 | 
			
		||||
 | 
			
		||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
 | 
			
		||||
	cmdlineLen := len(cmdline)
 | 
			
		||||
	if cmdlineLen > 0 {
 | 
			
		||||
		// Account for the additional NULL byte added by
 | 
			
		||||
		// BytePtrFromString in kexecFileLoad. The kexec_file_load
 | 
			
		||||
		// syscall expects a NULL-terminated string.
 | 
			
		||||
		cmdlineLen++
 | 
			
		||||
	}
 | 
			
		||||
	return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -30,6 +30,7 @@ func EpollCreate(size int) (fd 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	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	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) {
 | 
			
		||||
@@ -179,6 +180,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
@@ -207,3 +212,16 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 | 
			
		||||
	}
 | 
			
		||||
	return ppoll(&fds[0], len(fds), ts, nil)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
 | 
			
		||||
 | 
			
		||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
 | 
			
		||||
	cmdlineLen := len(cmdline)
 | 
			
		||||
	if cmdlineLen > 0 {
 | 
			
		||||
		// Account for the additional NULL byte added by
 | 
			
		||||
		// BytePtrFromString in kexecFileLoad. The kexec_file_load
 | 
			
		||||
		// syscall expects a NULL-terminated string.
 | 
			
		||||
		cmdlineLen++
 | 
			
		||||
	}
 | 
			
		||||
	return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -12,7 +12,6 @@ package unix
 | 
			
		||||
//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 | 
			
		||||
//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 | 
			
		||||
//sys	Fchown(fd int, uid int, gid int) (err error)
 | 
			
		||||
//sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
 | 
			
		||||
//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
 | 
			
		||||
//sys	Ftruncate(fd int, length int64) (err error)
 | 
			
		||||
//sysnb	Getegid() (egid int)
 | 
			
		||||
@@ -25,6 +24,7 @@ package unix
 | 
			
		||||
//sys	Pause() (err error)
 | 
			
		||||
//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	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) {
 | 
			
		||||
@@ -148,6 +148,7 @@ type stat_t struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	fstat(fd int, st *stat_t) (err error)
 | 
			
		||||
//sys	fstatat(dirfd int, path string, st *stat_t, flags int) (err error) = SYS_NEWFSTATAT
 | 
			
		||||
//sys	lstat(path string, st *stat_t) (err error)
 | 
			
		||||
//sys	stat(path string, st *stat_t) (err error)
 | 
			
		||||
 | 
			
		||||
@@ -158,6 +159,13 @@ func Fstat(fd int, s *Stat_t) (err error) {
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Fstatat(dirfd int, path string, s *Stat_t, flags int) (err error) {
 | 
			
		||||
	st := &stat_t{}
 | 
			
		||||
	err = fstatat(dirfd, path, st, flags)
 | 
			
		||||
	fillStat_t(s, st)
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Lstat(path string, s *Stat_t) (err error) {
 | 
			
		||||
	st := &stat_t{}
 | 
			
		||||
	err = lstat(path, st)
 | 
			
		||||
@@ -200,6 +208,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 | 
			
		||||
//sys	Listen(s int, n int) (err error)
 | 
			
		||||
//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	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	Setfsgid(gid int) (err error)
 | 
			
		||||
@@ -219,6 +220,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -30,6 +30,7 @@ package unix
 | 
			
		||||
//sys	Pause() (err error)
 | 
			
		||||
//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	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	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 | 
			
		||||
@@ -90,6 +91,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -179,6 +179,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
@@ -207,3 +211,20 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 | 
			
		||||
	}
 | 
			
		||||
	return ppoll(&fds[0], len(fds), ts, nil)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
 | 
			
		||||
	return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
 | 
			
		||||
 | 
			
		||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
 | 
			
		||||
	cmdlineLen := len(cmdline)
 | 
			
		||||
	if cmdlineLen > 0 {
 | 
			
		||||
		// Account for the additional NULL byte added by
 | 
			
		||||
		// BytePtrFromString in kexecFileLoad. The kexec_file_load
 | 
			
		||||
		// syscall expects a NULL-terminated string.
 | 
			
		||||
		cmdlineLen++
 | 
			
		||||
	}
 | 
			
		||||
	return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -30,6 +30,7 @@ import (
 | 
			
		||||
//sys	Pause() (err error)
 | 
			
		||||
//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	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	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 | 
			
		||||
@@ -119,6 +120,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -26,6 +26,7 @@ package unix
 | 
			
		||||
//sys	Pause() (err error)
 | 
			
		||||
//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	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	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 | 
			
		||||
@@ -106,6 +107,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										85
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										85
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -18,6 +18,8 @@ import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
 | 
			
		||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
 | 
			
		||||
type SockaddrDatalink struct {
 | 
			
		||||
	Len    uint8
 | 
			
		||||
@@ -94,6 +96,18 @@ func nametomib(name string) (mib []_C_int, err error) {
 | 
			
		||||
	return mib, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
 | 
			
		||||
	mib, err := sysctlmib(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -120,9 +134,30 @@ func Pipe(p []int) (err error) {
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys getdents(fd int, buf []byte) (n int, err error)
 | 
			
		||||
//sys Getdents(fd int, buf []byte) (n int, err error)
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	return getdents(fd, buf)
 | 
			
		||||
	n, err = Getdents(fd, buf)
 | 
			
		||||
	if err != nil || basep == nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var off int64
 | 
			
		||||
	off, err = Seek(fd, 0, 1 /* SEEK_CUR */)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		*basep = ^uintptr(0)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	*basep = uintptr(off)
 | 
			
		||||
	if unsafe.Sizeof(*basep) == 8 {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	if off>>32 != 0 {
 | 
			
		||||
		// We can't stuff the offset back into a uintptr, so any
 | 
			
		||||
		// future calls would be suspect. Generate an error.
 | 
			
		||||
		// EIO is allowed by getdirentries.
 | 
			
		||||
		err = EIO
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const ImplementsGetwd = true
 | 
			
		||||
@@ -154,43 +189,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
 | 
			
		||||
 | 
			
		||||
//sys	ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
 | 
			
		||||
	var value Ptmget
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
@@ -244,6 +242,13 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Exposed directly
 | 
			
		||||
 */
 | 
			
		||||
@@ -325,7 +330,7 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Revoke(path string) (err error)
 | 
			
		||||
//sys	Rmdir(path string) (err error)
 | 
			
		||||
//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
 | 
			
		||||
//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
 | 
			
		||||
//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
 | 
			
		||||
//sysnb	Setegid(egid int) (err error)
 | 
			
		||||
//sysnb	Seteuid(euid int) (err error)
 | 
			
		||||
//sysnb	Setgid(gid int) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										37
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build arm64,netbsd
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: sec, Nsec: nsec}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func setTimeval(sec, usec int64) Timeval {
 | 
			
		||||
	return Timeval{Sec: sec, Usec: int32(usec)}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
 | 
			
		||||
	k.Ident = uint64(fd)
 | 
			
		||||
	k.Filter = uint32(mode)
 | 
			
		||||
	k.Flags = uint32(flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (iov *Iovec) SetLen(length int) {
 | 
			
		||||
	iov.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										102
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										102
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -18,6 +18,8 @@ import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 | 
			
		||||
 | 
			
		||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
 | 
			
		||||
type SockaddrDatalink struct {
 | 
			
		||||
	Len    uint8
 | 
			
		||||
@@ -43,6 +45,35 @@ func nametomib(name string) (mib []_C_int, err error) {
 | 
			
		||||
	return nil, EINVAL
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
 | 
			
		||||
	mib, err := sysctlmib(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	n := uintptr(SizeofClockinfo)
 | 
			
		||||
	var ci Clockinfo
 | 
			
		||||
	if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if n != SizeofClockinfo {
 | 
			
		||||
		return nil, EIO
 | 
			
		||||
	}
 | 
			
		||||
	return &ci, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysctlUvmexp(name string) (*Uvmexp, error) {
 | 
			
		||||
	mib, err := sysctlmib(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -72,9 +103,30 @@ func Pipe(p []int) (err error) {
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys getdents(fd int, buf []byte) (n int, err error)
 | 
			
		||||
//sys Getdents(fd int, buf []byte) (n int, err error)
 | 
			
		||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
 | 
			
		||||
	return getdents(fd, buf)
 | 
			
		||||
	n, err = Getdents(fd, buf)
 | 
			
		||||
	if err != nil || basep == nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var off int64
 | 
			
		||||
	off, err = Seek(fd, 0, 1 /* SEEK_CUR */)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		*basep = ^uintptr(0)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	*basep = uintptr(off)
 | 
			
		||||
	if unsafe.Sizeof(*basep) == 8 {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	if off>>32 != 0 {
 | 
			
		||||
		// We can't stuff the offset back into a uintptr, so any
 | 
			
		||||
		// future calls would be suspect. Generate an error.
 | 
			
		||||
		// EIO was allowed by getdirentries.
 | 
			
		||||
		err = EIO
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const ImplementsGetwd = true
 | 
			
		||||
@@ -94,6 +146,13 @@ func Getwd() (string, error) {
 | 
			
		||||
	return string(buf[:n]), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TODO
 | 
			
		||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	return -1, ENOSYS
 | 
			
		||||
@@ -121,43 +180,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
 | 
			
		||||
 | 
			
		||||
//sys	ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
// ioctl itself should not be exposed directly, but additional get/set
 | 
			
		||||
// functions for specific types are permissible.
 | 
			
		||||
 | 
			
		||||
// IoctlSetInt performs an ioctl operation which sets an integer value
 | 
			
		||||
// on fd, using the specified request number.
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) error {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IoctlGetInt performs an ioctl operation which gets an integer value
 | 
			
		||||
// from fd, using the specified request number.
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys	ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
 | 
			
		||||
 | 
			
		||||
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
 | 
			
		||||
@@ -283,7 +305,7 @@ func Uname(uname *Utsname) error {
 | 
			
		||||
//sys	Revoke(path string) (err error)
 | 
			
		||||
//sys	Rmdir(path string) (err error)
 | 
			
		||||
//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
 | 
			
		||||
//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
 | 
			
		||||
//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
 | 
			
		||||
//sysnb	Setegid(egid int) (err error)
 | 
			
		||||
//sysnb	Seteuid(euid int) (err error)
 | 
			
		||||
//sysnb	Setgid(gid int) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,6 +28,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										41
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
// Copyright 2019 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.
 | 
			
		||||
 | 
			
		||||
// +build arm64,openbsd
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
func setTimespec(sec, nsec int64) Timespec {
 | 
			
		||||
	return Timespec{Sec: sec, Nsec: nsec}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func setTimeval(sec, usec int64) Timeval {
 | 
			
		||||
	return Timeval{Sec: sec, Usec: usec}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
 | 
			
		||||
	k.Ident = uint64(fd)
 | 
			
		||||
	k.Filter = int16(mode)
 | 
			
		||||
	k.Flags = uint16(flags)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (iov *Iovec) SetLen(length int) {
 | 
			
		||||
	iov.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetControllen(length int) {
 | 
			
		||||
	msghdr.Controllen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
 | 
			
		||||
// of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
 | 
			
		||||
const SYS___SYSCTL = SYS_SYSCTL
 | 
			
		||||
							
								
								
									
										56
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										56
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -35,6 +35,22 @@ type SockaddrDatalink struct {
 | 
			
		||||
	raw    RawSockaddrDatalink
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntIno(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntReclen(buf []byte) (uint64, bool) {
 | 
			
		||||
	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func direntNamlen(buf []byte) (uint64, bool) {
 | 
			
		||||
	reclen, ok := direntReclen(buf)
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return 0, false
 | 
			
		||||
	}
 | 
			
		||||
	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sysnb	pipe(p *[2]_C_int) (n int, err error)
 | 
			
		||||
 | 
			
		||||
func Pipe(p []int) (err error) {
 | 
			
		||||
@@ -189,6 +205,7 @@ func Setgroups(gids []int) (err error) {
 | 
			
		||||
	return setgroups(len(a), &a[0])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ReadDirent reads directory entries from fd and writes them into buf.
 | 
			
		||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
 | 
			
		||||
	// Final argument is (basep *uintptr) and the syscall doesn't take nil.
 | 
			
		||||
	// TODO(rsc): Can we use a single global basep for all calls?
 | 
			
		||||
@@ -536,40 +553,10 @@ func Minor(dev uint64) uint32 {
 | 
			
		||||
 | 
			
		||||
//sys	ioctl(fd int, req uint, arg uintptr) (err error)
 | 
			
		||||
 | 
			
		||||
func IoctlSetInt(fd int, req uint, value int) (err error) {
 | 
			
		||||
	return ioctl(fd, req, uintptr(value))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ioctlSetTermios(fd int, req uint, value *Termios) (err error) {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
 | 
			
		||||
	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetInt(fd int, req uint) (int, error) {
 | 
			
		||||
	var value int
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
 | 
			
		||||
	var value Winsize
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
 | 
			
		||||
	var value Termios
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
	return &value, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func IoctlGetTermio(fd int, req uint) (*Termio, error) {
 | 
			
		||||
	var value Termio
 | 
			
		||||
	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
 | 
			
		||||
@@ -585,6 +572,13 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 | 
			
		||||
	return poll(&fds[0], len(fds), timeout)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Exposed directly
 | 
			
		||||
 */
 | 
			
		||||
@@ -655,7 +649,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 | 
			
		||||
//sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
 | 
			
		||||
//sys	Rmdir(path string) (err error)
 | 
			
		||||
//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
 | 
			
		||||
//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
 | 
			
		||||
//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
 | 
			
		||||
//sysnb	Setegid(egid int) (err error)
 | 
			
		||||
//sysnb	Seteuid(euid int) (err error)
 | 
			
		||||
//sysnb	Setgid(gid int) (err error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -18,6 +18,10 @@ func (iov *Iovec) SetLen(length int) {
 | 
			
		||||
	iov.Len = uint64(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (msghdr *Msghdr) SetIovlen(length int) {
 | 
			
		||||
	msghdr.Iovlen = int32(length)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (cmsg *Cmsghdr) SetLen(length int) {
 | 
			
		||||
	cmsg.Len = uint32(length)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										69
									
								
								vendor/golang.org/x/sys/unix/syscall_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										69
									
								
								vendor/golang.org/x/sys/unix/syscall_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,7 +8,6 @@ package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"bytes"
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"sort"
 | 
			
		||||
	"sync"
 | 
			
		||||
	"syscall"
 | 
			
		||||
@@ -21,13 +20,6 @@ var (
 | 
			
		||||
	Stderr = 2
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	darwin64Bit    = runtime.GOOS == "darwin" && SizeofPtr == 8
 | 
			
		||||
	dragonfly64Bit = runtime.GOOS == "dragonfly" && SizeofPtr == 8
 | 
			
		||||
	netbsd32Bit    = runtime.GOOS == "netbsd" && SizeofPtr == 4
 | 
			
		||||
	solaris64Bit   = runtime.GOOS == "solaris" && SizeofPtr == 8
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Do the interface allocations only once for common
 | 
			
		||||
// Errno values.
 | 
			
		||||
var (
 | 
			
		||||
@@ -36,6 +28,11 @@ var (
 | 
			
		||||
	errENOENT error = syscall.ENOENT
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	signalNameMapOnce sync.Once
 | 
			
		||||
	signalNameMap     map[string]syscall.Signal
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// errnoErr returns common boxed Errno values, to prevent
 | 
			
		||||
// allocations at runtime.
 | 
			
		||||
func errnoErr(e syscall.Errno) error {
 | 
			
		||||
@@ -74,6 +71,19 @@ func SignalName(s syscall.Signal) string {
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SignalNum returns the syscall.Signal for signal named s,
 | 
			
		||||
// or 0 if a signal with such name is not found.
 | 
			
		||||
// The signal name should start with "SIG".
 | 
			
		||||
func SignalNum(s string) syscall.Signal {
 | 
			
		||||
	signalNameMapOnce.Do(func() {
 | 
			
		||||
		signalNameMap = make(map[string]syscall.Signal)
 | 
			
		||||
		for _, signal := range signalList {
 | 
			
		||||
			signalNameMap[signal.name] = signal.num
 | 
			
		||||
		}
 | 
			
		||||
	})
 | 
			
		||||
	return signalNameMap[s]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
 | 
			
		||||
func clen(n []byte) int {
 | 
			
		||||
	i := bytes.IndexByte(n, 0)
 | 
			
		||||
@@ -284,6 +294,13 @@ func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {
 | 
			
		||||
	return &tv, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func GetsockoptUint64(fd, level, opt int) (value uint64, err error) {
 | 
			
		||||
	var n uint64
 | 
			
		||||
	vallen := _Socklen(8)
 | 
			
		||||
	err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
 | 
			
		||||
	return n, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
 | 
			
		||||
	var rsa RawSockaddrAny
 | 
			
		||||
	var len _Socklen = SizeofSockaddrAny
 | 
			
		||||
@@ -334,13 +351,21 @@ func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptString(fd, level, opt int, s string) (err error) {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
 | 
			
		||||
	var p unsafe.Pointer
 | 
			
		||||
	if len(s) > 0 {
 | 
			
		||||
		p = unsafe.Pointer(&[]byte(s)[0])
 | 
			
		||||
	}
 | 
			
		||||
	return setsockopt(fd, level, opt, p, uintptr(len(s)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetsockoptUint64(fd, level, opt int, value uint64) (err error) {
 | 
			
		||||
	return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Socket(domain, typ, proto int) (fd int, err error) {
 | 
			
		||||
	if domain == AF_INET6 && SocketDisableIPv6 {
 | 
			
		||||
		return -1, EAFNOSUPPORT
 | 
			
		||||
@@ -359,13 +384,6 @@ func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 | 
			
		||||
	if raceenabled {
 | 
			
		||||
		raceReleaseMerge(unsafe.Pointer(&ioSync))
 | 
			
		||||
	}
 | 
			
		||||
	return sendfile(outfd, infd, offset, count)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var ioSync int64
 | 
			
		||||
 | 
			
		||||
func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
 | 
			
		||||
@@ -392,3 +410,22 @@ func SetNonblock(fd int, nonblocking bool) (err error) {
 | 
			
		||||
func Exec(argv0 string, argv []string, envv []string) error {
 | 
			
		||||
	return syscall.Exec(argv0, argv, envv)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Lutimes sets the access and modification times tv on path. If path refers to
 | 
			
		||||
// a symlink, it is not dereferenced and the timestamps are set on the symlink.
 | 
			
		||||
// If tv is nil, the access and modification times are set to the current time.
 | 
			
		||||
// Otherwise tv must contain exactly 2 elements, with access time as the first
 | 
			
		||||
// element and modification time as the second element.
 | 
			
		||||
func Lutimes(path string, tv []Timeval) error {
 | 
			
		||||
	if tv == nil {
 | 
			
		||||
		return UtimesNanoAt(AT_FDCWD, path, nil, AT_SYMLINK_NOFOLLOW)
 | 
			
		||||
	}
 | 
			
		||||
	if len(tv) != 2 {
 | 
			
		||||
		return EINVAL
 | 
			
		||||
	}
 | 
			
		||||
	ts := []Timespec{
 | 
			
		||||
		NsecToTimespec(TimevalToNsec(tv[0])),
 | 
			
		||||
		NsecToTimespec(TimevalToNsec(tv[1])),
 | 
			
		||||
	}
 | 
			
		||||
	return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,6 @@
 | 
			
		||||
// Use of this source code is governed by a BSD-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
 | 
			
		||||
// +build openbsd
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -926,6 +926,8 @@ const (
 | 
			
		||||
	TCSETSF                       = 0x5404
 | 
			
		||||
	TCSETSW                       = 0x5403
 | 
			
		||||
	TCXONC                        = 0x540b
 | 
			
		||||
	TIMER_ABSTIME                 = 0x3e7
 | 
			
		||||
	TIMER_MAX                     = 0x20
 | 
			
		||||
	TIOC                          = 0x5400
 | 
			
		||||
	TIOCCBRK                      = 0x2000747a
 | 
			
		||||
	TIOCCDTR                      = 0x20007478
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build ppc64,aix
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- -maix64 _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -926,6 +926,8 @@ const (
 | 
			
		||||
	TCSETSF                       = 0x5404
 | 
			
		||||
	TCSETSW                       = 0x5403
 | 
			
		||||
	TCXONC                        = 0x540b
 | 
			
		||||
	TIMER_ABSTIME                 = 0x3e7
 | 
			
		||||
	TIMER_MAX                     = 0x20
 | 
			
		||||
	TIOC                          = 0x5400
 | 
			
		||||
	TIOCCBRK                      = 0x2000747a
 | 
			
		||||
	TIOCCDTR                      = 0x20007478
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build 386,darwin
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- -m32 _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -980,6 +980,7 @@ const (
 | 
			
		||||
	NET_RT_MAXID                      = 0xa
 | 
			
		||||
	NET_RT_STAT                       = 0x4
 | 
			
		||||
	NET_RT_TRASH                      = 0x5
 | 
			
		||||
	NFDBITS                           = 0x20
 | 
			
		||||
	NL0                               = 0x0
 | 
			
		||||
	NL1                               = 0x100
 | 
			
		||||
	NL2                               = 0x200
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build amd64,darwin
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- -m64 _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -980,6 +980,7 @@ const (
 | 
			
		||||
	NET_RT_MAXID                      = 0xa
 | 
			
		||||
	NET_RT_STAT                       = 0x4
 | 
			
		||||
	NET_RT_TRASH                      = 0x5
 | 
			
		||||
	NFDBITS                           = 0x20
 | 
			
		||||
	NL0                               = 0x0
 | 
			
		||||
	NL1                               = 0x100
 | 
			
		||||
	NL2                               = 0x200
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build arm,darwin
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -980,6 +980,7 @@ const (
 | 
			
		||||
	NET_RT_MAXID                      = 0xa
 | 
			
		||||
	NET_RT_STAT                       = 0x4
 | 
			
		||||
	NET_RT_TRASH                      = 0x5
 | 
			
		||||
	NFDBITS                           = 0x20
 | 
			
		||||
	NL0                               = 0x0
 | 
			
		||||
	NL1                               = 0x100
 | 
			
		||||
	NL2                               = 0x200
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build arm64,darwin
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- -m64 _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -980,6 +980,7 @@ const (
 | 
			
		||||
	NET_RT_MAXID                      = 0xa
 | 
			
		||||
	NET_RT_STAT                       = 0x4
 | 
			
		||||
	NET_RT_TRASH                      = 0x5
 | 
			
		||||
	NFDBITS                           = 0x20
 | 
			
		||||
	NL0                               = 0x0
 | 
			
		||||
	NL1                               = 0x100
 | 
			
		||||
	NL2                               = 0x200
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -938,6 +938,7 @@ const (
 | 
			
		||||
	NET_RT_FLAGS                      = 0x2
 | 
			
		||||
	NET_RT_IFLIST                     = 0x3
 | 
			
		||||
	NET_RT_MAXID                      = 0x4
 | 
			
		||||
	NFDBITS                           = 0x40
 | 
			
		||||
	NOFLSH                            = 0x80000000
 | 
			
		||||
	NOKERNINFO                        = 0x2000000
 | 
			
		||||
	NOTE_ATTRIB                       = 0x8
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build 386,freebsd
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- -m32 _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -1055,6 +1055,7 @@ const (
 | 
			
		||||
	NET_RT_IFLIST                  = 0x3
 | 
			
		||||
	NET_RT_IFLISTL                 = 0x5
 | 
			
		||||
	NET_RT_IFMALIST                = 0x4
 | 
			
		||||
	NFDBITS                        = 0x20
 | 
			
		||||
	NOFLSH                         = 0x80000000
 | 
			
		||||
	NOKERNINFO                     = 0x2000000
 | 
			
		||||
	NOTE_ATTRIB                    = 0x8
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build amd64,freebsd
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- -m64 _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -1056,6 +1056,7 @@ const (
 | 
			
		||||
	NET_RT_IFLIST                  = 0x3
 | 
			
		||||
	NET_RT_IFLISTL                 = 0x5
 | 
			
		||||
	NET_RT_IFMALIST                = 0x4
 | 
			
		||||
	NFDBITS                        = 0x40
 | 
			
		||||
	NOFLSH                         = 0x80000000
 | 
			
		||||
	NOKERNINFO                     = 0x2000000
 | 
			
		||||
	NOTE_ATTRIB                    = 0x8
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
// +build arm,freebsd
 | 
			
		||||
 | 
			
		||||
// Created by cgo -godefs - DO NOT EDIT
 | 
			
		||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 | 
			
		||||
// cgo -godefs -- _const.go
 | 
			
		||||
 | 
			
		||||
package unix
 | 
			
		||||
@@ -1063,6 +1063,7 @@ const (
 | 
			
		||||
	NET_RT_IFLIST                  = 0x3
 | 
			
		||||
	NET_RT_IFLISTL                 = 0x5
 | 
			
		||||
	NET_RT_IFMALIST                = 0x4
 | 
			
		||||
	NFDBITS                        = 0x20
 | 
			
		||||
	NOFLSH                         = 0x80000000
 | 
			
		||||
	NOKERNINFO                     = 0x2000000
 | 
			
		||||
	NOTE_ATTRIB                    = 0x8
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1795
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1795
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										405
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										405
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -41,7 +41,7 @@ const (
 | 
			
		||||
	AF_KEY                               = 0xf
 | 
			
		||||
	AF_LLC                               = 0x1a
 | 
			
		||||
	AF_LOCAL                             = 0x1
 | 
			
		||||
	AF_MAX                               = 0x2c
 | 
			
		||||
	AF_MAX                               = 0x2d
 | 
			
		||||
	AF_MPLS                              = 0x1c
 | 
			
		||||
	AF_NETBEUI                           = 0xd
 | 
			
		||||
	AF_NETLINK                           = 0x10
 | 
			
		||||
@@ -174,6 +174,7 @@ const (
 | 
			
		||||
	B9600                                = 0xd
 | 
			
		||||
	BALLOON_KVM_MAGIC                    = 0x13661366
 | 
			
		||||
	BDEVFS_MAGIC                         = 0x62646576
 | 
			
		||||
	BINDERFS_SUPER_MAGIC                 = 0x6c6f6f70
 | 
			
		||||
	BINFMTFS_MAGIC                       = 0x42494e4d
 | 
			
		||||
	BLKBSZGET                            = 0x80041270
 | 
			
		||||
	BLKBSZSET                            = 0x40041271
 | 
			
		||||
@@ -195,11 +196,71 @@ const (
 | 
			
		||||
	BPF_A                                = 0x10
 | 
			
		||||
	BPF_ABS                              = 0x20
 | 
			
		||||
	BPF_ADD                              = 0x0
 | 
			
		||||
	BPF_ADJ_ROOM_ENCAP_L2_MASK           = 0xff
 | 
			
		||||
	BPF_ADJ_ROOM_ENCAP_L2_SHIFT          = 0x38
 | 
			
		||||
	BPF_ALU                              = 0x4
 | 
			
		||||
	BPF_ALU64                            = 0x7
 | 
			
		||||
	BPF_AND                              = 0x50
 | 
			
		||||
	BPF_ANY                              = 0x0
 | 
			
		||||
	BPF_ARSH                             = 0xc0
 | 
			
		||||
	BPF_B                                = 0x10
 | 
			
		||||
	BPF_BUILD_ID_SIZE                    = 0x14
 | 
			
		||||
	BPF_CALL                             = 0x80
 | 
			
		||||
	BPF_DEVCG_ACC_MKNOD                  = 0x1
 | 
			
		||||
	BPF_DEVCG_ACC_READ                   = 0x2
 | 
			
		||||
	BPF_DEVCG_ACC_WRITE                  = 0x4
 | 
			
		||||
	BPF_DEVCG_DEV_BLOCK                  = 0x1
 | 
			
		||||
	BPF_DEVCG_DEV_CHAR                   = 0x2
 | 
			
		||||
	BPF_DIV                              = 0x30
 | 
			
		||||
	BPF_DW                               = 0x18
 | 
			
		||||
	BPF_END                              = 0xd0
 | 
			
		||||
	BPF_EXIST                            = 0x2
 | 
			
		||||
	BPF_EXIT                             = 0x90
 | 
			
		||||
	BPF_FROM_BE                          = 0x8
 | 
			
		||||
	BPF_FROM_LE                          = 0x0
 | 
			
		||||
	BPF_FS_MAGIC                         = 0xcafe4a11
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L3_IPV4         = 0x2
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L3_IPV6         = 0x4
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L4_GRE          = 0x8
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L4_UDP          = 0x10
 | 
			
		||||
	BPF_F_ADJ_ROOM_FIXED_GSO             = 0x1
 | 
			
		||||
	BPF_F_ALLOW_MULTI                    = 0x2
 | 
			
		||||
	BPF_F_ALLOW_OVERRIDE                 = 0x1
 | 
			
		||||
	BPF_F_ANY_ALIGNMENT                  = 0x2
 | 
			
		||||
	BPF_F_CTXLEN_MASK                    = 0xfffff00000000
 | 
			
		||||
	BPF_F_CURRENT_CPU                    = 0xffffffff
 | 
			
		||||
	BPF_F_CURRENT_NETNS                  = -0x1
 | 
			
		||||
	BPF_F_DONT_FRAGMENT                  = 0x4
 | 
			
		||||
	BPF_F_FAST_STACK_CMP                 = 0x200
 | 
			
		||||
	BPF_F_HDR_FIELD_MASK                 = 0xf
 | 
			
		||||
	BPF_F_INDEX_MASK                     = 0xffffffff
 | 
			
		||||
	BPF_F_INGRESS                        = 0x1
 | 
			
		||||
	BPF_F_INVALIDATE_HASH                = 0x2
 | 
			
		||||
	BPF_F_LOCK                           = 0x4
 | 
			
		||||
	BPF_F_MARK_ENFORCE                   = 0x40
 | 
			
		||||
	BPF_F_MARK_MANGLED_0                 = 0x20
 | 
			
		||||
	BPF_F_NO_COMMON_LRU                  = 0x2
 | 
			
		||||
	BPF_F_NO_PREALLOC                    = 0x1
 | 
			
		||||
	BPF_F_NUMA_NODE                      = 0x4
 | 
			
		||||
	BPF_F_PSEUDO_HDR                     = 0x10
 | 
			
		||||
	BPF_F_QUERY_EFFECTIVE                = 0x1
 | 
			
		||||
	BPF_F_RDONLY                         = 0x8
 | 
			
		||||
	BPF_F_RDONLY_PROG                    = 0x80
 | 
			
		||||
	BPF_F_RECOMPUTE_CSUM                 = 0x1
 | 
			
		||||
	BPF_F_REUSE_STACKID                  = 0x400
 | 
			
		||||
	BPF_F_SEQ_NUMBER                     = 0x8
 | 
			
		||||
	BPF_F_SKIP_FIELD_MASK                = 0xff
 | 
			
		||||
	BPF_F_STACK_BUILD_ID                 = 0x20
 | 
			
		||||
	BPF_F_STRICT_ALIGNMENT               = 0x1
 | 
			
		||||
	BPF_F_SYSCTL_BASE_NAME               = 0x1
 | 
			
		||||
	BPF_F_TEST_RND_HI32                  = 0x4
 | 
			
		||||
	BPF_F_TUNINFO_IPV6                   = 0x1
 | 
			
		||||
	BPF_F_USER_BUILD_ID                  = 0x800
 | 
			
		||||
	BPF_F_USER_STACK                     = 0x100
 | 
			
		||||
	BPF_F_WRONLY                         = 0x10
 | 
			
		||||
	BPF_F_WRONLY_PROG                    = 0x100
 | 
			
		||||
	BPF_F_ZERO_CSUM_TX                   = 0x2
 | 
			
		||||
	BPF_F_ZERO_SEED                      = 0x40
 | 
			
		||||
	BPF_H                                = 0x8
 | 
			
		||||
	BPF_IMM                              = 0x0
 | 
			
		||||
	BPF_IND                              = 0x40
 | 
			
		||||
@@ -207,8 +268,16 @@ const (
 | 
			
		||||
	BPF_JEQ                              = 0x10
 | 
			
		||||
	BPF_JGE                              = 0x30
 | 
			
		||||
	BPF_JGT                              = 0x20
 | 
			
		||||
	BPF_JLE                              = 0xb0
 | 
			
		||||
	BPF_JLT                              = 0xa0
 | 
			
		||||
	BPF_JMP                              = 0x5
 | 
			
		||||
	BPF_JMP32                            = 0x6
 | 
			
		||||
	BPF_JNE                              = 0x50
 | 
			
		||||
	BPF_JSET                             = 0x40
 | 
			
		||||
	BPF_JSGE                             = 0x70
 | 
			
		||||
	BPF_JSGT                             = 0x60
 | 
			
		||||
	BPF_JSLE                             = 0xd0
 | 
			
		||||
	BPF_JSLT                             = 0xc0
 | 
			
		||||
	BPF_K                                = 0x0
 | 
			
		||||
	BPF_LD                               = 0x0
 | 
			
		||||
	BPF_LDX                              = 0x1
 | 
			
		||||
@@ -222,20 +291,36 @@ const (
 | 
			
		||||
	BPF_MINOR_VERSION                    = 0x1
 | 
			
		||||
	BPF_MISC                             = 0x7
 | 
			
		||||
	BPF_MOD                              = 0x90
 | 
			
		||||
	BPF_MOV                              = 0xb0
 | 
			
		||||
	BPF_MSH                              = 0xa0
 | 
			
		||||
	BPF_MUL                              = 0x20
 | 
			
		||||
	BPF_NEG                              = 0x80
 | 
			
		||||
	BPF_NET_OFF                          = -0x100000
 | 
			
		||||
	BPF_NOEXIST                          = 0x1
 | 
			
		||||
	BPF_OBJ_NAME_LEN                     = 0x10
 | 
			
		||||
	BPF_OR                               = 0x40
 | 
			
		||||
	BPF_PSEUDO_CALL                      = 0x1
 | 
			
		||||
	BPF_PSEUDO_MAP_FD                    = 0x1
 | 
			
		||||
	BPF_PSEUDO_MAP_VALUE                 = 0x2
 | 
			
		||||
	BPF_RET                              = 0x6
 | 
			
		||||
	BPF_RSH                              = 0x70
 | 
			
		||||
	BPF_SK_STORAGE_GET_F_CREATE          = 0x1
 | 
			
		||||
	BPF_SOCK_OPS_ALL_CB_FLAGS            = 0xf
 | 
			
		||||
	BPF_SOCK_OPS_RETRANS_CB_FLAG         = 0x2
 | 
			
		||||
	BPF_SOCK_OPS_RTO_CB_FLAG             = 0x1
 | 
			
		||||
	BPF_SOCK_OPS_RTT_CB_FLAG             = 0x8
 | 
			
		||||
	BPF_SOCK_OPS_STATE_CB_FLAG           = 0x4
 | 
			
		||||
	BPF_ST                               = 0x2
 | 
			
		||||
	BPF_STX                              = 0x3
 | 
			
		||||
	BPF_SUB                              = 0x10
 | 
			
		||||
	BPF_TAG_SIZE                         = 0x8
 | 
			
		||||
	BPF_TAX                              = 0x0
 | 
			
		||||
	BPF_TO_BE                            = 0x8
 | 
			
		||||
	BPF_TO_LE                            = 0x0
 | 
			
		||||
	BPF_TXA                              = 0x80
 | 
			
		||||
	BPF_W                                = 0x0
 | 
			
		||||
	BPF_X                                = 0x8
 | 
			
		||||
	BPF_XADD                             = 0xc0
 | 
			
		||||
	BPF_XOR                              = 0xa0
 | 
			
		||||
	BRKINT                               = 0x2
 | 
			
		||||
	BS0                                  = 0x0
 | 
			
		||||
@@ -263,6 +348,45 @@ const (
 | 
			
		||||
	CAN_SFF_MASK                         = 0x7ff
 | 
			
		||||
	CAN_TP16                             = 0x3
 | 
			
		||||
	CAN_TP20                             = 0x4
 | 
			
		||||
	CAP_AUDIT_CONTROL                    = 0x1e
 | 
			
		||||
	CAP_AUDIT_READ                       = 0x25
 | 
			
		||||
	CAP_AUDIT_WRITE                      = 0x1d
 | 
			
		||||
	CAP_BLOCK_SUSPEND                    = 0x24
 | 
			
		||||
	CAP_CHOWN                            = 0x0
 | 
			
		||||
	CAP_DAC_OVERRIDE                     = 0x1
 | 
			
		||||
	CAP_DAC_READ_SEARCH                  = 0x2
 | 
			
		||||
	CAP_FOWNER                           = 0x3
 | 
			
		||||
	CAP_FSETID                           = 0x4
 | 
			
		||||
	CAP_IPC_LOCK                         = 0xe
 | 
			
		||||
	CAP_IPC_OWNER                        = 0xf
 | 
			
		||||
	CAP_KILL                             = 0x5
 | 
			
		||||
	CAP_LAST_CAP                         = 0x25
 | 
			
		||||
	CAP_LEASE                            = 0x1c
 | 
			
		||||
	CAP_LINUX_IMMUTABLE                  = 0x9
 | 
			
		||||
	CAP_MAC_ADMIN                        = 0x21
 | 
			
		||||
	CAP_MAC_OVERRIDE                     = 0x20
 | 
			
		||||
	CAP_MKNOD                            = 0x1b
 | 
			
		||||
	CAP_NET_ADMIN                        = 0xc
 | 
			
		||||
	CAP_NET_BIND_SERVICE                 = 0xa
 | 
			
		||||
	CAP_NET_BROADCAST                    = 0xb
 | 
			
		||||
	CAP_NET_RAW                          = 0xd
 | 
			
		||||
	CAP_SETFCAP                          = 0x1f
 | 
			
		||||
	CAP_SETGID                           = 0x6
 | 
			
		||||
	CAP_SETPCAP                          = 0x8
 | 
			
		||||
	CAP_SETUID                           = 0x7
 | 
			
		||||
	CAP_SYSLOG                           = 0x22
 | 
			
		||||
	CAP_SYS_ADMIN                        = 0x15
 | 
			
		||||
	CAP_SYS_BOOT                         = 0x16
 | 
			
		||||
	CAP_SYS_CHROOT                       = 0x12
 | 
			
		||||
	CAP_SYS_MODULE                       = 0x10
 | 
			
		||||
	CAP_SYS_NICE                         = 0x17
 | 
			
		||||
	CAP_SYS_PACCT                        = 0x14
 | 
			
		||||
	CAP_SYS_PTRACE                       = 0x13
 | 
			
		||||
	CAP_SYS_RAWIO                        = 0x11
 | 
			
		||||
	CAP_SYS_RESOURCE                     = 0x18
 | 
			
		||||
	CAP_SYS_TIME                         = 0x19
 | 
			
		||||
	CAP_SYS_TTY_CONFIG                   = 0x1a
 | 
			
		||||
	CAP_WAKE_ALARM                       = 0x23
 | 
			
		||||
	CBAUD                                = 0x100f
 | 
			
		||||
	CBAUDEX                              = 0x1000
 | 
			
		||||
	CFLUSH                               = 0xf
 | 
			
		||||
@@ -301,6 +425,7 @@ const (
 | 
			
		||||
	CLONE_NEWUTS                         = 0x4000000
 | 
			
		||||
	CLONE_PARENT                         = 0x8000
 | 
			
		||||
	CLONE_PARENT_SETTID                  = 0x100000
 | 
			
		||||
	CLONE_PIDFD                          = 0x1000
 | 
			
		||||
	CLONE_PTRACE                         = 0x2000
 | 
			
		||||
	CLONE_SETTLS                         = 0x80000
 | 
			
		||||
	CLONE_SIGHAND                        = 0x800
 | 
			
		||||
@@ -319,6 +444,10 @@ const (
 | 
			
		||||
	CRDLY                                = 0x600
 | 
			
		||||
	CREAD                                = 0x80
 | 
			
		||||
	CRTSCTS                              = 0x80000000
 | 
			
		||||
	CRYPTO_MAX_NAME                      = 0x40
 | 
			
		||||
	CRYPTO_MSG_MAX                       = 0x15
 | 
			
		||||
	CRYPTO_NR_MSGTYPES                   = 0x6
 | 
			
		||||
	CRYPTO_REPORT_MAXSIZE                = 0x160
 | 
			
		||||
	CS5                                  = 0x0
 | 
			
		||||
	CS6                                  = 0x10
 | 
			
		||||
	CS7                                  = 0x20
 | 
			
		||||
@@ -333,6 +462,7 @@ const (
 | 
			
		||||
	DAXFS_MAGIC                          = 0x64646178
 | 
			
		||||
	DEBUGFS_MAGIC                        = 0x64626720
 | 
			
		||||
	DEVPTS_SUPER_MAGIC                   = 0x1cd1
 | 
			
		||||
	DMA_BUF_MAGIC                        = 0x444d4142
 | 
			
		||||
	DT_BLK                               = 0x6
 | 
			
		||||
	DT_CHR                               = 0x2
 | 
			
		||||
	DT_DIR                               = 0x4
 | 
			
		||||
@@ -413,6 +543,7 @@ const (
 | 
			
		||||
	ETH_P_DNA_RC                         = 0x6002
 | 
			
		||||
	ETH_P_DNA_RT                         = 0x6003
 | 
			
		||||
	ETH_P_DSA                            = 0x1b
 | 
			
		||||
	ETH_P_DSA_8021Q                      = 0xdadb
 | 
			
		||||
	ETH_P_ECONET                         = 0x18
 | 
			
		||||
	ETH_P_EDSA                           = 0xdada
 | 
			
		||||
	ETH_P_ERSPAN                         = 0x88be
 | 
			
		||||
@@ -432,6 +563,7 @@ const (
 | 
			
		||||
	ETH_P_IRDA                           = 0x17
 | 
			
		||||
	ETH_P_LAT                            = 0x6004
 | 
			
		||||
	ETH_P_LINK_CTL                       = 0x886c
 | 
			
		||||
	ETH_P_LLDP                           = 0x88cc
 | 
			
		||||
	ETH_P_LOCALTALK                      = 0x9
 | 
			
		||||
	ETH_P_LOOP                           = 0x60
 | 
			
		||||
	ETH_P_LOOPBACK                       = 0x9000
 | 
			
		||||
@@ -486,6 +618,60 @@ const (
 | 
			
		||||
	FALLOC_FL_PUNCH_HOLE                 = 0x2
 | 
			
		||||
	FALLOC_FL_UNSHARE_RANGE              = 0x40
 | 
			
		||||
	FALLOC_FL_ZERO_RANGE                 = 0x10
 | 
			
		||||
	FANOTIFY_METADATA_VERSION            = 0x3
 | 
			
		||||
	FAN_ACCESS                           = 0x1
 | 
			
		||||
	FAN_ACCESS_PERM                      = 0x20000
 | 
			
		||||
	FAN_ALLOW                            = 0x1
 | 
			
		||||
	FAN_ALL_CLASS_BITS                   = 0xc
 | 
			
		||||
	FAN_ALL_EVENTS                       = 0x3b
 | 
			
		||||
	FAN_ALL_INIT_FLAGS                   = 0x3f
 | 
			
		||||
	FAN_ALL_MARK_FLAGS                   = 0xff
 | 
			
		||||
	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
 | 
			
		||||
	FAN_ALL_PERM_EVENTS                  = 0x30000
 | 
			
		||||
	FAN_ATTRIB                           = 0x4
 | 
			
		||||
	FAN_AUDIT                            = 0x10
 | 
			
		||||
	FAN_CLASS_CONTENT                    = 0x4
 | 
			
		||||
	FAN_CLASS_NOTIF                      = 0x0
 | 
			
		||||
	FAN_CLASS_PRE_CONTENT                = 0x8
 | 
			
		||||
	FAN_CLOEXEC                          = 0x1
 | 
			
		||||
	FAN_CLOSE                            = 0x18
 | 
			
		||||
	FAN_CLOSE_NOWRITE                    = 0x10
 | 
			
		||||
	FAN_CLOSE_WRITE                      = 0x8
 | 
			
		||||
	FAN_CREATE                           = 0x100
 | 
			
		||||
	FAN_DELETE                           = 0x200
 | 
			
		||||
	FAN_DELETE_SELF                      = 0x400
 | 
			
		||||
	FAN_DENY                             = 0x2
 | 
			
		||||
	FAN_ENABLE_AUDIT                     = 0x40
 | 
			
		||||
	FAN_EVENT_INFO_TYPE_FID              = 0x1
 | 
			
		||||
	FAN_EVENT_METADATA_LEN               = 0x18
 | 
			
		||||
	FAN_EVENT_ON_CHILD                   = 0x8000000
 | 
			
		||||
	FAN_MARK_ADD                         = 0x1
 | 
			
		||||
	FAN_MARK_DONT_FOLLOW                 = 0x4
 | 
			
		||||
	FAN_MARK_FILESYSTEM                  = 0x100
 | 
			
		||||
	FAN_MARK_FLUSH                       = 0x80
 | 
			
		||||
	FAN_MARK_IGNORED_MASK                = 0x20
 | 
			
		||||
	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
 | 
			
		||||
	FAN_MARK_INODE                       = 0x0
 | 
			
		||||
	FAN_MARK_MOUNT                       = 0x10
 | 
			
		||||
	FAN_MARK_ONLYDIR                     = 0x8
 | 
			
		||||
	FAN_MARK_REMOVE                      = 0x2
 | 
			
		||||
	FAN_MODIFY                           = 0x2
 | 
			
		||||
	FAN_MOVE                             = 0xc0
 | 
			
		||||
	FAN_MOVED_FROM                       = 0x40
 | 
			
		||||
	FAN_MOVED_TO                         = 0x80
 | 
			
		||||
	FAN_MOVE_SELF                        = 0x800
 | 
			
		||||
	FAN_NOFD                             = -0x1
 | 
			
		||||
	FAN_NONBLOCK                         = 0x2
 | 
			
		||||
	FAN_ONDIR                            = 0x40000000
 | 
			
		||||
	FAN_OPEN                             = 0x20
 | 
			
		||||
	FAN_OPEN_EXEC                        = 0x1000
 | 
			
		||||
	FAN_OPEN_EXEC_PERM                   = 0x40000
 | 
			
		||||
	FAN_OPEN_PERM                        = 0x10000
 | 
			
		||||
	FAN_Q_OVERFLOW                       = 0x4000
 | 
			
		||||
	FAN_REPORT_FID                       = 0x200
 | 
			
		||||
	FAN_REPORT_TID                       = 0x100
 | 
			
		||||
	FAN_UNLIMITED_MARKS                  = 0x20
 | 
			
		||||
	FAN_UNLIMITED_QUEUE                  = 0x10
 | 
			
		||||
	FD_CLOEXEC                           = 0x1
 | 
			
		||||
	FD_SETSIZE                           = 0x400
 | 
			
		||||
	FF0                                  = 0x0
 | 
			
		||||
@@ -493,6 +679,7 @@ const (
 | 
			
		||||
	FFDLY                                = 0x8000
 | 
			
		||||
	FLUSHO                               = 0x1000
 | 
			
		||||
	FP_XSTATE_MAGIC2                     = 0x46505845
 | 
			
		||||
	FS_ENCRYPTION_MODE_ADIANTUM          = 0x9
 | 
			
		||||
	FS_ENCRYPTION_MODE_AES_128_CBC       = 0x5
 | 
			
		||||
	FS_ENCRYPTION_MODE_AES_128_CTS       = 0x6
 | 
			
		||||
	FS_ENCRYPTION_MODE_AES_256_CBC       = 0x3
 | 
			
		||||
@@ -514,7 +701,7 @@ const (
 | 
			
		||||
	FS_POLICY_FLAGS_PAD_4                = 0x0
 | 
			
		||||
	FS_POLICY_FLAGS_PAD_8                = 0x1
 | 
			
		||||
	FS_POLICY_FLAGS_PAD_MASK             = 0x3
 | 
			
		||||
	FS_POLICY_FLAGS_VALID                = 0x3
 | 
			
		||||
	FS_POLICY_FLAGS_VALID                = 0x7
 | 
			
		||||
	FUTEXFS_SUPER_MAGIC                  = 0xbad1dea
 | 
			
		||||
	F_ADD_SEALS                          = 0x409
 | 
			
		||||
	F_DUPFD                              = 0x0
 | 
			
		||||
@@ -539,6 +726,7 @@ const (
 | 
			
		||||
	F_OFD_SETLKW                         = 0x26
 | 
			
		||||
	F_OK                                 = 0x0
 | 
			
		||||
	F_RDLCK                              = 0x0
 | 
			
		||||
	F_SEAL_FUTURE_WRITE                  = 0x10
 | 
			
		||||
	F_SEAL_GROW                          = 0x4
 | 
			
		||||
	F_SEAL_SEAL                          = 0x1
 | 
			
		||||
	F_SEAL_SHRINK                        = 0x2
 | 
			
		||||
@@ -639,7 +827,7 @@ const (
 | 
			
		||||
	IFA_F_STABLE_PRIVACY                 = 0x800
 | 
			
		||||
	IFA_F_TEMPORARY                      = 0x1
 | 
			
		||||
	IFA_F_TENTATIVE                      = 0x40
 | 
			
		||||
	IFA_MAX                              = 0x9
 | 
			
		||||
	IFA_MAX                              = 0xa
 | 
			
		||||
	IFF_ALLMULTI                         = 0x200
 | 
			
		||||
	IFF_ATTACH_QUEUE                     = 0x200
 | 
			
		||||
	IFF_AUTOMEDIA                        = 0x4000
 | 
			
		||||
@@ -707,6 +895,7 @@ const (
 | 
			
		||||
	IN_ISDIR                             = 0x40000000
 | 
			
		||||
	IN_LOOPBACKNET                       = 0x7f
 | 
			
		||||
	IN_MASK_ADD                          = 0x20000000
 | 
			
		||||
	IN_MASK_CREATE                       = 0x10000000
 | 
			
		||||
	IN_MODIFY                            = 0x2
 | 
			
		||||
	IN_MOVE                              = 0xc0
 | 
			
		||||
	IN_MOVED_FROM                        = 0x40
 | 
			
		||||
@@ -778,6 +967,7 @@ const (
 | 
			
		||||
	IPV6_MINHOPCOUNT                     = 0x49
 | 
			
		||||
	IPV6_MTU                             = 0x18
 | 
			
		||||
	IPV6_MTU_DISCOVER                    = 0x17
 | 
			
		||||
	IPV6_MULTICAST_ALL                   = 0x1d
 | 
			
		||||
	IPV6_MULTICAST_HOPS                  = 0x12
 | 
			
		||||
	IPV6_MULTICAST_IF                    = 0x11
 | 
			
		||||
	IPV6_MULTICAST_LOOP                  = 0x13
 | 
			
		||||
@@ -802,6 +992,7 @@ const (
 | 
			
		||||
	IPV6_RECVRTHDR                       = 0x38
 | 
			
		||||
	IPV6_RECVTCLASS                      = 0x42
 | 
			
		||||
	IPV6_ROUTER_ALERT                    = 0x16
 | 
			
		||||
	IPV6_ROUTER_ALERT_ISOLATE            = 0x1e
 | 
			
		||||
	IPV6_RTHDR                           = 0x39
 | 
			
		||||
	IPV6_RTHDRDSTOPTS                    = 0x37
 | 
			
		||||
	IPV6_RTHDR_LOOSE                     = 0x0
 | 
			
		||||
@@ -900,6 +1091,17 @@ const (
 | 
			
		||||
	KEXEC_PRESERVE_CONTEXT               = 0x2
 | 
			
		||||
	KEXEC_SEGMENT_MAX                    = 0x10
 | 
			
		||||
	KEYCTL_ASSUME_AUTHORITY              = 0x10
 | 
			
		||||
	KEYCTL_CAPABILITIES                  = 0x1f
 | 
			
		||||
	KEYCTL_CAPS0_BIG_KEY                 = 0x10
 | 
			
		||||
	KEYCTL_CAPS0_CAPABILITIES            = 0x1
 | 
			
		||||
	KEYCTL_CAPS0_DIFFIE_HELLMAN          = 0x4
 | 
			
		||||
	KEYCTL_CAPS0_INVALIDATE              = 0x20
 | 
			
		||||
	KEYCTL_CAPS0_MOVE                    = 0x80
 | 
			
		||||
	KEYCTL_CAPS0_PERSISTENT_KEYRINGS     = 0x2
 | 
			
		||||
	KEYCTL_CAPS0_PUBLIC_KEY              = 0x8
 | 
			
		||||
	KEYCTL_CAPS0_RESTRICT_KEYRING        = 0x40
 | 
			
		||||
	KEYCTL_CAPS1_NS_KEYRING_NAME         = 0x1
 | 
			
		||||
	KEYCTL_CAPS1_NS_KEY_TAG              = 0x2
 | 
			
		||||
	KEYCTL_CHOWN                         = 0x4
 | 
			
		||||
	KEYCTL_CLEAR                         = 0x7
 | 
			
		||||
	KEYCTL_DESCRIBE                      = 0x6
 | 
			
		||||
@@ -912,7 +1114,14 @@ const (
 | 
			
		||||
	KEYCTL_INVALIDATE                    = 0x15
 | 
			
		||||
	KEYCTL_JOIN_SESSION_KEYRING          = 0x1
 | 
			
		||||
	KEYCTL_LINK                          = 0x8
 | 
			
		||||
	KEYCTL_MOVE                          = 0x1e
 | 
			
		||||
	KEYCTL_MOVE_EXCL                     = 0x1
 | 
			
		||||
	KEYCTL_NEGATE                        = 0xd
 | 
			
		||||
	KEYCTL_PKEY_DECRYPT                  = 0x1a
 | 
			
		||||
	KEYCTL_PKEY_ENCRYPT                  = 0x19
 | 
			
		||||
	KEYCTL_PKEY_QUERY                    = 0x18
 | 
			
		||||
	KEYCTL_PKEY_SIGN                     = 0x1b
 | 
			
		||||
	KEYCTL_PKEY_VERIFY                   = 0x1c
 | 
			
		||||
	KEYCTL_READ                          = 0xb
 | 
			
		||||
	KEYCTL_REJECT                        = 0x13
 | 
			
		||||
	KEYCTL_RESTRICT_KEYRING              = 0x1d
 | 
			
		||||
@@ -922,6 +1131,10 @@ const (
 | 
			
		||||
	KEYCTL_SETPERM                       = 0x5
 | 
			
		||||
	KEYCTL_SET_REQKEY_KEYRING            = 0xe
 | 
			
		||||
	KEYCTL_SET_TIMEOUT                   = 0xf
 | 
			
		||||
	KEYCTL_SUPPORTS_DECRYPT              = 0x2
 | 
			
		||||
	KEYCTL_SUPPORTS_ENCRYPT              = 0x1
 | 
			
		||||
	KEYCTL_SUPPORTS_SIGN                 = 0x4
 | 
			
		||||
	KEYCTL_SUPPORTS_VERIFY               = 0x8
 | 
			
		||||
	KEYCTL_UNLINK                        = 0x9
 | 
			
		||||
	KEYCTL_UPDATE                        = 0x2
 | 
			
		||||
	KEY_REQKEY_DEFL_DEFAULT              = 0x0
 | 
			
		||||
@@ -955,6 +1168,20 @@ const (
 | 
			
		||||
	LOCK_NB                              = 0x4
 | 
			
		||||
	LOCK_SH                              = 0x1
 | 
			
		||||
	LOCK_UN                              = 0x8
 | 
			
		||||
	LOOP_CLR_FD                          = 0x4c01
 | 
			
		||||
	LOOP_CTL_ADD                         = 0x4c80
 | 
			
		||||
	LOOP_CTL_GET_FREE                    = 0x4c82
 | 
			
		||||
	LOOP_CTL_REMOVE                      = 0x4c81
 | 
			
		||||
	LOOP_GET_STATUS                      = 0x4c03
 | 
			
		||||
	LOOP_GET_STATUS64                    = 0x4c05
 | 
			
		||||
	LOOP_SET_BLOCK_SIZE                  = 0x4c09
 | 
			
		||||
	LOOP_SET_CAPACITY                    = 0x4c07
 | 
			
		||||
	LOOP_SET_DIRECT_IO                   = 0x4c08
 | 
			
		||||
	LOOP_SET_FD                          = 0x4c00
 | 
			
		||||
	LOOP_SET_STATUS                      = 0x4c02
 | 
			
		||||
	LOOP_SET_STATUS64                    = 0x4c04
 | 
			
		||||
	LO_KEY_SIZE                          = 0x20
 | 
			
		||||
	LO_NAME_SIZE                         = 0x40
 | 
			
		||||
	MADV_DODUMP                          = 0x11
 | 
			
		||||
	MADV_DOFORK                          = 0xb
 | 
			
		||||
	MADV_DONTDUMP                        = 0x10
 | 
			
		||||
@@ -995,6 +1222,15 @@ const (
 | 
			
		||||
	MAP_STACK                            = 0x20000
 | 
			
		||||
	MAP_SYNC                             = 0x80000
 | 
			
		||||
	MAP_TYPE                             = 0xf
 | 
			
		||||
	MCAST_BLOCK_SOURCE                   = 0x2b
 | 
			
		||||
	MCAST_EXCLUDE                        = 0x0
 | 
			
		||||
	MCAST_INCLUDE                        = 0x1
 | 
			
		||||
	MCAST_JOIN_GROUP                     = 0x2a
 | 
			
		||||
	MCAST_JOIN_SOURCE_GROUP              = 0x2e
 | 
			
		||||
	MCAST_LEAVE_GROUP                    = 0x2d
 | 
			
		||||
	MCAST_LEAVE_SOURCE_GROUP             = 0x2f
 | 
			
		||||
	MCAST_MSFILTER                       = 0x30
 | 
			
		||||
	MCAST_UNBLOCK_SOURCE                 = 0x2c
 | 
			
		||||
	MCL_CURRENT                          = 0x1
 | 
			
		||||
	MCL_FUTURE                           = 0x2
 | 
			
		||||
	MCL_ONFAULT                          = 0x4
 | 
			
		||||
@@ -1101,6 +1337,7 @@ const (
 | 
			
		||||
	NETLINK_FIB_LOOKUP                   = 0xa
 | 
			
		||||
	NETLINK_FIREWALL                     = 0x3
 | 
			
		||||
	NETLINK_GENERIC                      = 0x10
 | 
			
		||||
	NETLINK_GET_STRICT_CHK               = 0xc
 | 
			
		||||
	NETLINK_INET_DIAG                    = 0x4
 | 
			
		||||
	NETLINK_IP6_FW                       = 0xd
 | 
			
		||||
	NETLINK_ISCSI                        = 0x8
 | 
			
		||||
@@ -1122,8 +1359,9 @@ const (
 | 
			
		||||
	NETLINK_UNUSED                       = 0x1
 | 
			
		||||
	NETLINK_USERSOCK                     = 0x2
 | 
			
		||||
	NETLINK_XFRM                         = 0x6
 | 
			
		||||
	NETNSA_MAX                           = 0x3
 | 
			
		||||
	NETNSA_MAX                           = 0x5
 | 
			
		||||
	NETNSA_NSID_NOT_ASSIGNED             = -0x1
 | 
			
		||||
	NFDBITS                              = 0x20
 | 
			
		||||
	NFNETLINK_V0                         = 0x0
 | 
			
		||||
	NFNLGRP_ACCT_QUOTA                   = 0x8
 | 
			
		||||
	NFNLGRP_CONNTRACK_DESTROY            = 0x3
 | 
			
		||||
@@ -1188,6 +1426,10 @@ const (
 | 
			
		||||
	NLM_F_ROOT                           = 0x100
 | 
			
		||||
	NOFLSH                               = 0x80
 | 
			
		||||
	NSFS_MAGIC                           = 0x6e736673
 | 
			
		||||
	NS_GET_NSTYPE                        = 0xb703
 | 
			
		||||
	NS_GET_OWNER_UID                     = 0xb704
 | 
			
		||||
	NS_GET_PARENT                        = 0xb702
 | 
			
		||||
	NS_GET_USERNS                        = 0xb701
 | 
			
		||||
	OCFS2_SUPER_MAGIC                    = 0x7461636f
 | 
			
		||||
	OCRNL                                = 0x8
 | 
			
		||||
	OFDEL                                = 0x80
 | 
			
		||||
@@ -1244,6 +1486,7 @@ const (
 | 
			
		||||
	PACKET_FASTROUTE                     = 0x6
 | 
			
		||||
	PACKET_HDRLEN                        = 0xb
 | 
			
		||||
	PACKET_HOST                          = 0x0
 | 
			
		||||
	PACKET_IGNORE_OUTGOING               = 0x17
 | 
			
		||||
	PACKET_KERNEL                        = 0x7
 | 
			
		||||
	PACKET_LOOPBACK                      = 0x5
 | 
			
		||||
	PACKET_LOSS                          = 0xe
 | 
			
		||||
@@ -1385,6 +1628,12 @@ const (
 | 
			
		||||
	PR_MCE_KILL_SET                      = 0x1
 | 
			
		||||
	PR_MPX_DISABLE_MANAGEMENT            = 0x2c
 | 
			
		||||
	PR_MPX_ENABLE_MANAGEMENT             = 0x2b
 | 
			
		||||
	PR_PAC_APDAKEY                       = 0x4
 | 
			
		||||
	PR_PAC_APDBKEY                       = 0x8
 | 
			
		||||
	PR_PAC_APGAKEY                       = 0x10
 | 
			
		||||
	PR_PAC_APIAKEY                       = 0x1
 | 
			
		||||
	PR_PAC_APIBKEY                       = 0x2
 | 
			
		||||
	PR_PAC_RESET_KEYS                    = 0x36
 | 
			
		||||
	PR_SET_CHILD_SUBREAPER               = 0x24
 | 
			
		||||
	PR_SET_DUMPABLE                      = 0x4
 | 
			
		||||
	PR_SET_ENDIAN                        = 0x14
 | 
			
		||||
@@ -1422,8 +1671,10 @@ const (
 | 
			
		||||
	PR_SET_TSC                           = 0x1a
 | 
			
		||||
	PR_SET_UNALIGN                       = 0x6
 | 
			
		||||
	PR_SPEC_DISABLE                      = 0x4
 | 
			
		||||
	PR_SPEC_DISABLE_NOEXEC               = 0x10
 | 
			
		||||
	PR_SPEC_ENABLE                       = 0x2
 | 
			
		||||
	PR_SPEC_FORCE_DISABLE                = 0x8
 | 
			
		||||
	PR_SPEC_INDIRECT_BRANCH              = 0x1
 | 
			
		||||
	PR_SPEC_NOT_AFFECTED                 = 0x0
 | 
			
		||||
	PR_SPEC_PRCTL                        = 0x1
 | 
			
		||||
	PR_SPEC_STORE_BYPASS                 = 0x0
 | 
			
		||||
@@ -1444,6 +1695,8 @@ const (
 | 
			
		||||
	PTRACE_ATTACH                        = 0x10
 | 
			
		||||
	PTRACE_CONT                          = 0x7
 | 
			
		||||
	PTRACE_DETACH                        = 0x11
 | 
			
		||||
	PTRACE_EVENTMSG_SYSCALL_ENTRY        = 0x1
 | 
			
		||||
	PTRACE_EVENTMSG_SYSCALL_EXIT         = 0x2
 | 
			
		||||
	PTRACE_EVENT_CLONE                   = 0x3
 | 
			
		||||
	PTRACE_EVENT_EXEC                    = 0x4
 | 
			
		||||
	PTRACE_EVENT_EXIT                    = 0x6
 | 
			
		||||
@@ -1459,6 +1712,7 @@ const (
 | 
			
		||||
	PTRACE_GETREGSET                     = 0x4204
 | 
			
		||||
	PTRACE_GETSIGINFO                    = 0x4202
 | 
			
		||||
	PTRACE_GETSIGMASK                    = 0x420a
 | 
			
		||||
	PTRACE_GET_SYSCALL_INFO              = 0x420e
 | 
			
		||||
	PTRACE_GET_THREAD_AREA               = 0x19
 | 
			
		||||
	PTRACE_INTERRUPT                     = 0x4207
 | 
			
		||||
	PTRACE_KILL                          = 0x8
 | 
			
		||||
@@ -1497,6 +1751,10 @@ const (
 | 
			
		||||
	PTRACE_SINGLEBLOCK                   = 0x21
 | 
			
		||||
	PTRACE_SINGLESTEP                    = 0x9
 | 
			
		||||
	PTRACE_SYSCALL                       = 0x18
 | 
			
		||||
	PTRACE_SYSCALL_INFO_ENTRY            = 0x1
 | 
			
		||||
	PTRACE_SYSCALL_INFO_EXIT             = 0x2
 | 
			
		||||
	PTRACE_SYSCALL_INFO_NONE             = 0x0
 | 
			
		||||
	PTRACE_SYSCALL_INFO_SECCOMP          = 0x3
 | 
			
		||||
	PTRACE_SYSEMU                        = 0x1f
 | 
			
		||||
	PTRACE_SYSEMU_SINGLESTEP             = 0x20
 | 
			
		||||
	PTRACE_TRACEME                       = 0x0
 | 
			
		||||
@@ -1525,6 +1783,13 @@ const (
 | 
			
		||||
	RLIMIT_SIGPENDING                    = 0xb
 | 
			
		||||
	RLIMIT_STACK                         = 0x3
 | 
			
		||||
	RLIM_INFINITY                        = 0xffffffffffffffff
 | 
			
		||||
	RNDADDENTROPY                        = 0x40085203
 | 
			
		||||
	RNDADDTOENTCNT                       = 0x40045201
 | 
			
		||||
	RNDCLEARPOOL                         = 0x5206
 | 
			
		||||
	RNDGETENTCNT                         = 0x80045200
 | 
			
		||||
	RNDGETPOOL                           = 0x80085202
 | 
			
		||||
	RNDRESEEDCRNG                        = 0x5207
 | 
			
		||||
	RNDZAPENTCNT                         = 0x5204
 | 
			
		||||
	RTAX_ADVMSS                          = 0x8
 | 
			
		||||
	RTAX_CC_ALGO                         = 0x10
 | 
			
		||||
	RTAX_CWND                            = 0x7
 | 
			
		||||
@@ -1550,7 +1815,7 @@ const (
 | 
			
		||||
	RTAX_UNSPEC                          = 0x0
 | 
			
		||||
	RTAX_WINDOW                          = 0x3
 | 
			
		||||
	RTA_ALIGNTO                          = 0x4
 | 
			
		||||
	RTA_MAX                              = 0x1d
 | 
			
		||||
	RTA_MAX                              = 0x1e
 | 
			
		||||
	RTCF_DIRECTSRC                       = 0x4000000
 | 
			
		||||
	RTCF_DOREDIRECT                      = 0x1000000
 | 
			
		||||
	RTCF_LOG                             = 0x2000000
 | 
			
		||||
@@ -1623,6 +1888,7 @@ const (
 | 
			
		||||
	RTM_DELMDB                           = 0x55
 | 
			
		||||
	RTM_DELNEIGH                         = 0x1d
 | 
			
		||||
	RTM_DELNETCONF                       = 0x51
 | 
			
		||||
	RTM_DELNEXTHOP                       = 0x69
 | 
			
		||||
	RTM_DELNSID                          = 0x59
 | 
			
		||||
	RTM_DELQDISC                         = 0x25
 | 
			
		||||
	RTM_DELROUTE                         = 0x19
 | 
			
		||||
@@ -1647,6 +1913,7 @@ const (
 | 
			
		||||
	RTM_GETNEIGH                         = 0x1e
 | 
			
		||||
	RTM_GETNEIGHTBL                      = 0x42
 | 
			
		||||
	RTM_GETNETCONF                       = 0x52
 | 
			
		||||
	RTM_GETNEXTHOP                       = 0x6a
 | 
			
		||||
	RTM_GETNSID                          = 0x5a
 | 
			
		||||
	RTM_GETQDISC                         = 0x26
 | 
			
		||||
	RTM_GETROUTE                         = 0x1a
 | 
			
		||||
@@ -1654,7 +1921,7 @@ const (
 | 
			
		||||
	RTM_GETSTATS                         = 0x5e
 | 
			
		||||
	RTM_GETTCLASS                        = 0x2a
 | 
			
		||||
	RTM_GETTFILTER                       = 0x2e
 | 
			
		||||
	RTM_MAX                              = 0x67
 | 
			
		||||
	RTM_MAX                              = 0x6b
 | 
			
		||||
	RTM_NEWACTION                        = 0x30
 | 
			
		||||
	RTM_NEWADDR                          = 0x14
 | 
			
		||||
	RTM_NEWADDRLABEL                     = 0x48
 | 
			
		||||
@@ -1666,6 +1933,7 @@ const (
 | 
			
		||||
	RTM_NEWNEIGH                         = 0x1c
 | 
			
		||||
	RTM_NEWNEIGHTBL                      = 0x40
 | 
			
		||||
	RTM_NEWNETCONF                       = 0x50
 | 
			
		||||
	RTM_NEWNEXTHOP                       = 0x68
 | 
			
		||||
	RTM_NEWNSID                          = 0x58
 | 
			
		||||
	RTM_NEWPREFIX                        = 0x34
 | 
			
		||||
	RTM_NEWQDISC                         = 0x24
 | 
			
		||||
@@ -1674,8 +1942,8 @@ const (
 | 
			
		||||
	RTM_NEWSTATS                         = 0x5c
 | 
			
		||||
	RTM_NEWTCLASS                        = 0x28
 | 
			
		||||
	RTM_NEWTFILTER                       = 0x2c
 | 
			
		||||
	RTM_NR_FAMILIES                      = 0x16
 | 
			
		||||
	RTM_NR_MSGTYPES                      = 0x58
 | 
			
		||||
	RTM_NR_FAMILIES                      = 0x17
 | 
			
		||||
	RTM_NR_MSGTYPES                      = 0x5c
 | 
			
		||||
	RTM_SETDCB                           = 0x4f
 | 
			
		||||
	RTM_SETLINK                          = 0x13
 | 
			
		||||
	RTM_SETNEIGHTBL                      = 0x43
 | 
			
		||||
@@ -1732,6 +2000,8 @@ const (
 | 
			
		||||
	SECCOMP_MODE_STRICT                  = 0x1
 | 
			
		||||
	SECURITYFS_MAGIC                     = 0x73636673
 | 
			
		||||
	SELINUX_MAGIC                        = 0xf97cff8c
 | 
			
		||||
	SFD_CLOEXEC                          = 0x80000
 | 
			
		||||
	SFD_NONBLOCK                         = 0x800
 | 
			
		||||
	SHUT_RD                              = 0x0
 | 
			
		||||
	SHUT_RDWR                            = 0x2
 | 
			
		||||
	SHUT_WR                              = 0x1
 | 
			
		||||
@@ -1758,6 +2028,8 @@ const (
 | 
			
		||||
	SIOCDRARP                            = 0x8960
 | 
			
		||||
	SIOCETHTOOL                          = 0x8946
 | 
			
		||||
	SIOCGARP                             = 0x8954
 | 
			
		||||
	SIOCGETLINKNAME                      = 0x89e0
 | 
			
		||||
	SIOCGETNODEID                        = 0x89e1
 | 
			
		||||
	SIOCGHWTSTAMP                        = 0x89b1
 | 
			
		||||
	SIOCGIFADDR                          = 0x8915
 | 
			
		||||
	SIOCGIFBR                            = 0x8940
 | 
			
		||||
@@ -1789,6 +2061,10 @@ const (
 | 
			
		||||
	SIOCGSKNS                            = 0x894c
 | 
			
		||||
	SIOCGSTAMP                           = 0x8906
 | 
			
		||||
	SIOCGSTAMPNS                         = 0x8907
 | 
			
		||||
	SIOCGSTAMPNS_NEW                     = 0x80108907
 | 
			
		||||
	SIOCGSTAMPNS_OLD                     = 0x8907
 | 
			
		||||
	SIOCGSTAMP_NEW                       = 0x80108906
 | 
			
		||||
	SIOCGSTAMP_OLD                       = 0x8906
 | 
			
		||||
	SIOCINQ                              = 0x541b
 | 
			
		||||
	SIOCOUTQ                             = 0x5411
 | 
			
		||||
	SIOCOUTQNSD                          = 0x894b
 | 
			
		||||
@@ -1882,6 +2158,7 @@ const (
 | 
			
		||||
	SO_ATTACH_REUSEPORT_CBPF             = 0x33
 | 
			
		||||
	SO_ATTACH_REUSEPORT_EBPF             = 0x34
 | 
			
		||||
	SO_BINDTODEVICE                      = 0x19
 | 
			
		||||
	SO_BINDTOIFINDEX                     = 0x3e
 | 
			
		||||
	SO_BPF_EXTENSIONS                    = 0x30
 | 
			
		||||
	SO_BROADCAST                         = 0x6
 | 
			
		||||
	SO_BSDCOMPAT                         = 0xe
 | 
			
		||||
@@ -1891,8 +2168,20 @@ const (
 | 
			
		||||
	SO_DEBUG                             = 0x1
 | 
			
		||||
	SO_DETACH_BPF                        = 0x1b
 | 
			
		||||
	SO_DETACH_FILTER                     = 0x1b
 | 
			
		||||
	SO_DETACH_REUSEPORT_BPF              = 0x44
 | 
			
		||||
	SO_DOMAIN                            = 0x27
 | 
			
		||||
	SO_DONTROUTE                         = 0x5
 | 
			
		||||
	SO_EE_CODE_TXTIME_INVALID_PARAM      = 0x1
 | 
			
		||||
	SO_EE_CODE_TXTIME_MISSED             = 0x2
 | 
			
		||||
	SO_EE_CODE_ZEROCOPY_COPIED           = 0x1
 | 
			
		||||
	SO_EE_ORIGIN_ICMP                    = 0x2
 | 
			
		||||
	SO_EE_ORIGIN_ICMP6                   = 0x3
 | 
			
		||||
	SO_EE_ORIGIN_LOCAL                   = 0x1
 | 
			
		||||
	SO_EE_ORIGIN_NONE                    = 0x0
 | 
			
		||||
	SO_EE_ORIGIN_TIMESTAMPING            = 0x4
 | 
			
		||||
	SO_EE_ORIGIN_TXSTATUS                = 0x4
 | 
			
		||||
	SO_EE_ORIGIN_TXTIME                  = 0x6
 | 
			
		||||
	SO_EE_ORIGIN_ZEROCOPY                = 0x5
 | 
			
		||||
	SO_ERROR                             = 0x4
 | 
			
		||||
	SO_GET_FILTER                        = 0x1a
 | 
			
		||||
	SO_INCOMING_CPU                      = 0x31
 | 
			
		||||
@@ -1919,6 +2208,8 @@ const (
 | 
			
		||||
	SO_RCVBUFFORCE                       = 0x21
 | 
			
		||||
	SO_RCVLOWAT                          = 0x12
 | 
			
		||||
	SO_RCVTIMEO                          = 0x14
 | 
			
		||||
	SO_RCVTIMEO_NEW                      = 0x42
 | 
			
		||||
	SO_RCVTIMEO_OLD                      = 0x14
 | 
			
		||||
	SO_REUSEADDR                         = 0x2
 | 
			
		||||
	SO_REUSEPORT                         = 0xf
 | 
			
		||||
	SO_RXQ_OVFL                          = 0x28
 | 
			
		||||
@@ -1930,9 +2221,17 @@ const (
 | 
			
		||||
	SO_SNDBUFFORCE                       = 0x20
 | 
			
		||||
	SO_SNDLOWAT                          = 0x13
 | 
			
		||||
	SO_SNDTIMEO                          = 0x15
 | 
			
		||||
	SO_SNDTIMEO_NEW                      = 0x43
 | 
			
		||||
	SO_SNDTIMEO_OLD                      = 0x15
 | 
			
		||||
	SO_TIMESTAMP                         = 0x1d
 | 
			
		||||
	SO_TIMESTAMPING                      = 0x25
 | 
			
		||||
	SO_TIMESTAMPING_NEW                  = 0x41
 | 
			
		||||
	SO_TIMESTAMPING_OLD                  = 0x25
 | 
			
		||||
	SO_TIMESTAMPNS                       = 0x23
 | 
			
		||||
	SO_TIMESTAMPNS_NEW                   = 0x40
 | 
			
		||||
	SO_TIMESTAMPNS_OLD                   = 0x23
 | 
			
		||||
	SO_TIMESTAMP_NEW                     = 0x3f
 | 
			
		||||
	SO_TIMESTAMP_OLD                     = 0x1d
 | 
			
		||||
	SO_TXTIME                            = 0x3d
 | 
			
		||||
	SO_TYPE                              = 0x3
 | 
			
		||||
	SO_VM_SOCKETS_BUFFER_MAX_SIZE        = 0x2
 | 
			
		||||
@@ -1974,6 +2273,7 @@ const (
 | 
			
		||||
	SYNC_FILE_RANGE_WAIT_AFTER           = 0x4
 | 
			
		||||
	SYNC_FILE_RANGE_WAIT_BEFORE          = 0x1
 | 
			
		||||
	SYNC_FILE_RANGE_WRITE                = 0x2
 | 
			
		||||
	SYNC_FILE_RANGE_WRITE_AND_WAIT       = 0x7
 | 
			
		||||
	SYSFS_MAGIC                          = 0x62656572
 | 
			
		||||
	S_BLKSIZE                            = 0x200
 | 
			
		||||
	S_IEXEC                              = 0x40
 | 
			
		||||
@@ -2012,7 +2312,7 @@ const (
 | 
			
		||||
	TASKSTATS_GENL_NAME                  = "TASKSTATS"
 | 
			
		||||
	TASKSTATS_GENL_VERSION               = 0x1
 | 
			
		||||
	TASKSTATS_TYPE_MAX                   = 0x6
 | 
			
		||||
	TASKSTATS_VERSION                    = 0x8
 | 
			
		||||
	TASKSTATS_VERSION                    = 0x9
 | 
			
		||||
	TCFLSH                               = 0x540b
 | 
			
		||||
	TCGETA                               = 0x5405
 | 
			
		||||
	TCGETS                               = 0x5401
 | 
			
		||||
@@ -2025,7 +2325,10 @@ const (
 | 
			
		||||
	TCOFLUSH                             = 0x1
 | 
			
		||||
	TCOOFF                               = 0x0
 | 
			
		||||
	TCOON                                = 0x1
 | 
			
		||||
	TCP_BPF_IW                           = 0x3e9
 | 
			
		||||
	TCP_BPF_SNDCWND_CLAMP                = 0x3ea
 | 
			
		||||
	TCP_CC_INFO                          = 0x1a
 | 
			
		||||
	TCP_CM_INQ                           = 0x24
 | 
			
		||||
	TCP_CONGESTION                       = 0xd
 | 
			
		||||
	TCP_COOKIE_IN_ALWAYS                 = 0x1
 | 
			
		||||
	TCP_COOKIE_MAX                       = 0x10
 | 
			
		||||
@@ -2040,6 +2343,7 @@ const (
 | 
			
		||||
	TCP_FASTOPEN_KEY                     = 0x21
 | 
			
		||||
	TCP_FASTOPEN_NO_COOKIE               = 0x22
 | 
			
		||||
	TCP_INFO                             = 0xb
 | 
			
		||||
	TCP_INQ                              = 0x24
 | 
			
		||||
	TCP_KEEPCNT                          = 0x6
 | 
			
		||||
	TCP_KEEPIDLE                         = 0x4
 | 
			
		||||
	TCP_KEEPINTVL                        = 0x5
 | 
			
		||||
@@ -2059,6 +2363,9 @@ const (
 | 
			
		||||
	TCP_QUEUE_SEQ                        = 0x15
 | 
			
		||||
	TCP_QUICKACK                         = 0xc
 | 
			
		||||
	TCP_REPAIR                           = 0x13
 | 
			
		||||
	TCP_REPAIR_OFF                       = 0x0
 | 
			
		||||
	TCP_REPAIR_OFF_NO_WP                 = -0x1
 | 
			
		||||
	TCP_REPAIR_ON                        = 0x1
 | 
			
		||||
	TCP_REPAIR_OPTIONS                   = 0x16
 | 
			
		||||
	TCP_REPAIR_QUEUE                     = 0x14
 | 
			
		||||
	TCP_REPAIR_WINDOW                    = 0x1d
 | 
			
		||||
@@ -2073,6 +2380,7 @@ const (
 | 
			
		||||
	TCP_ULP                              = 0x1f
 | 
			
		||||
	TCP_USER_TIMEOUT                     = 0x12
 | 
			
		||||
	TCP_WINDOW_CLAMP                     = 0xa
 | 
			
		||||
	TCP_ZEROCOPY_RECEIVE                 = 0x23
 | 
			
		||||
	TCSAFLUSH                            = 0x2
 | 
			
		||||
	TCSBRK                               = 0x5409
 | 
			
		||||
	TCSBRKP                              = 0x5425
 | 
			
		||||
@@ -2089,6 +2397,7 @@ const (
 | 
			
		||||
	TCSETXF                              = 0x5434
 | 
			
		||||
	TCSETXW                              = 0x5435
 | 
			
		||||
	TCXONC                               = 0x540a
 | 
			
		||||
	TIMER_ABSTIME                        = 0x1
 | 
			
		||||
	TIOCCBRK                             = 0x5428
 | 
			
		||||
	TIOCCONS                             = 0x541d
 | 
			
		||||
	TIOCEXCL                             = 0x540c
 | 
			
		||||
@@ -2096,6 +2405,7 @@ const (
 | 
			
		||||
	TIOCGETD                             = 0x5424
 | 
			
		||||
	TIOCGEXCL                            = 0x80045440
 | 
			
		||||
	TIOCGICOUNT                          = 0x545d
 | 
			
		||||
	TIOCGISO7816                         = 0x80285442
 | 
			
		||||
	TIOCGLCKTRMIOS                       = 0x5456
 | 
			
		||||
	TIOCGPGRP                            = 0x540f
 | 
			
		||||
	TIOCGPKT                             = 0x80045438
 | 
			
		||||
@@ -2149,6 +2459,7 @@ const (
 | 
			
		||||
	TIOCSER_TEMT                         = 0x1
 | 
			
		||||
	TIOCSETD                             = 0x5423
 | 
			
		||||
	TIOCSIG                              = 0x40045436
 | 
			
		||||
	TIOCSISO7816                         = 0xc0285443
 | 
			
		||||
	TIOCSLCKTRMIOS                       = 0x5457
 | 
			
		||||
	TIOCSPGRP                            = 0x5410
 | 
			
		||||
	TIOCSPTLCK                           = 0x40045431
 | 
			
		||||
@@ -2158,6 +2469,71 @@ const (
 | 
			
		||||
	TIOCSTI                              = 0x5412
 | 
			
		||||
	TIOCSWINSZ                           = 0x5414
 | 
			
		||||
	TIOCVHANGUP                          = 0x5437
 | 
			
		||||
	TIPC_ADDR_ID                         = 0x3
 | 
			
		||||
	TIPC_ADDR_MCAST                      = 0x1
 | 
			
		||||
	TIPC_ADDR_NAME                       = 0x2
 | 
			
		||||
	TIPC_ADDR_NAMESEQ                    = 0x1
 | 
			
		||||
	TIPC_CFG_SRV                         = 0x0
 | 
			
		||||
	TIPC_CLUSTER_BITS                    = 0xc
 | 
			
		||||
	TIPC_CLUSTER_MASK                    = 0xfff000
 | 
			
		||||
	TIPC_CLUSTER_OFFSET                  = 0xc
 | 
			
		||||
	TIPC_CLUSTER_SIZE                    = 0xfff
 | 
			
		||||
	TIPC_CONN_SHUTDOWN                   = 0x5
 | 
			
		||||
	TIPC_CONN_TIMEOUT                    = 0x82
 | 
			
		||||
	TIPC_CRITICAL_IMPORTANCE             = 0x3
 | 
			
		||||
	TIPC_DESTNAME                        = 0x3
 | 
			
		||||
	TIPC_DEST_DROPPABLE                  = 0x81
 | 
			
		||||
	TIPC_ERRINFO                         = 0x1
 | 
			
		||||
	TIPC_ERR_NO_NAME                     = 0x1
 | 
			
		||||
	TIPC_ERR_NO_NODE                     = 0x3
 | 
			
		||||
	TIPC_ERR_NO_PORT                     = 0x2
 | 
			
		||||
	TIPC_ERR_OVERLOAD                    = 0x4
 | 
			
		||||
	TIPC_GROUP_JOIN                      = 0x87
 | 
			
		||||
	TIPC_GROUP_LEAVE                     = 0x88
 | 
			
		||||
	TIPC_GROUP_LOOPBACK                  = 0x1
 | 
			
		||||
	TIPC_GROUP_MEMBER_EVTS               = 0x2
 | 
			
		||||
	TIPC_HIGH_IMPORTANCE                 = 0x2
 | 
			
		||||
	TIPC_IMPORTANCE                      = 0x7f
 | 
			
		||||
	TIPC_LINK_STATE                      = 0x2
 | 
			
		||||
	TIPC_LOW_IMPORTANCE                  = 0x0
 | 
			
		||||
	TIPC_MAX_BEARER_NAME                 = 0x20
 | 
			
		||||
	TIPC_MAX_IF_NAME                     = 0x10
 | 
			
		||||
	TIPC_MAX_LINK_NAME                   = 0x44
 | 
			
		||||
	TIPC_MAX_MEDIA_NAME                  = 0x10
 | 
			
		||||
	TIPC_MAX_USER_MSG_SIZE               = 0x101d0
 | 
			
		||||
	TIPC_MCAST_BROADCAST                 = 0x85
 | 
			
		||||
	TIPC_MCAST_REPLICAST                 = 0x86
 | 
			
		||||
	TIPC_MEDIUM_IMPORTANCE               = 0x1
 | 
			
		||||
	TIPC_NODEID_LEN                      = 0x10
 | 
			
		||||
	TIPC_NODE_BITS                       = 0xc
 | 
			
		||||
	TIPC_NODE_MASK                       = 0xfff
 | 
			
		||||
	TIPC_NODE_OFFSET                     = 0x0
 | 
			
		||||
	TIPC_NODE_RECVQ_DEPTH                = 0x83
 | 
			
		||||
	TIPC_NODE_SIZE                       = 0xfff
 | 
			
		||||
	TIPC_NODE_STATE                      = 0x0
 | 
			
		||||
	TIPC_OK                              = 0x0
 | 
			
		||||
	TIPC_PUBLISHED                       = 0x1
 | 
			
		||||
	TIPC_RESERVED_TYPES                  = 0x40
 | 
			
		||||
	TIPC_RETDATA                         = 0x2
 | 
			
		||||
	TIPC_SERVICE_ADDR                    = 0x2
 | 
			
		||||
	TIPC_SERVICE_RANGE                   = 0x1
 | 
			
		||||
	TIPC_SOCKET_ADDR                     = 0x3
 | 
			
		||||
	TIPC_SOCK_RECVQ_DEPTH                = 0x84
 | 
			
		||||
	TIPC_SOCK_RECVQ_USED                 = 0x89
 | 
			
		||||
	TIPC_SRC_DROPPABLE                   = 0x80
 | 
			
		||||
	TIPC_SUBSCR_TIMEOUT                  = 0x3
 | 
			
		||||
	TIPC_SUB_CANCEL                      = 0x4
 | 
			
		||||
	TIPC_SUB_PORTS                       = 0x1
 | 
			
		||||
	TIPC_SUB_SERVICE                     = 0x2
 | 
			
		||||
	TIPC_TOP_SRV                         = 0x1
 | 
			
		||||
	TIPC_WAIT_FOREVER                    = 0xffffffff
 | 
			
		||||
	TIPC_WITHDRAWN                       = 0x2
 | 
			
		||||
	TIPC_ZONE_BITS                       = 0x8
 | 
			
		||||
	TIPC_ZONE_CLUSTER_MASK               = 0xfffff000
 | 
			
		||||
	TIPC_ZONE_MASK                       = 0xff000000
 | 
			
		||||
	TIPC_ZONE_OFFSET                     = 0x18
 | 
			
		||||
	TIPC_ZONE_SCOPE                      = 0x1
 | 
			
		||||
	TIPC_ZONE_SIZE                       = 0xff
 | 
			
		||||
	TMPFS_MAGIC                          = 0x1021994
 | 
			
		||||
	TOSTOP                               = 0x100
 | 
			
		||||
	TPACKET_ALIGNMENT                    = 0x10
 | 
			
		||||
@@ -2171,7 +2547,7 @@ const (
 | 
			
		||||
	TP_STATUS_LOSING                     = 0x4
 | 
			
		||||
	TP_STATUS_SENDING                    = 0x2
 | 
			
		||||
	TP_STATUS_SEND_REQUEST               = 0x1
 | 
			
		||||
	TP_STATUS_TS_RAW_HARDWARE            = -0x80000000
 | 
			
		||||
	TP_STATUS_TS_RAW_HARDWARE            = 0x80000000
 | 
			
		||||
	TP_STATUS_TS_SOFTWARE                = 0x20000000
 | 
			
		||||
	TP_STATUS_TS_SYS_HARDWARE            = 0x40000000
 | 
			
		||||
	TP_STATUS_USER                       = 0x1
 | 
			
		||||
@@ -2182,6 +2558,7 @@ const (
 | 
			
		||||
	TS_COMM_LEN                          = 0x20
 | 
			
		||||
	TUNATTACHFILTER                      = 0x400854d5
 | 
			
		||||
	TUNDETACHFILTER                      = 0x400854d6
 | 
			
		||||
	TUNGETDEVNETNS                       = 0x54e3
 | 
			
		||||
	TUNGETFEATURES                       = 0x800454cf
 | 
			
		||||
	TUNGETFILTER                         = 0x800854db
 | 
			
		||||
	TUNGETIFF                            = 0x800454d2
 | 
			
		||||
@@ -2189,6 +2566,7 @@ const (
 | 
			
		||||
	TUNGETVNETBE                         = 0x800454df
 | 
			
		||||
	TUNGETVNETHDRSZ                      = 0x800454d7
 | 
			
		||||
	TUNGETVNETLE                         = 0x800454dd
 | 
			
		||||
	TUNSETCARRIER                        = 0x400454e2
 | 
			
		||||
	TUNSETDEBUG                          = 0x400454c9
 | 
			
		||||
	TUNSETFILTEREBPF                     = 0x800454e1
 | 
			
		||||
	TUNSETGROUP                          = 0x400454ce
 | 
			
		||||
@@ -2216,8 +2594,10 @@ const (
 | 
			
		||||
	UBI_IOCMKVOL                         = 0x40986f00
 | 
			
		||||
	UBI_IOCRMVOL                         = 0x40046f01
 | 
			
		||||
	UBI_IOCRNVOL                         = 0x51106f03
 | 
			
		||||
	UBI_IOCRPEB                          = 0x40046f04
 | 
			
		||||
	UBI_IOCRSVOL                         = 0x400c6f02
 | 
			
		||||
	UBI_IOCSETVOLPROP                    = 0x40104f06
 | 
			
		||||
	UBI_IOCSPEB                          = 0x40046f05
 | 
			
		||||
	UBI_IOCVOLCRBLK                      = 0x40804f07
 | 
			
		||||
	UBI_IOCVOLRMBLK                      = 0x4f08
 | 
			
		||||
	UBI_IOCVOLUP                         = 0x40084f00
 | 
			
		||||
@@ -2366,6 +2746,9 @@ const (
 | 
			
		||||
	XDP_FLAGS_SKB_MODE                   = 0x2
 | 
			
		||||
	XDP_FLAGS_UPDATE_IF_NOEXIST          = 0x1
 | 
			
		||||
	XDP_MMAP_OFFSETS                     = 0x1
 | 
			
		||||
	XDP_OPTIONS                          = 0x8
 | 
			
		||||
	XDP_OPTIONS_ZEROCOPY                 = 0x1
 | 
			
		||||
	XDP_PACKET_HEADROOM                  = 0x100
 | 
			
		||||
	XDP_PGOFF_RX_RING                    = 0x0
 | 
			
		||||
	XDP_PGOFF_TX_RING                    = 0x80000000
 | 
			
		||||
	XDP_RX_RING                          = 0x2
 | 
			
		||||
@@ -2379,7 +2762,9 @@ const (
 | 
			
		||||
	XDP_UMEM_REG                         = 0x4
 | 
			
		||||
	XDP_ZEROCOPY                         = 0x4
 | 
			
		||||
	XENFS_SUPER_MAGIC                    = 0xabba1974
 | 
			
		||||
	XFS_SUPER_MAGIC                      = 0x58465342
 | 
			
		||||
	XTABS                                = 0x1800
 | 
			
		||||
	Z3FOLD_MAGIC                         = 0x33
 | 
			
		||||
	ZSMALLOC_MAGIC                       = 0x58295829
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										405
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										405
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -41,7 +41,7 @@ const (
 | 
			
		||||
	AF_KEY                               = 0xf
 | 
			
		||||
	AF_LLC                               = 0x1a
 | 
			
		||||
	AF_LOCAL                             = 0x1
 | 
			
		||||
	AF_MAX                               = 0x2c
 | 
			
		||||
	AF_MAX                               = 0x2d
 | 
			
		||||
	AF_MPLS                              = 0x1c
 | 
			
		||||
	AF_NETBEUI                           = 0xd
 | 
			
		||||
	AF_NETLINK                           = 0x10
 | 
			
		||||
@@ -174,6 +174,7 @@ const (
 | 
			
		||||
	B9600                                = 0xd
 | 
			
		||||
	BALLOON_KVM_MAGIC                    = 0x13661366
 | 
			
		||||
	BDEVFS_MAGIC                         = 0x62646576
 | 
			
		||||
	BINDERFS_SUPER_MAGIC                 = 0x6c6f6f70
 | 
			
		||||
	BINFMTFS_MAGIC                       = 0x42494e4d
 | 
			
		||||
	BLKBSZGET                            = 0x80081270
 | 
			
		||||
	BLKBSZSET                            = 0x40081271
 | 
			
		||||
@@ -195,11 +196,71 @@ const (
 | 
			
		||||
	BPF_A                                = 0x10
 | 
			
		||||
	BPF_ABS                              = 0x20
 | 
			
		||||
	BPF_ADD                              = 0x0
 | 
			
		||||
	BPF_ADJ_ROOM_ENCAP_L2_MASK           = 0xff
 | 
			
		||||
	BPF_ADJ_ROOM_ENCAP_L2_SHIFT          = 0x38
 | 
			
		||||
	BPF_ALU                              = 0x4
 | 
			
		||||
	BPF_ALU64                            = 0x7
 | 
			
		||||
	BPF_AND                              = 0x50
 | 
			
		||||
	BPF_ANY                              = 0x0
 | 
			
		||||
	BPF_ARSH                             = 0xc0
 | 
			
		||||
	BPF_B                                = 0x10
 | 
			
		||||
	BPF_BUILD_ID_SIZE                    = 0x14
 | 
			
		||||
	BPF_CALL                             = 0x80
 | 
			
		||||
	BPF_DEVCG_ACC_MKNOD                  = 0x1
 | 
			
		||||
	BPF_DEVCG_ACC_READ                   = 0x2
 | 
			
		||||
	BPF_DEVCG_ACC_WRITE                  = 0x4
 | 
			
		||||
	BPF_DEVCG_DEV_BLOCK                  = 0x1
 | 
			
		||||
	BPF_DEVCG_DEV_CHAR                   = 0x2
 | 
			
		||||
	BPF_DIV                              = 0x30
 | 
			
		||||
	BPF_DW                               = 0x18
 | 
			
		||||
	BPF_END                              = 0xd0
 | 
			
		||||
	BPF_EXIST                            = 0x2
 | 
			
		||||
	BPF_EXIT                             = 0x90
 | 
			
		||||
	BPF_FROM_BE                          = 0x8
 | 
			
		||||
	BPF_FROM_LE                          = 0x0
 | 
			
		||||
	BPF_FS_MAGIC                         = 0xcafe4a11
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L3_IPV4         = 0x2
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L3_IPV6         = 0x4
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L4_GRE          = 0x8
 | 
			
		||||
	BPF_F_ADJ_ROOM_ENCAP_L4_UDP          = 0x10
 | 
			
		||||
	BPF_F_ADJ_ROOM_FIXED_GSO             = 0x1
 | 
			
		||||
	BPF_F_ALLOW_MULTI                    = 0x2
 | 
			
		||||
	BPF_F_ALLOW_OVERRIDE                 = 0x1
 | 
			
		||||
	BPF_F_ANY_ALIGNMENT                  = 0x2
 | 
			
		||||
	BPF_F_CTXLEN_MASK                    = 0xfffff00000000
 | 
			
		||||
	BPF_F_CURRENT_CPU                    = 0xffffffff
 | 
			
		||||
	BPF_F_CURRENT_NETNS                  = -0x1
 | 
			
		||||
	BPF_F_DONT_FRAGMENT                  = 0x4
 | 
			
		||||
	BPF_F_FAST_STACK_CMP                 = 0x200
 | 
			
		||||
	BPF_F_HDR_FIELD_MASK                 = 0xf
 | 
			
		||||
	BPF_F_INDEX_MASK                     = 0xffffffff
 | 
			
		||||
	BPF_F_INGRESS                        = 0x1
 | 
			
		||||
	BPF_F_INVALIDATE_HASH                = 0x2
 | 
			
		||||
	BPF_F_LOCK                           = 0x4
 | 
			
		||||
	BPF_F_MARK_ENFORCE                   = 0x40
 | 
			
		||||
	BPF_F_MARK_MANGLED_0                 = 0x20
 | 
			
		||||
	BPF_F_NO_COMMON_LRU                  = 0x2
 | 
			
		||||
	BPF_F_NO_PREALLOC                    = 0x1
 | 
			
		||||
	BPF_F_NUMA_NODE                      = 0x4
 | 
			
		||||
	BPF_F_PSEUDO_HDR                     = 0x10
 | 
			
		||||
	BPF_F_QUERY_EFFECTIVE                = 0x1
 | 
			
		||||
	BPF_F_RDONLY                         = 0x8
 | 
			
		||||
	BPF_F_RDONLY_PROG                    = 0x80
 | 
			
		||||
	BPF_F_RECOMPUTE_CSUM                 = 0x1
 | 
			
		||||
	BPF_F_REUSE_STACKID                  = 0x400
 | 
			
		||||
	BPF_F_SEQ_NUMBER                     = 0x8
 | 
			
		||||
	BPF_F_SKIP_FIELD_MASK                = 0xff
 | 
			
		||||
	BPF_F_STACK_BUILD_ID                 = 0x20
 | 
			
		||||
	BPF_F_STRICT_ALIGNMENT               = 0x1
 | 
			
		||||
	BPF_F_SYSCTL_BASE_NAME               = 0x1
 | 
			
		||||
	BPF_F_TEST_RND_HI32                  = 0x4
 | 
			
		||||
	BPF_F_TUNINFO_IPV6                   = 0x1
 | 
			
		||||
	BPF_F_USER_BUILD_ID                  = 0x800
 | 
			
		||||
	BPF_F_USER_STACK                     = 0x100
 | 
			
		||||
	BPF_F_WRONLY                         = 0x10
 | 
			
		||||
	BPF_F_WRONLY_PROG                    = 0x100
 | 
			
		||||
	BPF_F_ZERO_CSUM_TX                   = 0x2
 | 
			
		||||
	BPF_F_ZERO_SEED                      = 0x40
 | 
			
		||||
	BPF_H                                = 0x8
 | 
			
		||||
	BPF_IMM                              = 0x0
 | 
			
		||||
	BPF_IND                              = 0x40
 | 
			
		||||
@@ -207,8 +268,16 @@ const (
 | 
			
		||||
	BPF_JEQ                              = 0x10
 | 
			
		||||
	BPF_JGE                              = 0x30
 | 
			
		||||
	BPF_JGT                              = 0x20
 | 
			
		||||
	BPF_JLE                              = 0xb0
 | 
			
		||||
	BPF_JLT                              = 0xa0
 | 
			
		||||
	BPF_JMP                              = 0x5
 | 
			
		||||
	BPF_JMP32                            = 0x6
 | 
			
		||||
	BPF_JNE                              = 0x50
 | 
			
		||||
	BPF_JSET                             = 0x40
 | 
			
		||||
	BPF_JSGE                             = 0x70
 | 
			
		||||
	BPF_JSGT                             = 0x60
 | 
			
		||||
	BPF_JSLE                             = 0xd0
 | 
			
		||||
	BPF_JSLT                             = 0xc0
 | 
			
		||||
	BPF_K                                = 0x0
 | 
			
		||||
	BPF_LD                               = 0x0
 | 
			
		||||
	BPF_LDX                              = 0x1
 | 
			
		||||
@@ -222,20 +291,36 @@ const (
 | 
			
		||||
	BPF_MINOR_VERSION                    = 0x1
 | 
			
		||||
	BPF_MISC                             = 0x7
 | 
			
		||||
	BPF_MOD                              = 0x90
 | 
			
		||||
	BPF_MOV                              = 0xb0
 | 
			
		||||
	BPF_MSH                              = 0xa0
 | 
			
		||||
	BPF_MUL                              = 0x20
 | 
			
		||||
	BPF_NEG                              = 0x80
 | 
			
		||||
	BPF_NET_OFF                          = -0x100000
 | 
			
		||||
	BPF_NOEXIST                          = 0x1
 | 
			
		||||
	BPF_OBJ_NAME_LEN                     = 0x10
 | 
			
		||||
	BPF_OR                               = 0x40
 | 
			
		||||
	BPF_PSEUDO_CALL                      = 0x1
 | 
			
		||||
	BPF_PSEUDO_MAP_FD                    = 0x1
 | 
			
		||||
	BPF_PSEUDO_MAP_VALUE                 = 0x2
 | 
			
		||||
	BPF_RET                              = 0x6
 | 
			
		||||
	BPF_RSH                              = 0x70
 | 
			
		||||
	BPF_SK_STORAGE_GET_F_CREATE          = 0x1
 | 
			
		||||
	BPF_SOCK_OPS_ALL_CB_FLAGS            = 0xf
 | 
			
		||||
	BPF_SOCK_OPS_RETRANS_CB_FLAG         = 0x2
 | 
			
		||||
	BPF_SOCK_OPS_RTO_CB_FLAG             = 0x1
 | 
			
		||||
	BPF_SOCK_OPS_RTT_CB_FLAG             = 0x8
 | 
			
		||||
	BPF_SOCK_OPS_STATE_CB_FLAG           = 0x4
 | 
			
		||||
	BPF_ST                               = 0x2
 | 
			
		||||
	BPF_STX                              = 0x3
 | 
			
		||||
	BPF_SUB                              = 0x10
 | 
			
		||||
	BPF_TAG_SIZE                         = 0x8
 | 
			
		||||
	BPF_TAX                              = 0x0
 | 
			
		||||
	BPF_TO_BE                            = 0x8
 | 
			
		||||
	BPF_TO_LE                            = 0x0
 | 
			
		||||
	BPF_TXA                              = 0x80
 | 
			
		||||
	BPF_W                                = 0x0
 | 
			
		||||
	BPF_X                                = 0x8
 | 
			
		||||
	BPF_XADD                             = 0xc0
 | 
			
		||||
	BPF_XOR                              = 0xa0
 | 
			
		||||
	BRKINT                               = 0x2
 | 
			
		||||
	BS0                                  = 0x0
 | 
			
		||||
@@ -263,6 +348,45 @@ const (
 | 
			
		||||
	CAN_SFF_MASK                         = 0x7ff
 | 
			
		||||
	CAN_TP16                             = 0x3
 | 
			
		||||
	CAN_TP20                             = 0x4
 | 
			
		||||
	CAP_AUDIT_CONTROL                    = 0x1e
 | 
			
		||||
	CAP_AUDIT_READ                       = 0x25
 | 
			
		||||
	CAP_AUDIT_WRITE                      = 0x1d
 | 
			
		||||
	CAP_BLOCK_SUSPEND                    = 0x24
 | 
			
		||||
	CAP_CHOWN                            = 0x0
 | 
			
		||||
	CAP_DAC_OVERRIDE                     = 0x1
 | 
			
		||||
	CAP_DAC_READ_SEARCH                  = 0x2
 | 
			
		||||
	CAP_FOWNER                           = 0x3
 | 
			
		||||
	CAP_FSETID                           = 0x4
 | 
			
		||||
	CAP_IPC_LOCK                         = 0xe
 | 
			
		||||
	CAP_IPC_OWNER                        = 0xf
 | 
			
		||||
	CAP_KILL                             = 0x5
 | 
			
		||||
	CAP_LAST_CAP                         = 0x25
 | 
			
		||||
	CAP_LEASE                            = 0x1c
 | 
			
		||||
	CAP_LINUX_IMMUTABLE                  = 0x9
 | 
			
		||||
	CAP_MAC_ADMIN                        = 0x21
 | 
			
		||||
	CAP_MAC_OVERRIDE                     = 0x20
 | 
			
		||||
	CAP_MKNOD                            = 0x1b
 | 
			
		||||
	CAP_NET_ADMIN                        = 0xc
 | 
			
		||||
	CAP_NET_BIND_SERVICE                 = 0xa
 | 
			
		||||
	CAP_NET_BROADCAST                    = 0xb
 | 
			
		||||
	CAP_NET_RAW                          = 0xd
 | 
			
		||||
	CAP_SETFCAP                          = 0x1f
 | 
			
		||||
	CAP_SETGID                           = 0x6
 | 
			
		||||
	CAP_SETPCAP                          = 0x8
 | 
			
		||||
	CAP_SETUID                           = 0x7
 | 
			
		||||
	CAP_SYSLOG                           = 0x22
 | 
			
		||||
	CAP_SYS_ADMIN                        = 0x15
 | 
			
		||||
	CAP_SYS_BOOT                         = 0x16
 | 
			
		||||
	CAP_SYS_CHROOT                       = 0x12
 | 
			
		||||
	CAP_SYS_MODULE                       = 0x10
 | 
			
		||||
	CAP_SYS_NICE                         = 0x17
 | 
			
		||||
	CAP_SYS_PACCT                        = 0x14
 | 
			
		||||
	CAP_SYS_PTRACE                       = 0x13
 | 
			
		||||
	CAP_SYS_RAWIO                        = 0x11
 | 
			
		||||
	CAP_SYS_RESOURCE                     = 0x18
 | 
			
		||||
	CAP_SYS_TIME                         = 0x19
 | 
			
		||||
	CAP_SYS_TTY_CONFIG                   = 0x1a
 | 
			
		||||
	CAP_WAKE_ALARM                       = 0x23
 | 
			
		||||
	CBAUD                                = 0x100f
 | 
			
		||||
	CBAUDEX                              = 0x1000
 | 
			
		||||
	CFLUSH                               = 0xf
 | 
			
		||||
@@ -301,6 +425,7 @@ const (
 | 
			
		||||
	CLONE_NEWUTS                         = 0x4000000
 | 
			
		||||
	CLONE_PARENT                         = 0x8000
 | 
			
		||||
	CLONE_PARENT_SETTID                  = 0x100000
 | 
			
		||||
	CLONE_PIDFD                          = 0x1000
 | 
			
		||||
	CLONE_PTRACE                         = 0x2000
 | 
			
		||||
	CLONE_SETTLS                         = 0x80000
 | 
			
		||||
	CLONE_SIGHAND                        = 0x800
 | 
			
		||||
@@ -319,6 +444,10 @@ const (
 | 
			
		||||
	CRDLY                                = 0x600
 | 
			
		||||
	CREAD                                = 0x80
 | 
			
		||||
	CRTSCTS                              = 0x80000000
 | 
			
		||||
	CRYPTO_MAX_NAME                      = 0x40
 | 
			
		||||
	CRYPTO_MSG_MAX                       = 0x15
 | 
			
		||||
	CRYPTO_NR_MSGTYPES                   = 0x6
 | 
			
		||||
	CRYPTO_REPORT_MAXSIZE                = 0x160
 | 
			
		||||
	CS5                                  = 0x0
 | 
			
		||||
	CS6                                  = 0x10
 | 
			
		||||
	CS7                                  = 0x20
 | 
			
		||||
@@ -333,6 +462,7 @@ const (
 | 
			
		||||
	DAXFS_MAGIC                          = 0x64646178
 | 
			
		||||
	DEBUGFS_MAGIC                        = 0x64626720
 | 
			
		||||
	DEVPTS_SUPER_MAGIC                   = 0x1cd1
 | 
			
		||||
	DMA_BUF_MAGIC                        = 0x444d4142
 | 
			
		||||
	DT_BLK                               = 0x6
 | 
			
		||||
	DT_CHR                               = 0x2
 | 
			
		||||
	DT_DIR                               = 0x4
 | 
			
		||||
@@ -413,6 +543,7 @@ const (
 | 
			
		||||
	ETH_P_DNA_RC                         = 0x6002
 | 
			
		||||
	ETH_P_DNA_RT                         = 0x6003
 | 
			
		||||
	ETH_P_DSA                            = 0x1b
 | 
			
		||||
	ETH_P_DSA_8021Q                      = 0xdadb
 | 
			
		||||
	ETH_P_ECONET                         = 0x18
 | 
			
		||||
	ETH_P_EDSA                           = 0xdada
 | 
			
		||||
	ETH_P_ERSPAN                         = 0x88be
 | 
			
		||||
@@ -432,6 +563,7 @@ const (
 | 
			
		||||
	ETH_P_IRDA                           = 0x17
 | 
			
		||||
	ETH_P_LAT                            = 0x6004
 | 
			
		||||
	ETH_P_LINK_CTL                       = 0x886c
 | 
			
		||||
	ETH_P_LLDP                           = 0x88cc
 | 
			
		||||
	ETH_P_LOCALTALK                      = 0x9
 | 
			
		||||
	ETH_P_LOOP                           = 0x60
 | 
			
		||||
	ETH_P_LOOPBACK                       = 0x9000
 | 
			
		||||
@@ -486,6 +618,60 @@ const (
 | 
			
		||||
	FALLOC_FL_PUNCH_HOLE                 = 0x2
 | 
			
		||||
	FALLOC_FL_UNSHARE_RANGE              = 0x40
 | 
			
		||||
	FALLOC_FL_ZERO_RANGE                 = 0x10
 | 
			
		||||
	FANOTIFY_METADATA_VERSION            = 0x3
 | 
			
		||||
	FAN_ACCESS                           = 0x1
 | 
			
		||||
	FAN_ACCESS_PERM                      = 0x20000
 | 
			
		||||
	FAN_ALLOW                            = 0x1
 | 
			
		||||
	FAN_ALL_CLASS_BITS                   = 0xc
 | 
			
		||||
	FAN_ALL_EVENTS                       = 0x3b
 | 
			
		||||
	FAN_ALL_INIT_FLAGS                   = 0x3f
 | 
			
		||||
	FAN_ALL_MARK_FLAGS                   = 0xff
 | 
			
		||||
	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
 | 
			
		||||
	FAN_ALL_PERM_EVENTS                  = 0x30000
 | 
			
		||||
	FAN_ATTRIB                           = 0x4
 | 
			
		||||
	FAN_AUDIT                            = 0x10
 | 
			
		||||
	FAN_CLASS_CONTENT                    = 0x4
 | 
			
		||||
	FAN_CLASS_NOTIF                      = 0x0
 | 
			
		||||
	FAN_CLASS_PRE_CONTENT                = 0x8
 | 
			
		||||
	FAN_CLOEXEC                          = 0x1
 | 
			
		||||
	FAN_CLOSE                            = 0x18
 | 
			
		||||
	FAN_CLOSE_NOWRITE                    = 0x10
 | 
			
		||||
	FAN_CLOSE_WRITE                      = 0x8
 | 
			
		||||
	FAN_CREATE                           = 0x100
 | 
			
		||||
	FAN_DELETE                           = 0x200
 | 
			
		||||
	FAN_DELETE_SELF                      = 0x400
 | 
			
		||||
	FAN_DENY                             = 0x2
 | 
			
		||||
	FAN_ENABLE_AUDIT                     = 0x40
 | 
			
		||||
	FAN_EVENT_INFO_TYPE_FID              = 0x1
 | 
			
		||||
	FAN_EVENT_METADATA_LEN               = 0x18
 | 
			
		||||
	FAN_EVENT_ON_CHILD                   = 0x8000000
 | 
			
		||||
	FAN_MARK_ADD                         = 0x1
 | 
			
		||||
	FAN_MARK_DONT_FOLLOW                 = 0x4
 | 
			
		||||
	FAN_MARK_FILESYSTEM                  = 0x100
 | 
			
		||||
	FAN_MARK_FLUSH                       = 0x80
 | 
			
		||||
	FAN_MARK_IGNORED_MASK                = 0x20
 | 
			
		||||
	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
 | 
			
		||||
	FAN_MARK_INODE                       = 0x0
 | 
			
		||||
	FAN_MARK_MOUNT                       = 0x10
 | 
			
		||||
	FAN_MARK_ONLYDIR                     = 0x8
 | 
			
		||||
	FAN_MARK_REMOVE                      = 0x2
 | 
			
		||||
	FAN_MODIFY                           = 0x2
 | 
			
		||||
	FAN_MOVE                             = 0xc0
 | 
			
		||||
	FAN_MOVED_FROM                       = 0x40
 | 
			
		||||
	FAN_MOVED_TO                         = 0x80
 | 
			
		||||
	FAN_MOVE_SELF                        = 0x800
 | 
			
		||||
	FAN_NOFD                             = -0x1
 | 
			
		||||
	FAN_NONBLOCK                         = 0x2
 | 
			
		||||
	FAN_ONDIR                            = 0x40000000
 | 
			
		||||
	FAN_OPEN                             = 0x20
 | 
			
		||||
	FAN_OPEN_EXEC                        = 0x1000
 | 
			
		||||
	FAN_OPEN_EXEC_PERM                   = 0x40000
 | 
			
		||||
	FAN_OPEN_PERM                        = 0x10000
 | 
			
		||||
	FAN_Q_OVERFLOW                       = 0x4000
 | 
			
		||||
	FAN_REPORT_FID                       = 0x200
 | 
			
		||||
	FAN_REPORT_TID                       = 0x100
 | 
			
		||||
	FAN_UNLIMITED_MARKS                  = 0x20
 | 
			
		||||
	FAN_UNLIMITED_QUEUE                  = 0x10
 | 
			
		||||
	FD_CLOEXEC                           = 0x1
 | 
			
		||||
	FD_SETSIZE                           = 0x400
 | 
			
		||||
	FF0                                  = 0x0
 | 
			
		||||
@@ -493,6 +679,7 @@ const (
 | 
			
		||||
	FFDLY                                = 0x8000
 | 
			
		||||
	FLUSHO                               = 0x1000
 | 
			
		||||
	FP_XSTATE_MAGIC2                     = 0x46505845
 | 
			
		||||
	FS_ENCRYPTION_MODE_ADIANTUM          = 0x9
 | 
			
		||||
	FS_ENCRYPTION_MODE_AES_128_CBC       = 0x5
 | 
			
		||||
	FS_ENCRYPTION_MODE_AES_128_CTS       = 0x6
 | 
			
		||||
	FS_ENCRYPTION_MODE_AES_256_CBC       = 0x3
 | 
			
		||||
@@ -514,7 +701,7 @@ const (
 | 
			
		||||
	FS_POLICY_FLAGS_PAD_4                = 0x0
 | 
			
		||||
	FS_POLICY_FLAGS_PAD_8                = 0x1
 | 
			
		||||
	FS_POLICY_FLAGS_PAD_MASK             = 0x3
 | 
			
		||||
	FS_POLICY_FLAGS_VALID                = 0x3
 | 
			
		||||
	FS_POLICY_FLAGS_VALID                = 0x7
 | 
			
		||||
	FUTEXFS_SUPER_MAGIC                  = 0xbad1dea
 | 
			
		||||
	F_ADD_SEALS                          = 0x409
 | 
			
		||||
	F_DUPFD                              = 0x0
 | 
			
		||||
@@ -539,6 +726,7 @@ const (
 | 
			
		||||
	F_OFD_SETLKW                         = 0x26
 | 
			
		||||
	F_OK                                 = 0x0
 | 
			
		||||
	F_RDLCK                              = 0x0
 | 
			
		||||
	F_SEAL_FUTURE_WRITE                  = 0x10
 | 
			
		||||
	F_SEAL_GROW                          = 0x4
 | 
			
		||||
	F_SEAL_SEAL                          = 0x1
 | 
			
		||||
	F_SEAL_SHRINK                        = 0x2
 | 
			
		||||
@@ -639,7 +827,7 @@ const (
 | 
			
		||||
	IFA_F_STABLE_PRIVACY                 = 0x800
 | 
			
		||||
	IFA_F_TEMPORARY                      = 0x1
 | 
			
		||||
	IFA_F_TENTATIVE                      = 0x40
 | 
			
		||||
	IFA_MAX                              = 0x9
 | 
			
		||||
	IFA_MAX                              = 0xa
 | 
			
		||||
	IFF_ALLMULTI                         = 0x200
 | 
			
		||||
	IFF_ATTACH_QUEUE                     = 0x200
 | 
			
		||||
	IFF_AUTOMEDIA                        = 0x4000
 | 
			
		||||
@@ -707,6 +895,7 @@ const (
 | 
			
		||||
	IN_ISDIR                             = 0x40000000
 | 
			
		||||
	IN_LOOPBACKNET                       = 0x7f
 | 
			
		||||
	IN_MASK_ADD                          = 0x20000000
 | 
			
		||||
	IN_MASK_CREATE                       = 0x10000000
 | 
			
		||||
	IN_MODIFY                            = 0x2
 | 
			
		||||
	IN_MOVE                              = 0xc0
 | 
			
		||||
	IN_MOVED_FROM                        = 0x40
 | 
			
		||||
@@ -778,6 +967,7 @@ const (
 | 
			
		||||
	IPV6_MINHOPCOUNT                     = 0x49
 | 
			
		||||
	IPV6_MTU                             = 0x18
 | 
			
		||||
	IPV6_MTU_DISCOVER                    = 0x17
 | 
			
		||||
	IPV6_MULTICAST_ALL                   = 0x1d
 | 
			
		||||
	IPV6_MULTICAST_HOPS                  = 0x12
 | 
			
		||||
	IPV6_MULTICAST_IF                    = 0x11
 | 
			
		||||
	IPV6_MULTICAST_LOOP                  = 0x13
 | 
			
		||||
@@ -802,6 +992,7 @@ const (
 | 
			
		||||
	IPV6_RECVRTHDR                       = 0x38
 | 
			
		||||
	IPV6_RECVTCLASS                      = 0x42
 | 
			
		||||
	IPV6_ROUTER_ALERT                    = 0x16
 | 
			
		||||
	IPV6_ROUTER_ALERT_ISOLATE            = 0x1e
 | 
			
		||||
	IPV6_RTHDR                           = 0x39
 | 
			
		||||
	IPV6_RTHDRDSTOPTS                    = 0x37
 | 
			
		||||
	IPV6_RTHDR_LOOSE                     = 0x0
 | 
			
		||||
@@ -900,6 +1091,17 @@ const (
 | 
			
		||||
	KEXEC_PRESERVE_CONTEXT               = 0x2
 | 
			
		||||
	KEXEC_SEGMENT_MAX                    = 0x10
 | 
			
		||||
	KEYCTL_ASSUME_AUTHORITY              = 0x10
 | 
			
		||||
	KEYCTL_CAPABILITIES                  = 0x1f
 | 
			
		||||
	KEYCTL_CAPS0_BIG_KEY                 = 0x10
 | 
			
		||||
	KEYCTL_CAPS0_CAPABILITIES            = 0x1
 | 
			
		||||
	KEYCTL_CAPS0_DIFFIE_HELLMAN          = 0x4
 | 
			
		||||
	KEYCTL_CAPS0_INVALIDATE              = 0x20
 | 
			
		||||
	KEYCTL_CAPS0_MOVE                    = 0x80
 | 
			
		||||
	KEYCTL_CAPS0_PERSISTENT_KEYRINGS     = 0x2
 | 
			
		||||
	KEYCTL_CAPS0_PUBLIC_KEY              = 0x8
 | 
			
		||||
	KEYCTL_CAPS0_RESTRICT_KEYRING        = 0x40
 | 
			
		||||
	KEYCTL_CAPS1_NS_KEYRING_NAME         = 0x1
 | 
			
		||||
	KEYCTL_CAPS1_NS_KEY_TAG              = 0x2
 | 
			
		||||
	KEYCTL_CHOWN                         = 0x4
 | 
			
		||||
	KEYCTL_CLEAR                         = 0x7
 | 
			
		||||
	KEYCTL_DESCRIBE                      = 0x6
 | 
			
		||||
@@ -912,7 +1114,14 @@ const (
 | 
			
		||||
	KEYCTL_INVALIDATE                    = 0x15
 | 
			
		||||
	KEYCTL_JOIN_SESSION_KEYRING          = 0x1
 | 
			
		||||
	KEYCTL_LINK                          = 0x8
 | 
			
		||||
	KEYCTL_MOVE                          = 0x1e
 | 
			
		||||
	KEYCTL_MOVE_EXCL                     = 0x1
 | 
			
		||||
	KEYCTL_NEGATE                        = 0xd
 | 
			
		||||
	KEYCTL_PKEY_DECRYPT                  = 0x1a
 | 
			
		||||
	KEYCTL_PKEY_ENCRYPT                  = 0x19
 | 
			
		||||
	KEYCTL_PKEY_QUERY                    = 0x18
 | 
			
		||||
	KEYCTL_PKEY_SIGN                     = 0x1b
 | 
			
		||||
	KEYCTL_PKEY_VERIFY                   = 0x1c
 | 
			
		||||
	KEYCTL_READ                          = 0xb
 | 
			
		||||
	KEYCTL_REJECT                        = 0x13
 | 
			
		||||
	KEYCTL_RESTRICT_KEYRING              = 0x1d
 | 
			
		||||
@@ -922,6 +1131,10 @@ const (
 | 
			
		||||
	KEYCTL_SETPERM                       = 0x5
 | 
			
		||||
	KEYCTL_SET_REQKEY_KEYRING            = 0xe
 | 
			
		||||
	KEYCTL_SET_TIMEOUT                   = 0xf
 | 
			
		||||
	KEYCTL_SUPPORTS_DECRYPT              = 0x2
 | 
			
		||||
	KEYCTL_SUPPORTS_ENCRYPT              = 0x1
 | 
			
		||||
	KEYCTL_SUPPORTS_SIGN                 = 0x4
 | 
			
		||||
	KEYCTL_SUPPORTS_VERIFY               = 0x8
 | 
			
		||||
	KEYCTL_UNLINK                        = 0x9
 | 
			
		||||
	KEYCTL_UPDATE                        = 0x2
 | 
			
		||||
	KEY_REQKEY_DEFL_DEFAULT              = 0x0
 | 
			
		||||
@@ -955,6 +1168,20 @@ const (
 | 
			
		||||
	LOCK_NB                              = 0x4
 | 
			
		||||
	LOCK_SH                              = 0x1
 | 
			
		||||
	LOCK_UN                              = 0x8
 | 
			
		||||
	LOOP_CLR_FD                          = 0x4c01
 | 
			
		||||
	LOOP_CTL_ADD                         = 0x4c80
 | 
			
		||||
	LOOP_CTL_GET_FREE                    = 0x4c82
 | 
			
		||||
	LOOP_CTL_REMOVE                      = 0x4c81
 | 
			
		||||
	LOOP_GET_STATUS                      = 0x4c03
 | 
			
		||||
	LOOP_GET_STATUS64                    = 0x4c05
 | 
			
		||||
	LOOP_SET_BLOCK_SIZE                  = 0x4c09
 | 
			
		||||
	LOOP_SET_CAPACITY                    = 0x4c07
 | 
			
		||||
	LOOP_SET_DIRECT_IO                   = 0x4c08
 | 
			
		||||
	LOOP_SET_FD                          = 0x4c00
 | 
			
		||||
	LOOP_SET_STATUS                      = 0x4c02
 | 
			
		||||
	LOOP_SET_STATUS64                    = 0x4c04
 | 
			
		||||
	LO_KEY_SIZE                          = 0x20
 | 
			
		||||
	LO_NAME_SIZE                         = 0x40
 | 
			
		||||
	MADV_DODUMP                          = 0x11
 | 
			
		||||
	MADV_DOFORK                          = 0xb
 | 
			
		||||
	MADV_DONTDUMP                        = 0x10
 | 
			
		||||
@@ -995,6 +1222,15 @@ const (
 | 
			
		||||
	MAP_STACK                            = 0x20000
 | 
			
		||||
	MAP_SYNC                             = 0x80000
 | 
			
		||||
	MAP_TYPE                             = 0xf
 | 
			
		||||
	MCAST_BLOCK_SOURCE                   = 0x2b
 | 
			
		||||
	MCAST_EXCLUDE                        = 0x0
 | 
			
		||||
	MCAST_INCLUDE                        = 0x1
 | 
			
		||||
	MCAST_JOIN_GROUP                     = 0x2a
 | 
			
		||||
	MCAST_JOIN_SOURCE_GROUP              = 0x2e
 | 
			
		||||
	MCAST_LEAVE_GROUP                    = 0x2d
 | 
			
		||||
	MCAST_LEAVE_SOURCE_GROUP             = 0x2f
 | 
			
		||||
	MCAST_MSFILTER                       = 0x30
 | 
			
		||||
	MCAST_UNBLOCK_SOURCE                 = 0x2c
 | 
			
		||||
	MCL_CURRENT                          = 0x1
 | 
			
		||||
	MCL_FUTURE                           = 0x2
 | 
			
		||||
	MCL_ONFAULT                          = 0x4
 | 
			
		||||
@@ -1101,6 +1337,7 @@ const (
 | 
			
		||||
	NETLINK_FIB_LOOKUP                   = 0xa
 | 
			
		||||
	NETLINK_FIREWALL                     = 0x3
 | 
			
		||||
	NETLINK_GENERIC                      = 0x10
 | 
			
		||||
	NETLINK_GET_STRICT_CHK               = 0xc
 | 
			
		||||
	NETLINK_INET_DIAG                    = 0x4
 | 
			
		||||
	NETLINK_IP6_FW                       = 0xd
 | 
			
		||||
	NETLINK_ISCSI                        = 0x8
 | 
			
		||||
@@ -1122,8 +1359,9 @@ const (
 | 
			
		||||
	NETLINK_UNUSED                       = 0x1
 | 
			
		||||
	NETLINK_USERSOCK                     = 0x2
 | 
			
		||||
	NETLINK_XFRM                         = 0x6
 | 
			
		||||
	NETNSA_MAX                           = 0x3
 | 
			
		||||
	NETNSA_MAX                           = 0x5
 | 
			
		||||
	NETNSA_NSID_NOT_ASSIGNED             = -0x1
 | 
			
		||||
	NFDBITS                              = 0x40
 | 
			
		||||
	NFNETLINK_V0                         = 0x0
 | 
			
		||||
	NFNLGRP_ACCT_QUOTA                   = 0x8
 | 
			
		||||
	NFNLGRP_CONNTRACK_DESTROY            = 0x3
 | 
			
		||||
@@ -1188,6 +1426,10 @@ const (
 | 
			
		||||
	NLM_F_ROOT                           = 0x100
 | 
			
		||||
	NOFLSH                               = 0x80
 | 
			
		||||
	NSFS_MAGIC                           = 0x6e736673
 | 
			
		||||
	NS_GET_NSTYPE                        = 0xb703
 | 
			
		||||
	NS_GET_OWNER_UID                     = 0xb704
 | 
			
		||||
	NS_GET_PARENT                        = 0xb702
 | 
			
		||||
	NS_GET_USERNS                        = 0xb701
 | 
			
		||||
	OCFS2_SUPER_MAGIC                    = 0x7461636f
 | 
			
		||||
	OCRNL                                = 0x8
 | 
			
		||||
	OFDEL                                = 0x80
 | 
			
		||||
@@ -1244,6 +1486,7 @@ const (
 | 
			
		||||
	PACKET_FASTROUTE                     = 0x6
 | 
			
		||||
	PACKET_HDRLEN                        = 0xb
 | 
			
		||||
	PACKET_HOST                          = 0x0
 | 
			
		||||
	PACKET_IGNORE_OUTGOING               = 0x17
 | 
			
		||||
	PACKET_KERNEL                        = 0x7
 | 
			
		||||
	PACKET_LOOPBACK                      = 0x5
 | 
			
		||||
	PACKET_LOSS                          = 0xe
 | 
			
		||||
@@ -1385,6 +1628,12 @@ const (
 | 
			
		||||
	PR_MCE_KILL_SET                      = 0x1
 | 
			
		||||
	PR_MPX_DISABLE_MANAGEMENT            = 0x2c
 | 
			
		||||
	PR_MPX_ENABLE_MANAGEMENT             = 0x2b
 | 
			
		||||
	PR_PAC_APDAKEY                       = 0x4
 | 
			
		||||
	PR_PAC_APDBKEY                       = 0x8
 | 
			
		||||
	PR_PAC_APGAKEY                       = 0x10
 | 
			
		||||
	PR_PAC_APIAKEY                       = 0x1
 | 
			
		||||
	PR_PAC_APIBKEY                       = 0x2
 | 
			
		||||
	PR_PAC_RESET_KEYS                    = 0x36
 | 
			
		||||
	PR_SET_CHILD_SUBREAPER               = 0x24
 | 
			
		||||
	PR_SET_DUMPABLE                      = 0x4
 | 
			
		||||
	PR_SET_ENDIAN                        = 0x14
 | 
			
		||||
@@ -1422,8 +1671,10 @@ const (
 | 
			
		||||
	PR_SET_TSC                           = 0x1a
 | 
			
		||||
	PR_SET_UNALIGN                       = 0x6
 | 
			
		||||
	PR_SPEC_DISABLE                      = 0x4
 | 
			
		||||
	PR_SPEC_DISABLE_NOEXEC               = 0x10
 | 
			
		||||
	PR_SPEC_ENABLE                       = 0x2
 | 
			
		||||
	PR_SPEC_FORCE_DISABLE                = 0x8
 | 
			
		||||
	PR_SPEC_INDIRECT_BRANCH              = 0x1
 | 
			
		||||
	PR_SPEC_NOT_AFFECTED                 = 0x0
 | 
			
		||||
	PR_SPEC_PRCTL                        = 0x1
 | 
			
		||||
	PR_SPEC_STORE_BYPASS                 = 0x0
 | 
			
		||||
@@ -1445,6 +1696,8 @@ const (
 | 
			
		||||
	PTRACE_ATTACH                        = 0x10
 | 
			
		||||
	PTRACE_CONT                          = 0x7
 | 
			
		||||
	PTRACE_DETACH                        = 0x11
 | 
			
		||||
	PTRACE_EVENTMSG_SYSCALL_ENTRY        = 0x1
 | 
			
		||||
	PTRACE_EVENTMSG_SYSCALL_EXIT         = 0x2
 | 
			
		||||
	PTRACE_EVENT_CLONE                   = 0x3
 | 
			
		||||
	PTRACE_EVENT_EXEC                    = 0x4
 | 
			
		||||
	PTRACE_EVENT_EXIT                    = 0x6
 | 
			
		||||
@@ -1460,6 +1713,7 @@ const (
 | 
			
		||||
	PTRACE_GETREGSET                     = 0x4204
 | 
			
		||||
	PTRACE_GETSIGINFO                    = 0x4202
 | 
			
		||||
	PTRACE_GETSIGMASK                    = 0x420a
 | 
			
		||||
	PTRACE_GET_SYSCALL_INFO              = 0x420e
 | 
			
		||||
	PTRACE_GET_THREAD_AREA               = 0x19
 | 
			
		||||
	PTRACE_INTERRUPT                     = 0x4207
 | 
			
		||||
	PTRACE_KILL                          = 0x8
 | 
			
		||||
@@ -1498,6 +1752,10 @@ const (
 | 
			
		||||
	PTRACE_SINGLEBLOCK                   = 0x21
 | 
			
		||||
	PTRACE_SINGLESTEP                    = 0x9
 | 
			
		||||
	PTRACE_SYSCALL                       = 0x18
 | 
			
		||||
	PTRACE_SYSCALL_INFO_ENTRY            = 0x1
 | 
			
		||||
	PTRACE_SYSCALL_INFO_EXIT             = 0x2
 | 
			
		||||
	PTRACE_SYSCALL_INFO_NONE             = 0x0
 | 
			
		||||
	PTRACE_SYSCALL_INFO_SECCOMP          = 0x3
 | 
			
		||||
	PTRACE_SYSEMU                        = 0x1f
 | 
			
		||||
	PTRACE_SYSEMU_SINGLESTEP             = 0x20
 | 
			
		||||
	PTRACE_TRACEME                       = 0x0
 | 
			
		||||
@@ -1526,6 +1784,13 @@ const (
 | 
			
		||||
	RLIMIT_SIGPENDING                    = 0xb
 | 
			
		||||
	RLIMIT_STACK                         = 0x3
 | 
			
		||||
	RLIM_INFINITY                        = 0xffffffffffffffff
 | 
			
		||||
	RNDADDENTROPY                        = 0x40085203
 | 
			
		||||
	RNDADDTOENTCNT                       = 0x40045201
 | 
			
		||||
	RNDCLEARPOOL                         = 0x5206
 | 
			
		||||
	RNDGETENTCNT                         = 0x80045200
 | 
			
		||||
	RNDGETPOOL                           = 0x80085202
 | 
			
		||||
	RNDRESEEDCRNG                        = 0x5207
 | 
			
		||||
	RNDZAPENTCNT                         = 0x5204
 | 
			
		||||
	RTAX_ADVMSS                          = 0x8
 | 
			
		||||
	RTAX_CC_ALGO                         = 0x10
 | 
			
		||||
	RTAX_CWND                            = 0x7
 | 
			
		||||
@@ -1551,7 +1816,7 @@ const (
 | 
			
		||||
	RTAX_UNSPEC                          = 0x0
 | 
			
		||||
	RTAX_WINDOW                          = 0x3
 | 
			
		||||
	RTA_ALIGNTO                          = 0x4
 | 
			
		||||
	RTA_MAX                              = 0x1d
 | 
			
		||||
	RTA_MAX                              = 0x1e
 | 
			
		||||
	RTCF_DIRECTSRC                       = 0x4000000
 | 
			
		||||
	RTCF_DOREDIRECT                      = 0x1000000
 | 
			
		||||
	RTCF_LOG                             = 0x2000000
 | 
			
		||||
@@ -1624,6 +1889,7 @@ const (
 | 
			
		||||
	RTM_DELMDB                           = 0x55
 | 
			
		||||
	RTM_DELNEIGH                         = 0x1d
 | 
			
		||||
	RTM_DELNETCONF                       = 0x51
 | 
			
		||||
	RTM_DELNEXTHOP                       = 0x69
 | 
			
		||||
	RTM_DELNSID                          = 0x59
 | 
			
		||||
	RTM_DELQDISC                         = 0x25
 | 
			
		||||
	RTM_DELROUTE                         = 0x19
 | 
			
		||||
@@ -1648,6 +1914,7 @@ const (
 | 
			
		||||
	RTM_GETNEIGH                         = 0x1e
 | 
			
		||||
	RTM_GETNEIGHTBL                      = 0x42
 | 
			
		||||
	RTM_GETNETCONF                       = 0x52
 | 
			
		||||
	RTM_GETNEXTHOP                       = 0x6a
 | 
			
		||||
	RTM_GETNSID                          = 0x5a
 | 
			
		||||
	RTM_GETQDISC                         = 0x26
 | 
			
		||||
	RTM_GETROUTE                         = 0x1a
 | 
			
		||||
@@ -1655,7 +1922,7 @@ const (
 | 
			
		||||
	RTM_GETSTATS                         = 0x5e
 | 
			
		||||
	RTM_GETTCLASS                        = 0x2a
 | 
			
		||||
	RTM_GETTFILTER                       = 0x2e
 | 
			
		||||
	RTM_MAX                              = 0x67
 | 
			
		||||
	RTM_MAX                              = 0x6b
 | 
			
		||||
	RTM_NEWACTION                        = 0x30
 | 
			
		||||
	RTM_NEWADDR                          = 0x14
 | 
			
		||||
	RTM_NEWADDRLABEL                     = 0x48
 | 
			
		||||
@@ -1667,6 +1934,7 @@ const (
 | 
			
		||||
	RTM_NEWNEIGH                         = 0x1c
 | 
			
		||||
	RTM_NEWNEIGHTBL                      = 0x40
 | 
			
		||||
	RTM_NEWNETCONF                       = 0x50
 | 
			
		||||
	RTM_NEWNEXTHOP                       = 0x68
 | 
			
		||||
	RTM_NEWNSID                          = 0x58
 | 
			
		||||
	RTM_NEWPREFIX                        = 0x34
 | 
			
		||||
	RTM_NEWQDISC                         = 0x24
 | 
			
		||||
@@ -1675,8 +1943,8 @@ const (
 | 
			
		||||
	RTM_NEWSTATS                         = 0x5c
 | 
			
		||||
	RTM_NEWTCLASS                        = 0x28
 | 
			
		||||
	RTM_NEWTFILTER                       = 0x2c
 | 
			
		||||
	RTM_NR_FAMILIES                      = 0x16
 | 
			
		||||
	RTM_NR_MSGTYPES                      = 0x58
 | 
			
		||||
	RTM_NR_FAMILIES                      = 0x17
 | 
			
		||||
	RTM_NR_MSGTYPES                      = 0x5c
 | 
			
		||||
	RTM_SETDCB                           = 0x4f
 | 
			
		||||
	RTM_SETLINK                          = 0x13
 | 
			
		||||
	RTM_SETNEIGHTBL                      = 0x43
 | 
			
		||||
@@ -1733,6 +2001,8 @@ const (
 | 
			
		||||
	SECCOMP_MODE_STRICT                  = 0x1
 | 
			
		||||
	SECURITYFS_MAGIC                     = 0x73636673
 | 
			
		||||
	SELINUX_MAGIC                        = 0xf97cff8c
 | 
			
		||||
	SFD_CLOEXEC                          = 0x80000
 | 
			
		||||
	SFD_NONBLOCK                         = 0x800
 | 
			
		||||
	SHUT_RD                              = 0x0
 | 
			
		||||
	SHUT_RDWR                            = 0x2
 | 
			
		||||
	SHUT_WR                              = 0x1
 | 
			
		||||
@@ -1759,6 +2029,8 @@ const (
 | 
			
		||||
	SIOCDRARP                            = 0x8960
 | 
			
		||||
	SIOCETHTOOL                          = 0x8946
 | 
			
		||||
	SIOCGARP                             = 0x8954
 | 
			
		||||
	SIOCGETLINKNAME                      = 0x89e0
 | 
			
		||||
	SIOCGETNODEID                        = 0x89e1
 | 
			
		||||
	SIOCGHWTSTAMP                        = 0x89b1
 | 
			
		||||
	SIOCGIFADDR                          = 0x8915
 | 
			
		||||
	SIOCGIFBR                            = 0x8940
 | 
			
		||||
@@ -1790,6 +2062,10 @@ const (
 | 
			
		||||
	SIOCGSKNS                            = 0x894c
 | 
			
		||||
	SIOCGSTAMP                           = 0x8906
 | 
			
		||||
	SIOCGSTAMPNS                         = 0x8907
 | 
			
		||||
	SIOCGSTAMPNS_NEW                     = 0x80108907
 | 
			
		||||
	SIOCGSTAMPNS_OLD                     = 0x8907
 | 
			
		||||
	SIOCGSTAMP_NEW                       = 0x80108906
 | 
			
		||||
	SIOCGSTAMP_OLD                       = 0x8906
 | 
			
		||||
	SIOCINQ                              = 0x541b
 | 
			
		||||
	SIOCOUTQ                             = 0x5411
 | 
			
		||||
	SIOCOUTQNSD                          = 0x894b
 | 
			
		||||
@@ -1883,6 +2159,7 @@ const (
 | 
			
		||||
	SO_ATTACH_REUSEPORT_CBPF             = 0x33
 | 
			
		||||
	SO_ATTACH_REUSEPORT_EBPF             = 0x34
 | 
			
		||||
	SO_BINDTODEVICE                      = 0x19
 | 
			
		||||
	SO_BINDTOIFINDEX                     = 0x3e
 | 
			
		||||
	SO_BPF_EXTENSIONS                    = 0x30
 | 
			
		||||
	SO_BROADCAST                         = 0x6
 | 
			
		||||
	SO_BSDCOMPAT                         = 0xe
 | 
			
		||||
@@ -1892,8 +2169,20 @@ const (
 | 
			
		||||
	SO_DEBUG                             = 0x1
 | 
			
		||||
	SO_DETACH_BPF                        = 0x1b
 | 
			
		||||
	SO_DETACH_FILTER                     = 0x1b
 | 
			
		||||
	SO_DETACH_REUSEPORT_BPF              = 0x44
 | 
			
		||||
	SO_DOMAIN                            = 0x27
 | 
			
		||||
	SO_DONTROUTE                         = 0x5
 | 
			
		||||
	SO_EE_CODE_TXTIME_INVALID_PARAM      = 0x1
 | 
			
		||||
	SO_EE_CODE_TXTIME_MISSED             = 0x2
 | 
			
		||||
	SO_EE_CODE_ZEROCOPY_COPIED           = 0x1
 | 
			
		||||
	SO_EE_ORIGIN_ICMP                    = 0x2
 | 
			
		||||
	SO_EE_ORIGIN_ICMP6                   = 0x3
 | 
			
		||||
	SO_EE_ORIGIN_LOCAL                   = 0x1
 | 
			
		||||
	SO_EE_ORIGIN_NONE                    = 0x0
 | 
			
		||||
	SO_EE_ORIGIN_TIMESTAMPING            = 0x4
 | 
			
		||||
	SO_EE_ORIGIN_TXSTATUS                = 0x4
 | 
			
		||||
	SO_EE_ORIGIN_TXTIME                  = 0x6
 | 
			
		||||
	SO_EE_ORIGIN_ZEROCOPY                = 0x5
 | 
			
		||||
	SO_ERROR                             = 0x4
 | 
			
		||||
	SO_GET_FILTER                        = 0x1a
 | 
			
		||||
	SO_INCOMING_CPU                      = 0x31
 | 
			
		||||
@@ -1920,6 +2209,8 @@ const (
 | 
			
		||||
	SO_RCVBUFFORCE                       = 0x21
 | 
			
		||||
	SO_RCVLOWAT                          = 0x12
 | 
			
		||||
	SO_RCVTIMEO                          = 0x14
 | 
			
		||||
	SO_RCVTIMEO_NEW                      = 0x42
 | 
			
		||||
	SO_RCVTIMEO_OLD                      = 0x14
 | 
			
		||||
	SO_REUSEADDR                         = 0x2
 | 
			
		||||
	SO_REUSEPORT                         = 0xf
 | 
			
		||||
	SO_RXQ_OVFL                          = 0x28
 | 
			
		||||
@@ -1931,9 +2222,17 @@ const (
 | 
			
		||||
	SO_SNDBUFFORCE                       = 0x20
 | 
			
		||||
	SO_SNDLOWAT                          = 0x13
 | 
			
		||||
	SO_SNDTIMEO                          = 0x15
 | 
			
		||||
	SO_SNDTIMEO_NEW                      = 0x43
 | 
			
		||||
	SO_SNDTIMEO_OLD                      = 0x15
 | 
			
		||||
	SO_TIMESTAMP                         = 0x1d
 | 
			
		||||
	SO_TIMESTAMPING                      = 0x25
 | 
			
		||||
	SO_TIMESTAMPING_NEW                  = 0x41
 | 
			
		||||
	SO_TIMESTAMPING_OLD                  = 0x25
 | 
			
		||||
	SO_TIMESTAMPNS                       = 0x23
 | 
			
		||||
	SO_TIMESTAMPNS_NEW                   = 0x40
 | 
			
		||||
	SO_TIMESTAMPNS_OLD                   = 0x23
 | 
			
		||||
	SO_TIMESTAMP_NEW                     = 0x3f
 | 
			
		||||
	SO_TIMESTAMP_OLD                     = 0x1d
 | 
			
		||||
	SO_TXTIME                            = 0x3d
 | 
			
		||||
	SO_TYPE                              = 0x3
 | 
			
		||||
	SO_VM_SOCKETS_BUFFER_MAX_SIZE        = 0x2
 | 
			
		||||
@@ -1975,6 +2274,7 @@ const (
 | 
			
		||||
	SYNC_FILE_RANGE_WAIT_AFTER           = 0x4
 | 
			
		||||
	SYNC_FILE_RANGE_WAIT_BEFORE          = 0x1
 | 
			
		||||
	SYNC_FILE_RANGE_WRITE                = 0x2
 | 
			
		||||
	SYNC_FILE_RANGE_WRITE_AND_WAIT       = 0x7
 | 
			
		||||
	SYSFS_MAGIC                          = 0x62656572
 | 
			
		||||
	S_BLKSIZE                            = 0x200
 | 
			
		||||
	S_IEXEC                              = 0x40
 | 
			
		||||
@@ -2013,7 +2313,7 @@ const (
 | 
			
		||||
	TASKSTATS_GENL_NAME                  = "TASKSTATS"
 | 
			
		||||
	TASKSTATS_GENL_VERSION               = 0x1
 | 
			
		||||
	TASKSTATS_TYPE_MAX                   = 0x6
 | 
			
		||||
	TASKSTATS_VERSION                    = 0x8
 | 
			
		||||
	TASKSTATS_VERSION                    = 0x9
 | 
			
		||||
	TCFLSH                               = 0x540b
 | 
			
		||||
	TCGETA                               = 0x5405
 | 
			
		||||
	TCGETS                               = 0x5401
 | 
			
		||||
@@ -2026,7 +2326,10 @@ const (
 | 
			
		||||
	TCOFLUSH                             = 0x1
 | 
			
		||||
	TCOOFF                               = 0x0
 | 
			
		||||
	TCOON                                = 0x1
 | 
			
		||||
	TCP_BPF_IW                           = 0x3e9
 | 
			
		||||
	TCP_BPF_SNDCWND_CLAMP                = 0x3ea
 | 
			
		||||
	TCP_CC_INFO                          = 0x1a
 | 
			
		||||
	TCP_CM_INQ                           = 0x24
 | 
			
		||||
	TCP_CONGESTION                       = 0xd
 | 
			
		||||
	TCP_COOKIE_IN_ALWAYS                 = 0x1
 | 
			
		||||
	TCP_COOKIE_MAX                       = 0x10
 | 
			
		||||
@@ -2041,6 +2344,7 @@ const (
 | 
			
		||||
	TCP_FASTOPEN_KEY                     = 0x21
 | 
			
		||||
	TCP_FASTOPEN_NO_COOKIE               = 0x22
 | 
			
		||||
	TCP_INFO                             = 0xb
 | 
			
		||||
	TCP_INQ                              = 0x24
 | 
			
		||||
	TCP_KEEPCNT                          = 0x6
 | 
			
		||||
	TCP_KEEPIDLE                         = 0x4
 | 
			
		||||
	TCP_KEEPINTVL                        = 0x5
 | 
			
		||||
@@ -2060,6 +2364,9 @@ const (
 | 
			
		||||
	TCP_QUEUE_SEQ                        = 0x15
 | 
			
		||||
	TCP_QUICKACK                         = 0xc
 | 
			
		||||
	TCP_REPAIR                           = 0x13
 | 
			
		||||
	TCP_REPAIR_OFF                       = 0x0
 | 
			
		||||
	TCP_REPAIR_OFF_NO_WP                 = -0x1
 | 
			
		||||
	TCP_REPAIR_ON                        = 0x1
 | 
			
		||||
	TCP_REPAIR_OPTIONS                   = 0x16
 | 
			
		||||
	TCP_REPAIR_QUEUE                     = 0x14
 | 
			
		||||
	TCP_REPAIR_WINDOW                    = 0x1d
 | 
			
		||||
@@ -2074,6 +2381,7 @@ const (
 | 
			
		||||
	TCP_ULP                              = 0x1f
 | 
			
		||||
	TCP_USER_TIMEOUT                     = 0x12
 | 
			
		||||
	TCP_WINDOW_CLAMP                     = 0xa
 | 
			
		||||
	TCP_ZEROCOPY_RECEIVE                 = 0x23
 | 
			
		||||
	TCSAFLUSH                            = 0x2
 | 
			
		||||
	TCSBRK                               = 0x5409
 | 
			
		||||
	TCSBRKP                              = 0x5425
 | 
			
		||||
@@ -2090,6 +2398,7 @@ const (
 | 
			
		||||
	TCSETXF                              = 0x5434
 | 
			
		||||
	TCSETXW                              = 0x5435
 | 
			
		||||
	TCXONC                               = 0x540a
 | 
			
		||||
	TIMER_ABSTIME                        = 0x1
 | 
			
		||||
	TIOCCBRK                             = 0x5428
 | 
			
		||||
	TIOCCONS                             = 0x541d
 | 
			
		||||
	TIOCEXCL                             = 0x540c
 | 
			
		||||
@@ -2097,6 +2406,7 @@ const (
 | 
			
		||||
	TIOCGETD                             = 0x5424
 | 
			
		||||
	TIOCGEXCL                            = 0x80045440
 | 
			
		||||
	TIOCGICOUNT                          = 0x545d
 | 
			
		||||
	TIOCGISO7816                         = 0x80285442
 | 
			
		||||
	TIOCGLCKTRMIOS                       = 0x5456
 | 
			
		||||
	TIOCGPGRP                            = 0x540f
 | 
			
		||||
	TIOCGPKT                             = 0x80045438
 | 
			
		||||
@@ -2150,6 +2460,7 @@ const (
 | 
			
		||||
	TIOCSER_TEMT                         = 0x1
 | 
			
		||||
	TIOCSETD                             = 0x5423
 | 
			
		||||
	TIOCSIG                              = 0x40045436
 | 
			
		||||
	TIOCSISO7816                         = 0xc0285443
 | 
			
		||||
	TIOCSLCKTRMIOS                       = 0x5457
 | 
			
		||||
	TIOCSPGRP                            = 0x5410
 | 
			
		||||
	TIOCSPTLCK                           = 0x40045431
 | 
			
		||||
@@ -2159,6 +2470,71 @@ const (
 | 
			
		||||
	TIOCSTI                              = 0x5412
 | 
			
		||||
	TIOCSWINSZ                           = 0x5414
 | 
			
		||||
	TIOCVHANGUP                          = 0x5437
 | 
			
		||||
	TIPC_ADDR_ID                         = 0x3
 | 
			
		||||
	TIPC_ADDR_MCAST                      = 0x1
 | 
			
		||||
	TIPC_ADDR_NAME                       = 0x2
 | 
			
		||||
	TIPC_ADDR_NAMESEQ                    = 0x1
 | 
			
		||||
	TIPC_CFG_SRV                         = 0x0
 | 
			
		||||
	TIPC_CLUSTER_BITS                    = 0xc
 | 
			
		||||
	TIPC_CLUSTER_MASK                    = 0xfff000
 | 
			
		||||
	TIPC_CLUSTER_OFFSET                  = 0xc
 | 
			
		||||
	TIPC_CLUSTER_SIZE                    = 0xfff
 | 
			
		||||
	TIPC_CONN_SHUTDOWN                   = 0x5
 | 
			
		||||
	TIPC_CONN_TIMEOUT                    = 0x82
 | 
			
		||||
	TIPC_CRITICAL_IMPORTANCE             = 0x3
 | 
			
		||||
	TIPC_DESTNAME                        = 0x3
 | 
			
		||||
	TIPC_DEST_DROPPABLE                  = 0x81
 | 
			
		||||
	TIPC_ERRINFO                         = 0x1
 | 
			
		||||
	TIPC_ERR_NO_NAME                     = 0x1
 | 
			
		||||
	TIPC_ERR_NO_NODE                     = 0x3
 | 
			
		||||
	TIPC_ERR_NO_PORT                     = 0x2
 | 
			
		||||
	TIPC_ERR_OVERLOAD                    = 0x4
 | 
			
		||||
	TIPC_GROUP_JOIN                      = 0x87
 | 
			
		||||
	TIPC_GROUP_LEAVE                     = 0x88
 | 
			
		||||
	TIPC_GROUP_LOOPBACK                  = 0x1
 | 
			
		||||
	TIPC_GROUP_MEMBER_EVTS               = 0x2
 | 
			
		||||
	TIPC_HIGH_IMPORTANCE                 = 0x2
 | 
			
		||||
	TIPC_IMPORTANCE                      = 0x7f
 | 
			
		||||
	TIPC_LINK_STATE                      = 0x2
 | 
			
		||||
	TIPC_LOW_IMPORTANCE                  = 0x0
 | 
			
		||||
	TIPC_MAX_BEARER_NAME                 = 0x20
 | 
			
		||||
	TIPC_MAX_IF_NAME                     = 0x10
 | 
			
		||||
	TIPC_MAX_LINK_NAME                   = 0x44
 | 
			
		||||
	TIPC_MAX_MEDIA_NAME                  = 0x10
 | 
			
		||||
	TIPC_MAX_USER_MSG_SIZE               = 0x101d0
 | 
			
		||||
	TIPC_MCAST_BROADCAST                 = 0x85
 | 
			
		||||
	TIPC_MCAST_REPLICAST                 = 0x86
 | 
			
		||||
	TIPC_MEDIUM_IMPORTANCE               = 0x1
 | 
			
		||||
	TIPC_NODEID_LEN                      = 0x10
 | 
			
		||||
	TIPC_NODE_BITS                       = 0xc
 | 
			
		||||
	TIPC_NODE_MASK                       = 0xfff
 | 
			
		||||
	TIPC_NODE_OFFSET                     = 0x0
 | 
			
		||||
	TIPC_NODE_RECVQ_DEPTH                = 0x83
 | 
			
		||||
	TIPC_NODE_SIZE                       = 0xfff
 | 
			
		||||
	TIPC_NODE_STATE                      = 0x0
 | 
			
		||||
	TIPC_OK                              = 0x0
 | 
			
		||||
	TIPC_PUBLISHED                       = 0x1
 | 
			
		||||
	TIPC_RESERVED_TYPES                  = 0x40
 | 
			
		||||
	TIPC_RETDATA                         = 0x2
 | 
			
		||||
	TIPC_SERVICE_ADDR                    = 0x2
 | 
			
		||||
	TIPC_SERVICE_RANGE                   = 0x1
 | 
			
		||||
	TIPC_SOCKET_ADDR                     = 0x3
 | 
			
		||||
	TIPC_SOCK_RECVQ_DEPTH                = 0x84
 | 
			
		||||
	TIPC_SOCK_RECVQ_USED                 = 0x89
 | 
			
		||||
	TIPC_SRC_DROPPABLE                   = 0x80
 | 
			
		||||
	TIPC_SUBSCR_TIMEOUT                  = 0x3
 | 
			
		||||
	TIPC_SUB_CANCEL                      = 0x4
 | 
			
		||||
	TIPC_SUB_PORTS                       = 0x1
 | 
			
		||||
	TIPC_SUB_SERVICE                     = 0x2
 | 
			
		||||
	TIPC_TOP_SRV                         = 0x1
 | 
			
		||||
	TIPC_WAIT_FOREVER                    = 0xffffffff
 | 
			
		||||
	TIPC_WITHDRAWN                       = 0x2
 | 
			
		||||
	TIPC_ZONE_BITS                       = 0x8
 | 
			
		||||
	TIPC_ZONE_CLUSTER_MASK               = 0xfffff000
 | 
			
		||||
	TIPC_ZONE_MASK                       = 0xff000000
 | 
			
		||||
	TIPC_ZONE_OFFSET                     = 0x18
 | 
			
		||||
	TIPC_ZONE_SCOPE                      = 0x1
 | 
			
		||||
	TIPC_ZONE_SIZE                       = 0xff
 | 
			
		||||
	TMPFS_MAGIC                          = 0x1021994
 | 
			
		||||
	TOSTOP                               = 0x100
 | 
			
		||||
	TPACKET_ALIGNMENT                    = 0x10
 | 
			
		||||
@@ -2172,7 +2548,7 @@ const (
 | 
			
		||||
	TP_STATUS_LOSING                     = 0x4
 | 
			
		||||
	TP_STATUS_SENDING                    = 0x2
 | 
			
		||||
	TP_STATUS_SEND_REQUEST               = 0x1
 | 
			
		||||
	TP_STATUS_TS_RAW_HARDWARE            = -0x80000000
 | 
			
		||||
	TP_STATUS_TS_RAW_HARDWARE            = 0x80000000
 | 
			
		||||
	TP_STATUS_TS_SOFTWARE                = 0x20000000
 | 
			
		||||
	TP_STATUS_TS_SYS_HARDWARE            = 0x40000000
 | 
			
		||||
	TP_STATUS_USER                       = 0x1
 | 
			
		||||
@@ -2183,6 +2559,7 @@ const (
 | 
			
		||||
	TS_COMM_LEN                          = 0x20
 | 
			
		||||
	TUNATTACHFILTER                      = 0x401054d5
 | 
			
		||||
	TUNDETACHFILTER                      = 0x401054d6
 | 
			
		||||
	TUNGETDEVNETNS                       = 0x54e3
 | 
			
		||||
	TUNGETFEATURES                       = 0x800454cf
 | 
			
		||||
	TUNGETFILTER                         = 0x801054db
 | 
			
		||||
	TUNGETIFF                            = 0x800454d2
 | 
			
		||||
@@ -2190,6 +2567,7 @@ const (
 | 
			
		||||
	TUNGETVNETBE                         = 0x800454df
 | 
			
		||||
	TUNGETVNETHDRSZ                      = 0x800454d7
 | 
			
		||||
	TUNGETVNETLE                         = 0x800454dd
 | 
			
		||||
	TUNSETCARRIER                        = 0x400454e2
 | 
			
		||||
	TUNSETDEBUG                          = 0x400454c9
 | 
			
		||||
	TUNSETFILTEREBPF                     = 0x800454e1
 | 
			
		||||
	TUNSETGROUP                          = 0x400454ce
 | 
			
		||||
@@ -2217,8 +2595,10 @@ const (
 | 
			
		||||
	UBI_IOCMKVOL                         = 0x40986f00
 | 
			
		||||
	UBI_IOCRMVOL                         = 0x40046f01
 | 
			
		||||
	UBI_IOCRNVOL                         = 0x51106f03
 | 
			
		||||
	UBI_IOCRPEB                          = 0x40046f04
 | 
			
		||||
	UBI_IOCRSVOL                         = 0x400c6f02
 | 
			
		||||
	UBI_IOCSETVOLPROP                    = 0x40104f06
 | 
			
		||||
	UBI_IOCSPEB                          = 0x40046f05
 | 
			
		||||
	UBI_IOCVOLCRBLK                      = 0x40804f07
 | 
			
		||||
	UBI_IOCVOLRMBLK                      = 0x4f08
 | 
			
		||||
	UBI_IOCVOLUP                         = 0x40084f00
 | 
			
		||||
@@ -2366,6 +2746,9 @@ const (
 | 
			
		||||
	XDP_FLAGS_SKB_MODE                   = 0x2
 | 
			
		||||
	XDP_FLAGS_UPDATE_IF_NOEXIST          = 0x1
 | 
			
		||||
	XDP_MMAP_OFFSETS                     = 0x1
 | 
			
		||||
	XDP_OPTIONS                          = 0x8
 | 
			
		||||
	XDP_OPTIONS_ZEROCOPY                 = 0x1
 | 
			
		||||
	XDP_PACKET_HEADROOM                  = 0x100
 | 
			
		||||
	XDP_PGOFF_RX_RING                    = 0x0
 | 
			
		||||
	XDP_PGOFF_TX_RING                    = 0x80000000
 | 
			
		||||
	XDP_RX_RING                          = 0x2
 | 
			
		||||
@@ -2379,7 +2762,9 @@ const (
 | 
			
		||||
	XDP_UMEM_REG                         = 0x4
 | 
			
		||||
	XDP_ZEROCOPY                         = 0x4
 | 
			
		||||
	XENFS_SUPER_MAGIC                    = 0xabba1974
 | 
			
		||||
	XFS_SUPER_MAGIC                      = 0x58465342
 | 
			
		||||
	XTABS                                = 0x1800
 | 
			
		||||
	Z3FOLD_MAGIC                         = 0x33
 | 
			
		||||
	ZSMALLOC_MAGIC                       = 0x58295829
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user