mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
Merge pull request #575 from restic/remove-constants
Remove POSIX constants, reduce code duplication
This commit is contained in:
commit
84c14e623d
@ -3,6 +3,8 @@ package fs
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// File is an open file on a file system.
|
||||
@ -17,3 +19,113 @@ type File interface {
|
||||
Seek(int64, int) (int64, error)
|
||||
Stat() (os.FileInfo, error)
|
||||
}
|
||||
|
||||
// fixpath returns an absolute path on windows, so restic can open long file
|
||||
// names.
|
||||
func fixpath(name string) string {
|
||||
if runtime.GOOS == "windows" {
|
||||
abspath, err := filepath.Abs(name)
|
||||
if err == nil {
|
||||
return "\\\\?\\" + abspath
|
||||
}
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
// Chmod changes the mode of the named file to mode.
|
||||
func Chmod(name string, mode os.FileMode) error {
|
||||
return os.Chmod(fixpath(name), mode)
|
||||
}
|
||||
|
||||
// Mkdir creates a new directory with the specified name and permission bits.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Mkdir(name string, perm os.FileMode) error {
|
||||
return os.Mkdir(fixpath(name), perm)
|
||||
}
|
||||
|
||||
// MkdirAll creates a directory named path,
|
||||
// along with any necessary parents, and returns nil,
|
||||
// or else returns an error.
|
||||
// The permission bits perm are used for all
|
||||
// directories that MkdirAll creates.
|
||||
// If path is already a directory, MkdirAll does nothing
|
||||
// and returns nil.
|
||||
func MkdirAll(path string, perm os.FileMode) error {
|
||||
return os.MkdirAll(fixpath(path), perm)
|
||||
}
|
||||
|
||||
// Readlink returns the destination of the named symbolic link.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Readlink(name string) (string, error) {
|
||||
return os.Readlink(fixpath(name))
|
||||
}
|
||||
|
||||
// Remove removes the named file or directory.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Remove(name string) error {
|
||||
return os.Remove(fixpath(name))
|
||||
}
|
||||
|
||||
// RemoveAll removes path and any children it contains.
|
||||
// It removes everything it can but returns the first error
|
||||
// it encounters. If the path does not exist, RemoveAll
|
||||
// returns nil (no error).
|
||||
func RemoveAll(path string) error {
|
||||
return os.RemoveAll(fixpath(path))
|
||||
}
|
||||
|
||||
// Rename renames (moves) oldpath to newpath.
|
||||
// If newpath already exists, Rename replaces it.
|
||||
// OS-specific restrictions may apply when oldpath and newpath are in different directories.
|
||||
// If there is an error, it will be of type *LinkError.
|
||||
func Rename(oldpath, newpath string) error {
|
||||
return os.Rename(fixpath(oldpath), fixpath(newpath))
|
||||
}
|
||||
|
||||
// Symlink creates newname as a symbolic link to oldname.
|
||||
// If there is an error, it will be of type *LinkError.
|
||||
func Symlink(oldname, newname string) error {
|
||||
return os.Symlink(fixpath(oldname), fixpath(newname))
|
||||
}
|
||||
|
||||
// Stat returns a FileInfo structure describing the named file.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Stat(name string) (os.FileInfo, error) {
|
||||
return os.Stat(fixpath(name))
|
||||
}
|
||||
|
||||
// Lstat returns the FileInfo structure describing the named file.
|
||||
// If the file is a symbolic link, the returned FileInfo
|
||||
// describes the symbolic link. Lstat makes no attempt to follow the link.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Lstat(name string) (os.FileInfo, error) {
|
||||
return os.Lstat(fixpath(name))
|
||||
}
|
||||
|
||||
// Create creates the named file with mode 0666 (before umask), truncating
|
||||
// it if it already exists. If successful, methods on the returned
|
||||
// File can be used for I/O; the associated file descriptor has mode
|
||||
// O_RDWR.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Create(name string) (*os.File, error) {
|
||||
return os.Create(fixpath(name))
|
||||
}
|
||||
|
||||
// OpenFile is the generalized open call; most users will use Open
|
||||
// or Create instead. It opens the named file with specified flag
|
||||
// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
|
||||
// methods on the returned File can be used for I/O.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return os.OpenFile(fixpath(name), flag, perm)
|
||||
}
|
||||
|
||||
// Walk walks the file tree rooted at root, calling walkFn for each file or
|
||||
// directory in the tree, including root. All errors that arise visiting files
|
||||
// and directories are filtered by walkFn. The files are walked in lexical
|
||||
// order, which makes the output deterministic but means that for very
|
||||
// large directories Walk can be inefficient.
|
||||
// Walk does not follow symbolic links.
|
||||
func Walk(root string, walkFn filepath.WalkFunc) error {
|
||||
return filepath.Walk(fixpath(root), walkFn)
|
||||
}
|
||||
|
@ -1,127 +0,0 @@
|
||||
// +build !linux !go1.4
|
||||
|
||||
package fs
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func fixpath(name string) string {
|
||||
if runtime.GOOS == "windows" {
|
||||
abspath, err := filepath.Abs(name)
|
||||
if err == nil {
|
||||
return "\\\\?\\" + abspath
|
||||
}
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
// Open opens a file for reading.
|
||||
func Open(name string) (File, error) {
|
||||
return os.OpenFile(fixpath(name), os.O_RDONLY, 0)
|
||||
}
|
||||
|
||||
// ClearCache syncs and then removes the file's content from the OS cache.
|
||||
func ClearCache(f File) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Chmod changes the mode of the named file to mode.
|
||||
func Chmod(name string, mode os.FileMode) error {
|
||||
return os.Chmod(fixpath(name), mode)
|
||||
}
|
||||
|
||||
// Mkdir creates a new directory with the specified name and permission bits.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Mkdir(name string, perm os.FileMode) error {
|
||||
return os.Mkdir(fixpath(name), perm)
|
||||
}
|
||||
|
||||
// MkdirAll creates a directory named path,
|
||||
// along with any necessary parents, and returns nil,
|
||||
// or else returns an error.
|
||||
// The permission bits perm are used for all
|
||||
// directories that MkdirAll creates.
|
||||
// If path is already a directory, MkdirAll does nothing
|
||||
// and returns nil.
|
||||
func MkdirAll(path string, perm os.FileMode) error {
|
||||
return os.MkdirAll(fixpath(path), perm)
|
||||
}
|
||||
|
||||
// Readlink returns the destination of the named symbolic link.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Readlink(name string) (string, error) {
|
||||
return os.Readlink(fixpath(name))
|
||||
}
|
||||
|
||||
// Remove removes the named file or directory.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Remove(name string) error {
|
||||
return os.Remove(fixpath(name))
|
||||
}
|
||||
|
||||
// RemoveAll removes path and any children it contains.
|
||||
// It removes everything it can but returns the first error
|
||||
// it encounters. If the path does not exist, RemoveAll
|
||||
// returns nil (no error).
|
||||
func RemoveAll(path string) error {
|
||||
return os.RemoveAll(fixpath(path))
|
||||
}
|
||||
|
||||
// Rename renames (moves) oldpath to newpath.
|
||||
// If newpath already exists, Rename replaces it.
|
||||
// OS-specific restrictions may apply when oldpath and newpath are in different directories.
|
||||
// If there is an error, it will be of type *LinkError.
|
||||
func Rename(oldpath, newpath string) error {
|
||||
return os.Rename(fixpath(oldpath), fixpath(newpath))
|
||||
}
|
||||
|
||||
// Symlink creates newname as a symbolic link to oldname.
|
||||
// If there is an error, it will be of type *LinkError.
|
||||
func Symlink(oldname, newname string) error {
|
||||
return os.Symlink(fixpath(oldname), fixpath(newname))
|
||||
}
|
||||
|
||||
// Stat returns a FileInfo structure describing the named file.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Stat(name string) (os.FileInfo, error) {
|
||||
return os.Stat(fixpath(name))
|
||||
}
|
||||
|
||||
// Lstat returns the FileInfo structure describing the named file.
|
||||
// If the file is a symbolic link, the returned FileInfo
|
||||
// describes the symbolic link. Lstat makes no attempt to follow the link.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Lstat(name string) (os.FileInfo, error) {
|
||||
return os.Lstat(fixpath(name))
|
||||
}
|
||||
|
||||
// Create creates the named file with mode 0666 (before umask), truncating
|
||||
// it if it already exists. If successful, methods on the returned
|
||||
// File can be used for I/O; the associated file descriptor has mode
|
||||
// O_RDWR.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Create(name string) (*os.File, error) {
|
||||
return os.Create(fixpath(name))
|
||||
}
|
||||
|
||||
// OpenFile is the generalized open call; most users will use Open
|
||||
// or Create instead. It opens the named file with specified flag
|
||||
// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
|
||||
// methods on the returned File can be used for I/O.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return os.OpenFile(fixpath(name), flag, perm)
|
||||
}
|
||||
|
||||
// Walk walks the file tree rooted at root, calling walkFn for each file or
|
||||
// directory in the tree, including root. All errors that arise visiting files
|
||||
// and directories are filtered by walkFn. The files are walked in lexical
|
||||
// order, which makes the output deterministic but means that for very
|
||||
// large directories Walk can be inefficient.
|
||||
// Walk does not follow symbolic links.
|
||||
func Walk(root string, walkFn filepath.WalkFunc) error {
|
||||
return filepath.Walk(fixpath(root), walkFn)
|
||||
}
|
@ -4,7 +4,6 @@ package fs
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
@ -19,16 +18,6 @@ func Open(name string) (File, error) {
|
||||
return &nonCachingFile{File: file}, err
|
||||
}
|
||||
|
||||
// these constants should've been defined in x/sys/unix, but somehow aren't.
|
||||
const (
|
||||
_POSIX_FADV_NORMAL = iota
|
||||
_POSIX_FADV_RANDOM
|
||||
_POSIX_FADV_SEQUENTIAL
|
||||
_POSIX_FADV_WILLNEED
|
||||
_POSIX_FADV_DONTNEED
|
||||
_POSIX_FADV_NOREUSE
|
||||
)
|
||||
|
||||
// nonCachingFile wraps an *os.File and calls fadvise() to instantly forget
|
||||
// data that has been read or written.
|
||||
type nonCachingFile struct {
|
||||
@ -40,7 +29,7 @@ func (f *nonCachingFile) Read(p []byte) (int, error) {
|
||||
n, err := f.File.Read(p)
|
||||
|
||||
if n > 0 {
|
||||
ferr := unix.Fadvise(int(f.File.Fd()), f.readOffset, int64(n), _POSIX_FADV_DONTNEED)
|
||||
ferr := unix.Fadvise(int(f.File.Fd()), f.readOffset, int64(n), unix.FADV_DONTNEED)
|
||||
|
||||
f.readOffset += int64(n)
|
||||
|
||||
@ -64,103 +53,5 @@ func ClearCache(file File) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return unix.Fadvise(int(f.Fd()), 0, 0, _POSIX_FADV_DONTNEED)
|
||||
}
|
||||
|
||||
// Chmod changes the mode of the named file to mode.
|
||||
func Chmod(name string, mode os.FileMode) error {
|
||||
return os.Chmod(name, mode)
|
||||
}
|
||||
|
||||
// Mkdir creates a new directory with the specified name and permission bits.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Mkdir(name string, perm os.FileMode) error {
|
||||
return os.Mkdir(name, perm)
|
||||
}
|
||||
|
||||
// MkdirAll creates a directory named path,
|
||||
// along with any necessary parents, and returns nil,
|
||||
// or else returns an error.
|
||||
// The permission bits perm are used for all
|
||||
// directories that MkdirAll creates.
|
||||
// If path is already a directory, MkdirAll does nothing
|
||||
// and returns nil.
|
||||
func MkdirAll(path string, perm os.FileMode) error {
|
||||
return os.MkdirAll(path, perm)
|
||||
}
|
||||
|
||||
// Readlink returns the destination of the named symbolic link.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Readlink(name string) (string, error) {
|
||||
return os.Readlink(name)
|
||||
}
|
||||
|
||||
// Remove removes the named file or directory.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Remove(name string) error {
|
||||
return os.Remove(name)
|
||||
}
|
||||
|
||||
// RemoveAll removes path and any children it contains.
|
||||
// It removes everything it can but returns the first error
|
||||
// it encounters. If the path does not exist, RemoveAll
|
||||
// returns nil (no error).
|
||||
func RemoveAll(path string) error {
|
||||
return os.RemoveAll(path)
|
||||
}
|
||||
|
||||
// Rename renames (moves) oldpath to newpath.
|
||||
// If newpath already exists, Rename replaces it.
|
||||
// OS-specific restrictions may apply when oldpath and newpath are in different directories.
|
||||
// If there is an error, it will be of type *LinkError.
|
||||
func Rename(oldpath, newpath string) error {
|
||||
return os.Rename(oldpath, newpath)
|
||||
}
|
||||
|
||||
// Symlink creates newname as a symbolic link to oldname.
|
||||
// If there is an error, it will be of type *LinkError.
|
||||
func Symlink(oldname, newname string) error {
|
||||
return os.Symlink(oldname, newname)
|
||||
}
|
||||
|
||||
// Stat returns a FileInfo structure describing the named file.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Stat(name string) (os.FileInfo, error) {
|
||||
return os.Stat(name)
|
||||
}
|
||||
|
||||
// Lstat returns the FileInfo structure describing the named file.
|
||||
// If the file is a symbolic link, the returned FileInfo
|
||||
// describes the symbolic link. Lstat makes no attempt to follow the link.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Lstat(name string) (os.FileInfo, error) {
|
||||
return os.Lstat(name)
|
||||
}
|
||||
|
||||
// Create creates the named file with mode 0666 (before umask), truncating
|
||||
// it if it already exists. If successful, methods on the returned
|
||||
// File can be used for I/O; the associated file descriptor has mode
|
||||
// O_RDWR.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func Create(name string) (*os.File, error) {
|
||||
return os.Create(name)
|
||||
}
|
||||
|
||||
// OpenFile is the generalized open call; most users will use Open
|
||||
// or Create instead. It opens the named file with specified flag
|
||||
// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
|
||||
// methods on the returned File can be used for I/O.
|
||||
// If there is an error, it will be of type *PathError.
|
||||
func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return os.OpenFile(name, flag, perm)
|
||||
}
|
||||
|
||||
// Walk walks the file tree rooted at root, calling walkFn for each file or
|
||||
// directory in the tree, including root. All errors that arise visiting files
|
||||
// and directories are filtered by walkFn. The files are walked in lexical
|
||||
// order, which makes the output deterministic but means that for very
|
||||
// large directories Walk can be inefficient.
|
||||
// Walk does not follow symbolic links.
|
||||
func Walk(root string, walkFn filepath.WalkFunc) error {
|
||||
return filepath.Walk(root, walkFn)
|
||||
return unix.Fadvise(int(f.Fd()), 0, 0, unix.FADV_DONTNEED)
|
||||
}
|
||||
|
15
src/restic/fs/file_nonlinux.go
Normal file
15
src/restic/fs/file_nonlinux.go
Normal file
@ -0,0 +1,15 @@
|
||||
// +build !linux !go1.4
|
||||
|
||||
package fs
|
||||
|
||||
import "os"
|
||||
|
||||
// Open opens a file for reading.
|
||||
func Open(name string) (File, error) {
|
||||
return os.OpenFile(fixpath(name), os.O_RDONLY, 0)
|
||||
}
|
||||
|
||||
// ClearCache syncs and then removes the file's content from the OS cache.
|
||||
func ClearCache(f File) error {
|
||||
return nil
|
||||
}
|
2
vendor/manifest
vendored
2
vendor/manifest
vendored
@ -81,7 +81,7 @@
|
||||
{
|
||||
"importpath": "golang.org/x/sys/unix",
|
||||
"repository": "https://go.googlesource.com/sys",
|
||||
"revision": "320cb01ddbbf0473674c2585f9b6e245721de355",
|
||||
"revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8",
|
||||
"branch": "master",
|
||||
"path": "/unix"
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// +build !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System call support for 386, FreeBSD
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
JMP syscall·RawSyscall6(SB)
|
28
vendor/src/golang.org/x/sys/unix/asm_linux_s390x.s
vendored
Normal file
28
vendor/src/golang.org/x/sys/unix/asm_linux_s390x.s
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2016 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 s390x
|
||||
// +build linux
|
||||
// +build !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System calls for s390x, Linux
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
BR syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
BR syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
BR syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
BR syscall·RawSyscall6(SB)
|
35
vendor/src/golang.org/x/sys/unix/bluetooth_linux.go
vendored
Normal file
35
vendor/src/golang.org/x/sys/unix/bluetooth_linux.go
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright 2016 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.
|
||||
|
||||
// Bluetooth sockets and messages
|
||||
|
||||
package unix
|
||||
|
||||
// Bluetooth Protocols
|
||||
const (
|
||||
BTPROTO_L2CAP = 0
|
||||
BTPROTO_HCI = 1
|
||||
BTPROTO_SCO = 2
|
||||
BTPROTO_RFCOMM = 3
|
||||
BTPROTO_BNEP = 4
|
||||
BTPROTO_CMTP = 5
|
||||
BTPROTO_HIDP = 6
|
||||
BTPROTO_AVDTP = 7
|
||||
)
|
||||
|
||||
const (
|
||||
HCI_CHANNEL_RAW = 0
|
||||
HCI_CHANNEL_USER = 1
|
||||
HCI_CHANNEL_MONITOR = 2
|
||||
HCI_CHANNEL_CONTROL = 3
|
||||
)
|
||||
|
||||
// Socketoption Level
|
||||
const (
|
||||
SOL_BLUETOOTH = 0x112
|
||||
SOL_HCI = 0x0
|
||||
SOL_L2CAP = 0x6
|
||||
SOL_RFCOMM = 0x12
|
||||
SOL_SCO = 0x11
|
||||
)
|
17
vendor/src/golang.org/x/sys/unix/mkall.sh
vendored
17
vendor/src/golang.org/x/sys/unix/mkall.sh
vendored
@ -161,7 +161,7 @@ freebsd_arm)
|
||||
mkerrors="$mkerrors"
|
||||
mksyscall="./mksyscall.pl -l32 -arm"
|
||||
mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
|
||||
# Let the type of C char be singed for making the bare syscall
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across over platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
@ -194,7 +194,7 @@ linux_arm64)
|
||||
exit 1
|
||||
fi
|
||||
mksysnum="./mksysnum_linux.pl $unistd_h"
|
||||
# Let the type of C char be singed for making the bare syscall
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across over platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
@ -212,6 +212,17 @@ linux_ppc64le)
|
||||
mksysnum="./mksysnum_linux.pl $unistd_h"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
linux_s390x)
|
||||
GOOSARCH_in=syscall_linux_s390x.go
|
||||
unistd_h=/usr/include/asm/unistd.h
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="./mksysnum_linux.pl $unistd_h"
|
||||
# Let the type of C char be signed to make the bare sys
|
||||
# API more consistent between platforms.
|
||||
# This is a deliberate departure from the way the syscall
|
||||
# package generates its version of the types file.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
netbsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="./mksyscall.pl -l32 -netbsd"
|
||||
@ -269,6 +280,6 @@ esac
|
||||
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
|
||||
if [ -n "$mktypes" ]; then
|
||||
echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go";
|
||||
echo "$mktypes types_$GOOS.go | gofmt >>ztypes_$GOOSARCH.go";
|
||||
echo "$mktypes types_$GOOS.go | go run mkpost.go >>ztypes_$GOOSARCH.go";
|
||||
fi
|
||||
) | $run
|
||||
|
62
vendor/src/golang.org/x/sys/unix/mkpost.go
vendored
Normal file
62
vendor/src/golang.org/x/sys/unix/mkpost.go
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// Copyright 2016 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 ignore
|
||||
|
||||
// mkpost processes the output of cgo -godefs to
|
||||
// modify the generated types. It is used to clean up
|
||||
// the sys API in an architecture specific manner.
|
||||
//
|
||||
// mkpost is run after cgo -godefs by mkall.sh.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/format"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
b, err := ioutil.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
s := string(b)
|
||||
|
||||
goarch := os.Getenv("GOARCH")
|
||||
goos := os.Getenv("GOOS")
|
||||
if goarch == "s390x" && goos == "linux" {
|
||||
// Export the types of PtraceRegs fields.
|
||||
re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)")
|
||||
s = re.ReplaceAllString(s, "Ptrace$1")
|
||||
|
||||
// Replace padding fields inserted by cgo with blank identifiers.
|
||||
re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*")
|
||||
s = re.ReplaceAllString(s, "_")
|
||||
|
||||
// Replace other unwanted fields with blank identifiers.
|
||||
re = regexp.MustCompile("X_[A-Za-z0-9_]*")
|
||||
s = re.ReplaceAllString(s, "_")
|
||||
|
||||
// Replace the control_regs union with a blank identifier for now.
|
||||
re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64")
|
||||
s = re.ReplaceAllString(s, "_ [0]uint64")
|
||||
}
|
||||
|
||||
// gofmt
|
||||
b, err = format.Source([]byte(s))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Append this command to the header to show where the new file
|
||||
// came from.
|
||||
re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)")
|
||||
b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go"))
|
||||
|
||||
fmt.Printf("%s", b)
|
||||
}
|
@ -62,7 +62,7 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
|
||||
|
||||
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
|
||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
if h.Len < SizeofCmsghdr || int(h.Len) > len(b) {
|
||||
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
|
||||
return nil, nil, EINVAL
|
||||
}
|
||||
return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
|
||||
|
@ -144,6 +144,7 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
uintptr(options),
|
||||
0,
|
||||
)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
return nil, e1
|
||||
}
|
||||
@ -196,6 +197,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
|
@ -109,6 +109,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
|
@ -1,61 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// +build 386,dragonfly
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
return
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint32(fd)
|
||||
k.Filter = int16(mode)
|
||||
k.Flags = uint16(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint32(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(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((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 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)
|
@ -129,6 +129,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
|
@ -7,6 +7,7 @@
|
||||
package unix_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
@ -15,6 +16,9 @@ import (
|
||||
func TestSysctUint64(t *testing.T) {
|
||||
_, err := unix.SysctlUint64("vm.max_kernel_address")
|
||||
if err != nil {
|
||||
if os.Getenv("GO_BUILDER_NAME") == "freebsd-386-gce101" {
|
||||
t.Skipf("Ignoring known failing test (golang.org/issue/15186). Failed with: %v", err)
|
||||
}
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,15 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return openat(dirfd, path, flags|O_LARGEFILE, mode)
|
||||
}
|
||||
|
||||
//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) {
|
||||
if len(fds) == 0 {
|
||||
return ppoll(nil, 0, timeout, sigmask)
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
||||
}
|
||||
|
||||
//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||
|
||||
func Readlink(path string, buf []byte) (n int, err error) {
|
||||
@ -394,6 +403,19 @@ func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
|
||||
}
|
||||
|
||||
type SockaddrHCI struct {
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
raw RawSockaddrHCI
|
||||
}
|
||||
|
||||
func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
sa.raw.Family = AF_BLUETOOTH
|
||||
sa.raw.Dev = sa.Dev
|
||||
sa.raw.Channel = sa.Channel
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
|
||||
}
|
||||
|
||||
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
switch rsa.Addr.Family {
|
||||
case AF_NETLINK:
|
||||
@ -859,7 +881,6 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
|
||||
//sysnb EpollCreate(size int) (fd int, err error)
|
||||
//sysnb EpollCreate1(flag int) (fd int, err error)
|
||||
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Exit(code int) = SYS_EXIT_GROUP
|
||||
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
|
||||
//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
|
||||
@ -894,7 +915,6 @@ func Getpgrp() (pid int) {
|
||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||
//sys Pause() (err error)
|
||||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||
//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
|
||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||
@ -1032,8 +1052,6 @@ func Munmap(b []byte) (err error) {
|
||||
// Newfstatat
|
||||
// Nfsservctl
|
||||
// Personality
|
||||
// Poll
|
||||
// Ppoll
|
||||
// Pselect6
|
||||
// Ptrace
|
||||
// Putpmsg
|
||||
|
@ -91,6 +91,8 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
|
||||
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Pause() (err error)
|
||||
|
||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||
page := uintptr(offset / 4096)
|
||||
@ -386,3 +388,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ package unix
|
||||
import "syscall"
|
||||
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//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 Fstat(fd int, stat *Stat_t) (err error)
|
||||
@ -25,6 +26,7 @@ import "syscall"
|
||||
//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 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 Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
@ -144,3 +146,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint64(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
@ -108,6 +108,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
|
||||
// Vsyscalls on amd64.
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Pause() (err error)
|
||||
|
||||
func Time(t *Time_t) (Time_t, error) {
|
||||
var tv Timeval
|
||||
@ -250,3 +252,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ package unix
|
||||
|
||||
const _SYS_dup = SYS_DUP3
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
@ -154,6 +155,14 @@ func Dup2(oldfd int, newfd int) (err error) {
|
||||
return Dup3(oldfd, newfd, 0)
|
||||
}
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
|
||||
// these when the deprecated syscalls that the syscall package relies on
|
||||
// are removed.
|
||||
@ -169,3 +178,15 @@ const (
|
||||
SYS_EPOLL_CREATE = 1042
|
||||
SYS_EPOLL_WAIT = 1069
|
||||
)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
var ts *Timespec
|
||||
if timeout >= 0 {
|
||||
ts = new(Timespec)
|
||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||
}
|
||||
if len(fds) == 0 {
|
||||
return ppoll(nil, 0, ts, nil)
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), ts, nil)
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ package unix
|
||||
// Lookup linux_dirent{,64} in kernel source code for details.
|
||||
const _SYS_getdents = SYS_GETDENTS
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
@ -24,6 +25,7 @@ const _SYS_getdents = SYS_GETDENTS
|
||||
//sysnb Getuid() (uid int)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//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 Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
@ -202,3 +204,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint64(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
@ -17,11 +18,13 @@ package unix
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
|
||||
//sysnb Getuid() (uid int)
|
||||
//sysnb InotifyInit() (fd int, err error)
|
||||
//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)
|
||||
//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 Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
@ -95,3 +98,38 @@ func (msghdr *Msghdr) SetControllen(length int) {
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint64(length)
|
||||
}
|
||||
|
||||
//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
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
329
vendor/src/golang.org/x/sys/unix/syscall_linux_s390x.go
vendored
Normal file
329
vendor/src/golang.org/x/sys/unix/syscall_linux_s390x.go
vendored
Normal file
@ -0,0 +1,329 @@
|
||||
// Copyright 2016 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 s390x,linux
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//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 Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (euid int)
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sysnb InotifyInit() (fd int, err error)
|
||||
//sys Lchown(path string, uid int, gid int) (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) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys 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)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid 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 Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
|
||||
func Time(t *Time_t) (tt Time_t, err error) {
|
||||
var tv Timeval
|
||||
err = Gettimeofday(&tv)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if t != nil {
|
||||
*t = Time_t(tv.Sec)
|
||||
}
|
||||
return Time_t(tv.Sec), nil
|
||||
}
|
||||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
func Iopl(level int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint64(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint64(length)
|
||||
}
|
||||
|
||||
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
|
||||
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
|
||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||
mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
|
||||
r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)
|
||||
use(unsafe.Pointer(&mmap_args[0]))
|
||||
xaddr = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// On s390x Linux, all the socket calls go through an extra indirection.
|
||||
// The arguments to the underlying system call (SYS_SOCKETCALL) are the
|
||||
// number below and a pointer to an array of uintptr.
|
||||
const (
|
||||
// see linux/net.h
|
||||
netSocket = 1
|
||||
netBind = 2
|
||||
netConnect = 3
|
||||
netListen = 4
|
||||
netAccept = 5
|
||||
netGetSockName = 6
|
||||
netGetPeerName = 7
|
||||
netSocketPair = 8
|
||||
netSend = 9
|
||||
netRecv = 10
|
||||
netSendTo = 11
|
||||
netRecvFrom = 12
|
||||
netShutdown = 13
|
||||
netSetSockOpt = 14
|
||||
netGetSockOpt = 15
|
||||
netSendMsg = 16
|
||||
netRecvMsg = 17
|
||||
netAccept4 = 18
|
||||
netRecvMMsg = 19
|
||||
netSendMMsg = 20
|
||||
)
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
|
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(fd), nil
|
||||
}
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
|
||||
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
|
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(fd), nil
|
||||
}
|
||||
|
||||
func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
|
||||
_, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
|
||||
_, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func socketpair(domain int, typ int, flags int, fd *[2]int32) error {
|
||||
args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))}
|
||||
_, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error {
|
||||
args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error {
|
||||
args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func socket(domain int, typ int, proto int) (int, error) {
|
||||
args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)}
|
||||
fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(fd), nil
|
||||
}
|
||||
|
||||
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error {
|
||||
args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
|
||||
args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) {
|
||||
var base uintptr
|
||||
if len(p) > 0 {
|
||||
base = uintptr(unsafe.Pointer(&p[0]))
|
||||
}
|
||||
args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))}
|
||||
n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(n), nil
|
||||
}
|
||||
|
||||
func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error {
|
||||
var base uintptr
|
||||
if len(p) > 0 {
|
||||
base = uintptr(unsafe.Pointer(&p[0]))
|
||||
}
|
||||
args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func recvmsg(s int, msg *Msghdr, flags int) (int, error) {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
|
||||
n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(n), nil
|
||||
}
|
||||
|
||||
func sendmsg(s int, msg *Msghdr, flags int) (int, error) {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
|
||||
n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(n), nil
|
||||
}
|
||||
|
||||
func Listen(s int, n int) error {
|
||||
args := [2]uintptr{uintptr(s), uintptr(n)}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Shutdown(s, how int) error {
|
||||
args := [2]uintptr{uintptr(s), uintptr(how)}
|
||||
_, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
@ -15,6 +15,82 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func TestPoll(t *testing.T) {
|
||||
f, cleanup := mktmpfifo(t)
|
||||
defer cleanup()
|
||||
|
||||
const timeout = 100
|
||||
|
||||
ok := make(chan bool, 1)
|
||||
go func() {
|
||||
select {
|
||||
case <-time.After(10 * timeout * time.Millisecond):
|
||||
t.Errorf("Poll: failed to timeout after %d milliseconds", 10*timeout)
|
||||
case <-ok:
|
||||
}
|
||||
}()
|
||||
|
||||
fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}}
|
||||
n, err := unix.Poll(fds, timeout)
|
||||
ok <- true
|
||||
if err != nil {
|
||||
t.Errorf("Poll: unexpected error: %v", err)
|
||||
return
|
||||
}
|
||||
if n != 0 {
|
||||
t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestPpoll(t *testing.T) {
|
||||
f, cleanup := mktmpfifo(t)
|
||||
defer cleanup()
|
||||
|
||||
const timeout = 100 * time.Millisecond
|
||||
|
||||
ok := make(chan bool, 1)
|
||||
go func() {
|
||||
select {
|
||||
case <-time.After(10 * timeout):
|
||||
t.Errorf("Ppoll: failed to timeout after %d", 10*timeout)
|
||||
case <-ok:
|
||||
}
|
||||
}()
|
||||
|
||||
fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}}
|
||||
timeoutTs := unix.NsecToTimespec(int64(timeout))
|
||||
n, err := unix.Ppoll(fds, &timeoutTs, nil)
|
||||
ok <- true
|
||||
if err != nil {
|
||||
t.Errorf("Ppoll: unexpected error: %v", err)
|
||||
return
|
||||
}
|
||||
if n != 0 {
|
||||
t.Errorf("Ppoll: wrong number of events: got %v, expected %v", n, 0)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// mktmpfifo creates a temporary FIFO and provides a cleanup function.
|
||||
func mktmpfifo(t *testing.T) (*os.File, func()) {
|
||||
err := unix.Mkfifo("fifo", 0666)
|
||||
if err != nil {
|
||||
t.Fatalf("mktmpfifo: failed to create FIFO: %v", err)
|
||||
}
|
||||
|
||||
f, err := os.OpenFile("fifo", os.O_RDWR, 0666)
|
||||
if err != nil {
|
||||
os.Remove("fifo")
|
||||
t.Fatalf("mktmpfifo: failed to open FIFO: %v", err)
|
||||
}
|
||||
|
||||
return f, func() {
|
||||
f.Close()
|
||||
os.Remove("fifo")
|
||||
}
|
||||
}
|
||||
|
||||
func TestTime(t *testing.T) {
|
||||
var ut unix.Time_t
|
||||
ut2, err := unix.Time(&ut)
|
||||
|
@ -111,6 +111,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
|
43
vendor/src/golang.org/x/sys/unix/types_linux.go
vendored
43
vendor/src/golang.org/x/sys/unix/types_linux.go
vendored
@ -24,6 +24,7 @@ package unix
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netpacket/packet.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/epoll.h>
|
||||
@ -55,6 +56,8 @@ package unix
|
||||
#include <unistd.h>
|
||||
#include <ustat.h>
|
||||
#include <utime.h>
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/hci.h>
|
||||
|
||||
#ifdef TCSETS2
|
||||
// On systems that have "struct termios2" use this as type Termios.
|
||||
@ -100,17 +103,31 @@ typedef struct user_pt_regs PtraceRegs;
|
||||
typedef struct pt_regs PtraceRegs;
|
||||
#elif defined(__mips__)
|
||||
typedef struct user PtraceRegs;
|
||||
#elif defined(__s390x__)
|
||||
typedef struct _user_regs_struct PtraceRegs;
|
||||
#else
|
||||
typedef struct user_regs_struct PtraceRegs;
|
||||
#endif
|
||||
|
||||
#if defined(__s390x__)
|
||||
typedef struct _user_psw_struct ptracePsw;
|
||||
typedef struct _user_fpregs_struct ptraceFpregs;
|
||||
typedef struct _user_per_struct ptracePer;
|
||||
#else
|
||||
typedef struct {} ptracePsw;
|
||||
typedef struct {} ptraceFpregs;
|
||||
typedef struct {} ptracePer;
|
||||
#endif
|
||||
|
||||
// The real epoll_event is a union, and godefs doesn't handle it well.
|
||||
struct my_epoll_event {
|
||||
uint32_t events;
|
||||
#ifdef __ARM_EABI__
|
||||
#if defined(__ARM_EABI__) || defined(__aarch64__)
|
||||
// padding is not specified in linux/eventpoll.h but added to conform to the
|
||||
// alignment requirements of EABI
|
||||
int32_t padFd;
|
||||
#elif defined(__powerpc64__) || defined(__s390x__)
|
||||
int32_t _padFd;
|
||||
#endif
|
||||
int32_t fd;
|
||||
int32_t pad;
|
||||
@ -196,6 +213,8 @@ type RawSockaddrLinklayer C.struct_sockaddr_ll
|
||||
|
||||
type RawSockaddrNetlink C.struct_sockaddr_nl
|
||||
|
||||
type RawSockaddrHCI C.struct_sockaddr_hci
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
@ -235,6 +254,7 @@ const (
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
|
||||
SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
|
||||
SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
|
||||
@ -385,6 +405,13 @@ const SizeofInotifyEvent = C.sizeof_struct_inotify_event
|
||||
// Register structures
|
||||
type PtraceRegs C.PtraceRegs
|
||||
|
||||
// Structures contained in PtraceRegs on s390x (exported by mkpost.go)
|
||||
type ptracePsw C.ptracePsw
|
||||
|
||||
type ptraceFpregs C.ptraceFpregs
|
||||
|
||||
type ptracePer C.ptracePer
|
||||
|
||||
// Misc
|
||||
|
||||
type FdSet C.fd_set
|
||||
@ -404,6 +431,20 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLIN = C.POLLIN
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLRDHUP = C.POLLRDHUP
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLNVAL = C.POLLNVAL
|
||||
)
|
||||
|
||||
type Sigset_t C.sigset_t
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.termios_t
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -216,6 +216,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -216,6 +216,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -212,6 +212,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -222,6 +222,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -221,6 +221,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -221,6 +221,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -223,6 +223,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
@ -222,6 +222,7 @@ const (
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
CLONE_IO = 0x80000000
|
||||
CLONE_NEWCGROUP = 0x2000000
|
||||
CLONE_NEWIPC = 0x8000000
|
||||
CLONE_NEWNET = 0x40000000
|
||||
CLONE_NEWNS = 0x20000
|
||||
|
2027
vendor/src/golang.org/x/sys/unix/zerrors_linux_s390x.go
vendored
Normal file
2027
vendor/src/golang.org/x/sys/unix/zerrors_linux_s390x.go
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1582,6 +1566,33 @@ func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getrlimit(resource int, rlim *rlimit32) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
@ -1636,3 +1647,14 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1226,6 +1210,23 @@ func Dup2(oldfd int, newfd int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1391,6 +1392,16 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
@ -1830,3 +1841,14 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1649,6 +1633,33 @@ func Gettimeofday(tv *Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
@ -1737,3 +1748,14 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1216,6 +1200,23 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchown(fd int, uid int, gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1216,6 +1200,23 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchown(fd int, uid int, gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
@ -1314,6 +1315,16 @@ func Listen(s int, n int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
@ -1779,3 +1790,14 @@ func stat(path string, st *stat_t) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1216,6 +1200,23 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchown(fd int, uid int, gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
@ -1314,6 +1315,16 @@ func Listen(s int, n int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
@ -1779,3 +1790,14 @@ func stat(path string, st *stat_t) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1216,6 +1200,23 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
@ -1308,6 +1309,17 @@ func Getuid() (uid int) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func InotifyInit() (fd int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||
if e1 != 0 {
|
||||
@ -1370,6 +1382,16 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
@ -1810,3 +1832,34 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -370,23 +381,6 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
@ -746,16 +740,6 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
@ -1216,6 +1200,23 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
@ -1308,6 +1309,17 @@ func Getuid() (uid int) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func InotifyInit() (fd int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||
if e1 != 0 {
|
||||
@ -1370,6 +1382,16 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pause() (err error) {
|
||||
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
@ -1810,3 +1832,34 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
use(_p0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -1,304 +0,0 @@
|
||||
// mksysnum_dragonfly.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build 386,dragonfly
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
|
||||
SYS_EXIT = 1 // { void exit(int rval); }
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
|
||||
SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
|
||||
SYS_ACCESS = 33 // { int access(char *path, int flags); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
|
||||
SYS_VFORK = 66 // { pid_t vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
|
||||
SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
|
||||
SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
|
||||
SYS_UNAME = 164 // { int uname(struct utsname *name); }
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \
|
||||
SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \
|
||||
// SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
|
||||
SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \
|
||||
SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
|
||||
SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \
|
||||
SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
|
||||
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
|
||||
SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \
|
||||
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \
|
||||
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \
|
||||
SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \
|
||||
SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \
|
||||
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
|
||||
SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \
|
||||
SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\
|
||||
SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||
SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
|
||||
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
|
||||
SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); }
|
||||
SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); }
|
||||
SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); }
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
|
||||
SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
|
||||
SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
|
||||
SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
|
||||
SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); }
|
||||
SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); }
|
||||
SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
|
||||
SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
|
||||
SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
|
||||
SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }
|
||||
SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); }
|
||||
SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
|
||||
SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
|
||||
SYS_CLOSEFROM = 474 // { int closefrom(int fd); }
|
||||
SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
|
||||
SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \
|
||||
SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
|
||||
SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \
|
||||
SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
|
||||
SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
|
||||
SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
|
||||
SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
|
||||
SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
|
||||
SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \
|
||||
SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \
|
||||
SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \
|
||||
SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \
|
||||
SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \
|
||||
SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \
|
||||
SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
|
||||
SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
|
||||
SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
|
||||
SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
|
||||
SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
|
||||
SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
|
||||
SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
|
||||
SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
|
||||
SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \
|
||||
SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
|
||||
SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \
|
||||
SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \
|
||||
SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \
|
||||
SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
|
||||
SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \
|
||||
SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
|
||||
SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
|
||||
SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \
|
||||
SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \
|
||||
SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \
|
||||
SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \
|
||||
SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
|
||||
SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \
|
||||
SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \
|
||||
SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
|
||||
SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); }
|
||||
SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
|
||||
SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
|
||||
SYS_SWAPOFF = 529 // { int swapoff(char *name); }
|
||||
SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \
|
||||
SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
|
||||
SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
|
||||
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
|
||||
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
|
||||
)
|
328
vendor/src/golang.org/x/sys/unix/zsysnum_linux_s390x.go
vendored
Normal file
328
vendor/src/golang.org/x/sys/unix/zsysnum_linux_s390x.go
vendored
Normal file
@ -0,0 +1,328 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build s390x,linux
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
SYS_EXIT = 1
|
||||
SYS_FORK = 2
|
||||
SYS_READ = 3
|
||||
SYS_WRITE = 4
|
||||
SYS_OPEN = 5
|
||||
SYS_CLOSE = 6
|
||||
SYS_RESTART_SYSCALL = 7
|
||||
SYS_CREAT = 8
|
||||
SYS_LINK = 9
|
||||
SYS_UNLINK = 10
|
||||
SYS_EXECVE = 11
|
||||
SYS_CHDIR = 12
|
||||
SYS_MKNOD = 14
|
||||
SYS_CHMOD = 15
|
||||
SYS_LSEEK = 19
|
||||
SYS_GETPID = 20
|
||||
SYS_MOUNT = 21
|
||||
SYS_UMOUNT = 22
|
||||
SYS_PTRACE = 26
|
||||
SYS_ALARM = 27
|
||||
SYS_PAUSE = 29
|
||||
SYS_UTIME = 30
|
||||
SYS_ACCESS = 33
|
||||
SYS_NICE = 34
|
||||
SYS_SYNC = 36
|
||||
SYS_KILL = 37
|
||||
SYS_RENAME = 38
|
||||
SYS_MKDIR = 39
|
||||
SYS_RMDIR = 40
|
||||
SYS_DUP = 41
|
||||
SYS_PIPE = 42
|
||||
SYS_TIMES = 43
|
||||
SYS_BRK = 45
|
||||
SYS_SIGNAL = 48
|
||||
SYS_ACCT = 51
|
||||
SYS_UMOUNT2 = 52
|
||||
SYS_IOCTL = 54
|
||||
SYS_FCNTL = 55
|
||||
SYS_SETPGID = 57
|
||||
SYS_UMASK = 60
|
||||
SYS_CHROOT = 61
|
||||
SYS_USTAT = 62
|
||||
SYS_DUP2 = 63
|
||||
SYS_GETPPID = 64
|
||||
SYS_GETPGRP = 65
|
||||
SYS_SETSID = 66
|
||||
SYS_SIGACTION = 67
|
||||
SYS_SIGSUSPEND = 72
|
||||
SYS_SIGPENDING = 73
|
||||
SYS_SETHOSTNAME = 74
|
||||
SYS_SETRLIMIT = 75
|
||||
SYS_GETRUSAGE = 77
|
||||
SYS_GETTIMEOFDAY = 78
|
||||
SYS_SETTIMEOFDAY = 79
|
||||
SYS_SYMLINK = 83
|
||||
SYS_READLINK = 85
|
||||
SYS_USELIB = 86
|
||||
SYS_SWAPON = 87
|
||||
SYS_REBOOT = 88
|
||||
SYS_READDIR = 89
|
||||
SYS_MMAP = 90
|
||||
SYS_MUNMAP = 91
|
||||
SYS_TRUNCATE = 92
|
||||
SYS_FTRUNCATE = 93
|
||||
SYS_FCHMOD = 94
|
||||
SYS_GETPRIORITY = 96
|
||||
SYS_SETPRIORITY = 97
|
||||
SYS_STATFS = 99
|
||||
SYS_FSTATFS = 100
|
||||
SYS_SOCKETCALL = 102
|
||||
SYS_SYSLOG = 103
|
||||
SYS_SETITIMER = 104
|
||||
SYS_GETITIMER = 105
|
||||
SYS_STAT = 106
|
||||
SYS_LSTAT = 107
|
||||
SYS_FSTAT = 108
|
||||
SYS_LOOKUP_DCOOKIE = 110
|
||||
SYS_VHANGUP = 111
|
||||
SYS_IDLE = 112
|
||||
SYS_WAIT4 = 114
|
||||
SYS_SWAPOFF = 115
|
||||
SYS_SYSINFO = 116
|
||||
SYS_IPC = 117
|
||||
SYS_FSYNC = 118
|
||||
SYS_SIGRETURN = 119
|
||||
SYS_CLONE = 120
|
||||
SYS_SETDOMAINNAME = 121
|
||||
SYS_UNAME = 122
|
||||
SYS_ADJTIMEX = 124
|
||||
SYS_MPROTECT = 125
|
||||
SYS_SIGPROCMASK = 126
|
||||
SYS_CREATE_MODULE = 127
|
||||
SYS_INIT_MODULE = 128
|
||||
SYS_DELETE_MODULE = 129
|
||||
SYS_GET_KERNEL_SYMS = 130
|
||||
SYS_QUOTACTL = 131
|
||||
SYS_GETPGID = 132
|
||||
SYS_FCHDIR = 133
|
||||
SYS_BDFLUSH = 134
|
||||
SYS_SYSFS = 135
|
||||
SYS_PERSONALITY = 136
|
||||
SYS_AFS_SYSCALL = 137
|
||||
SYS_GETDENTS = 141
|
||||
SYS_FLOCK = 143
|
||||
SYS_MSYNC = 144
|
||||
SYS_READV = 145
|
||||
SYS_WRITEV = 146
|
||||
SYS_GETSID = 147
|
||||
SYS_FDATASYNC = 148
|
||||
SYS__SYSCTL = 149
|
||||
SYS_MLOCK = 150
|
||||
SYS_MUNLOCK = 151
|
||||
SYS_MLOCKALL = 152
|
||||
SYS_MUNLOCKALL = 153
|
||||
SYS_SCHED_SETPARAM = 154
|
||||
SYS_SCHED_GETPARAM = 155
|
||||
SYS_SCHED_SETSCHEDULER = 156
|
||||
SYS_SCHED_GETSCHEDULER = 157
|
||||
SYS_SCHED_YIELD = 158
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 159
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 160
|
||||
SYS_SCHED_RR_GET_INTERVAL = 161
|
||||
SYS_NANOSLEEP = 162
|
||||
SYS_MREMAP = 163
|
||||
SYS_QUERY_MODULE = 167
|
||||
SYS_POLL = 168
|
||||
SYS_NFSSERVCTL = 169
|
||||
SYS_PRCTL = 172
|
||||
SYS_RT_SIGRETURN = 173
|
||||
SYS_RT_SIGACTION = 174
|
||||
SYS_RT_SIGPROCMASK = 175
|
||||
SYS_RT_SIGPENDING = 176
|
||||
SYS_RT_SIGTIMEDWAIT = 177
|
||||
SYS_RT_SIGQUEUEINFO = 178
|
||||
SYS_RT_SIGSUSPEND = 179
|
||||
SYS_PREAD64 = 180
|
||||
SYS_PWRITE64 = 181
|
||||
SYS_GETCWD = 183
|
||||
SYS_CAPGET = 184
|
||||
SYS_CAPSET = 185
|
||||
SYS_SIGALTSTACK = 186
|
||||
SYS_SENDFILE = 187
|
||||
SYS_GETPMSG = 188
|
||||
SYS_PUTPMSG = 189
|
||||
SYS_VFORK = 190
|
||||
SYS_PIVOT_ROOT = 217
|
||||
SYS_MINCORE = 218
|
||||
SYS_MADVISE = 219
|
||||
SYS_GETDENTS64 = 220
|
||||
SYS_READAHEAD = 222
|
||||
SYS_SETXATTR = 224
|
||||
SYS_LSETXATTR = 225
|
||||
SYS_FSETXATTR = 226
|
||||
SYS_GETXATTR = 227
|
||||
SYS_LGETXATTR = 228
|
||||
SYS_FGETXATTR = 229
|
||||
SYS_LISTXATTR = 230
|
||||
SYS_LLISTXATTR = 231
|
||||
SYS_FLISTXATTR = 232
|
||||
SYS_REMOVEXATTR = 233
|
||||
SYS_LREMOVEXATTR = 234
|
||||
SYS_FREMOVEXATTR = 235
|
||||
SYS_GETTID = 236
|
||||
SYS_TKILL = 237
|
||||
SYS_FUTEX = 238
|
||||
SYS_SCHED_SETAFFINITY = 239
|
||||
SYS_SCHED_GETAFFINITY = 240
|
||||
SYS_TGKILL = 241
|
||||
SYS_IO_SETUP = 243
|
||||
SYS_IO_DESTROY = 244
|
||||
SYS_IO_GETEVENTS = 245
|
||||
SYS_IO_SUBMIT = 246
|
||||
SYS_IO_CANCEL = 247
|
||||
SYS_EXIT_GROUP = 248
|
||||
SYS_EPOLL_CREATE = 249
|
||||
SYS_EPOLL_CTL = 250
|
||||
SYS_EPOLL_WAIT = 251
|
||||
SYS_SET_TID_ADDRESS = 252
|
||||
SYS_FADVISE64 = 253
|
||||
SYS_TIMER_CREATE = 254
|
||||
SYS_TIMER_SETTIME = 255
|
||||
SYS_TIMER_GETTIME = 256
|
||||
SYS_TIMER_GETOVERRUN = 257
|
||||
SYS_TIMER_DELETE = 258
|
||||
SYS_CLOCK_SETTIME = 259
|
||||
SYS_CLOCK_GETTIME = 260
|
||||
SYS_CLOCK_GETRES = 261
|
||||
SYS_CLOCK_NANOSLEEP = 262
|
||||
SYS_STATFS64 = 265
|
||||
SYS_FSTATFS64 = 266
|
||||
SYS_REMAP_FILE_PAGES = 267
|
||||
SYS_MBIND = 268
|
||||
SYS_GET_MEMPOLICY = 269
|
||||
SYS_SET_MEMPOLICY = 270
|
||||
SYS_MQ_OPEN = 271
|
||||
SYS_MQ_UNLINK = 272
|
||||
SYS_MQ_TIMEDSEND = 273
|
||||
SYS_MQ_TIMEDRECEIVE = 274
|
||||
SYS_MQ_NOTIFY = 275
|
||||
SYS_MQ_GETSETATTR = 276
|
||||
SYS_KEXEC_LOAD = 277
|
||||
SYS_ADD_KEY = 278
|
||||
SYS_REQUEST_KEY = 279
|
||||
SYS_KEYCTL = 280
|
||||
SYS_WAITID = 281
|
||||
SYS_IOPRIO_SET = 282
|
||||
SYS_IOPRIO_GET = 283
|
||||
SYS_INOTIFY_INIT = 284
|
||||
SYS_INOTIFY_ADD_WATCH = 285
|
||||
SYS_INOTIFY_RM_WATCH = 286
|
||||
SYS_MIGRATE_PAGES = 287
|
||||
SYS_OPENAT = 288
|
||||
SYS_MKDIRAT = 289
|
||||
SYS_MKNODAT = 290
|
||||
SYS_FCHOWNAT = 291
|
||||
SYS_FUTIMESAT = 292
|
||||
SYS_UNLINKAT = 294
|
||||
SYS_RENAMEAT = 295
|
||||
SYS_LINKAT = 296
|
||||
SYS_SYMLINKAT = 297
|
||||
SYS_READLINKAT = 298
|
||||
SYS_FCHMODAT = 299
|
||||
SYS_FACCESSAT = 300
|
||||
SYS_PSELECT6 = 301
|
||||
SYS_PPOLL = 302
|
||||
SYS_UNSHARE = 303
|
||||
SYS_SET_ROBUST_LIST = 304
|
||||
SYS_GET_ROBUST_LIST = 305
|
||||
SYS_SPLICE = 306
|
||||
SYS_SYNC_FILE_RANGE = 307
|
||||
SYS_TEE = 308
|
||||
SYS_VMSPLICE = 309
|
||||
SYS_MOVE_PAGES = 310
|
||||
SYS_GETCPU = 311
|
||||
SYS_EPOLL_PWAIT = 312
|
||||
SYS_UTIMES = 313
|
||||
SYS_FALLOCATE = 314
|
||||
SYS_UTIMENSAT = 315
|
||||
SYS_SIGNALFD = 316
|
||||
SYS_TIMERFD = 317
|
||||
SYS_EVENTFD = 318
|
||||
SYS_TIMERFD_CREATE = 319
|
||||
SYS_TIMERFD_SETTIME = 320
|
||||
SYS_TIMERFD_GETTIME = 321
|
||||
SYS_SIGNALFD4 = 322
|
||||
SYS_EVENTFD2 = 323
|
||||
SYS_INOTIFY_INIT1 = 324
|
||||
SYS_PIPE2 = 325
|
||||
SYS_DUP3 = 326
|
||||
SYS_EPOLL_CREATE1 = 327
|
||||
SYS_PREADV = 328
|
||||
SYS_PWRITEV = 329
|
||||
SYS_RT_TGSIGQUEUEINFO = 330
|
||||
SYS_PERF_EVENT_OPEN = 331
|
||||
SYS_FANOTIFY_INIT = 332
|
||||
SYS_FANOTIFY_MARK = 333
|
||||
SYS_PRLIMIT64 = 334
|
||||
SYS_NAME_TO_HANDLE_AT = 335
|
||||
SYS_OPEN_BY_HANDLE_AT = 336
|
||||
SYS_CLOCK_ADJTIME = 337
|
||||
SYS_SYNCFS = 338
|
||||
SYS_SETNS = 339
|
||||
SYS_PROCESS_VM_READV = 340
|
||||
SYS_PROCESS_VM_WRITEV = 341
|
||||
SYS_S390_RUNTIME_INSTR = 342
|
||||
SYS_KCMP = 343
|
||||
SYS_FINIT_MODULE = 344
|
||||
SYS_SCHED_SETATTR = 345
|
||||
SYS_SCHED_GETATTR = 346
|
||||
SYS_RENAMEAT2 = 347
|
||||
SYS_SECCOMP = 348
|
||||
SYS_GETRANDOM = 349
|
||||
SYS_MEMFD_CREATE = 350
|
||||
SYS_BPF = 351
|
||||
SYS_S390_PCI_MMIO_WRITE = 352
|
||||
SYS_S390_PCI_MMIO_READ = 353
|
||||
SYS_EXECVEAT = 354
|
||||
SYS_USERFAULTFD = 355
|
||||
SYS_MEMBARRIER = 356
|
||||
SYS_RECVMMSG = 357
|
||||
SYS_SENDMMSG = 358
|
||||
SYS_SOCKET = 359
|
||||
SYS_SOCKETPAIR = 360
|
||||
SYS_BIND = 361
|
||||
SYS_CONNECT = 362
|
||||
SYS_LISTEN = 363
|
||||
SYS_ACCEPT4 = 364
|
||||
SYS_GETSOCKOPT = 365
|
||||
SYS_SETSOCKOPT = 366
|
||||
SYS_GETSOCKNAME = 367
|
||||
SYS_GETPEERNAME = 368
|
||||
SYS_SENDTO = 369
|
||||
SYS_SENDMSG = 370
|
||||
SYS_RECVFROM = 371
|
||||
SYS_RECVMSG = 372
|
||||
SYS_SHUTDOWN = 373
|
||||
SYS_MLOCK2 = 374
|
||||
SYS_SELECT = 142
|
||||
SYS_GETRLIMIT = 191
|
||||
SYS_LCHOWN = 198
|
||||
SYS_GETUID = 199
|
||||
SYS_GETGID = 200
|
||||
SYS_GETEUID = 201
|
||||
SYS_GETEGID = 202
|
||||
SYS_SETREUID = 203
|
||||
SYS_SETREGID = 204
|
||||
SYS_GETGROUPS = 205
|
||||
SYS_SETGROUPS = 206
|
||||
SYS_FCHOWN = 207
|
||||
SYS_SETRESUID = 208
|
||||
SYS_GETRESUID = 209
|
||||
SYS_SETRESGID = 210
|
||||
SYS_GETRESGID = 211
|
||||
SYS_CHOWN = 212
|
||||
SYS_SETUID = 213
|
||||
SYS_SETGID = 214
|
||||
SYS_SETFSUID = 215
|
||||
SYS_SETFSGID = 216
|
||||
SYS_NEWFSTATAT = 293
|
||||
)
|
@ -1,437 +0,0 @@
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_dragonfly.go
|
||||
|
||||
// +build 386,dragonfly
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
sizeofPtr = 0x4
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x4
|
||||
sizeofLongLong = 0x8
|
||||
)
|
||||
|
||||
type (
|
||||
_C_short int16
|
||||
_C_int int32
|
||||
_C_long int32
|
||||
_C_long_long int64
|
||||
)
|
||||
|
||||
type Timespec struct {
|
||||
Sec int32
|
||||
Nsec int32
|
||||
}
|
||||
|
||||
type Timeval struct {
|
||||
Sec int32
|
||||
Usec int32
|
||||
}
|
||||
|
||||
type Rusage struct {
|
||||
Utime Timeval
|
||||
Stime Timeval
|
||||
Maxrss int32
|
||||
Ixrss int32
|
||||
Idrss int32
|
||||
Isrss int32
|
||||
Minflt int32
|
||||
Majflt int32
|
||||
Nswap int32
|
||||
Inblock int32
|
||||
Oublock int32
|
||||
Msgsnd int32
|
||||
Msgrcv int32
|
||||
Nsignals int32
|
||||
Nvcsw int32
|
||||
Nivcsw int32
|
||||
}
|
||||
|
||||
type Rlimit struct {
|
||||
Cur int64
|
||||
Max int64
|
||||
}
|
||||
|
||||
type _Gid_t uint32
|
||||
|
||||
const (
|
||||
S_IFMT = 0xf000
|
||||
S_IFIFO = 0x1000
|
||||
S_IFCHR = 0x2000
|
||||
S_IFDIR = 0x4000
|
||||
S_IFBLK = 0x6000
|
||||
S_IFREG = 0x8000
|
||||
S_IFLNK = 0xa000
|
||||
S_IFSOCK = 0xc000
|
||||
S_ISUID = 0x800
|
||||
S_ISGID = 0x400
|
||||
S_ISVTX = 0x200
|
||||
S_IRUSR = 0x100
|
||||
S_IWUSR = 0x80
|
||||
S_IXUSR = 0x40
|
||||
)
|
||||
|
||||
type Stat_t struct {
|
||||
Ino uint64
|
||||
Nlink uint32
|
||||
Dev uint32
|
||||
Mode uint16
|
||||
Padding1 uint16
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize uint32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare int32
|
||||
Qspare1 int64
|
||||
Qspare2 int64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Spare2 int32
|
||||
Bsize int32
|
||||
Iosize int32
|
||||
Blocks int32
|
||||
Bfree int32
|
||||
Bavail int32
|
||||
Files int32
|
||||
Ffree int32
|
||||
Fsid Fsid
|
||||
Owner uint32
|
||||
Type int32
|
||||
Flags int32
|
||||
Syncwrites int32
|
||||
Asyncwrites int32
|
||||
Fstypename [16]int8
|
||||
Mntonname [80]int8
|
||||
Syncreads int32
|
||||
Asyncreads int32
|
||||
Spares1 int16
|
||||
Mntfromname [80]int8
|
||||
Spares2 int16
|
||||
Spare [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
Type int16
|
||||
Whence int16
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Fileno uint64
|
||||
Namlen uint16
|
||||
Type uint8
|
||||
Unused1 uint8
|
||||
Unused2 uint32
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type RawSockaddrInet4 struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Port uint16
|
||||
Addr [4]byte /* in_addr */
|
||||
Zero [8]int8
|
||||
}
|
||||
|
||||
type RawSockaddrInet6 struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Port uint16
|
||||
Flowinfo uint32
|
||||
Addr [16]byte /* in6_addr */
|
||||
Scope_id uint32
|
||||
}
|
||||
|
||||
type RawSockaddrUnix struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Path [104]int8
|
||||
}
|
||||
|
||||
type RawSockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Index uint16
|
||||
Type uint8
|
||||
Nlen uint8
|
||||
Alen uint8
|
||||
Slen uint8
|
||||
Data [12]int8
|
||||
Rcf uint16
|
||||
Route [16]uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Data [14]int8
|
||||
}
|
||||
|
||||
type RawSockaddrAny struct {
|
||||
Addr RawSockaddr
|
||||
Pad [92]int8
|
||||
}
|
||||
|
||||
type _Socklen uint32
|
||||
|
||||
type Linger struct {
|
||||
Onoff int32
|
||||
Linger int32
|
||||
}
|
||||
|
||||
type Iovec struct {
|
||||
Base *byte
|
||||
Len uint32
|
||||
}
|
||||
|
||||
type IPMreq struct {
|
||||
Multiaddr [4]byte /* in_addr */
|
||||
Interface [4]byte /* in_addr */
|
||||
}
|
||||
|
||||
type IPv6Mreq struct {
|
||||
Multiaddr [16]byte /* in6_addr */
|
||||
Interface uint32
|
||||
}
|
||||
|
||||
type Msghdr struct {
|
||||
Name *byte
|
||||
Namelen uint32
|
||||
Iov *Iovec
|
||||
Iovlen int32
|
||||
Control *byte
|
||||
Controllen uint32
|
||||
Flags int32
|
||||
}
|
||||
|
||||
type Cmsghdr struct {
|
||||
Len uint32
|
||||
Level int32
|
||||
Type int32
|
||||
}
|
||||
|
||||
type Inet6Pktinfo struct {
|
||||
Addr [16]byte /* in6_addr */
|
||||
Ifindex uint32
|
||||
}
|
||||
|
||||
type IPv6MTUInfo struct {
|
||||
Addr RawSockaddrInet6
|
||||
Mtu uint32
|
||||
}
|
||||
|
||||
type ICMPv6Filter struct {
|
||||
Filt [8]uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x6c
|
||||
SizeofSockaddrUnix = 0x6a
|
||||
SizeofSockaddrDatalink = 0x36
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x1c
|
||||
SizeofCmsghdr = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
SizeofIPv6MTUInfo = 0x20
|
||||
SizeofICMPv6Filter = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type Kevent_t struct {
|
||||
Ident uint32
|
||||
Filter int16
|
||||
Flags uint16
|
||||
Fflags uint32
|
||||
Data int32
|
||||
Udata *byte
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [32]uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = 0x68
|
||||
SizeofIfData = 0x58
|
||||
SizeofIfaMsghdr = 0x14
|
||||
SizeofIfmaMsghdr = 0x10
|
||||
SizeofIfAnnounceMsghdr = 0x18
|
||||
SizeofRtMsghdr = 0x5c
|
||||
SizeofRtMetrics = 0x38
|
||||
)
|
||||
|
||||
type IfMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Data IfData
|
||||
}
|
||||
|
||||
type IfData struct {
|
||||
Type uint8
|
||||
Physical uint8
|
||||
Addrlen uint8
|
||||
Hdrlen uint8
|
||||
Recvquota uint8
|
||||
Xmitquota uint8
|
||||
Pad_cgo_0 [2]byte
|
||||
Mtu uint32
|
||||
Metric uint32
|
||||
Link_state uint32
|
||||
Baudrate uint64
|
||||
Ipackets uint32
|
||||
Ierrors uint32
|
||||
Opackets uint32
|
||||
Oerrors uint32
|
||||
Collisions uint32
|
||||
Ibytes uint32
|
||||
Obytes uint32
|
||||
Imcasts uint32
|
||||
Omcasts uint32
|
||||
Iqdrops uint32
|
||||
Noproto uint32
|
||||
Hwassist uint32
|
||||
Unused uint32
|
||||
Lastchange Timeval
|
||||
}
|
||||
|
||||
type IfaMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Metric int32
|
||||
}
|
||||
|
||||
type IfmaMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
}
|
||||
|
||||
type IfAnnounceMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Index uint16
|
||||
Name [16]int8
|
||||
What uint16
|
||||
}
|
||||
|
||||
type RtMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Index uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Flags int32
|
||||
Addrs int32
|
||||
Pid int32
|
||||
Seq int32
|
||||
Errno int32
|
||||
Use int32
|
||||
Inits uint32
|
||||
Rmx RtMetrics
|
||||
}
|
||||
|
||||
type RtMetrics struct {
|
||||
Locks uint32
|
||||
Mtu uint32
|
||||
Pksent uint32
|
||||
Expire uint32
|
||||
Sendpipe uint32
|
||||
Ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
Recvpipe uint32
|
||||
Hopcount uint32
|
||||
Mssopt uint16
|
||||
Pad uint16
|
||||
Msl uint32
|
||||
Iwmaxsegs uint32
|
||||
Iwcapsegs uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = 0x4
|
||||
SizeofBpfStat = 0x8
|
||||
SizeofBpfProgram = 0x8
|
||||
SizeofBpfInsn = 0x8
|
||||
SizeofBpfHdr = 0x14
|
||||
)
|
||||
|
||||
type BpfVersion struct {
|
||||
Major uint16
|
||||
Minor uint16
|
||||
}
|
||||
|
||||
type BpfStat struct {
|
||||
Recv uint32
|
||||
Drop uint32
|
||||
}
|
||||
|
||||
type BpfProgram struct {
|
||||
Len uint32
|
||||
Insns *BpfInsn
|
||||
}
|
||||
|
||||
type BpfInsn struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
||||
type BpfHdr struct {
|
||||
Tstamp Timeval
|
||||
Caplen uint32
|
||||
Datalen uint32
|
||||
Hdrlen uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Cc [20]uint8
|
||||
Ispeed uint32
|
||||
Ospeed uint32
|
||||
}
|
@ -151,6 +151,15 @@ type Flock_t struct {
|
||||
Pid int32
|
||||
}
|
||||
|
||||
const (
|
||||
FADV_NORMAL = 0x0
|
||||
FADV_RANDOM = 0x1
|
||||
FADV_SEQUENTIAL = 0x2
|
||||
FADV_WILLNEED = 0x3
|
||||
FADV_DONTNEED = 0x4
|
||||
FADV_NOREUSE = 0x5
|
||||
)
|
||||
|
||||
type RawSockaddrInet4 struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
@ -188,6 +197,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@ -310,6 +325,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -579,6 +595,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -153,6 +153,15 @@ type Flock_t struct {
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
const (
|
||||
FADV_NORMAL = 0x0
|
||||
FADV_RANDOM = 0x1
|
||||
FADV_SEQUENTIAL = 0x2
|
||||
FADV_WILLNEED = 0x3
|
||||
FADV_DONTNEED = 0x4
|
||||
FADV_NOREUSE = 0x5
|
||||
)
|
||||
|
||||
type RawSockaddrInet4 struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
@ -190,6 +199,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@ -314,6 +329,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -597,6 +613,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -192,6 +192,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]uint8
|
||||
@ -314,6 +320,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -568,6 +575,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -200,6 +200,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@ -324,6 +330,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -573,6 +580,7 @@ type Ustat_t struct {
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
PadFd int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
@ -584,6 +592,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -200,6 +200,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@ -323,6 +329,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -589,6 +596,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -200,6 +200,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@ -323,6 +329,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -589,6 +596,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -201,6 +201,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]uint8
|
||||
@ -325,6 +331,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -583,6 +590,7 @@ type Ustat_t struct {
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
X_padFd int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
@ -594,6 +602,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
@ -201,6 +201,12 @@ type RawSockaddrNetlink struct {
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]uint8
|
||||
@ -325,6 +331,7 @@ const (
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
@ -583,6 +590,7 @@ type Ustat_t struct {
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
X_padFd int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
@ -594,6 +602,26 @@ const (
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
|
649
vendor/src/golang.org/x/sys/unix/ztypes_linux_s390x.go
vendored
Normal file
649
vendor/src/golang.org/x/sys/unix/ztypes_linux_s390x.go
vendored
Normal file
@ -0,0 +1,649 @@
|
||||
// +build s390x,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs -- -fsigned-char types_linux.go
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
sizeofPtr = 0x8
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x8
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x1000
|
||||
)
|
||||
|
||||
type (
|
||||
_C_short int16
|
||||
_C_int int32
|
||||
_C_long int64
|
||||
_C_long_long int64
|
||||
)
|
||||
|
||||
type Timespec struct {
|
||||
Sec int64
|
||||
Nsec int64
|
||||
}
|
||||
|
||||
type Timeval struct {
|
||||
Sec int64
|
||||
Usec int64
|
||||
}
|
||||
|
||||
type Timex struct {
|
||||
Modes uint32
|
||||
_ [4]byte
|
||||
Offset int64
|
||||
Freq int64
|
||||
Maxerror int64
|
||||
Esterror int64
|
||||
Status int32
|
||||
_ [4]byte
|
||||
Constant int64
|
||||
Precision int64
|
||||
Tolerance int64
|
||||
Time Timeval
|
||||
Tick int64
|
||||
Ppsfreq int64
|
||||
Jitter int64
|
||||
Shift int32
|
||||
_ [4]byte
|
||||
Stabil int64
|
||||
Jitcnt int64
|
||||
Calcnt int64
|
||||
Errcnt int64
|
||||
Stbcnt int64
|
||||
Tai int32
|
||||
_ [44]byte
|
||||
}
|
||||
|
||||
type Time_t int64
|
||||
|
||||
type Tms struct {
|
||||
Utime int64
|
||||
Stime int64
|
||||
Cutime int64
|
||||
Cstime int64
|
||||
}
|
||||
|
||||
type Utimbuf struct {
|
||||
Actime int64
|
||||
Modtime int64
|
||||
}
|
||||
|
||||
type Rusage struct {
|
||||
Utime Timeval
|
||||
Stime Timeval
|
||||
Maxrss int64
|
||||
Ixrss int64
|
||||
Idrss int64
|
||||
Isrss int64
|
||||
Minflt int64
|
||||
Majflt int64
|
||||
Nswap int64
|
||||
Inblock int64
|
||||
Oublock int64
|
||||
Msgsnd int64
|
||||
Msgrcv int64
|
||||
Nsignals int64
|
||||
Nvcsw int64
|
||||
Nivcsw int64
|
||||
}
|
||||
|
||||
type Rlimit struct {
|
||||
Cur uint64
|
||||
Max uint64
|
||||
}
|
||||
|
||||
type _Gid_t uint32
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint64
|
||||
Ino uint64
|
||||
Nlink uint64
|
||||
Mode uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
_ int32
|
||||
Rdev uint64
|
||||
Size int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Blksize int64
|
||||
Blocks int64
|
||||
_ [3]int64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Type uint32
|
||||
Bsize uint32
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail uint64
|
||||
Files uint64
|
||||
Ffree uint64
|
||||
Fsid Fsid
|
||||
Namelen uint32
|
||||
Frsize uint32
|
||||
Flags uint32
|
||||
Spare [4]uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Ino uint64
|
||||
Off int64
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Name [256]int8
|
||||
_ [5]byte
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
_ [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Type int16
|
||||
Whence int16
|
||||
_ [4]byte
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
const (
|
||||
FADV_NORMAL = 0x0
|
||||
FADV_RANDOM = 0x1
|
||||
FADV_SEQUENTIAL = 0x2
|
||||
FADV_WILLNEED = 0x3
|
||||
FADV_DONTNEED = 0x6
|
||||
FADV_NOREUSE = 0x7
|
||||
)
|
||||
|
||||
type RawSockaddrInet4 struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
Addr [4]byte /* in_addr */
|
||||
Zero [8]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrInet6 struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
Flowinfo uint32
|
||||
Addr [16]byte /* in6_addr */
|
||||
Scope_id uint32
|
||||
}
|
||||
|
||||
type RawSockaddrUnix struct {
|
||||
Family uint16
|
||||
Path [108]int8
|
||||
}
|
||||
|
||||
type RawSockaddrLinklayer struct {
|
||||
Family uint16
|
||||
Protocol uint16
|
||||
Ifindex int32
|
||||
Hatype uint16
|
||||
Pkttype uint8
|
||||
Halen uint8
|
||||
Addr [8]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrNetlink struct {
|
||||
Family uint16
|
||||
Pad uint16
|
||||
Pid uint32
|
||||
Groups uint32
|
||||
}
|
||||
|
||||
type RawSockaddrHCI struct {
|
||||
Family uint16
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
}
|
||||
|
||||
type RawSockaddrAny struct {
|
||||
Addr RawSockaddr
|
||||
Pad [96]int8
|
||||
}
|
||||
|
||||
type _Socklen uint32
|
||||
|
||||
type Linger struct {
|
||||
Onoff int32
|
||||
Linger int32
|
||||
}
|
||||
|
||||
type Iovec struct {
|
||||
Base *byte
|
||||
Len uint64
|
||||
}
|
||||
|
||||
type IPMreq struct {
|
||||
Multiaddr [4]byte /* in_addr */
|
||||
Interface [4]byte /* in_addr */
|
||||
}
|
||||
|
||||
type IPMreqn struct {
|
||||
Multiaddr [4]byte /* in_addr */
|
||||
Address [4]byte /* in_addr */
|
||||
Ifindex int32
|
||||
}
|
||||
|
||||
type IPv6Mreq struct {
|
||||
Multiaddr [16]byte /* in6_addr */
|
||||
Interface uint32
|
||||
}
|
||||
|
||||
type Msghdr struct {
|
||||
Name *byte
|
||||
Namelen uint32
|
||||
_ [4]byte
|
||||
Iov *Iovec
|
||||
Iovlen uint64
|
||||
Control *byte
|
||||
Controllen uint64
|
||||
Flags int32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type Cmsghdr struct {
|
||||
Len uint64
|
||||
Level int32
|
||||
Type int32
|
||||
}
|
||||
|
||||
type Inet4Pktinfo struct {
|
||||
Ifindex int32
|
||||
Spec_dst [4]byte /* in_addr */
|
||||
Addr [4]byte /* in_addr */
|
||||
}
|
||||
|
||||
type Inet6Pktinfo struct {
|
||||
Addr [16]byte /* in6_addr */
|
||||
Ifindex uint32
|
||||
}
|
||||
|
||||
type IPv6MTUInfo struct {
|
||||
Addr RawSockaddrInet6
|
||||
Mtu uint32
|
||||
}
|
||||
|
||||
type ICMPv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type Ucred struct {
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
}
|
||||
|
||||
type TCPInfo struct {
|
||||
State uint8
|
||||
Ca_state uint8
|
||||
Retransmits uint8
|
||||
Probes uint8
|
||||
Backoff uint8
|
||||
Options uint8
|
||||
_ [2]byte
|
||||
Rto uint32
|
||||
Ato uint32
|
||||
Snd_mss uint32
|
||||
Rcv_mss uint32
|
||||
Unacked uint32
|
||||
Sacked uint32
|
||||
Lost uint32
|
||||
Retrans uint32
|
||||
Fackets uint32
|
||||
Last_data_sent uint32
|
||||
Last_ack_sent uint32
|
||||
Last_data_recv uint32
|
||||
Last_ack_recv uint32
|
||||
Pmtu uint32
|
||||
Rcv_ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
Snd_ssthresh uint32
|
||||
Snd_cwnd uint32
|
||||
Advmss uint32
|
||||
Reordering uint32
|
||||
Rcv_rtt uint32
|
||||
Rcv_space uint32
|
||||
Total_retrans uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x70
|
||||
SizeofSockaddrUnix = 0x6e
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x38
|
||||
SizeofCmsghdr = 0x10
|
||||
SizeofInet4Pktinfo = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
SizeofIPv6MTUInfo = 0x20
|
||||
SizeofICMPv6Filter = 0x20
|
||||
SizeofUcred = 0xc
|
||||
SizeofTCPInfo = 0x68
|
||||
)
|
||||
|
||||
const (
|
||||
IFA_UNSPEC = 0x0
|
||||
IFA_ADDRESS = 0x1
|
||||
IFA_LOCAL = 0x2
|
||||
IFA_LABEL = 0x3
|
||||
IFA_BROADCAST = 0x4
|
||||
IFA_ANYCAST = 0x5
|
||||
IFA_CACHEINFO = 0x6
|
||||
IFA_MULTICAST = 0x7
|
||||
IFLA_UNSPEC = 0x0
|
||||
IFLA_ADDRESS = 0x1
|
||||
IFLA_BROADCAST = 0x2
|
||||
IFLA_IFNAME = 0x3
|
||||
IFLA_MTU = 0x4
|
||||
IFLA_LINK = 0x5
|
||||
IFLA_QDISC = 0x6
|
||||
IFLA_STATS = 0x7
|
||||
IFLA_COST = 0x8
|
||||
IFLA_PRIORITY = 0x9
|
||||
IFLA_MASTER = 0xa
|
||||
IFLA_WIRELESS = 0xb
|
||||
IFLA_PROTINFO = 0xc
|
||||
IFLA_TXQLEN = 0xd
|
||||
IFLA_MAP = 0xe
|
||||
IFLA_WEIGHT = 0xf
|
||||
IFLA_OPERSTATE = 0x10
|
||||
IFLA_LINKMODE = 0x11
|
||||
IFLA_LINKINFO = 0x12
|
||||
IFLA_NET_NS_PID = 0x13
|
||||
IFLA_IFALIAS = 0x14
|
||||
IFLA_MAX = 0x27
|
||||
RT_SCOPE_UNIVERSE = 0x0
|
||||
RT_SCOPE_SITE = 0xc8
|
||||
RT_SCOPE_LINK = 0xfd
|
||||
RT_SCOPE_HOST = 0xfe
|
||||
RT_SCOPE_NOWHERE = 0xff
|
||||
RT_TABLE_UNSPEC = 0x0
|
||||
RT_TABLE_COMPAT = 0xfc
|
||||
RT_TABLE_DEFAULT = 0xfd
|
||||
RT_TABLE_MAIN = 0xfe
|
||||
RT_TABLE_LOCAL = 0xff
|
||||
RT_TABLE_MAX = 0xffffffff
|
||||
RTA_UNSPEC = 0x0
|
||||
RTA_DST = 0x1
|
||||
RTA_SRC = 0x2
|
||||
RTA_IIF = 0x3
|
||||
RTA_OIF = 0x4
|
||||
RTA_GATEWAY = 0x5
|
||||
RTA_PRIORITY = 0x6
|
||||
RTA_PREFSRC = 0x7
|
||||
RTA_METRICS = 0x8
|
||||
RTA_MULTIPATH = 0x9
|
||||
RTA_FLOW = 0xb
|
||||
RTA_CACHEINFO = 0xc
|
||||
RTA_TABLE = 0xf
|
||||
RTN_UNSPEC = 0x0
|
||||
RTN_UNICAST = 0x1
|
||||
RTN_LOCAL = 0x2
|
||||
RTN_BROADCAST = 0x3
|
||||
RTN_ANYCAST = 0x4
|
||||
RTN_MULTICAST = 0x5
|
||||
RTN_BLACKHOLE = 0x6
|
||||
RTN_UNREACHABLE = 0x7
|
||||
RTN_PROHIBIT = 0x8
|
||||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
SizeofNlAttr = 0x4
|
||||
SizeofRtAttr = 0x4
|
||||
SizeofIfInfomsg = 0x10
|
||||
SizeofIfAddrmsg = 0x8
|
||||
SizeofRtMsg = 0xc
|
||||
SizeofRtNexthop = 0x8
|
||||
)
|
||||
|
||||
type NlMsghdr struct {
|
||||
Len uint32
|
||||
Type uint16
|
||||
Flags uint16
|
||||
Seq uint32
|
||||
Pid uint32
|
||||
}
|
||||
|
||||
type NlMsgerr struct {
|
||||
Error int32
|
||||
Msg NlMsghdr
|
||||
}
|
||||
|
||||
type RtGenmsg struct {
|
||||
Family uint8
|
||||
}
|
||||
|
||||
type NlAttr struct {
|
||||
Len uint16
|
||||
Type uint16
|
||||
}
|
||||
|
||||
type RtAttr struct {
|
||||
Len uint16
|
||||
Type uint16
|
||||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
Family uint8
|
||||
Prefixlen uint8
|
||||
Flags uint8
|
||||
Scope uint8
|
||||
Index uint32
|
||||
}
|
||||
|
||||
type RtMsg struct {
|
||||
Family uint8
|
||||
Dst_len uint8
|
||||
Src_len uint8
|
||||
Tos uint8
|
||||
Table uint8
|
||||
Protocol uint8
|
||||
Scope uint8
|
||||
Type uint8
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type RtNexthop struct {
|
||||
Len uint16
|
||||
Flags uint8
|
||||
Hops uint8
|
||||
Ifindex int32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockFilter = 0x8
|
||||
SizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type SockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
||||
type SockFprog struct {
|
||||
Len uint16
|
||||
_ [6]byte
|
||||
Filter *SockFilter
|
||||
}
|
||||
|
||||
type InotifyEvent struct {
|
||||
Wd int32
|
||||
Mask uint32
|
||||
Cookie uint32
|
||||
Len uint32
|
||||
}
|
||||
|
||||
const SizeofInotifyEvent = 0x10
|
||||
|
||||
type PtraceRegs struct {
|
||||
Psw PtracePsw
|
||||
Gprs [16]uint64
|
||||
Acrs [16]uint32
|
||||
Orig_gpr2 uint64
|
||||
Fp_regs PtraceFpregs
|
||||
Per_info PtracePer
|
||||
Ieee_instruction_pointer uint64
|
||||
}
|
||||
|
||||
type PtracePsw struct {
|
||||
Mask uint64
|
||||
Addr uint64
|
||||
}
|
||||
|
||||
type PtraceFpregs struct {
|
||||
Fpc uint32
|
||||
_ [4]byte
|
||||
Fprs [16]float64
|
||||
}
|
||||
|
||||
type PtracePer struct {
|
||||
_ [0]uint64
|
||||
_ [24]byte
|
||||
_ [8]byte
|
||||
Starting_addr uint64
|
||||
Ending_addr uint64
|
||||
Perc_atmid uint16
|
||||
_ [6]byte
|
||||
Address uint64
|
||||
Access_id uint8
|
||||
_ [7]byte
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [16]int64
|
||||
}
|
||||
|
||||
type Sysinfo_t struct {
|
||||
Uptime int64
|
||||
Loads [3]uint64
|
||||
Totalram uint64
|
||||
Freeram uint64
|
||||
Sharedram uint64
|
||||
Bufferram uint64
|
||||
Totalswap uint64
|
||||
Freeswap uint64
|
||||
Procs uint16
|
||||
Pad uint16
|
||||
_ [4]byte
|
||||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
_ [0]int8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [65]int8
|
||||
Nodename [65]int8
|
||||
Release [65]int8
|
||||
Version [65]int8
|
||||
Machine [65]int8
|
||||
Domainname [65]int8
|
||||
}
|
||||
|
||||
type Ustat_t struct {
|
||||
Tfree int32
|
||||
_ [4]byte
|
||||
Tinode uint64
|
||||
Fname [6]int8
|
||||
Fpack [6]int8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
_ int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
|
||||
const (
|
||||
AT_FDCWD = -0x64
|
||||
AT_REMOVEDIR = 0x200
|
||||
AT_SYMLINK_FOLLOW = 0x400
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
)
|
||||
|
||||
type PollFd struct {
|
||||
Fd int32
|
||||
Events int16
|
||||
Revents int16
|
||||
}
|
||||
|
||||
const (
|
||||
POLLIN = 0x1
|
||||
POLLPRI = 0x2
|
||||
POLLOUT = 0x4
|
||||
POLLRDHUP = 0x2000
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Line uint8
|
||||
Cc [19]uint8
|
||||
Ispeed uint32
|
||||
Ospeed uint32
|
||||
}
|
Loading…
Reference in New Issue
Block a user