vendor: Mega update all dependencies
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4080
This commit is contained in:
-10
@@ -1,10 +0,0 @@
|
||||
// Copyright 2014 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"
|
||||
|
||||
TEXT ·use(SB),NOSPLIT,$0
|
||||
RET
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// 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 linux
|
||||
// +build mips mipsle
|
||||
// +build !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System calls for mips, Linux
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
// 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 darwin dragonfly freebsd linux nacl netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// readInt returns the size-bytes unsigned integer in native byte order at offset off.
|
||||
func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
|
||||
if len(b) < int(off+size) {
|
||||
return 0, false
|
||||
}
|
||||
if isBigEndian {
|
||||
return readIntBE(b[off:], size), true
|
||||
}
|
||||
return readIntLE(b[off:], size), true
|
||||
}
|
||||
|
||||
func readIntBE(b []byte, size uintptr) uint64 {
|
||||
switch size {
|
||||
case 1:
|
||||
return uint64(b[0])
|
||||
case 2:
|
||||
_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[1]) | uint64(b[0])<<8
|
||||
case 4:
|
||||
_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
|
||||
case 8:
|
||||
_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
|
||||
uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
|
||||
default:
|
||||
panic("syscall: readInt with unsupported size")
|
||||
}
|
||||
}
|
||||
|
||||
func readIntLE(b []byte, size uintptr) uint64 {
|
||||
switch size {
|
||||
case 1:
|
||||
return uint64(b[0])
|
||||
case 2:
|
||||
_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8
|
||||
case 4:
|
||||
_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
|
||||
case 8:
|
||||
_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
|
||||
uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
|
||||
default:
|
||||
panic("syscall: readInt with unsupported size")
|
||||
}
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number of
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
count = 0
|
||||
for max != 0 && len(buf) > 0 {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok || reclen > uint64(len(buf)) {
|
||||
return origlen, count, names
|
||||
}
|
||||
rec := buf[:reclen]
|
||||
buf = buf[reclen:]
|
||||
ino, ok := direntIno(rec)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
if ino == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
|
||||
namlen, ok := direntNamlen(rec)
|
||||
if !ok || namoff+namlen > uint64(len(rec)) {
|
||||
break
|
||||
}
|
||||
name := rec[namoff : namoff+namlen]
|
||||
for i, c := range name {
|
||||
if c == 0 {
|
||||
name = name[:i]
|
||||
break
|
||||
}
|
||||
}
|
||||
// Check for useless names before allocating a string.
|
||||
if string(name) == "." || string(name) == ".." {
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, string(name))
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// 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 ppc64 s390x mips64
|
||||
|
||||
package unix
|
||||
|
||||
const isBigEndian = true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// 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 386 amd64 amd64p32 arm arm64 ppc64le mips64le
|
||||
|
||||
package unix
|
||||
|
||||
const isBigEndian = false
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// +build linux,386 linux,arm
|
||||
// +build linux,386 linux,arm linux,mips linux,mipsle
|
||||
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// 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 gccgo,linux,sparc64
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
//extern sysconf
|
||||
func realSysconf(name int) int64
|
||||
|
||||
func sysconf(name int) (n int64, err syscall.Errno) {
|
||||
r := realSysconf(name)
|
||||
if r < 0 {
|
||||
return 0, syscall.GetErrno()
|
||||
}
|
||||
return r, 0
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// 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 openbsd
|
||||
// +build 386 amd64 arm
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
SYS_PLEDGE = 108
|
||||
)
|
||||
|
||||
// Pledge implements the pledge syscall. For more information see pledge(2).
|
||||
func Pledge(promises string, paths []string) error {
|
||||
promisesPtr, err := syscall.BytePtrFromString(promises)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
promisesUnsafe, pathsUnsafe := unsafe.Pointer(promisesPtr), unsafe.Pointer(nil)
|
||||
if paths != nil {
|
||||
var pathsPtr []*byte
|
||||
if pathsPtr, err = syscall.SlicePtrFromStrings(paths); err != nil {
|
||||
return err
|
||||
}
|
||||
pathsUnsafe = unsafe.Pointer(&pathsPtr[0])
|
||||
}
|
||||
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(promisesUnsafe), uintptr(pathsUnsafe), 0)
|
||||
if e != 0 {
|
||||
return e
|
||||
}
|
||||
return nil
|
||||
}
|
||||
-7
@@ -21,8 +21,6 @@
|
||||
// holds a value of type syscall.Errno.
|
||||
package unix // import "golang.org/x/sys/unix"
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// ByteSliceFromString returns a NUL-terminated slice of bytes
|
||||
// containing the text of s. If s contains a NUL byte at any
|
||||
// location, it returns (nil, EINVAL).
|
||||
@@ -69,8 +67,3 @@ func (tv *Timeval) Nano() int64 {
|
||||
}
|
||||
|
||||
func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
|
||||
|
||||
// use is a no-op, but the compiler cannot see that it is.
|
||||
// Calling use(p) ensures that p is kept live until that point.
|
||||
//go:noescape
|
||||
func use(p unsafe.Pointer)
|
||||
|
||||
+2
-16
@@ -470,25 +470,11 @@ func Sysctl(name string) (string, error) {
|
||||
}
|
||||
|
||||
func SysctlArgs(name string, args ...int) (string, error) {
|
||||
mib, err := sysctlmib(name, args...)
|
||||
buf, err := SysctlRaw(name, args...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Find size.
|
||||
n := uintptr(0)
|
||||
if err := sysctl(mib, nil, &n, nil, 0); err != nil {
|
||||
return "", err
|
||||
}
|
||||
if n == 0 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// Read into buffer of that size.
|
||||
buf := make([]byte, n)
|
||||
if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
|
||||
return "", err
|
||||
}
|
||||
n := len(buf)
|
||||
|
||||
// Throw away terminating NUL.
|
||||
if n > 0 && buf[n-1] == '\x00' {
|
||||
|
||||
+10
-28
@@ -76,32 +76,16 @@ func nametomib(name string) (mib []_C_int, err error) {
|
||||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
if dirent.Reclen == 0 {
|
||||
buf = nil
|
||||
break
|
||||
}
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Ino == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:dirent.Namlen])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
@@ -144,7 +128,6 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
uintptr(options),
|
||||
0,
|
||||
)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
return nil, e1
|
||||
}
|
||||
@@ -197,7 +180,6 @@ 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
|
||||
|
||||
+13
-23
@@ -56,29 +56,20 @@ func nametomib(name string) (mib []_C_int, err error) {
|
||||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
reclen := int(16+dirent.Namlen+1+7) & ^7
|
||||
buf = buf[reclen:]
|
||||
if dirent.Fileno == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:dirent.Namlen])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
namlen, ok := direntNamlen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
return (16 + namlen + 1 + 7) & ^7, true
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
@@ -109,7 +100,6 @@ 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
|
||||
|
||||
+10
-27
@@ -54,32 +54,16 @@ func nametomib(name string) (mib []_C_int, err error) {
|
||||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
if dirent.Reclen == 0 {
|
||||
buf = nil
|
||||
break
|
||||
}
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Fileno == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:dirent.Namlen])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
@@ -129,7 +113,6 @@ 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
|
||||
|
||||
+224
-42
@@ -69,10 +69,10 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
|
||||
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
||||
}
|
||||
|
||||
//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||
|
||||
func Readlink(path string, buf []byte) (n int, err error) {
|
||||
return readlinkat(AT_FDCWD, path, buf)
|
||||
return Readlinkat(AT_FDCWD, path, buf)
|
||||
}
|
||||
|
||||
func Rename(oldpath string, newpath string) (err error) {
|
||||
@@ -80,24 +80,20 @@ func Rename(oldpath string, newpath string) (err error) {
|
||||
}
|
||||
|
||||
func Rmdir(path string) error {
|
||||
return unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
|
||||
return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
|
||||
}
|
||||
|
||||
//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
|
||||
func Symlink(oldpath string, newpath string) (err error) {
|
||||
return symlinkat(oldpath, AT_FDCWD, newpath)
|
||||
return Symlinkat(oldpath, AT_FDCWD, newpath)
|
||||
}
|
||||
|
||||
func Unlink(path string) error {
|
||||
return unlinkat(AT_FDCWD, path, 0)
|
||||
return Unlinkat(AT_FDCWD, path, 0)
|
||||
}
|
||||
|
||||
//sys unlinkat(dirfd int, path string, flags int) (err error)
|
||||
|
||||
func Unlinkat(dirfd int, path string, flags int) error {
|
||||
return unlinkat(dirfd, path, flags)
|
||||
}
|
||||
//sys Unlinkat(dirfd int, path string, flags int) (err error)
|
||||
|
||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
||||
|
||||
@@ -143,8 +139,7 @@ func UtimesNano(path string, ts []Timespec) error {
|
||||
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
|
||||
var tv [2]Timeval
|
||||
for i := 0; i < 2; i++ {
|
||||
tv[i].Sec = ts[i].Sec
|
||||
tv[i].Usec = ts[i].Nsec / 1000
|
||||
tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
|
||||
}
|
||||
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
|
||||
}
|
||||
@@ -416,6 +411,168 @@ func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
|
||||
}
|
||||
|
||||
// SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
|
||||
// The RxID and TxID fields are used for transport protocol addressing in
|
||||
// (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with
|
||||
// zero values for CAN_RAW and CAN_BCM sockets as they have no meaning.
|
||||
//
|
||||
// The SockaddrCAN struct must be bound to the socket file descriptor
|
||||
// using Bind before the CAN socket can be used.
|
||||
//
|
||||
// // Read one raw CAN frame
|
||||
// fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW)
|
||||
// addr := &SockaddrCAN{Ifindex: index}
|
||||
// Bind(fd, addr)
|
||||
// frame := make([]byte, 16)
|
||||
// Read(fd, frame)
|
||||
//
|
||||
// The full SocketCAN documentation can be found in the linux kernel
|
||||
// archives at: https://www.kernel.org/doc/Documentation/networking/can.txt
|
||||
type SockaddrCAN struct {
|
||||
Ifindex int
|
||||
RxID uint32
|
||||
TxID uint32
|
||||
raw RawSockaddrCAN
|
||||
}
|
||||
|
||||
func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
|
||||
return nil, 0, EINVAL
|
||||
}
|
||||
sa.raw.Family = AF_CAN
|
||||
sa.raw.Ifindex = int32(sa.Ifindex)
|
||||
rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
|
||||
for i := 0; i < 4; i++ {
|
||||
sa.raw.Addr[i] = rx[i]
|
||||
}
|
||||
tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
|
||||
for i := 0; i < 4; i++ {
|
||||
sa.raw.Addr[i+4] = tx[i]
|
||||
}
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
|
||||
}
|
||||
|
||||
// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
|
||||
// SockaddrALG enables userspace access to the Linux kernel's cryptography
|
||||
// subsystem. The Type and Name fields specify which type of hash or cipher
|
||||
// should be used with a given socket.
|
||||
//
|
||||
// To create a file descriptor that provides access to a hash or cipher, both
|
||||
// Bind and Accept must be used. Once the setup process is complete, input
|
||||
// data can be written to the socket, processed by the kernel, and then read
|
||||
// back as hash output or ciphertext.
|
||||
//
|
||||
// Here is an example of using an AF_ALG socket with SHA1 hashing.
|
||||
// The initial socket setup process is as follows:
|
||||
//
|
||||
// // Open a socket to perform SHA1 hashing.
|
||||
// fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
|
||||
// addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
|
||||
// unix.Bind(fd, addr)
|
||||
// // Note: unix.Accept does not work at this time; must invoke accept()
|
||||
// // manually using unix.Syscall.
|
||||
// hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
|
||||
//
|
||||
// Once a file descriptor has been returned from Accept, it may be used to
|
||||
// perform SHA1 hashing. The descriptor is not safe for concurrent use, but
|
||||
// may be re-used repeatedly with subsequent Write and Read operations.
|
||||
//
|
||||
// When hashing a small byte slice or string, a single Write and Read may
|
||||
// be used:
|
||||
//
|
||||
// // Assume hashfd is already configured using the setup process.
|
||||
// hash := os.NewFile(hashfd, "sha1")
|
||||
// // Hash an input string and read the results. Each Write discards
|
||||
// // previous hash state. Read always reads the current state.
|
||||
// b := make([]byte, 20)
|
||||
// for i := 0; i < 2; i++ {
|
||||
// io.WriteString(hash, "Hello, world.")
|
||||
// hash.Read(b)
|
||||
// fmt.Println(hex.EncodeToString(b))
|
||||
// }
|
||||
// // Output:
|
||||
// // 2ae01472317d1935a84797ec1983ae243fc6aa28
|
||||
// // 2ae01472317d1935a84797ec1983ae243fc6aa28
|
||||
//
|
||||
// For hashing larger byte slices, or byte streams such as those read from
|
||||
// a file or socket, use Sendto with MSG_MORE to instruct the kernel to update
|
||||
// the hash digest instead of creating a new one for a given chunk and finalizing it.
|
||||
//
|
||||
// // Assume hashfd and addr are already configured using the setup process.
|
||||
// hash := os.NewFile(hashfd, "sha1")
|
||||
// // Hash the contents of a file.
|
||||
// f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
|
||||
// b := make([]byte, 4096)
|
||||
// for {
|
||||
// n, err := f.Read(b)
|
||||
// if err == io.EOF {
|
||||
// break
|
||||
// }
|
||||
// unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
|
||||
// }
|
||||
// hash.Read(b)
|
||||
// fmt.Println(hex.EncodeToString(b))
|
||||
// // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
|
||||
//
|
||||
// For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.
|
||||
type SockaddrALG struct {
|
||||
Type string
|
||||
Name string
|
||||
Feature uint32
|
||||
Mask uint32
|
||||
raw RawSockaddrALG
|
||||
}
|
||||
|
||||
func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
// Leave room for NUL byte terminator.
|
||||
if len(sa.Type) > 13 {
|
||||
return nil, 0, EINVAL
|
||||
}
|
||||
if len(sa.Name) > 63 {
|
||||
return nil, 0, EINVAL
|
||||
}
|
||||
|
||||
sa.raw.Family = AF_ALG
|
||||
sa.raw.Feat = sa.Feature
|
||||
sa.raw.Mask = sa.Mask
|
||||
|
||||
typ, err := ByteSliceFromString(sa.Type)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
name, err := ByteSliceFromString(sa.Name)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
copy(sa.raw.Type[:], typ)
|
||||
copy(sa.raw.Name[:], name)
|
||||
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil
|
||||
}
|
||||
|
||||
// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
|
||||
// SockaddrVM provides access to Linux VM sockets: a mechanism that enables
|
||||
// bidirectional communication between a hypervisor and its guest virtual
|
||||
// machines.
|
||||
type SockaddrVM struct {
|
||||
// CID and Port specify a context ID and port address for a VM socket.
|
||||
// Guests have a unique CID, and hosts may have a well-known CID of:
|
||||
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
||||
// - VMADDR_CID_HOST: refers to other processes on the host.
|
||||
CID uint32
|
||||
Port uint32
|
||||
raw RawSockaddrVM
|
||||
}
|
||||
|
||||
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
sa.raw.Family = AF_VSOCK
|
||||
sa.raw.Port = sa.Port
|
||||
sa.raw.Cid = sa.CID
|
||||
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
||||
}
|
||||
|
||||
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
switch rsa.Addr.Family {
|
||||
case AF_NETLINK:
|
||||
@@ -485,6 +642,14 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
sa.Addr[i] = pp.Addr[i]
|
||||
}
|
||||
return sa, nil
|
||||
|
||||
case AF_VSOCK:
|
||||
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
|
||||
sa := &SockaddrVM{
|
||||
CID: pp.Cid,
|
||||
Port: pp.Port,
|
||||
}
|
||||
return sa, nil
|
||||
}
|
||||
return nil, EAFNOSUPPORT
|
||||
}
|
||||
@@ -579,6 +744,13 @@ func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
|
||||
var value TCPInfo
|
||||
vallen := _Socklen(SizeofTCPInfo)
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
||||
}
|
||||
@@ -716,6 +888,10 @@ func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
|
||||
return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
|
||||
}
|
||||
|
||||
func PtracePeekUser(pid int, addr uintptr, out []byte) (count int, err error) {
|
||||
return ptracePeek(PTRACE_PEEKUSR, pid, addr, out)
|
||||
}
|
||||
|
||||
func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
|
||||
// As for ptracePeek, we need to align our accesses to deal
|
||||
// with the possibility of straddling an invalid page.
|
||||
@@ -814,38 +990,24 @@ func Reboot(cmd int) (err error) {
|
||||
return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
|
||||
}
|
||||
|
||||
func clen(n []byte) int {
|
||||
for i := 0; i < len(n); i++ {
|
||||
if n[i] == 0 {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return len(n)
|
||||
}
|
||||
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
return Getdents(fd, buf)
|
||||
}
|
||||
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
count = 0
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Ino == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:clen(bytes[:])])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
|
||||
@@ -903,7 +1065,9 @@ func Getpgrp() (pid int) {
|
||||
//sysnb Getpid() (pid int)
|
||||
//sysnb Getppid() (ppid int)
|
||||
//sys Getpriority(which int, who int) (prio int, err error)
|
||||
//sys Getrandom(buf []byte, flags int) (n int, err error)
|
||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||
//sysnb Getsid(pid int) (sid int, err error)
|
||||
//sysnb Gettid() (tid int)
|
||||
//sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
|
||||
//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
|
||||
@@ -916,7 +1080,7 @@ func Getpgrp() (pid int) {
|
||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (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
|
||||
//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||
//sys read(fd int, p []byte) (n int, err error)
|
||||
//sys Removexattr(path string, attr string) (err error)
|
||||
@@ -982,6 +1146,25 @@ func Munmap(b []byte) (err error) {
|
||||
//sys Mlockall(flags int) (err error)
|
||||
//sys Munlockall() (err error)
|
||||
|
||||
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
|
||||
// using the specified flags.
|
||||
func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
||||
n, _, errno := Syscall6(
|
||||
SYS_VMSPLICE,
|
||||
uintptr(fd),
|
||||
uintptr(unsafe.Pointer(&iovs[0])),
|
||||
uintptr(len(iovs)),
|
||||
uintptr(flags),
|
||||
0,
|
||||
0,
|
||||
)
|
||||
if errno != 0 {
|
||||
return 0, syscall.Errno(errno)
|
||||
}
|
||||
|
||||
return int(n), nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
@@ -1109,7 +1292,6 @@ func Munmap(b []byte) (err error) {
|
||||
// Utimensat
|
||||
// Vfork
|
||||
// Vhangup
|
||||
// Vmsplice
|
||||
// Vserver
|
||||
// Waitid
|
||||
// _Sysctl
|
||||
|
||||
-5
@@ -6,8 +6,6 @@
|
||||
|
||||
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
|
||||
@@ -63,9 +61,6 @@ import "syscall"
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
//go:noescape
|
||||
func gettimeofday(tv *Timeval) (err syscall.Errno)
|
||||
|
||||
func Gettimeofday(tv *Timeval) (err error) {
|
||||
errno := gettimeofday(tv)
|
||||
if errno != 0 {
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// 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 amd64,linux
|
||||
// +build !gccgo
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
//go:noescape
|
||||
func gettimeofday(tv *Timeval) (err syscall.Errno)
|
||||
-2
@@ -6,8 +6,6 @@
|
||||
|
||||
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)
|
||||
|
||||
-7
@@ -7,13 +7,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
// Linux introduced getdents64 syscall for N64 ABI only in 3.10
|
||||
// (May 21 2013, rev dec33abaafc89bcbd78f85fad0513170415a26d5),
|
||||
// to support older kernels, we have to use getdents for mips64.
|
||||
// Also note that struct dirent is different for these two.
|
||||
// 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)
|
||||
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
// 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 linux
|
||||
// +build mips mipsle
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (euid int)
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//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 Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
|
||||
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
|
||||
//sysnb socket(domain int, typ int, proto int) (fd int, err error)
|
||||
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
|
||||
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
//sysnb InotifyInit() (fd int, err error)
|
||||
//sys Ioperm(from int, num int, on int) (err error)
|
||||
//sys Iopl(level int) (err error)
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
//sysnb Time(t *Time_t) (tt Time_t, err error)
|
||||
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Pause() (err error)
|
||||
|
||||
func Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
|
||||
if e != 0 {
|
||||
err = errnoErr(e)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
p, err := BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
|
||||
if e != 0 {
|
||||
err = errnoErr(e)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
_, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0)
|
||||
if e != 0 {
|
||||
err = errnoErr(e)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
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.Sec = int32(nsec / 1e9)
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
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
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
||||
|
||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||
page := uintptr(offset / 4096)
|
||||
if offset != int64(page)*4096 {
|
||||
return 0, EINVAL
|
||||
}
|
||||
return mmap2(addr, length, prot, flags, fd, page)
|
||||
}
|
||||
|
||||
const rlimInf32 = ^uint32(0)
|
||||
const rlimInf64 = ^uint64(0)
|
||||
|
||||
type rlimit32 struct {
|
||||
Cur uint32
|
||||
Max uint32
|
||||
}
|
||||
|
||||
//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
|
||||
|
||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
err = prlimit(0, resource, nil, rlim)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
|
||||
rl := rlimit32{}
|
||||
err = getrlimit(resource, &rl)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if rl.Cur == rlimInf32 {
|
||||
rlim.Cur = rlimInf64
|
||||
} else {
|
||||
rlim.Cur = uint64(rl.Cur)
|
||||
}
|
||||
|
||||
if rl.Max == rlimInf32 {
|
||||
rlim.Max = rlimInf64
|
||||
} else {
|
||||
rlim.Max = uint64(rl.Max)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
err = prlimit(0, resource, rlim, nil)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
|
||||
rl := rlimit32{}
|
||||
if rlim.Cur == rlimInf64 {
|
||||
rl.Cur = rlimInf32
|
||||
} else if rlim.Cur < uint64(rlimInf32) {
|
||||
rl.Cur = uint32(rlim.Cur)
|
||||
} else {
|
||||
return EINVAL
|
||||
}
|
||||
if rlim.Max == rlimInf64 {
|
||||
rl.Max = rlimInf32
|
||||
} else if rlim.Max < uint64(rlimInf32) {
|
||||
rl.Max = uint32(rlim.Max)
|
||||
} else {
|
||||
return EINVAL
|
||||
}
|
||||
|
||||
return setrlimit(resource, &rl)
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return uint64(r.Regs[64]) }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = uint32(pc) }
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
//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)
|
||||
}
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
-1
@@ -132,7 +132,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
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)
|
||||
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
// 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 sparc64,linux
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
//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)
|
||||
//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 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
|
||||
//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 Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys 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)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
|
||||
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
|
||||
//sysnb socket(domain int, typ int, proto int) (fd int, err error)
|
||||
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
|
||||
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
func sysconf(name int) (n int64, err syscall.Errno)
|
||||
|
||||
// pageSize caches the value of Getpagesize, since it can't change
|
||||
// once the system is booted.
|
||||
var pageSize int64 // accessed atomically
|
||||
|
||||
func Getpagesize() int {
|
||||
n := atomic.LoadInt64(&pageSize)
|
||||
if n == 0 {
|
||||
n, _ = sysconf(_SC_PAGESIZE)
|
||||
atomic.StoreInt64(&pageSize, n)
|
||||
}
|
||||
return int(n)
|
||||
}
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
func Iopl(level int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//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 = int32(nsec % 1e9 / 1e3)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Tpc }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = 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)
|
||||
}
|
||||
|
||||
//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)
|
||||
}
|
||||
+10
-26
@@ -93,32 +93,16 @@ func nametomib(name string) (mib []_C_int, err error) {
|
||||
return mib, nil
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
if dirent.Reclen == 0 {
|
||||
buf = nil
|
||||
break
|
||||
}
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Fileno == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:dirent.Namlen])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (fd1 int, fd2 int, err error)
|
||||
|
||||
+10
-27
@@ -53,32 +53,16 @@ func nametomib(name string) (mib []_C_int, err error) {
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
if dirent.Reclen == 0 {
|
||||
buf = nil
|
||||
break
|
||||
}
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Fileno == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:dirent.Namlen])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
@@ -111,7 +95,6 @@ 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
-43
@@ -44,46 +44,36 @@ func clen(n []byte) int {
|
||||
return len(n)
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
if dirent.Reclen == 0 {
|
||||
buf = nil
|
||||
break
|
||||
}
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Ino == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:clen(bytes[:])])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func pipe() (r uintptr, w uintptr, err uintptr)
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (n int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
r0, w0, e1 := pipe()
|
||||
if e1 != 0 {
|
||||
err = syscall.Errno(e1)
|
||||
var pp [2]_C_int
|
||||
n, err := pipe(&pp)
|
||||
if n != 0 {
|
||||
return err
|
||||
}
|
||||
p[0], p[1] = int(r0), int(w0)
|
||||
return
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return nil
|
||||
}
|
||||
|
||||
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
@@ -269,24 +259,34 @@ func (w WaitStatus) StopSignal() syscall.Signal {
|
||||
|
||||
func (w WaitStatus) TrapCause() int { return -1 }
|
||||
|
||||
func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr)
|
||||
//sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
|
||||
|
||||
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
|
||||
r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage)
|
||||
if e1 != 0 {
|
||||
err = syscall.Errno(e1)
|
||||
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
|
||||
var status _C_int
|
||||
rpid, err := wait4(int32(pid), &status, options, rusage)
|
||||
wpid := int(rpid)
|
||||
if wpid == -1 {
|
||||
return wpid, err
|
||||
}
|
||||
return int(r0), err
|
||||
if wstatus != nil {
|
||||
*wstatus = WaitStatus(status)
|
||||
}
|
||||
return wpid, nil
|
||||
}
|
||||
|
||||
func gethostname() (name string, err uintptr)
|
||||
//sys gethostname(buf []byte) (n int, err error)
|
||||
|
||||
func Gethostname() (name string, err error) {
|
||||
name, e1 := gethostname()
|
||||
if e1 != 0 {
|
||||
err = syscall.Errno(e1)
|
||||
var buf [MaxHostNameLen]byte
|
||||
n, err := gethostname(buf[:])
|
||||
if n != 0 {
|
||||
return "", err
|
||||
}
|
||||
return name, err
|
||||
n = clen(buf[:])
|
||||
if n < 1 {
|
||||
return "", EFAULT
|
||||
}
|
||||
return string(buf[:n]), nil
|
||||
}
|
||||
|
||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
||||
|
||||
-5
@@ -49,11 +49,6 @@ func errnoErr(e syscall.Errno) error {
|
||||
return e
|
||||
}
|
||||
|
||||
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
// Mmap manager, for use by operating system-specific implementations.
|
||||
|
||||
type mmapper struct {
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// 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 darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
// +build !gccgo
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
+21
-2
@@ -58,6 +58,9 @@ package unix
|
||||
#include <utime.h>
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/hci.h>
|
||||
#include <linux/can.h>
|
||||
#include <linux/if_alg.h>
|
||||
#include <linux/vm_sockets.h>
|
||||
|
||||
#ifdef TCSETS2
|
||||
// On systems that have "struct termios2" use this as type Termios.
|
||||
@@ -105,6 +108,9 @@ typedef struct pt_regs PtraceRegs;
|
||||
typedef struct user PtraceRegs;
|
||||
#elif defined(__s390x__)
|
||||
typedef struct _user_regs_struct PtraceRegs;
|
||||
#elif defined(__sparc__)
|
||||
#include <asm/ptrace.h>
|
||||
typedef struct pt_regs PtraceRegs;
|
||||
#else
|
||||
typedef struct user_regs_struct PtraceRegs;
|
||||
#endif
|
||||
@@ -122,11 +128,11 @@ typedef struct {} ptracePer;
|
||||
// The real epoll_event is a union, and godefs doesn't handle it well.
|
||||
struct my_epoll_event {
|
||||
uint32_t events;
|
||||
#if defined(__ARM_EABI__) || defined(__aarch64__)
|
||||
#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32)
|
||||
// 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__)
|
||||
#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__)
|
||||
int32_t _padFd;
|
||||
#endif
|
||||
int32_t fd;
|
||||
@@ -215,6 +221,12 @@ type RawSockaddrNetlink C.struct_sockaddr_nl
|
||||
|
||||
type RawSockaddrHCI C.struct_sockaddr_hci
|
||||
|
||||
type RawSockaddrCAN C.struct_sockaddr_can
|
||||
|
||||
type RawSockaddrALG C.struct_sockaddr_alg
|
||||
|
||||
type RawSockaddrVM C.struct_sockaddr_vm
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
@@ -255,6 +267,9 @@ const (
|
||||
SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
|
||||
SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
|
||||
SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
|
||||
SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can
|
||||
SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg
|
||||
SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
|
||||
@@ -445,6 +460,10 @@ const (
|
||||
|
||||
type Sigset_t C.sigset_t
|
||||
|
||||
// sysconf information
|
||||
|
||||
const _SC_PAGESIZE = C._SC_PAGESIZE
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.termios_t
|
||||
|
||||
+2
@@ -22,6 +22,7 @@ package unix
|
||||
#define __USE_LEGACY_PROTOTYPES__ // iovec
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
@@ -81,6 +82,7 @@ const (
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
PathMax = C.PATH_MAX
|
||||
MaxHostNameLen = C.MAXHOSTNAMELEN
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
+68
@@ -51,8 +51,16 @@ const (
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
ARPHRD_ARCNET = 0x7
|
||||
@@ -145,6 +153,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80041270
|
||||
BLKBSZSET = 0x40041271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80041272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1000
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -190,6 +213,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x2000
|
||||
BSDLY = 0x2000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
@@ -366,6 +408,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -405,6 +453,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
@@ -789,6 +839,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1228,6 +1279,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1273,6 +1325,17 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1445,6 +1508,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x6
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
|
||||
+75
@@ -51,8 +51,16 @@ const (
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
ARPHRD_ARCNET = 0x7
|
||||
@@ -145,6 +153,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1000
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -190,6 +213,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x2000
|
||||
BSDLY = 0x2000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
@@ -366,6 +408,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -405,6 +453,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
@@ -747,6 +797,7 @@ const (
|
||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||
NETLINK_AUDIT = 0x9
|
||||
NETLINK_BROADCAST_ERROR = 0x4
|
||||
NETLINK_CAP_ACK = 0xa
|
||||
NETLINK_CONNECTOR = 0xb
|
||||
NETLINK_CRYPTO = 0x15
|
||||
NETLINK_DNRTMSG = 0xe
|
||||
@@ -759,14 +810,19 @@ const (
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
NETLINK_KOBJECT_UEVENT = 0xf
|
||||
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||
NETLINK_NETFILTER = 0xc
|
||||
NETLINK_NFLOG = 0x5
|
||||
NETLINK_NO_ENOBUFS = 0x5
|
||||
NETLINK_PKTINFO = 0x3
|
||||
NETLINK_RDMA = 0x14
|
||||
NETLINK_ROUTE = 0x0
|
||||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
@@ -789,6 +845,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1229,6 +1286,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1274,6 +1332,17 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1446,7 +1515,13 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x6
|
||||
VM_SOCKETS_INVALID_VERSION = 0xffffffff
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
VSTART = 0x8
|
||||
|
||||
+72
@@ -50,8 +50,16 @@ const (
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
ARPHRD_ARCNET = 0x7
|
||||
@@ -141,6 +149,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1000
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -186,6 +209,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x2000
|
||||
BSDLY = 0x2000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
@@ -351,6 +393,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -390,6 +438,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
@@ -707,6 +757,7 @@ const (
|
||||
NETLINK_AUDIT = 0x9
|
||||
NETLINK_BROADCAST_ERROR = 0x4
|
||||
NETLINK_CONNECTOR = 0xb
|
||||
NETLINK_CRYPTO = 0x15
|
||||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
@@ -723,8 +774,11 @@ const (
|
||||
NETLINK_PKTINFO = 0x3
|
||||
NETLINK_RDMA = 0x14
|
||||
NETLINK_ROUTE = 0x0
|
||||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
@@ -747,6 +801,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
NLM_F_MATCH = 0x200
|
||||
@@ -1152,6 +1207,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1197,6 +1253,17 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1369,6 +1436,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x6
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
|
||||
+70
@@ -54,6 +54,13 @@ const (
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
ARPHRD_ARCNET = 0x7
|
||||
@@ -149,6 +156,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1000
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -196,6 +218,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x2000
|
||||
BSDLY = 0x2000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
@@ -380,6 +421,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -419,6 +466,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
@@ -776,6 +825,7 @@ const (
|
||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||
NETLINK_AUDIT = 0x9
|
||||
NETLINK_BROADCAST_ERROR = 0x4
|
||||
NETLINK_CAP_ACK = 0xa
|
||||
NETLINK_CONNECTOR = 0xb
|
||||
NETLINK_CRYPTO = 0x15
|
||||
NETLINK_DNRTMSG = 0xe
|
||||
@@ -788,6 +838,8 @@ const (
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
NETLINK_KOBJECT_UEVENT = 0xf
|
||||
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||
NETLINK_NETFILTER = 0xc
|
||||
NETLINK_NFLOG = 0x5
|
||||
NETLINK_NO_ENOBUFS = 0x5
|
||||
@@ -821,6 +873,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1275,6 +1328,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1328,7 +1382,18 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SO_WIFI_STATUS = 0x29
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1523,6 +1588,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x6
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
|
||||
+1869
File diff suppressed because it is too large
Load Diff
+48
@@ -56,6 +56,13 @@ const (
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_6LOWPAN = 0x339
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
@@ -152,6 +159,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
@@ -374,6 +396,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FLUSHO = 0x2000
|
||||
@@ -413,6 +441,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
ICANON = 0x2
|
||||
ICMPV6_FILTER = 0x1
|
||||
@@ -806,6 +836,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1304,6 +1335,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0xffff
|
||||
@@ -1362,7 +1394,18 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x1008
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SO_WIFI_STATUS = 0x29
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1540,6 +1583,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x4
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
|
||||
+48
@@ -56,6 +56,13 @@ const (
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_6LOWPAN = 0x339
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
@@ -152,6 +159,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
@@ -374,6 +396,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FLUSHO = 0x2000
|
||||
@@ -413,6 +441,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
ICANON = 0x2
|
||||
ICMPV6_FILTER = 0x1
|
||||
@@ -806,6 +836,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1304,6 +1335,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0xffff
|
||||
@@ -1362,7 +1394,18 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x1008
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SO_WIFI_STATUS = 0x29
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1540,6 +1583,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x4
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
|
||||
+2066
File diff suppressed because it is too large
Load Diff
+70
@@ -54,6 +54,13 @@ const (
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_6LOWPAN = 0x339
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
@@ -150,6 +157,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x16
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1f
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -197,6 +219,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x8000
|
||||
BSDLY = 0x8000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0xff
|
||||
CBAUDEX = 0x0
|
||||
CFLUSH = 0xf
|
||||
@@ -382,6 +423,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -424,6 +471,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x4000
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x100
|
||||
@@ -766,6 +815,7 @@ const (
|
||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||
NETLINK_AUDIT = 0x9
|
||||
NETLINK_BROADCAST_ERROR = 0x4
|
||||
NETLINK_CAP_ACK = 0xa
|
||||
NETLINK_CONNECTOR = 0xb
|
||||
NETLINK_CRYPTO = 0x15
|
||||
NETLINK_DNRTMSG = 0xe
|
||||
@@ -778,6 +828,8 @@ const (
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
NETLINK_KOBJECT_UEVENT = 0xf
|
||||
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||
NETLINK_NETFILTER = 0xc
|
||||
NETLINK_NFLOG = 0x5
|
||||
NETLINK_NO_ENOBUFS = 0x5
|
||||
@@ -813,6 +865,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1342,6 +1395,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1396,7 +1450,18 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SO_WIFI_STATUS = 0x29
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1595,6 +1660,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x5
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xb
|
||||
|
||||
+67
@@ -54,6 +54,13 @@ const (
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
ARPHRD_ARCNET = 0x7
|
||||
@@ -149,6 +156,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x16
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1f
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -196,6 +218,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x8000
|
||||
BSDLY = 0x8000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0xff
|
||||
CBAUDEX = 0x0
|
||||
CFLUSH = 0xf
|
||||
@@ -378,6 +419,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -417,6 +464,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x4000
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x100
|
||||
@@ -821,6 +870,7 @@ const (
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
NLM_F_DUMP_INTR = 0x10
|
||||
NLM_F_ECHO = 0x8
|
||||
NLM_F_EXCL = 0x200
|
||||
@@ -1342,6 +1392,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1395,7 +1446,18 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SO_WIFI_STATUS = 0x29
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1594,6 +1656,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x5
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xb
|
||||
|
||||
+66
@@ -56,6 +56,13 @@ const (
|
||||
AF_VSOCK = 0x28
|
||||
AF_WANPIPE = 0x19
|
||||
AF_X25 = 0x9
|
||||
ALG_OP_DECRYPT = 0x0
|
||||
ALG_OP_ENCRYPT = 0x1
|
||||
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||
ALG_SET_IV = 0x2
|
||||
ALG_SET_KEY = 0x1
|
||||
ALG_SET_OP = 0x3
|
||||
ARPHRD_6LOWPAN = 0x339
|
||||
ARPHRD_ADAPT = 0x108
|
||||
ARPHRD_APPLETLK = 0x8
|
||||
@@ -152,6 +159,21 @@ const (
|
||||
B75 = 0x2
|
||||
B921600 = 0x1007
|
||||
B9600 = 0xd
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
BLKFLSBUF = 0x1261
|
||||
BLKFRAGET = 0x1265
|
||||
BLKFRASET = 0x1264
|
||||
BLKGETSIZE = 0x1260
|
||||
BLKGETSIZE64 = 0x80081272
|
||||
BLKRAGET = 0x1263
|
||||
BLKRASET = 0x1262
|
||||
BLKROGET = 0x125e
|
||||
BLKROSET = 0x125d
|
||||
BLKRRPART = 0x125f
|
||||
BLKSECTGET = 0x1267
|
||||
BLKSECTSET = 0x1266
|
||||
BLKSSZGET = 0x1268
|
||||
BOTHER = 0x1000
|
||||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
@@ -201,6 +223,25 @@ const (
|
||||
BS0 = 0x0
|
||||
BS1 = 0x2000
|
||||
BSDLY = 0x2000
|
||||
CAN_BCM = 0x2
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
CAN_ERR_FLAG = 0x20000000
|
||||
CAN_ERR_MASK = 0x1fffffff
|
||||
CAN_INV_FILTER = 0x20000000
|
||||
CAN_ISOTP = 0x6
|
||||
CAN_MAX_DLC = 0x8
|
||||
CAN_MAX_DLEN = 0x8
|
||||
CAN_MCNET = 0x5
|
||||
CAN_MTU = 0x10
|
||||
CAN_NPROTO = 0x7
|
||||
CAN_RAW = 0x1
|
||||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
@@ -388,6 +429,12 @@ const (
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@@ -430,6 +477,8 @@ const (
|
||||
F_ULOCK = 0x0
|
||||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x1
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
@@ -1393,6 +1442,7 @@ const (
|
||||
SOL_IP = 0x0
|
||||
SOL_IPV6 = 0x29
|
||||
SOL_IRDA = 0x10a
|
||||
SOL_NETLINK = 0x10e
|
||||
SOL_PACKET = 0x107
|
||||
SOL_RAW = 0xff
|
||||
SOL_SOCKET = 0x1
|
||||
@@ -1450,7 +1500,18 @@ const (
|
||||
SO_TIMESTAMPING = 0x25
|
||||
SO_TIMESTAMPNS = 0x23
|
||||
SO_TYPE = 0x3
|
||||
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
SO_WIFI_STATUS = 0x29
|
||||
SPLICE_F_GIFT = 0x8
|
||||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
@@ -1653,6 +1714,11 @@ const (
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x6
|
||||
VQUIT = 0x1
|
||||
VREPRINT = 0xc
|
||||
|
||||
+2142
File diff suppressed because it is too large
Load Diff
+2
-35
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
|
||||
// mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build 386,darwin
|
||||
// +build darwin,386
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -307,7 +305,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -333,7 +330,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -349,7 +345,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -365,7 +360,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -381,7 +375,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -397,7 +390,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -449,8 +441,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -727,7 +717,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -748,8 +737,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -775,7 +762,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -791,7 +777,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -807,7 +792,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -823,7 +807,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -907,7 +890,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -924,7 +906,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -998,7 +979,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1020,8 +1000,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1037,7 +1015,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1053,7 +1030,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1120,7 +1096,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1227,7 +1202,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1264,8 +1237,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1291,7 +1262,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1315,7 +1285,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1331,7 +1300,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1347,7 +1315,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-36
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// mksyscall.pl -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,darwin
|
||||
// +build darwin,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -307,7 +305,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -333,7 +330,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -349,7 +345,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -365,7 +360,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -381,7 +375,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -397,7 +390,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -449,8 +441,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -727,7 +717,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -748,8 +737,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -775,7 +762,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -791,7 +777,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -807,7 +792,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -823,7 +807,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -907,7 +890,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -924,7 +906,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -998,7 +979,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1020,8 +1000,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1037,7 +1015,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1053,7 +1030,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1120,7 +1096,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1227,7 +1202,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1264,8 +1237,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1291,7 +1262,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1315,7 +1285,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1331,7 +1300,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1347,7 +1315,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1423,7 +1390,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+9
-42
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
|
||||
// mksyscall.pl -l32 -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build arm,darwin
|
||||
// +build darwin,arm
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -307,7 +305,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -333,7 +330,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -349,7 +345,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -365,7 +360,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -381,7 +375,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -397,7 +390,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -449,8 +441,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -558,7 +548,7 @@ func Fsync(fd int) (err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Ftruncate(fd int, length int64) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
|
||||
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -727,7 +717,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -748,8 +737,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -775,7 +762,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -791,7 +777,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -807,7 +792,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -823,7 +807,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -907,7 +890,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -924,7 +906,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -941,7 +922,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
||||
r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -958,7 +939,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
||||
r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -998,7 +979,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1020,8 +1000,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1037,7 +1015,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1053,7 +1030,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1063,8 +1039,8 @@ func Rmdir(path string) (err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
newoffset = int64(r0)
|
||||
r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
|
||||
newoffset = int64(int64(r1)<<32 | int64(r0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1120,7 +1096,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1227,7 +1202,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1264,8 +1237,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1290,8 +1261,7 @@ func Truncate(path string, length int64) (err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1315,7 +1285,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1331,7 +1300,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1347,7 +1315,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1374,7 +1341,7 @@ func write(fd int, p []byte) (n int, err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
|
||||
r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
|
||||
ret = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
|
||||
+2
-35
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build arm64,darwin
|
||||
// +build darwin,arm64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -307,7 +305,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -333,7 +330,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -349,7 +345,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -365,7 +360,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -381,7 +375,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -397,7 +390,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -449,8 +441,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -727,7 +717,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -748,8 +737,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -775,7 +762,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -791,7 +777,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -807,7 +792,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -823,7 +807,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -907,7 +890,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -924,7 +906,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -998,7 +979,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1020,8 +1000,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1037,7 +1015,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1053,7 +1030,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1120,7 +1096,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1227,7 +1202,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1264,8 +1237,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1291,7 +1262,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1315,7 +1285,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1331,7 +1300,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1347,7 +1315,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-33
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
|
||||
// mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,dragonfly
|
||||
// +build dragonfly,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -321,7 +319,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -347,7 +344,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -363,7 +359,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -379,7 +374,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +389,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -411,7 +404,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -739,7 +731,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -760,8 +751,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -787,7 +776,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -803,7 +791,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -819,7 +806,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -835,7 +821,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -929,7 +914,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -946,7 +930,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -986,7 +969,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1008,8 +990,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1025,7 +1005,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1041,7 +1020,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1108,7 +1086,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1225,7 +1202,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1241,7 +1217,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1262,8 +1237,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1289,7 +1262,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1313,7 +1285,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1329,7 +1300,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1345,7 +1315,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-50
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
|
||||
// mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build 386,freebsd
|
||||
// +build freebsd,386
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -287,7 +285,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -313,7 +310,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -329,7 +325,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -345,7 +340,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -361,7 +355,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -377,7 +370,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -431,7 +423,6 @@ func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbyt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -448,7 +439,6 @@ func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbyt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -465,7 +455,6 @@ func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -497,8 +486,6 @@ func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -520,8 +507,6 @@ func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -543,8 +528,6 @@ func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err err
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -560,7 +543,6 @@ func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -582,8 +564,6 @@ func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -605,8 +585,6 @@ func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -628,8 +606,6 @@ func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err err
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -645,7 +621,6 @@ func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -946,7 +921,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -967,8 +941,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -994,7 +966,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1010,7 +981,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1026,7 +996,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1042,7 +1011,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1136,7 +1104,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1153,7 +1120,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1227,7 +1193,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1249,8 +1214,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1266,7 +1229,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1282,7 +1244,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1349,7 +1310,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1466,7 +1426,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1482,7 +1441,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1503,8 +1461,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1530,7 +1486,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1554,7 +1509,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1570,7 +1524,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1586,7 +1539,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-50
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
|
||||
// mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,freebsd
|
||||
// +build freebsd,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -287,7 +285,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -313,7 +310,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -329,7 +325,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -345,7 +340,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -361,7 +355,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -377,7 +370,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -431,7 +423,6 @@ func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbyt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -448,7 +439,6 @@ func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbyt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -465,7 +455,6 @@ func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -497,8 +486,6 @@ func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -520,8 +507,6 @@ func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -543,8 +528,6 @@ func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err err
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -560,7 +543,6 @@ func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -582,8 +564,6 @@ func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -605,8 +585,6 @@ func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -628,8 +606,6 @@ func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err err
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -645,7 +621,6 @@ func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -946,7 +921,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -967,8 +941,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -994,7 +966,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1010,7 +981,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1026,7 +996,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1042,7 +1011,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1136,7 +1104,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1153,7 +1120,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1227,7 +1193,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1249,8 +1214,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1266,7 +1229,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1282,7 +1244,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1349,7 +1310,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1466,7 +1426,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1482,7 +1441,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1503,8 +1461,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1530,7 +1486,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1554,7 +1509,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1570,7 +1524,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1586,7 +1539,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-50
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
|
||||
// mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build arm,freebsd
|
||||
// +build freebsd,arm
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -287,7 +285,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -313,7 +310,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -329,7 +325,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -345,7 +340,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -361,7 +355,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -377,7 +370,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -431,7 +423,6 @@ func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbyt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -448,7 +439,6 @@ func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbyt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -465,7 +455,6 @@ func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -497,8 +486,6 @@ func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -520,8 +507,6 @@ func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -543,8 +528,6 @@ func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err err
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -560,7 +543,6 @@ func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -582,8 +564,6 @@ func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -605,8 +585,6 @@ func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintpt
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -628,8 +606,6 @@ func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err err
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -645,7 +621,6 @@ func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
ret = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -946,7 +921,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -967,8 +941,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -994,7 +966,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1010,7 +981,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1026,7 +996,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1042,7 +1011,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1136,7 +1104,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1153,7 +1120,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1227,7 +1193,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -1249,8 +1214,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1266,7 +1229,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1282,7 +1244,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1349,7 +1310,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1466,7 +1426,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1482,7 +1441,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1503,8 +1461,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1530,7 +1486,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1554,7 +1509,6 @@ func Undelete(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1570,7 +1524,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1586,7 +1539,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-46
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
|
||||
// mksyscall.pl -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build 386,linux
|
||||
// +build linux,386
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1340,7 +1334,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1356,7 +1349,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1488,7 +1480,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1514,7 +1505,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1641,7 +1631,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-47
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_amd64.go
|
||||
// mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,linux
|
||||
// +build linux,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1357,7 +1351,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1383,7 +1376,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1567,7 +1559,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1583,7 +1574,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1609,7 +1599,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1815,7 +1804,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-45
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go
|
||||
// mksyscall.pl -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build arm,linux
|
||||
// +build linux,arm
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1469,7 +1463,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1495,7 +1488,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1614,7 +1606,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1701,7 +1692,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-44
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_arm64.go
|
||||
// mksyscall.pl -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build arm64,linux
|
||||
// +build linux,arm64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1244,7 +1238,6 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1490,7 +1483,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1516,7 +1508,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+1807
File diff suppressed because it is too large
Load Diff
+35
-47
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
|
||||
// mksyscall.pl -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build mips64,linux
|
||||
// +build linux,mips64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1296,7 +1290,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1490,7 +1483,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1516,7 +1508,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1732,7 +1723,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1768,7 +1758,6 @@ func lstat(path string, st *stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1784,7 +1773,6 @@ func stat(path string, st *stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-47
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
|
||||
// mksyscall.pl -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build mips64le,linux
|
||||
// +build linux,mips64le
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1296,7 +1290,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1490,7 +1483,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1516,7 +1508,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1732,7 +1723,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1768,7 +1758,6 @@ func lstat(path string, st *stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1784,7 +1773,6 @@ func stat(path string, st *stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+1807
File diff suppressed because it is too large
Load Diff
+35
-47
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
|
||||
// mksyscall.pl -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build ppc64,linux
|
||||
// +build linux,ppc64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1347,7 +1341,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1373,7 +1366,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1557,7 +1549,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1573,7 +1564,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1599,7 +1589,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1826,7 +1815,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-47
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
|
||||
// mksyscall.pl -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build ppc64le,linux
|
||||
// +build linux,ppc64le
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1347,7 +1341,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1373,7 +1366,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1557,7 +1549,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1573,7 +1564,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1599,7 +1589,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1826,7 +1815,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+35
-47
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl syscall_linux.go syscall_linux_s390x.go
|
||||
// mksyscall.pl -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build s390x,linux
|
||||
// +build linux,s390x
|
||||
|
||||
package unix
|
||||
|
||||
@@ -26,8 +26,6 @@ func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags in
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -43,7 +41,6 @@ func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -64,7 +61,7 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
|
||||
|
||||
// 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) {
|
||||
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -87,7 +83,7 @@ func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
@@ -99,8 +95,6 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -109,14 +103,13 @@ func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -132,7 +125,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -148,7 +140,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -212,7 +203,6 @@ func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -238,9 +228,6 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
use(unsafe.Pointer(_p2))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -256,7 +243,6 @@ func Acct(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -283,7 +269,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -299,7 +284,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -395,7 +379,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -441,7 +424,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -457,7 +439,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -562,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
@@ -572,6 +570,17 @@ func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsid(pid int) (sid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
|
||||
sid = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
@@ -598,8 +607,6 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -616,7 +623,6 @@ func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err e
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
||||
use(unsafe.Pointer(_p0))
|
||||
watchdesc = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -688,7 +694,6 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
sz = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -705,7 +710,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -721,7 +725,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -752,8 +755,6 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -762,8 +763,8 @@ func PivotRoot(newroot string, putold string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -811,8 +812,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -833,8 +832,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -944,8 +941,6 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
_p2 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1028,7 +1023,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1337,7 +1331,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1353,7 +1346,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1527,7 +1519,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1543,7 +1534,6 @@ func Statfs(path string, buf *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1569,7 +1559,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1616,7 +1605,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+1822
File diff suppressed because it is too large
Load Diff
+2
-30
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
|
||||
// mksyscall.pl -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build 386,netbsd
|
||||
// +build netbsd,386
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -304,7 +302,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -330,7 +327,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -346,7 +342,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -362,7 +357,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -378,7 +372,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -394,7 +387,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -687,7 +679,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -708,8 +699,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -735,7 +724,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -751,7 +739,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -767,7 +754,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -783,7 +769,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -877,7 +862,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -894,7 +878,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -968,7 +951,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -990,8 +972,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1007,7 +987,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1023,7 +1002,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1171,7 +1149,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1192,8 +1169,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1219,7 +1194,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1259,7 +1232,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-30
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
|
||||
// mksyscall.pl -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,netbsd
|
||||
// +build netbsd,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -304,7 +302,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -330,7 +327,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -346,7 +342,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -362,7 +357,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -378,7 +372,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -394,7 +387,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -687,7 +679,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -708,8 +699,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -735,7 +724,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -751,7 +739,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -767,7 +754,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -783,7 +769,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -877,7 +862,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -894,7 +878,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -968,7 +951,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -990,8 +972,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1007,7 +987,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1023,7 +1002,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1171,7 +1149,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1192,8 +1169,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1219,7 +1194,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1259,7 +1232,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-30
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
|
||||
// mksyscall.pl -l32 -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build arm,netbsd
|
||||
// +build netbsd,arm
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -304,7 +302,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -330,7 +327,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -346,7 +342,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -362,7 +357,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -378,7 +372,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -394,7 +387,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -687,7 +679,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -708,8 +699,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -735,7 +724,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -751,7 +739,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -767,7 +754,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -783,7 +769,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -877,7 +862,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -894,7 +878,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -968,7 +951,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -990,8 +972,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1007,7 +987,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1023,7 +1002,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1171,7 +1149,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1192,8 +1169,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1219,7 +1194,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1243,7 +1217,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1259,7 +1232,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-32
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
|
||||
// mksyscall.pl -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build 386,openbsd
|
||||
// +build openbsd,386
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -302,7 +300,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -328,7 +325,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -344,7 +340,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -360,7 +355,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -376,7 +370,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -392,7 +385,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -695,7 +687,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -716,8 +707,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -743,7 +732,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -759,7 +747,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -775,7 +762,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -791,7 +777,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -885,7 +870,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -902,7 +886,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -976,7 +959,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -998,8 +980,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1015,7 +995,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1031,7 +1010,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1098,7 +1076,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1215,7 +1192,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1231,7 +1207,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1252,8 +1227,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1279,7 +1252,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1303,7 +1275,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1319,7 +1290,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+2
-32
@@ -1,7 +1,7 @@
|
||||
// mksyscall.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
|
||||
// mksyscall.pl -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,openbsd
|
||||
// +build openbsd,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -222,7 +222,6 @@ 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)
|
||||
}
|
||||
@@ -238,7 +237,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -302,7 +300,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -328,7 +325,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -344,7 +340,6 @@ func Chflags(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -360,7 +355,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -376,7 +370,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -392,7 +385,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -695,7 +687,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -716,8 +707,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -743,7 +732,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -759,7 +747,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -775,7 +762,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -791,7 +777,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -885,7 +870,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -902,7 +886,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -976,7 +959,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -998,8 +980,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1015,7 +995,6 @@ func Revoke(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1031,7 +1010,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1098,7 +1076,6 @@ func Setlogin(name string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1215,7 +1192,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1231,7 +1207,6 @@ func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1252,8 +1227,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1279,7 +1252,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1303,7 +1275,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -1319,7 +1290,6 @@ func Unmount(path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+42
-39
@@ -1,7 +1,7 @@
|
||||
// mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go
|
||||
// mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
|
||||
// +build amd64,solaris
|
||||
// +build solaris,amd64
|
||||
|
||||
package unix
|
||||
|
||||
@@ -10,10 +10,13 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//go:cgo_import_dynamic libc_pipe pipe "libc.so"
|
||||
//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
|
||||
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
|
||||
//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
|
||||
//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
|
||||
//go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
|
||||
//go:cgo_import_dynamic libc_utimes utimes "libc.so"
|
||||
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
|
||||
@@ -125,10 +128,13 @@ import (
|
||||
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
|
||||
|
||||
//go:linkname procpipe libc_pipe
|
||||
//go:linkname procgetsockname libc_getsockname
|
||||
//go:linkname procGetcwd libc_getcwd
|
||||
//go:linkname procgetgroups libc_getgroups
|
||||
//go:linkname procsetgroups libc_setgroups
|
||||
//go:linkname procwait4 libc_wait4
|
||||
//go:linkname procgethostname libc_gethostname
|
||||
//go:linkname procutimes libc_utimes
|
||||
//go:linkname procutimensat libc_utimensat
|
||||
//go:linkname procfcntl libc_fcntl
|
||||
@@ -241,10 +247,13 @@ import (
|
||||
//go:linkname procsysconf libc_sysconf
|
||||
|
||||
var (
|
||||
procpipe,
|
||||
procgetsockname,
|
||||
procGetcwd,
|
||||
procgetgroups,
|
||||
procsetgroups,
|
||||
procwait4,
|
||||
procgethostname,
|
||||
procutimes,
|
||||
procutimensat,
|
||||
procfcntl,
|
||||
@@ -357,6 +366,15 @@ var (
|
||||
procsysconf syscallFunc
|
||||
)
|
||||
|
||||
func pipe(p *[2]_C_int) (n int, err error) {
|
||||
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
@@ -395,6 +413,28 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
|
||||
wpid = int32(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func gethostname(buf []byte) (n int, err error) {
|
||||
var _p0 *byte
|
||||
if len(buf) > 0 {
|
||||
_p0 = &buf[0]
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func utimes(path string, times *[2]Timeval) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@@ -402,7 +442,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -416,7 +455,6 @@ func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -490,7 +528,6 @@ func Access(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -512,7 +549,6 @@ func Chdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -526,7 +562,6 @@ func Chmod(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -540,7 +575,6 @@ func Chown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -554,7 +588,6 @@ func Chroot(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -576,7 +609,6 @@ func Creat(path string, mode uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
@@ -629,7 +661,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -651,7 +682,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -798,7 +828,6 @@ func Lchown(path string, uid int, gid int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -817,8 +846,6 @@ func Link(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -840,7 +867,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -866,7 +892,6 @@ func Mkdir(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -880,7 +905,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -894,7 +918,6 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -908,7 +931,6 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -922,7 +944,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -936,7 +957,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1010,7 +1030,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
@@ -1025,7 +1044,6 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
|
||||
return
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
@@ -1040,7 +1058,6 @@ func Pathconf(path string, name int) (val int, err error) {
|
||||
return
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
@@ -1106,7 +1123,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
||||
_p1 = &buf[0]
|
||||
}
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
@@ -1126,8 +1142,6 @@ func Rename(from string, to string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1146,8 +1160,6 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1161,7 +1173,6 @@ func Rmdir(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1285,7 +1296,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1304,8 +1314,6 @@ func Symlink(path string, link string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
use(unsafe.Pointer(_p1))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1336,7 +1344,6 @@ func Truncate(path string, length int64) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1380,7 +1387,6 @@ func Unmount(target string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1394,7 +1400,6 @@ func Unlink(path string) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1408,7 +1413,6 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
@@ -1430,7 +1434,6 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
return
|
||||
}
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
|
||||
use(unsafe.Pointer(_p0))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
|
||||
+35
-2
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd_32.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D__i386__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build 386,linux
|
||||
@@ -226,7 +226,6 @@ const (
|
||||
SYS_PIVOT_ROOT = 217
|
||||
SYS_MINCORE = 218
|
||||
SYS_MADVISE = 219
|
||||
SYS_MADVISE1 = 219
|
||||
SYS_GETDENTS64 = 220
|
||||
SYS_FCNTL64 = 221
|
||||
SYS_GETTID = 224
|
||||
@@ -352,4 +351,38 @@ const (
|
||||
SYS_SETNS = 346
|
||||
SYS_PROCESS_VM_READV = 347
|
||||
SYS_PROCESS_VM_WRITEV = 348
|
||||
SYS_KCMP = 349
|
||||
SYS_FINIT_MODULE = 350
|
||||
SYS_SCHED_SETATTR = 351
|
||||
SYS_SCHED_GETATTR = 352
|
||||
SYS_RENAMEAT2 = 353
|
||||
SYS_SECCOMP = 354
|
||||
SYS_GETRANDOM = 355
|
||||
SYS_MEMFD_CREATE = 356
|
||||
SYS_BPF = 357
|
||||
SYS_EXECVEAT = 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_USERFAULTFD = 374
|
||||
SYS_MEMBARRIER = 375
|
||||
SYS_MLOCK2 = 376
|
||||
SYS_COPY_FILE_RANGE = 377
|
||||
SYS_PREADV2 = 378
|
||||
SYS_PWRITEV2 = 379
|
||||
SYS_PKEY_MPROTECT = 380
|
||||
SYS_PKEY_ALLOC = 381
|
||||
SYS_PKEY_FREE = 382
|
||||
)
|
||||
|
||||
+21
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd_64.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build amd64,linux
|
||||
@@ -318,4 +318,24 @@ const (
|
||||
SYS_GETCPU = 309
|
||||
SYS_PROCESS_VM_READV = 310
|
||||
SYS_PROCESS_VM_WRITEV = 311
|
||||
SYS_KCMP = 312
|
||||
SYS_FINIT_MODULE = 313
|
||||
SYS_SCHED_SETATTR = 314
|
||||
SYS_SCHED_GETATTR = 315
|
||||
SYS_RENAMEAT2 = 316
|
||||
SYS_SECCOMP = 317
|
||||
SYS_GETRANDOM = 318
|
||||
SYS_MEMFD_CREATE = 319
|
||||
SYS_KEXEC_FILE_LOAD = 320
|
||||
SYS_BPF = 321
|
||||
SYS_EXECVEAT = 322
|
||||
SYS_USERFAULTFD = 323
|
||||
SYS_MEMBARRIER = 324
|
||||
SYS_MLOCK2 = 325
|
||||
SYS_COPY_FILE_RANGE = 326
|
||||
SYS_PREADV2 = 327
|
||||
SYS_PWRITEV2 = 328
|
||||
SYS_PKEY_MPROTECT = 329
|
||||
SYS_PKEY_ALLOC = 330
|
||||
SYS_PKEY_FREE = 331
|
||||
)
|
||||
|
||||
+20
-15
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D__ARM_EABI__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build arm,linux
|
||||
@@ -6,8 +6,6 @@
|
||||
package unix
|
||||
|
||||
const (
|
||||
SYS_OABI_SYSCALL_BASE = 0
|
||||
SYS_SYSCALL_BASE = 0
|
||||
SYS_RESTART_SYSCALL = 0
|
||||
SYS_EXIT = 1
|
||||
SYS_FORK = 2
|
||||
@@ -20,21 +18,16 @@ const (
|
||||
SYS_UNLINK = 10
|
||||
SYS_EXECVE = 11
|
||||
SYS_CHDIR = 12
|
||||
SYS_TIME = 13
|
||||
SYS_MKNOD = 14
|
||||
SYS_CHMOD = 15
|
||||
SYS_LCHOWN = 16
|
||||
SYS_LSEEK = 19
|
||||
SYS_GETPID = 20
|
||||
SYS_MOUNT = 21
|
||||
SYS_UMOUNT = 22
|
||||
SYS_SETUID = 23
|
||||
SYS_GETUID = 24
|
||||
SYS_STIME = 25
|
||||
SYS_PTRACE = 26
|
||||
SYS_ALARM = 27
|
||||
SYS_PAUSE = 29
|
||||
SYS_UTIME = 30
|
||||
SYS_ACCESS = 33
|
||||
SYS_NICE = 34
|
||||
SYS_SYNC = 36
|
||||
@@ -69,20 +62,16 @@ const (
|
||||
SYS_SIGPENDING = 73
|
||||
SYS_SETHOSTNAME = 74
|
||||
SYS_SETRLIMIT = 75
|
||||
SYS_GETRLIMIT = 76
|
||||
SYS_GETRUSAGE = 77
|
||||
SYS_GETTIMEOFDAY = 78
|
||||
SYS_SETTIMEOFDAY = 79
|
||||
SYS_GETGROUPS = 80
|
||||
SYS_SETGROUPS = 81
|
||||
SYS_SELECT = 82
|
||||
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
|
||||
@@ -92,7 +81,6 @@ const (
|
||||
SYS_SETPRIORITY = 97
|
||||
SYS_STATFS = 99
|
||||
SYS_FSTATFS = 100
|
||||
SYS_SOCKETCALL = 102
|
||||
SYS_SYSLOG = 103
|
||||
SYS_SETITIMER = 104
|
||||
SYS_GETITIMER = 105
|
||||
@@ -100,11 +88,9 @@ const (
|
||||
SYS_LSTAT = 107
|
||||
SYS_FSTAT = 108
|
||||
SYS_VHANGUP = 111
|
||||
SYS_SYSCALL = 113
|
||||
SYS_WAIT4 = 114
|
||||
SYS_SWAPOFF = 115
|
||||
SYS_SYSINFO = 116
|
||||
SYS_IPC = 117
|
||||
SYS_FSYNC = 118
|
||||
SYS_SIGRETURN = 119
|
||||
SYS_CLONE = 120
|
||||
@@ -353,4 +339,23 @@ const (
|
||||
SYS_SETNS = 375
|
||||
SYS_PROCESS_VM_READV = 376
|
||||
SYS_PROCESS_VM_WRITEV = 377
|
||||
SYS_KCMP = 378
|
||||
SYS_FINIT_MODULE = 379
|
||||
SYS_SCHED_SETATTR = 380
|
||||
SYS_SCHED_GETATTR = 381
|
||||
SYS_RENAMEAT2 = 382
|
||||
SYS_SECCOMP = 383
|
||||
SYS_GETRANDOM = 384
|
||||
SYS_MEMFD_CREATE = 385
|
||||
SYS_BPF = 386
|
||||
SYS_EXECVEAT = 387
|
||||
SYS_USERFAULTFD = 388
|
||||
SYS_MEMBARRIER = 389
|
||||
SYS_MLOCK2 = 390
|
||||
SYS_COPY_FILE_RANGE = 391
|
||||
SYS_PREADV2 = 392
|
||||
SYS_PWRITEV2 = 393
|
||||
SYS_PKEY_MPROTECT = 394
|
||||
SYS_PKEY_ALLOC = 395
|
||||
SYS_PKEY_FREE = 396
|
||||
)
|
||||
|
||||
+14
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm-generic/unistd.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build arm64,linux
|
||||
@@ -269,4 +269,17 @@ const (
|
||||
SYS_SCHED_GETATTR = 275
|
||||
SYS_RENAMEAT2 = 276
|
||||
SYS_SECCOMP = 277
|
||||
SYS_GETRANDOM = 278
|
||||
SYS_MEMFD_CREATE = 279
|
||||
SYS_BPF = 280
|
||||
SYS_EXECVEAT = 281
|
||||
SYS_USERFAULTFD = 282
|
||||
SYS_MEMBARRIER = 283
|
||||
SYS_MLOCK2 = 284
|
||||
SYS_COPY_FILE_RANGE = 285
|
||||
SYS_PREADV2 = 286
|
||||
SYS_PWRITEV2 = 287
|
||||
SYS_PKEY_MPROTECT = 288
|
||||
SYS_PKEY_ALLOC = 289
|
||||
SYS_PKEY_FREE = 290
|
||||
)
|
||||
|
||||
+374
@@ -0,0 +1,374 @@
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__MIPSEB__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build mips,linux
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
SYS_SYSCALL = 4000
|
||||
SYS_EXIT = 4001
|
||||
SYS_FORK = 4002
|
||||
SYS_READ = 4003
|
||||
SYS_WRITE = 4004
|
||||
SYS_OPEN = 4005
|
||||
SYS_CLOSE = 4006
|
||||
SYS_WAITPID = 4007
|
||||
SYS_CREAT = 4008
|
||||
SYS_LINK = 4009
|
||||
SYS_UNLINK = 4010
|
||||
SYS_EXECVE = 4011
|
||||
SYS_CHDIR = 4012
|
||||
SYS_TIME = 4013
|
||||
SYS_MKNOD = 4014
|
||||
SYS_CHMOD = 4015
|
||||
SYS_LCHOWN = 4016
|
||||
SYS_BREAK = 4017
|
||||
SYS_UNUSED18 = 4018
|
||||
SYS_LSEEK = 4019
|
||||
SYS_GETPID = 4020
|
||||
SYS_MOUNT = 4021
|
||||
SYS_UMOUNT = 4022
|
||||
SYS_SETUID = 4023
|
||||
SYS_GETUID = 4024
|
||||
SYS_STIME = 4025
|
||||
SYS_PTRACE = 4026
|
||||
SYS_ALARM = 4027
|
||||
SYS_UNUSED28 = 4028
|
||||
SYS_PAUSE = 4029
|
||||
SYS_UTIME = 4030
|
||||
SYS_STTY = 4031
|
||||
SYS_GTTY = 4032
|
||||
SYS_ACCESS = 4033
|
||||
SYS_NICE = 4034
|
||||
SYS_FTIME = 4035
|
||||
SYS_SYNC = 4036
|
||||
SYS_KILL = 4037
|
||||
SYS_RENAME = 4038
|
||||
SYS_MKDIR = 4039
|
||||
SYS_RMDIR = 4040
|
||||
SYS_DUP = 4041
|
||||
SYS_PIPE = 4042
|
||||
SYS_TIMES = 4043
|
||||
SYS_PROF = 4044
|
||||
SYS_BRK = 4045
|
||||
SYS_SETGID = 4046
|
||||
SYS_GETGID = 4047
|
||||
SYS_SIGNAL = 4048
|
||||
SYS_GETEUID = 4049
|
||||
SYS_GETEGID = 4050
|
||||
SYS_ACCT = 4051
|
||||
SYS_UMOUNT2 = 4052
|
||||
SYS_LOCK = 4053
|
||||
SYS_IOCTL = 4054
|
||||
SYS_FCNTL = 4055
|
||||
SYS_MPX = 4056
|
||||
SYS_SETPGID = 4057
|
||||
SYS_ULIMIT = 4058
|
||||
SYS_UNUSED59 = 4059
|
||||
SYS_UMASK = 4060
|
||||
SYS_CHROOT = 4061
|
||||
SYS_USTAT = 4062
|
||||
SYS_DUP2 = 4063
|
||||
SYS_GETPPID = 4064
|
||||
SYS_GETPGRP = 4065
|
||||
SYS_SETSID = 4066
|
||||
SYS_SIGACTION = 4067
|
||||
SYS_SGETMASK = 4068
|
||||
SYS_SSETMASK = 4069
|
||||
SYS_SETREUID = 4070
|
||||
SYS_SETREGID = 4071
|
||||
SYS_SIGSUSPEND = 4072
|
||||
SYS_SIGPENDING = 4073
|
||||
SYS_SETHOSTNAME = 4074
|
||||
SYS_SETRLIMIT = 4075
|
||||
SYS_GETRLIMIT = 4076
|
||||
SYS_GETRUSAGE = 4077
|
||||
SYS_GETTIMEOFDAY = 4078
|
||||
SYS_SETTIMEOFDAY = 4079
|
||||
SYS_GETGROUPS = 4080
|
||||
SYS_SETGROUPS = 4081
|
||||
SYS_RESERVED82 = 4082
|
||||
SYS_SYMLINK = 4083
|
||||
SYS_UNUSED84 = 4084
|
||||
SYS_READLINK = 4085
|
||||
SYS_USELIB = 4086
|
||||
SYS_SWAPON = 4087
|
||||
SYS_REBOOT = 4088
|
||||
SYS_READDIR = 4089
|
||||
SYS_MMAP = 4090
|
||||
SYS_MUNMAP = 4091
|
||||
SYS_TRUNCATE = 4092
|
||||
SYS_FTRUNCATE = 4093
|
||||
SYS_FCHMOD = 4094
|
||||
SYS_FCHOWN = 4095
|
||||
SYS_GETPRIORITY = 4096
|
||||
SYS_SETPRIORITY = 4097
|
||||
SYS_PROFIL = 4098
|
||||
SYS_STATFS = 4099
|
||||
SYS_FSTATFS = 4100
|
||||
SYS_IOPERM = 4101
|
||||
SYS_SOCKETCALL = 4102
|
||||
SYS_SYSLOG = 4103
|
||||
SYS_SETITIMER = 4104
|
||||
SYS_GETITIMER = 4105
|
||||
SYS_STAT = 4106
|
||||
SYS_LSTAT = 4107
|
||||
SYS_FSTAT = 4108
|
||||
SYS_UNUSED109 = 4109
|
||||
SYS_IOPL = 4110
|
||||
SYS_VHANGUP = 4111
|
||||
SYS_IDLE = 4112
|
||||
SYS_VM86 = 4113
|
||||
SYS_WAIT4 = 4114
|
||||
SYS_SWAPOFF = 4115
|
||||
SYS_SYSINFO = 4116
|
||||
SYS_IPC = 4117
|
||||
SYS_FSYNC = 4118
|
||||
SYS_SIGRETURN = 4119
|
||||
SYS_CLONE = 4120
|
||||
SYS_SETDOMAINNAME = 4121
|
||||
SYS_UNAME = 4122
|
||||
SYS_MODIFY_LDT = 4123
|
||||
SYS_ADJTIMEX = 4124
|
||||
SYS_MPROTECT = 4125
|
||||
SYS_SIGPROCMASK = 4126
|
||||
SYS_CREATE_MODULE = 4127
|
||||
SYS_INIT_MODULE = 4128
|
||||
SYS_DELETE_MODULE = 4129
|
||||
SYS_GET_KERNEL_SYMS = 4130
|
||||
SYS_QUOTACTL = 4131
|
||||
SYS_GETPGID = 4132
|
||||
SYS_FCHDIR = 4133
|
||||
SYS_BDFLUSH = 4134
|
||||
SYS_SYSFS = 4135
|
||||
SYS_PERSONALITY = 4136
|
||||
SYS_AFS_SYSCALL = 4137
|
||||
SYS_SETFSUID = 4138
|
||||
SYS_SETFSGID = 4139
|
||||
SYS__LLSEEK = 4140
|
||||
SYS_GETDENTS = 4141
|
||||
SYS__NEWSELECT = 4142
|
||||
SYS_FLOCK = 4143
|
||||
SYS_MSYNC = 4144
|
||||
SYS_READV = 4145
|
||||
SYS_WRITEV = 4146
|
||||
SYS_CACHEFLUSH = 4147
|
||||
SYS_CACHECTL = 4148
|
||||
SYS_SYSMIPS = 4149
|
||||
SYS_UNUSED150 = 4150
|
||||
SYS_GETSID = 4151
|
||||
SYS_FDATASYNC = 4152
|
||||
SYS__SYSCTL = 4153
|
||||
SYS_MLOCK = 4154
|
||||
SYS_MUNLOCK = 4155
|
||||
SYS_MLOCKALL = 4156
|
||||
SYS_MUNLOCKALL = 4157
|
||||
SYS_SCHED_SETPARAM = 4158
|
||||
SYS_SCHED_GETPARAM = 4159
|
||||
SYS_SCHED_SETSCHEDULER = 4160
|
||||
SYS_SCHED_GETSCHEDULER = 4161
|
||||
SYS_SCHED_YIELD = 4162
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 4163
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 4164
|
||||
SYS_SCHED_RR_GET_INTERVAL = 4165
|
||||
SYS_NANOSLEEP = 4166
|
||||
SYS_MREMAP = 4167
|
||||
SYS_ACCEPT = 4168
|
||||
SYS_BIND = 4169
|
||||
SYS_CONNECT = 4170
|
||||
SYS_GETPEERNAME = 4171
|
||||
SYS_GETSOCKNAME = 4172
|
||||
SYS_GETSOCKOPT = 4173
|
||||
SYS_LISTEN = 4174
|
||||
SYS_RECV = 4175
|
||||
SYS_RECVFROM = 4176
|
||||
SYS_RECVMSG = 4177
|
||||
SYS_SEND = 4178
|
||||
SYS_SENDMSG = 4179
|
||||
SYS_SENDTO = 4180
|
||||
SYS_SETSOCKOPT = 4181
|
||||
SYS_SHUTDOWN = 4182
|
||||
SYS_SOCKET = 4183
|
||||
SYS_SOCKETPAIR = 4184
|
||||
SYS_SETRESUID = 4185
|
||||
SYS_GETRESUID = 4186
|
||||
SYS_QUERY_MODULE = 4187
|
||||
SYS_POLL = 4188
|
||||
SYS_NFSSERVCTL = 4189
|
||||
SYS_SETRESGID = 4190
|
||||
SYS_GETRESGID = 4191
|
||||
SYS_PRCTL = 4192
|
||||
SYS_RT_SIGRETURN = 4193
|
||||
SYS_RT_SIGACTION = 4194
|
||||
SYS_RT_SIGPROCMASK = 4195
|
||||
SYS_RT_SIGPENDING = 4196
|
||||
SYS_RT_SIGTIMEDWAIT = 4197
|
||||
SYS_RT_SIGQUEUEINFO = 4198
|
||||
SYS_RT_SIGSUSPEND = 4199
|
||||
SYS_PREAD64 = 4200
|
||||
SYS_PWRITE64 = 4201
|
||||
SYS_CHOWN = 4202
|
||||
SYS_GETCWD = 4203
|
||||
SYS_CAPGET = 4204
|
||||
SYS_CAPSET = 4205
|
||||
SYS_SIGALTSTACK = 4206
|
||||
SYS_SENDFILE = 4207
|
||||
SYS_GETPMSG = 4208
|
||||
SYS_PUTPMSG = 4209
|
||||
SYS_MMAP2 = 4210
|
||||
SYS_TRUNCATE64 = 4211
|
||||
SYS_FTRUNCATE64 = 4212
|
||||
SYS_STAT64 = 4213
|
||||
SYS_LSTAT64 = 4214
|
||||
SYS_FSTAT64 = 4215
|
||||
SYS_PIVOT_ROOT = 4216
|
||||
SYS_MINCORE = 4217
|
||||
SYS_MADVISE = 4218
|
||||
SYS_GETDENTS64 = 4219
|
||||
SYS_FCNTL64 = 4220
|
||||
SYS_RESERVED221 = 4221
|
||||
SYS_GETTID = 4222
|
||||
SYS_READAHEAD = 4223
|
||||
SYS_SETXATTR = 4224
|
||||
SYS_LSETXATTR = 4225
|
||||
SYS_FSETXATTR = 4226
|
||||
SYS_GETXATTR = 4227
|
||||
SYS_LGETXATTR = 4228
|
||||
SYS_FGETXATTR = 4229
|
||||
SYS_LISTXATTR = 4230
|
||||
SYS_LLISTXATTR = 4231
|
||||
SYS_FLISTXATTR = 4232
|
||||
SYS_REMOVEXATTR = 4233
|
||||
SYS_LREMOVEXATTR = 4234
|
||||
SYS_FREMOVEXATTR = 4235
|
||||
SYS_TKILL = 4236
|
||||
SYS_SENDFILE64 = 4237
|
||||
SYS_FUTEX = 4238
|
||||
SYS_SCHED_SETAFFINITY = 4239
|
||||
SYS_SCHED_GETAFFINITY = 4240
|
||||
SYS_IO_SETUP = 4241
|
||||
SYS_IO_DESTROY = 4242
|
||||
SYS_IO_GETEVENTS = 4243
|
||||
SYS_IO_SUBMIT = 4244
|
||||
SYS_IO_CANCEL = 4245
|
||||
SYS_EXIT_GROUP = 4246
|
||||
SYS_LOOKUP_DCOOKIE = 4247
|
||||
SYS_EPOLL_CREATE = 4248
|
||||
SYS_EPOLL_CTL = 4249
|
||||
SYS_EPOLL_WAIT = 4250
|
||||
SYS_REMAP_FILE_PAGES = 4251
|
||||
SYS_SET_TID_ADDRESS = 4252
|
||||
SYS_RESTART_SYSCALL = 4253
|
||||
SYS_FADVISE64 = 4254
|
||||
SYS_STATFS64 = 4255
|
||||
SYS_FSTATFS64 = 4256
|
||||
SYS_TIMER_CREATE = 4257
|
||||
SYS_TIMER_SETTIME = 4258
|
||||
SYS_TIMER_GETTIME = 4259
|
||||
SYS_TIMER_GETOVERRUN = 4260
|
||||
SYS_TIMER_DELETE = 4261
|
||||
SYS_CLOCK_SETTIME = 4262
|
||||
SYS_CLOCK_GETTIME = 4263
|
||||
SYS_CLOCK_GETRES = 4264
|
||||
SYS_CLOCK_NANOSLEEP = 4265
|
||||
SYS_TGKILL = 4266
|
||||
SYS_UTIMES = 4267
|
||||
SYS_MBIND = 4268
|
||||
SYS_GET_MEMPOLICY = 4269
|
||||
SYS_SET_MEMPOLICY = 4270
|
||||
SYS_MQ_OPEN = 4271
|
||||
SYS_MQ_UNLINK = 4272
|
||||
SYS_MQ_TIMEDSEND = 4273
|
||||
SYS_MQ_TIMEDRECEIVE = 4274
|
||||
SYS_MQ_NOTIFY = 4275
|
||||
SYS_MQ_GETSETATTR = 4276
|
||||
SYS_VSERVER = 4277
|
||||
SYS_WAITID = 4278
|
||||
SYS_ADD_KEY = 4280
|
||||
SYS_REQUEST_KEY = 4281
|
||||
SYS_KEYCTL = 4282
|
||||
SYS_SET_THREAD_AREA = 4283
|
||||
SYS_INOTIFY_INIT = 4284
|
||||
SYS_INOTIFY_ADD_WATCH = 4285
|
||||
SYS_INOTIFY_RM_WATCH = 4286
|
||||
SYS_MIGRATE_PAGES = 4287
|
||||
SYS_OPENAT = 4288
|
||||
SYS_MKDIRAT = 4289
|
||||
SYS_MKNODAT = 4290
|
||||
SYS_FCHOWNAT = 4291
|
||||
SYS_FUTIMESAT = 4292
|
||||
SYS_FSTATAT64 = 4293
|
||||
SYS_UNLINKAT = 4294
|
||||
SYS_RENAMEAT = 4295
|
||||
SYS_LINKAT = 4296
|
||||
SYS_SYMLINKAT = 4297
|
||||
SYS_READLINKAT = 4298
|
||||
SYS_FCHMODAT = 4299
|
||||
SYS_FACCESSAT = 4300
|
||||
SYS_PSELECT6 = 4301
|
||||
SYS_PPOLL = 4302
|
||||
SYS_UNSHARE = 4303
|
||||
SYS_SPLICE = 4304
|
||||
SYS_SYNC_FILE_RANGE = 4305
|
||||
SYS_TEE = 4306
|
||||
SYS_VMSPLICE = 4307
|
||||
SYS_MOVE_PAGES = 4308
|
||||
SYS_SET_ROBUST_LIST = 4309
|
||||
SYS_GET_ROBUST_LIST = 4310
|
||||
SYS_KEXEC_LOAD = 4311
|
||||
SYS_GETCPU = 4312
|
||||
SYS_EPOLL_PWAIT = 4313
|
||||
SYS_IOPRIO_SET = 4314
|
||||
SYS_IOPRIO_GET = 4315
|
||||
SYS_UTIMENSAT = 4316
|
||||
SYS_SIGNALFD = 4317
|
||||
SYS_TIMERFD = 4318
|
||||
SYS_EVENTFD = 4319
|
||||
SYS_FALLOCATE = 4320
|
||||
SYS_TIMERFD_CREATE = 4321
|
||||
SYS_TIMERFD_GETTIME = 4322
|
||||
SYS_TIMERFD_SETTIME = 4323
|
||||
SYS_SIGNALFD4 = 4324
|
||||
SYS_EVENTFD2 = 4325
|
||||
SYS_EPOLL_CREATE1 = 4326
|
||||
SYS_DUP3 = 4327
|
||||
SYS_PIPE2 = 4328
|
||||
SYS_INOTIFY_INIT1 = 4329
|
||||
SYS_PREADV = 4330
|
||||
SYS_PWRITEV = 4331
|
||||
SYS_RT_TGSIGQUEUEINFO = 4332
|
||||
SYS_PERF_EVENT_OPEN = 4333
|
||||
SYS_ACCEPT4 = 4334
|
||||
SYS_RECVMMSG = 4335
|
||||
SYS_FANOTIFY_INIT = 4336
|
||||
SYS_FANOTIFY_MARK = 4337
|
||||
SYS_PRLIMIT64 = 4338
|
||||
SYS_NAME_TO_HANDLE_AT = 4339
|
||||
SYS_OPEN_BY_HANDLE_AT = 4340
|
||||
SYS_CLOCK_ADJTIME = 4341
|
||||
SYS_SYNCFS = 4342
|
||||
SYS_SENDMMSG = 4343
|
||||
SYS_SETNS = 4344
|
||||
SYS_PROCESS_VM_READV = 4345
|
||||
SYS_PROCESS_VM_WRITEV = 4346
|
||||
SYS_KCMP = 4347
|
||||
SYS_FINIT_MODULE = 4348
|
||||
SYS_SCHED_SETATTR = 4349
|
||||
SYS_SCHED_GETATTR = 4350
|
||||
SYS_RENAMEAT2 = 4351
|
||||
SYS_SECCOMP = 4352
|
||||
SYS_GETRANDOM = 4353
|
||||
SYS_MEMFD_CREATE = 4354
|
||||
SYS_BPF = 4355
|
||||
SYS_EXECVEAT = 4356
|
||||
SYS_USERFAULTFD = 4357
|
||||
SYS_MEMBARRIER = 4358
|
||||
SYS_MLOCK2 = 4359
|
||||
SYS_COPY_FILE_RANGE = 4360
|
||||
SYS_PREADV2 = 4361
|
||||
SYS_PWRITEV2 = 4362
|
||||
SYS_PKEY_MPROTECT = 4363
|
||||
SYS_PKEY_ALLOC = 4364
|
||||
SYS_PKEY_FREE = 4365
|
||||
)
|
||||
+8
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D_MIPS_SIM=_MIPS_SIM_ABI64 -D__MIPSEB__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build mips64,linux
|
||||
@@ -324,4 +324,11 @@ const (
|
||||
SYS_EXECVEAT = 5316
|
||||
SYS_USERFAULTFD = 5317
|
||||
SYS_MEMBARRIER = 5318
|
||||
SYS_MLOCK2 = 5319
|
||||
SYS_COPY_FILE_RANGE = 5320
|
||||
SYS_PREADV2 = 5321
|
||||
SYS_PWRITEV2 = 5322
|
||||
SYS_PKEY_MPROTECT = 5323
|
||||
SYS_PKEY_ALLOC = 5324
|
||||
SYS_PKEY_FREE = 5325
|
||||
)
|
||||
|
||||
+8
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D_MIPS_SIM=_MIPS_SIM_ABI64 -D__MIPSEL__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build mips64le,linux
|
||||
@@ -324,4 +324,11 @@ const (
|
||||
SYS_EXECVEAT = 5316
|
||||
SYS_USERFAULTFD = 5317
|
||||
SYS_MEMBARRIER = 5318
|
||||
SYS_MLOCK2 = 5319
|
||||
SYS_COPY_FILE_RANGE = 5320
|
||||
SYS_PREADV2 = 5321
|
||||
SYS_PWRITEV2 = 5322
|
||||
SYS_PKEY_MPROTECT = 5323
|
||||
SYS_PKEY_ALLOC = 5324
|
||||
SYS_PKEY_FREE = 5325
|
||||
)
|
||||
|
||||
+374
@@ -0,0 +1,374 @@
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__MIPSEL__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build mipsle,linux
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
SYS_SYSCALL = 4000
|
||||
SYS_EXIT = 4001
|
||||
SYS_FORK = 4002
|
||||
SYS_READ = 4003
|
||||
SYS_WRITE = 4004
|
||||
SYS_OPEN = 4005
|
||||
SYS_CLOSE = 4006
|
||||
SYS_WAITPID = 4007
|
||||
SYS_CREAT = 4008
|
||||
SYS_LINK = 4009
|
||||
SYS_UNLINK = 4010
|
||||
SYS_EXECVE = 4011
|
||||
SYS_CHDIR = 4012
|
||||
SYS_TIME = 4013
|
||||
SYS_MKNOD = 4014
|
||||
SYS_CHMOD = 4015
|
||||
SYS_LCHOWN = 4016
|
||||
SYS_BREAK = 4017
|
||||
SYS_UNUSED18 = 4018
|
||||
SYS_LSEEK = 4019
|
||||
SYS_GETPID = 4020
|
||||
SYS_MOUNT = 4021
|
||||
SYS_UMOUNT = 4022
|
||||
SYS_SETUID = 4023
|
||||
SYS_GETUID = 4024
|
||||
SYS_STIME = 4025
|
||||
SYS_PTRACE = 4026
|
||||
SYS_ALARM = 4027
|
||||
SYS_UNUSED28 = 4028
|
||||
SYS_PAUSE = 4029
|
||||
SYS_UTIME = 4030
|
||||
SYS_STTY = 4031
|
||||
SYS_GTTY = 4032
|
||||
SYS_ACCESS = 4033
|
||||
SYS_NICE = 4034
|
||||
SYS_FTIME = 4035
|
||||
SYS_SYNC = 4036
|
||||
SYS_KILL = 4037
|
||||
SYS_RENAME = 4038
|
||||
SYS_MKDIR = 4039
|
||||
SYS_RMDIR = 4040
|
||||
SYS_DUP = 4041
|
||||
SYS_PIPE = 4042
|
||||
SYS_TIMES = 4043
|
||||
SYS_PROF = 4044
|
||||
SYS_BRK = 4045
|
||||
SYS_SETGID = 4046
|
||||
SYS_GETGID = 4047
|
||||
SYS_SIGNAL = 4048
|
||||
SYS_GETEUID = 4049
|
||||
SYS_GETEGID = 4050
|
||||
SYS_ACCT = 4051
|
||||
SYS_UMOUNT2 = 4052
|
||||
SYS_LOCK = 4053
|
||||
SYS_IOCTL = 4054
|
||||
SYS_FCNTL = 4055
|
||||
SYS_MPX = 4056
|
||||
SYS_SETPGID = 4057
|
||||
SYS_ULIMIT = 4058
|
||||
SYS_UNUSED59 = 4059
|
||||
SYS_UMASK = 4060
|
||||
SYS_CHROOT = 4061
|
||||
SYS_USTAT = 4062
|
||||
SYS_DUP2 = 4063
|
||||
SYS_GETPPID = 4064
|
||||
SYS_GETPGRP = 4065
|
||||
SYS_SETSID = 4066
|
||||
SYS_SIGACTION = 4067
|
||||
SYS_SGETMASK = 4068
|
||||
SYS_SSETMASK = 4069
|
||||
SYS_SETREUID = 4070
|
||||
SYS_SETREGID = 4071
|
||||
SYS_SIGSUSPEND = 4072
|
||||
SYS_SIGPENDING = 4073
|
||||
SYS_SETHOSTNAME = 4074
|
||||
SYS_SETRLIMIT = 4075
|
||||
SYS_GETRLIMIT = 4076
|
||||
SYS_GETRUSAGE = 4077
|
||||
SYS_GETTIMEOFDAY = 4078
|
||||
SYS_SETTIMEOFDAY = 4079
|
||||
SYS_GETGROUPS = 4080
|
||||
SYS_SETGROUPS = 4081
|
||||
SYS_RESERVED82 = 4082
|
||||
SYS_SYMLINK = 4083
|
||||
SYS_UNUSED84 = 4084
|
||||
SYS_READLINK = 4085
|
||||
SYS_USELIB = 4086
|
||||
SYS_SWAPON = 4087
|
||||
SYS_REBOOT = 4088
|
||||
SYS_READDIR = 4089
|
||||
SYS_MMAP = 4090
|
||||
SYS_MUNMAP = 4091
|
||||
SYS_TRUNCATE = 4092
|
||||
SYS_FTRUNCATE = 4093
|
||||
SYS_FCHMOD = 4094
|
||||
SYS_FCHOWN = 4095
|
||||
SYS_GETPRIORITY = 4096
|
||||
SYS_SETPRIORITY = 4097
|
||||
SYS_PROFIL = 4098
|
||||
SYS_STATFS = 4099
|
||||
SYS_FSTATFS = 4100
|
||||
SYS_IOPERM = 4101
|
||||
SYS_SOCKETCALL = 4102
|
||||
SYS_SYSLOG = 4103
|
||||
SYS_SETITIMER = 4104
|
||||
SYS_GETITIMER = 4105
|
||||
SYS_STAT = 4106
|
||||
SYS_LSTAT = 4107
|
||||
SYS_FSTAT = 4108
|
||||
SYS_UNUSED109 = 4109
|
||||
SYS_IOPL = 4110
|
||||
SYS_VHANGUP = 4111
|
||||
SYS_IDLE = 4112
|
||||
SYS_VM86 = 4113
|
||||
SYS_WAIT4 = 4114
|
||||
SYS_SWAPOFF = 4115
|
||||
SYS_SYSINFO = 4116
|
||||
SYS_IPC = 4117
|
||||
SYS_FSYNC = 4118
|
||||
SYS_SIGRETURN = 4119
|
||||
SYS_CLONE = 4120
|
||||
SYS_SETDOMAINNAME = 4121
|
||||
SYS_UNAME = 4122
|
||||
SYS_MODIFY_LDT = 4123
|
||||
SYS_ADJTIMEX = 4124
|
||||
SYS_MPROTECT = 4125
|
||||
SYS_SIGPROCMASK = 4126
|
||||
SYS_CREATE_MODULE = 4127
|
||||
SYS_INIT_MODULE = 4128
|
||||
SYS_DELETE_MODULE = 4129
|
||||
SYS_GET_KERNEL_SYMS = 4130
|
||||
SYS_QUOTACTL = 4131
|
||||
SYS_GETPGID = 4132
|
||||
SYS_FCHDIR = 4133
|
||||
SYS_BDFLUSH = 4134
|
||||
SYS_SYSFS = 4135
|
||||
SYS_PERSONALITY = 4136
|
||||
SYS_AFS_SYSCALL = 4137
|
||||
SYS_SETFSUID = 4138
|
||||
SYS_SETFSGID = 4139
|
||||
SYS__LLSEEK = 4140
|
||||
SYS_GETDENTS = 4141
|
||||
SYS__NEWSELECT = 4142
|
||||
SYS_FLOCK = 4143
|
||||
SYS_MSYNC = 4144
|
||||
SYS_READV = 4145
|
||||
SYS_WRITEV = 4146
|
||||
SYS_CACHEFLUSH = 4147
|
||||
SYS_CACHECTL = 4148
|
||||
SYS_SYSMIPS = 4149
|
||||
SYS_UNUSED150 = 4150
|
||||
SYS_GETSID = 4151
|
||||
SYS_FDATASYNC = 4152
|
||||
SYS__SYSCTL = 4153
|
||||
SYS_MLOCK = 4154
|
||||
SYS_MUNLOCK = 4155
|
||||
SYS_MLOCKALL = 4156
|
||||
SYS_MUNLOCKALL = 4157
|
||||
SYS_SCHED_SETPARAM = 4158
|
||||
SYS_SCHED_GETPARAM = 4159
|
||||
SYS_SCHED_SETSCHEDULER = 4160
|
||||
SYS_SCHED_GETSCHEDULER = 4161
|
||||
SYS_SCHED_YIELD = 4162
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 4163
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 4164
|
||||
SYS_SCHED_RR_GET_INTERVAL = 4165
|
||||
SYS_NANOSLEEP = 4166
|
||||
SYS_MREMAP = 4167
|
||||
SYS_ACCEPT = 4168
|
||||
SYS_BIND = 4169
|
||||
SYS_CONNECT = 4170
|
||||
SYS_GETPEERNAME = 4171
|
||||
SYS_GETSOCKNAME = 4172
|
||||
SYS_GETSOCKOPT = 4173
|
||||
SYS_LISTEN = 4174
|
||||
SYS_RECV = 4175
|
||||
SYS_RECVFROM = 4176
|
||||
SYS_RECVMSG = 4177
|
||||
SYS_SEND = 4178
|
||||
SYS_SENDMSG = 4179
|
||||
SYS_SENDTO = 4180
|
||||
SYS_SETSOCKOPT = 4181
|
||||
SYS_SHUTDOWN = 4182
|
||||
SYS_SOCKET = 4183
|
||||
SYS_SOCKETPAIR = 4184
|
||||
SYS_SETRESUID = 4185
|
||||
SYS_GETRESUID = 4186
|
||||
SYS_QUERY_MODULE = 4187
|
||||
SYS_POLL = 4188
|
||||
SYS_NFSSERVCTL = 4189
|
||||
SYS_SETRESGID = 4190
|
||||
SYS_GETRESGID = 4191
|
||||
SYS_PRCTL = 4192
|
||||
SYS_RT_SIGRETURN = 4193
|
||||
SYS_RT_SIGACTION = 4194
|
||||
SYS_RT_SIGPROCMASK = 4195
|
||||
SYS_RT_SIGPENDING = 4196
|
||||
SYS_RT_SIGTIMEDWAIT = 4197
|
||||
SYS_RT_SIGQUEUEINFO = 4198
|
||||
SYS_RT_SIGSUSPEND = 4199
|
||||
SYS_PREAD64 = 4200
|
||||
SYS_PWRITE64 = 4201
|
||||
SYS_CHOWN = 4202
|
||||
SYS_GETCWD = 4203
|
||||
SYS_CAPGET = 4204
|
||||
SYS_CAPSET = 4205
|
||||
SYS_SIGALTSTACK = 4206
|
||||
SYS_SENDFILE = 4207
|
||||
SYS_GETPMSG = 4208
|
||||
SYS_PUTPMSG = 4209
|
||||
SYS_MMAP2 = 4210
|
||||
SYS_TRUNCATE64 = 4211
|
||||
SYS_FTRUNCATE64 = 4212
|
||||
SYS_STAT64 = 4213
|
||||
SYS_LSTAT64 = 4214
|
||||
SYS_FSTAT64 = 4215
|
||||
SYS_PIVOT_ROOT = 4216
|
||||
SYS_MINCORE = 4217
|
||||
SYS_MADVISE = 4218
|
||||
SYS_GETDENTS64 = 4219
|
||||
SYS_FCNTL64 = 4220
|
||||
SYS_RESERVED221 = 4221
|
||||
SYS_GETTID = 4222
|
||||
SYS_READAHEAD = 4223
|
||||
SYS_SETXATTR = 4224
|
||||
SYS_LSETXATTR = 4225
|
||||
SYS_FSETXATTR = 4226
|
||||
SYS_GETXATTR = 4227
|
||||
SYS_LGETXATTR = 4228
|
||||
SYS_FGETXATTR = 4229
|
||||
SYS_LISTXATTR = 4230
|
||||
SYS_LLISTXATTR = 4231
|
||||
SYS_FLISTXATTR = 4232
|
||||
SYS_REMOVEXATTR = 4233
|
||||
SYS_LREMOVEXATTR = 4234
|
||||
SYS_FREMOVEXATTR = 4235
|
||||
SYS_TKILL = 4236
|
||||
SYS_SENDFILE64 = 4237
|
||||
SYS_FUTEX = 4238
|
||||
SYS_SCHED_SETAFFINITY = 4239
|
||||
SYS_SCHED_GETAFFINITY = 4240
|
||||
SYS_IO_SETUP = 4241
|
||||
SYS_IO_DESTROY = 4242
|
||||
SYS_IO_GETEVENTS = 4243
|
||||
SYS_IO_SUBMIT = 4244
|
||||
SYS_IO_CANCEL = 4245
|
||||
SYS_EXIT_GROUP = 4246
|
||||
SYS_LOOKUP_DCOOKIE = 4247
|
||||
SYS_EPOLL_CREATE = 4248
|
||||
SYS_EPOLL_CTL = 4249
|
||||
SYS_EPOLL_WAIT = 4250
|
||||
SYS_REMAP_FILE_PAGES = 4251
|
||||
SYS_SET_TID_ADDRESS = 4252
|
||||
SYS_RESTART_SYSCALL = 4253
|
||||
SYS_FADVISE64 = 4254
|
||||
SYS_STATFS64 = 4255
|
||||
SYS_FSTATFS64 = 4256
|
||||
SYS_TIMER_CREATE = 4257
|
||||
SYS_TIMER_SETTIME = 4258
|
||||
SYS_TIMER_GETTIME = 4259
|
||||
SYS_TIMER_GETOVERRUN = 4260
|
||||
SYS_TIMER_DELETE = 4261
|
||||
SYS_CLOCK_SETTIME = 4262
|
||||
SYS_CLOCK_GETTIME = 4263
|
||||
SYS_CLOCK_GETRES = 4264
|
||||
SYS_CLOCK_NANOSLEEP = 4265
|
||||
SYS_TGKILL = 4266
|
||||
SYS_UTIMES = 4267
|
||||
SYS_MBIND = 4268
|
||||
SYS_GET_MEMPOLICY = 4269
|
||||
SYS_SET_MEMPOLICY = 4270
|
||||
SYS_MQ_OPEN = 4271
|
||||
SYS_MQ_UNLINK = 4272
|
||||
SYS_MQ_TIMEDSEND = 4273
|
||||
SYS_MQ_TIMEDRECEIVE = 4274
|
||||
SYS_MQ_NOTIFY = 4275
|
||||
SYS_MQ_GETSETATTR = 4276
|
||||
SYS_VSERVER = 4277
|
||||
SYS_WAITID = 4278
|
||||
SYS_ADD_KEY = 4280
|
||||
SYS_REQUEST_KEY = 4281
|
||||
SYS_KEYCTL = 4282
|
||||
SYS_SET_THREAD_AREA = 4283
|
||||
SYS_INOTIFY_INIT = 4284
|
||||
SYS_INOTIFY_ADD_WATCH = 4285
|
||||
SYS_INOTIFY_RM_WATCH = 4286
|
||||
SYS_MIGRATE_PAGES = 4287
|
||||
SYS_OPENAT = 4288
|
||||
SYS_MKDIRAT = 4289
|
||||
SYS_MKNODAT = 4290
|
||||
SYS_FCHOWNAT = 4291
|
||||
SYS_FUTIMESAT = 4292
|
||||
SYS_FSTATAT64 = 4293
|
||||
SYS_UNLINKAT = 4294
|
||||
SYS_RENAMEAT = 4295
|
||||
SYS_LINKAT = 4296
|
||||
SYS_SYMLINKAT = 4297
|
||||
SYS_READLINKAT = 4298
|
||||
SYS_FCHMODAT = 4299
|
||||
SYS_FACCESSAT = 4300
|
||||
SYS_PSELECT6 = 4301
|
||||
SYS_PPOLL = 4302
|
||||
SYS_UNSHARE = 4303
|
||||
SYS_SPLICE = 4304
|
||||
SYS_SYNC_FILE_RANGE = 4305
|
||||
SYS_TEE = 4306
|
||||
SYS_VMSPLICE = 4307
|
||||
SYS_MOVE_PAGES = 4308
|
||||
SYS_SET_ROBUST_LIST = 4309
|
||||
SYS_GET_ROBUST_LIST = 4310
|
||||
SYS_KEXEC_LOAD = 4311
|
||||
SYS_GETCPU = 4312
|
||||
SYS_EPOLL_PWAIT = 4313
|
||||
SYS_IOPRIO_SET = 4314
|
||||
SYS_IOPRIO_GET = 4315
|
||||
SYS_UTIMENSAT = 4316
|
||||
SYS_SIGNALFD = 4317
|
||||
SYS_TIMERFD = 4318
|
||||
SYS_EVENTFD = 4319
|
||||
SYS_FALLOCATE = 4320
|
||||
SYS_TIMERFD_CREATE = 4321
|
||||
SYS_TIMERFD_GETTIME = 4322
|
||||
SYS_TIMERFD_SETTIME = 4323
|
||||
SYS_SIGNALFD4 = 4324
|
||||
SYS_EVENTFD2 = 4325
|
||||
SYS_EPOLL_CREATE1 = 4326
|
||||
SYS_DUP3 = 4327
|
||||
SYS_PIPE2 = 4328
|
||||
SYS_INOTIFY_INIT1 = 4329
|
||||
SYS_PREADV = 4330
|
||||
SYS_PWRITEV = 4331
|
||||
SYS_RT_TGSIGQUEUEINFO = 4332
|
||||
SYS_PERF_EVENT_OPEN = 4333
|
||||
SYS_ACCEPT4 = 4334
|
||||
SYS_RECVMMSG = 4335
|
||||
SYS_FANOTIFY_INIT = 4336
|
||||
SYS_FANOTIFY_MARK = 4337
|
||||
SYS_PRLIMIT64 = 4338
|
||||
SYS_NAME_TO_HANDLE_AT = 4339
|
||||
SYS_OPEN_BY_HANDLE_AT = 4340
|
||||
SYS_CLOCK_ADJTIME = 4341
|
||||
SYS_SYNCFS = 4342
|
||||
SYS_SENDMMSG = 4343
|
||||
SYS_SETNS = 4344
|
||||
SYS_PROCESS_VM_READV = 4345
|
||||
SYS_PROCESS_VM_WRITEV = 4346
|
||||
SYS_KCMP = 4347
|
||||
SYS_FINIT_MODULE = 4348
|
||||
SYS_SCHED_SETATTR = 4349
|
||||
SYS_SCHED_GETATTR = 4350
|
||||
SYS_RENAMEAT2 = 4351
|
||||
SYS_SECCOMP = 4352
|
||||
SYS_GETRANDOM = 4353
|
||||
SYS_MEMFD_CREATE = 4354
|
||||
SYS_BPF = 4355
|
||||
SYS_EXECVEAT = 4356
|
||||
SYS_USERFAULTFD = 4357
|
||||
SYS_MEMBARRIER = 4358
|
||||
SYS_MLOCK2 = 4359
|
||||
SYS_COPY_FILE_RANGE = 4360
|
||||
SYS_PREADV2 = 4361
|
||||
SYS_PWRITEV2 = 4362
|
||||
SYS_PKEY_MPROTECT = 4363
|
||||
SYS_PKEY_ALLOC = 4364
|
||||
SYS_PKEY_FREE = 4365
|
||||
)
|
||||
+10
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__powerpc64__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build ppc64,linux
|
||||
@@ -357,4 +357,13 @@ const (
|
||||
SYS_GETRANDOM = 359
|
||||
SYS_MEMFD_CREATE = 360
|
||||
SYS_BPF = 361
|
||||
SYS_EXECVEAT = 362
|
||||
SYS_SWITCH_ENDIAN = 363
|
||||
SYS_USERFAULTFD = 364
|
||||
SYS_MEMBARRIER = 365
|
||||
SYS_MLOCK2 = 378
|
||||
SYS_COPY_FILE_RANGE = 379
|
||||
SYS_PREADV2 = 380
|
||||
SYS_PWRITEV2 = 381
|
||||
SYS_KEXEC_FILE_LOAD = 382
|
||||
)
|
||||
|
||||
+17
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__powerpc64__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build ppc64le,linux
|
||||
@@ -350,4 +350,20 @@ const (
|
||||
SYS_PROCESS_VM_WRITEV = 352
|
||||
SYS_FINIT_MODULE = 353
|
||||
SYS_KCMP = 354
|
||||
SYS_SCHED_SETATTR = 355
|
||||
SYS_SCHED_GETATTR = 356
|
||||
SYS_RENAMEAT2 = 357
|
||||
SYS_SECCOMP = 358
|
||||
SYS_GETRANDOM = 359
|
||||
SYS_MEMFD_CREATE = 360
|
||||
SYS_BPF = 361
|
||||
SYS_EXECVEAT = 362
|
||||
SYS_SWITCH_ENDIAN = 363
|
||||
SYS_USERFAULTFD = 364
|
||||
SYS_MEMBARRIER = 365
|
||||
SYS_MLOCK2 = 378
|
||||
SYS_COPY_FILE_RANGE = 379
|
||||
SYS_PREADV2 = 380
|
||||
SYS_PWRITEV2 = 381
|
||||
SYS_KEXEC_FILE_LOAD = 382
|
||||
)
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__s390x__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build s390x,linux
|
||||
@@ -303,6 +303,9 @@ const (
|
||||
SYS_RECVMSG = 372
|
||||
SYS_SHUTDOWN = 373
|
||||
SYS_MLOCK2 = 374
|
||||
SYS_COPY_FILE_RANGE = 375
|
||||
SYS_PREADV2 = 376
|
||||
SYS_PWRITEV2 = 377
|
||||
SYS_SELECT = 142
|
||||
SYS_GETRLIMIT = 191
|
||||
SYS_LCHOWN = 198
|
||||
|
||||
+348
@@ -0,0 +1,348 @@
|
||||
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__arch64__ linux/usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build sparc64,linux
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
SYS_RESTART_SYSCALL = 0
|
||||
SYS_EXIT = 1
|
||||
SYS_FORK = 2
|
||||
SYS_READ = 3
|
||||
SYS_WRITE = 4
|
||||
SYS_OPEN = 5
|
||||
SYS_CLOSE = 6
|
||||
SYS_WAIT4 = 7
|
||||
SYS_CREAT = 8
|
||||
SYS_LINK = 9
|
||||
SYS_UNLINK = 10
|
||||
SYS_EXECV = 11
|
||||
SYS_CHDIR = 12
|
||||
SYS_CHOWN = 13
|
||||
SYS_MKNOD = 14
|
||||
SYS_CHMOD = 15
|
||||
SYS_LCHOWN = 16
|
||||
SYS_BRK = 17
|
||||
SYS_PERFCTR = 18
|
||||
SYS_LSEEK = 19
|
||||
SYS_GETPID = 20
|
||||
SYS_CAPGET = 21
|
||||
SYS_CAPSET = 22
|
||||
SYS_SETUID = 23
|
||||
SYS_GETUID = 24
|
||||
SYS_VMSPLICE = 25
|
||||
SYS_PTRACE = 26
|
||||
SYS_ALARM = 27
|
||||
SYS_SIGALTSTACK = 28
|
||||
SYS_PAUSE = 29
|
||||
SYS_UTIME = 30
|
||||
SYS_ACCESS = 33
|
||||
SYS_NICE = 34
|
||||
SYS_SYNC = 36
|
||||
SYS_KILL = 37
|
||||
SYS_STAT = 38
|
||||
SYS_SENDFILE = 39
|
||||
SYS_LSTAT = 40
|
||||
SYS_DUP = 41
|
||||
SYS_PIPE = 42
|
||||
SYS_TIMES = 43
|
||||
SYS_UMOUNT2 = 45
|
||||
SYS_SETGID = 46
|
||||
SYS_GETGID = 47
|
||||
SYS_SIGNAL = 48
|
||||
SYS_GETEUID = 49
|
||||
SYS_GETEGID = 50
|
||||
SYS_ACCT = 51
|
||||
SYS_MEMORY_ORDERING = 52
|
||||
SYS_IOCTL = 54
|
||||
SYS_REBOOT = 55
|
||||
SYS_SYMLINK = 57
|
||||
SYS_READLINK = 58
|
||||
SYS_EXECVE = 59
|
||||
SYS_UMASK = 60
|
||||
SYS_CHROOT = 61
|
||||
SYS_FSTAT = 62
|
||||
SYS_FSTAT64 = 63
|
||||
SYS_GETPAGESIZE = 64
|
||||
SYS_MSYNC = 65
|
||||
SYS_VFORK = 66
|
||||
SYS_PREAD64 = 67
|
||||
SYS_PWRITE64 = 68
|
||||
SYS_MMAP = 71
|
||||
SYS_MUNMAP = 73
|
||||
SYS_MPROTECT = 74
|
||||
SYS_MADVISE = 75
|
||||
SYS_VHANGUP = 76
|
||||
SYS_MINCORE = 78
|
||||
SYS_GETGROUPS = 79
|
||||
SYS_SETGROUPS = 80
|
||||
SYS_GETPGRP = 81
|
||||
SYS_SETITIMER = 83
|
||||
SYS_SWAPON = 85
|
||||
SYS_GETITIMER = 86
|
||||
SYS_SETHOSTNAME = 88
|
||||
SYS_DUP2 = 90
|
||||
SYS_FCNTL = 92
|
||||
SYS_SELECT = 93
|
||||
SYS_FSYNC = 95
|
||||
SYS_SETPRIORITY = 96
|
||||
SYS_SOCKET = 97
|
||||
SYS_CONNECT = 98
|
||||
SYS_ACCEPT = 99
|
||||
SYS_GETPRIORITY = 100
|
||||
SYS_RT_SIGRETURN = 101
|
||||
SYS_RT_SIGACTION = 102
|
||||
SYS_RT_SIGPROCMASK = 103
|
||||
SYS_RT_SIGPENDING = 104
|
||||
SYS_RT_SIGTIMEDWAIT = 105
|
||||
SYS_RT_SIGQUEUEINFO = 106
|
||||
SYS_RT_SIGSUSPEND = 107
|
||||
SYS_SETRESUID = 108
|
||||
SYS_GETRESUID = 109
|
||||
SYS_SETRESGID = 110
|
||||
SYS_GETRESGID = 111
|
||||
SYS_RECVMSG = 113
|
||||
SYS_SENDMSG = 114
|
||||
SYS_GETTIMEOFDAY = 116
|
||||
SYS_GETRUSAGE = 117
|
||||
SYS_GETSOCKOPT = 118
|
||||
SYS_GETCWD = 119
|
||||
SYS_READV = 120
|
||||
SYS_WRITEV = 121
|
||||
SYS_SETTIMEOFDAY = 122
|
||||
SYS_FCHOWN = 123
|
||||
SYS_FCHMOD = 124
|
||||
SYS_RECVFROM = 125
|
||||
SYS_SETREUID = 126
|
||||
SYS_SETREGID = 127
|
||||
SYS_RENAME = 128
|
||||
SYS_TRUNCATE = 129
|
||||
SYS_FTRUNCATE = 130
|
||||
SYS_FLOCK = 131
|
||||
SYS_LSTAT64 = 132
|
||||
SYS_SENDTO = 133
|
||||
SYS_SHUTDOWN = 134
|
||||
SYS_SOCKETPAIR = 135
|
||||
SYS_MKDIR = 136
|
||||
SYS_RMDIR = 137
|
||||
SYS_UTIMES = 138
|
||||
SYS_STAT64 = 139
|
||||
SYS_SENDFILE64 = 140
|
||||
SYS_GETPEERNAME = 141
|
||||
SYS_FUTEX = 142
|
||||
SYS_GETTID = 143
|
||||
SYS_GETRLIMIT = 144
|
||||
SYS_SETRLIMIT = 145
|
||||
SYS_PIVOT_ROOT = 146
|
||||
SYS_PRCTL = 147
|
||||
SYS_PCICONFIG_READ = 148
|
||||
SYS_PCICONFIG_WRITE = 149
|
||||
SYS_GETSOCKNAME = 150
|
||||
SYS_INOTIFY_INIT = 151
|
||||
SYS_INOTIFY_ADD_WATCH = 152
|
||||
SYS_POLL = 153
|
||||
SYS_GETDENTS64 = 154
|
||||
SYS_INOTIFY_RM_WATCH = 156
|
||||
SYS_STATFS = 157
|
||||
SYS_FSTATFS = 158
|
||||
SYS_UMOUNT = 159
|
||||
SYS_SCHED_SET_AFFINITY = 160
|
||||
SYS_SCHED_GET_AFFINITY = 161
|
||||
SYS_GETDOMAINNAME = 162
|
||||
SYS_SETDOMAINNAME = 163
|
||||
SYS_UTRAP_INSTALL = 164
|
||||
SYS_QUOTACTL = 165
|
||||
SYS_SET_TID_ADDRESS = 166
|
||||
SYS_MOUNT = 167
|
||||
SYS_USTAT = 168
|
||||
SYS_SETXATTR = 169
|
||||
SYS_LSETXATTR = 170
|
||||
SYS_FSETXATTR = 171
|
||||
SYS_GETXATTR = 172
|
||||
SYS_LGETXATTR = 173
|
||||
SYS_GETDENTS = 174
|
||||
SYS_SETSID = 175
|
||||
SYS_FCHDIR = 176
|
||||
SYS_FGETXATTR = 177
|
||||
SYS_LISTXATTR = 178
|
||||
SYS_LLISTXATTR = 179
|
||||
SYS_FLISTXATTR = 180
|
||||
SYS_REMOVEXATTR = 181
|
||||
SYS_LREMOVEXATTR = 182
|
||||
SYS_SIGPENDING = 183
|
||||
SYS_QUERY_MODULE = 184
|
||||
SYS_SETPGID = 185
|
||||
SYS_FREMOVEXATTR = 186
|
||||
SYS_TKILL = 187
|
||||
SYS_EXIT_GROUP = 188
|
||||
SYS_UNAME = 189
|
||||
SYS_INIT_MODULE = 190
|
||||
SYS_PERSONALITY = 191
|
||||
SYS_REMAP_FILE_PAGES = 192
|
||||
SYS_EPOLL_CREATE = 193
|
||||
SYS_EPOLL_CTL = 194
|
||||
SYS_EPOLL_WAIT = 195
|
||||
SYS_IOPRIO_SET = 196
|
||||
SYS_GETPPID = 197
|
||||
SYS_SIGACTION = 198
|
||||
SYS_SGETMASK = 199
|
||||
SYS_SSETMASK = 200
|
||||
SYS_SIGSUSPEND = 201
|
||||
SYS_OLDLSTAT = 202
|
||||
SYS_USELIB = 203
|
||||
SYS_READDIR = 204
|
||||
SYS_READAHEAD = 205
|
||||
SYS_SOCKETCALL = 206
|
||||
SYS_SYSLOG = 207
|
||||
SYS_LOOKUP_DCOOKIE = 208
|
||||
SYS_FADVISE64 = 209
|
||||
SYS_FADVISE64_64 = 210
|
||||
SYS_TGKILL = 211
|
||||
SYS_WAITPID = 212
|
||||
SYS_SWAPOFF = 213
|
||||
SYS_SYSINFO = 214
|
||||
SYS_IPC = 215
|
||||
SYS_SIGRETURN = 216
|
||||
SYS_CLONE = 217
|
||||
SYS_IOPRIO_GET = 218
|
||||
SYS_ADJTIMEX = 219
|
||||
SYS_SIGPROCMASK = 220
|
||||
SYS_CREATE_MODULE = 221
|
||||
SYS_DELETE_MODULE = 222
|
||||
SYS_GET_KERNEL_SYMS = 223
|
||||
SYS_GETPGID = 224
|
||||
SYS_BDFLUSH = 225
|
||||
SYS_SYSFS = 226
|
||||
SYS_AFS_SYSCALL = 227
|
||||
SYS_SETFSUID = 228
|
||||
SYS_SETFSGID = 229
|
||||
SYS__NEWSELECT = 230
|
||||
SYS_SPLICE = 232
|
||||
SYS_STIME = 233
|
||||
SYS_STATFS64 = 234
|
||||
SYS_FSTATFS64 = 235
|
||||
SYS__LLSEEK = 236
|
||||
SYS_MLOCK = 237
|
||||
SYS_MUNLOCK = 238
|
||||
SYS_MLOCKALL = 239
|
||||
SYS_MUNLOCKALL = 240
|
||||
SYS_SCHED_SETPARAM = 241
|
||||
SYS_SCHED_GETPARAM = 242
|
||||
SYS_SCHED_SETSCHEDULER = 243
|
||||
SYS_SCHED_GETSCHEDULER = 244
|
||||
SYS_SCHED_YIELD = 245
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 246
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 247
|
||||
SYS_SCHED_RR_GET_INTERVAL = 248
|
||||
SYS_NANOSLEEP = 249
|
||||
SYS_MREMAP = 250
|
||||
SYS__SYSCTL = 251
|
||||
SYS_GETSID = 252
|
||||
SYS_FDATASYNC = 253
|
||||
SYS_NFSSERVCTL = 254
|
||||
SYS_SYNC_FILE_RANGE = 255
|
||||
SYS_CLOCK_SETTIME = 256
|
||||
SYS_CLOCK_GETTIME = 257
|
||||
SYS_CLOCK_GETRES = 258
|
||||
SYS_CLOCK_NANOSLEEP = 259
|
||||
SYS_SCHED_GETAFFINITY = 260
|
||||
SYS_SCHED_SETAFFINITY = 261
|
||||
SYS_TIMER_SETTIME = 262
|
||||
SYS_TIMER_GETTIME = 263
|
||||
SYS_TIMER_GETOVERRUN = 264
|
||||
SYS_TIMER_DELETE = 265
|
||||
SYS_TIMER_CREATE = 266
|
||||
SYS_IO_SETUP = 268
|
||||
SYS_IO_DESTROY = 269
|
||||
SYS_IO_SUBMIT = 270
|
||||
SYS_IO_CANCEL = 271
|
||||
SYS_IO_GETEVENTS = 272
|
||||
SYS_MQ_OPEN = 273
|
||||
SYS_MQ_UNLINK = 274
|
||||
SYS_MQ_TIMEDSEND = 275
|
||||
SYS_MQ_TIMEDRECEIVE = 276
|
||||
SYS_MQ_NOTIFY = 277
|
||||
SYS_MQ_GETSETATTR = 278
|
||||
SYS_WAITID = 279
|
||||
SYS_TEE = 280
|
||||
SYS_ADD_KEY = 281
|
||||
SYS_REQUEST_KEY = 282
|
||||
SYS_KEYCTL = 283
|
||||
SYS_OPENAT = 284
|
||||
SYS_MKDIRAT = 285
|
||||
SYS_MKNODAT = 286
|
||||
SYS_FCHOWNAT = 287
|
||||
SYS_FUTIMESAT = 288
|
||||
SYS_FSTATAT64 = 289
|
||||
SYS_UNLINKAT = 290
|
||||
SYS_RENAMEAT = 291
|
||||
SYS_LINKAT = 292
|
||||
SYS_SYMLINKAT = 293
|
||||
SYS_READLINKAT = 294
|
||||
SYS_FCHMODAT = 295
|
||||
SYS_FACCESSAT = 296
|
||||
SYS_PSELECT6 = 297
|
||||
SYS_PPOLL = 298
|
||||
SYS_UNSHARE = 299
|
||||
SYS_SET_ROBUST_LIST = 300
|
||||
SYS_GET_ROBUST_LIST = 301
|
||||
SYS_MIGRATE_PAGES = 302
|
||||
SYS_MBIND = 303
|
||||
SYS_GET_MEMPOLICY = 304
|
||||
SYS_SET_MEMPOLICY = 305
|
||||
SYS_KEXEC_LOAD = 306
|
||||
SYS_MOVE_PAGES = 307
|
||||
SYS_GETCPU = 308
|
||||
SYS_EPOLL_PWAIT = 309
|
||||
SYS_UTIMENSAT = 310
|
||||
SYS_SIGNALFD = 311
|
||||
SYS_TIMERFD_CREATE = 312
|
||||
SYS_EVENTFD = 313
|
||||
SYS_FALLOCATE = 314
|
||||
SYS_TIMERFD_SETTIME = 315
|
||||
SYS_TIMERFD_GETTIME = 316
|
||||
SYS_SIGNALFD4 = 317
|
||||
SYS_EVENTFD2 = 318
|
||||
SYS_EPOLL_CREATE1 = 319
|
||||
SYS_DUP3 = 320
|
||||
SYS_PIPE2 = 321
|
||||
SYS_INOTIFY_INIT1 = 322
|
||||
SYS_ACCEPT4 = 323
|
||||
SYS_PREADV = 324
|
||||
SYS_PWRITEV = 325
|
||||
SYS_RT_TGSIGQUEUEINFO = 326
|
||||
SYS_PERF_EVENT_OPEN = 327
|
||||
SYS_RECVMMSG = 328
|
||||
SYS_FANOTIFY_INIT = 329
|
||||
SYS_FANOTIFY_MARK = 330
|
||||
SYS_PRLIMIT64 = 331
|
||||
SYS_NAME_TO_HANDLE_AT = 332
|
||||
SYS_OPEN_BY_HANDLE_AT = 333
|
||||
SYS_CLOCK_ADJTIME = 334
|
||||
SYS_SYNCFS = 335
|
||||
SYS_SENDMMSG = 336
|
||||
SYS_SETNS = 337
|
||||
SYS_PROCESS_VM_READV = 338
|
||||
SYS_PROCESS_VM_WRITEV = 339
|
||||
SYS_KERN_FEATURES = 340
|
||||
SYS_KCMP = 341
|
||||
SYS_FINIT_MODULE = 342
|
||||
SYS_SCHED_SETATTR = 343
|
||||
SYS_SCHED_GETATTR = 344
|
||||
SYS_RENAMEAT2 = 345
|
||||
SYS_SECCOMP = 346
|
||||
SYS_GETRANDOM = 347
|
||||
SYS_MEMFD_CREATE = 348
|
||||
SYS_BPF = 349
|
||||
SYS_EXECVEAT = 350
|
||||
SYS_MEMBARRIER = 351
|
||||
SYS_USERFAULTFD = 352
|
||||
SYS_BIND = 353
|
||||
SYS_LISTEN = 354
|
||||
SYS_SETSOCKOPT = 355
|
||||
SYS_MLOCK2 = 356
|
||||
SYS_COPY_FILE_RANGE = 357
|
||||
SYS_PREADV2 = 358
|
||||
SYS_PWRITEV2 = 359
|
||||
)
|
||||
+26
@@ -203,6 +203,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@@ -326,6 +349,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+26
@@ -205,6 +205,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@@ -330,6 +353,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+36
-1
@@ -1,6 +1,6 @@
|
||||
// +build arm,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go
|
||||
// cgo -godefs types_linux.go | go run mkpost.go
|
||||
|
||||
package unix
|
||||
|
||||
@@ -155,6 +155,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
|
||||
@@ -198,6 +207,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]uint8
|
||||
@@ -321,6 +353,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+26
@@ -206,6 +206,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@@ -331,6 +354,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+660
@@ -0,0 +1,660 @@
|
||||
// +build mips,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go | go run mkpost.go
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
sizeofPtr = 0x4
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x4
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x1000
|
||||
)
|
||||
|
||||
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 Timex struct {
|
||||
Modes uint32
|
||||
Offset int32
|
||||
Freq int32
|
||||
Maxerror int32
|
||||
Esterror int32
|
||||
Status int32
|
||||
Constant int32
|
||||
Precision int32
|
||||
Tolerance int32
|
||||
Time Timeval
|
||||
Tick int32
|
||||
Ppsfreq int32
|
||||
Jitter int32
|
||||
Shift int32
|
||||
Stabil int32
|
||||
Jitcnt int32
|
||||
Calcnt int32
|
||||
Errcnt int32
|
||||
Stbcnt int32
|
||||
Tai int32
|
||||
Pad_cgo_0 [44]byte
|
||||
}
|
||||
|
||||
type Time_t int32
|
||||
|
||||
type Tms struct {
|
||||
Utime int32
|
||||
Stime int32
|
||||
Cutime int32
|
||||
Cstime int32
|
||||
}
|
||||
|
||||
type Utimbuf struct {
|
||||
Actime int32
|
||||
Modtime 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 uint64
|
||||
Max uint64
|
||||
}
|
||||
|
||||
type _Gid_t uint32
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint32
|
||||
Pad1 [3]int32
|
||||
Ino uint64
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Pad2 [3]int32
|
||||
Size int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Blksize int32
|
||||
Pad4 int32
|
||||
Blocks int64
|
||||
Pad5 [14]int32
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Type int32
|
||||
Bsize int32
|
||||
Frsize int32
|
||||
Pad_cgo_0 [4]byte
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Files uint64
|
||||
Ffree uint64
|
||||
Bavail uint64
|
||||
Fsid Fsid
|
||||
Namelen int32
|
||||
Flags int32
|
||||
Spare [5]int32
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Ino uint64
|
||||
Off int64
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Name [256]int8
|
||||
Pad_cgo_0 [5]byte
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Type int16
|
||||
Whence int16
|
||||
Pad_cgo_0 [4]byte
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
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
|
||||
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 RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
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 uint32
|
||||
}
|
||||
|
||||
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
|
||||
Iov *Iovec
|
||||
Iovlen uint32
|
||||
Control *byte
|
||||
Controllen uint32
|
||||
Flags int32
|
||||
}
|
||||
|
||||
type Cmsghdr struct {
|
||||
Len uint32
|
||||
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
|
||||
Pad_cgo_0 [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
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x1c
|
||||
SizeofCmsghdr = 0xc
|
||||
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 = 0x1d
|
||||
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
|
||||
X__ifi_pad 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 = 0x8
|
||||
)
|
||||
|
||||
type SockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
||||
type SockFprog struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *SockFilter
|
||||
}
|
||||
|
||||
type InotifyEvent struct {
|
||||
Wd int32
|
||||
Mask uint32
|
||||
Cookie uint32
|
||||
Len uint32
|
||||
}
|
||||
|
||||
const SizeofInotifyEvent = 0x10
|
||||
|
||||
type PtraceRegs struct {
|
||||
Regs [109]uint32
|
||||
U_tsize uint32
|
||||
U_dsize uint32
|
||||
U_ssize uint32
|
||||
Start_code uint32
|
||||
Start_data uint32
|
||||
Start_stack uint32
|
||||
Signal int32
|
||||
U_ar0 *byte
|
||||
Magic uint32
|
||||
U_comm [32]int8
|
||||
}
|
||||
|
||||
type ptracePsw struct {
|
||||
}
|
||||
|
||||
type ptraceFpregs struct {
|
||||
}
|
||||
|
||||
type ptracePer struct {
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [32]int32
|
||||
}
|
||||
|
||||
type Sysinfo_t struct {
|
||||
Uptime int32
|
||||
Loads [3]uint32
|
||||
Totalram uint32
|
||||
Freeram uint32
|
||||
Sharedram uint32
|
||||
Bufferram uint32
|
||||
Totalswap uint32
|
||||
Freeswap uint32
|
||||
Procs uint16
|
||||
Pad uint16
|
||||
Totalhigh uint32
|
||||
Freehigh uint32
|
||||
Unit uint32
|
||||
X_f [8]int8
|
||||
}
|
||||
|
||||
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
|
||||
Tinode uint32
|
||||
Fname [6]int8
|
||||
Fpack [6]int8
|
||||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
PadFd 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 [32]uint32
|
||||
}
|
||||
|
||||
const _SC_PAGESIZE = 0x1e
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Line uint8
|
||||
Cc [23]uint8
|
||||
Ispeed uint32
|
||||
Ospeed uint32
|
||||
}
|
||||
+26
@@ -206,6 +206,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@@ -330,6 +353,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+26
@@ -206,6 +206,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@@ -330,6 +353,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+660
@@ -0,0 +1,660 @@
|
||||
// +build mipsle,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go | go run mkpost.go
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
sizeofPtr = 0x4
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x4
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x1000
|
||||
)
|
||||
|
||||
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 Timex struct {
|
||||
Modes uint32
|
||||
Offset int32
|
||||
Freq int32
|
||||
Maxerror int32
|
||||
Esterror int32
|
||||
Status int32
|
||||
Constant int32
|
||||
Precision int32
|
||||
Tolerance int32
|
||||
Time Timeval
|
||||
Tick int32
|
||||
Ppsfreq int32
|
||||
Jitter int32
|
||||
Shift int32
|
||||
Stabil int32
|
||||
Jitcnt int32
|
||||
Calcnt int32
|
||||
Errcnt int32
|
||||
Stbcnt int32
|
||||
Tai int32
|
||||
Pad_cgo_0 [44]byte
|
||||
}
|
||||
|
||||
type Time_t int32
|
||||
|
||||
type Tms struct {
|
||||
Utime int32
|
||||
Stime int32
|
||||
Cutime int32
|
||||
Cstime int32
|
||||
}
|
||||
|
||||
type Utimbuf struct {
|
||||
Actime int32
|
||||
Modtime 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 uint64
|
||||
Max uint64
|
||||
}
|
||||
|
||||
type _Gid_t uint32
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint32
|
||||
Pad1 [3]int32
|
||||
Ino uint64
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Pad2 [3]int32
|
||||
Size int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Blksize int32
|
||||
Pad4 int32
|
||||
Blocks int64
|
||||
Pad5 [14]int32
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Type int32
|
||||
Bsize int32
|
||||
Frsize int32
|
||||
Pad_cgo_0 [4]byte
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Files uint64
|
||||
Ffree uint64
|
||||
Bavail uint64
|
||||
Fsid Fsid
|
||||
Namelen int32
|
||||
Flags int32
|
||||
Spare [5]int32
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Ino uint64
|
||||
Off int64
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Name [256]int8
|
||||
Pad_cgo_0 [5]byte
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Type int16
|
||||
Whence int16
|
||||
Pad_cgo_0 [4]byte
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
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
|
||||
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 RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
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 uint32
|
||||
}
|
||||
|
||||
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
|
||||
Iov *Iovec
|
||||
Iovlen uint32
|
||||
Control *byte
|
||||
Controllen uint32
|
||||
Flags int32
|
||||
}
|
||||
|
||||
type Cmsghdr struct {
|
||||
Len uint32
|
||||
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
|
||||
Pad_cgo_0 [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
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x1c
|
||||
SizeofCmsghdr = 0xc
|
||||
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 = 0x2a
|
||||
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
|
||||
X__ifi_pad 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 = 0x8
|
||||
)
|
||||
|
||||
type SockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
||||
type SockFprog struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *SockFilter
|
||||
}
|
||||
|
||||
type InotifyEvent struct {
|
||||
Wd int32
|
||||
Mask uint32
|
||||
Cookie uint32
|
||||
Len uint32
|
||||
}
|
||||
|
||||
const SizeofInotifyEvent = 0x10
|
||||
|
||||
type PtraceRegs struct {
|
||||
Regs [109]uint32
|
||||
U_tsize uint32
|
||||
U_dsize uint32
|
||||
U_ssize uint32
|
||||
Start_code uint32
|
||||
Start_data uint32
|
||||
Start_stack uint32
|
||||
Signal int32
|
||||
U_ar0 *byte
|
||||
Magic uint32
|
||||
U_comm [32]int8
|
||||
}
|
||||
|
||||
type ptracePsw struct {
|
||||
}
|
||||
|
||||
type ptraceFpregs struct {
|
||||
}
|
||||
|
||||
type ptracePer struct {
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [32]int32
|
||||
}
|
||||
|
||||
type Sysinfo_t struct {
|
||||
Uptime int32
|
||||
Loads [3]uint32
|
||||
Totalram uint32
|
||||
Freeram uint32
|
||||
Sharedram uint32
|
||||
Bufferram uint32
|
||||
Totalswap uint32
|
||||
Freeswap uint32
|
||||
Procs uint16
|
||||
Pad uint16
|
||||
Totalhigh uint32
|
||||
Freehigh uint32
|
||||
Unit uint32
|
||||
X_f [8]int8
|
||||
}
|
||||
|
||||
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
|
||||
Tinode uint32
|
||||
Fname [6]int8
|
||||
Fpack [6]int8
|
||||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
PadFd 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 [32]uint32
|
||||
}
|
||||
|
||||
const _SC_PAGESIZE = 0x1e
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Line uint8
|
||||
Cc [23]uint8
|
||||
Ispeed uint32
|
||||
Ospeed uint32
|
||||
}
|
||||
+26
@@ -207,6 +207,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]uint8
|
||||
@@ -332,6 +355,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+26
@@ -207,6 +207,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]uint8
|
||||
@@ -332,6 +355,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+26
@@ -206,6 +206,29 @@ type RawSockaddrHCI struct {
|
||||
Channel uint16
|
||||
}
|
||||
|
||||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
@@ -330,6 +353,9 @@ const (
|
||||
SizeofSockaddrLinklayer = 0x14
|
||||
SizeofSockaddrNetlink = 0xc
|
||||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPMreqn = 0xc
|
||||
|
||||
+666
@@ -0,0 +1,666 @@
|
||||
// +build sparc64,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go | go run mkpost.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 int32
|
||||
Pad_cgo_0 [4]byte
|
||||
}
|
||||
|
||||
type Timex struct {
|
||||
Modes uint32
|
||||
Pad_cgo_0 [4]byte
|
||||
Offset int64
|
||||
Freq int64
|
||||
Maxerror int64
|
||||
Esterror int64
|
||||
Status int32
|
||||
Pad_cgo_1 [4]byte
|
||||
Constant int64
|
||||
Precision int64
|
||||
Tolerance int64
|
||||
Time Timeval
|
||||
Tick int64
|
||||
Ppsfreq int64
|
||||
Jitter int64
|
||||
Shift int32
|
||||
Pad_cgo_2 [4]byte
|
||||
Stabil int64
|
||||
Jitcnt int64
|
||||
Calcnt int64
|
||||
Errcnt int64
|
||||
Stbcnt int64
|
||||
Tai int32
|
||||
Pad_cgo_3 [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
|
||||
X__pad1 uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Ino uint64
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
X__pad2 uint16
|
||||
Pad_cgo_1 [6]byte
|
||||
Size int64
|
||||
Blksize int64
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
X__glibc_reserved4 uint64
|
||||
X__glibc_reserved5 uint64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Type int64
|
||||
Bsize int64
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail uint64
|
||||
Files uint64
|
||||
Ffree uint64
|
||||
Fsid Fsid
|
||||
Namelen int64
|
||||
Frsize int64
|
||||
Flags int64
|
||||
Spare [4]int64
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Ino uint64
|
||||
Off int64
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Name [256]int8
|
||||
Pad_cgo_0 [5]byte
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Type int16
|
||||
Whence int16
|
||||
Pad_cgo_0 [4]byte
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
X__glibc_reserved int16
|
||||
Pad_cgo_1 [2]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
|
||||
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 RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
Family uint16
|
||||
Type [14]uint8
|
||||
Feat uint32
|
||||
Mask uint32
|
||||
Name [64]uint8
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Family uint16
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
Zero [4]uint8
|
||||
}
|
||||
|
||||
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
|
||||
Pad_cgo_0 [4]byte
|
||||
Iov *Iovec
|
||||
Iovlen uint64
|
||||
Control *byte
|
||||
Controllen uint64
|
||||
Flags int32
|
||||
Pad_cgo_1 [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
|
||||
Pad_cgo_0 [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
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
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 = 0x2a
|
||||
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
|
||||
X__ifi_pad 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
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *SockFilter
|
||||
}
|
||||
|
||||
type InotifyEvent struct {
|
||||
Wd int32
|
||||
Mask uint32
|
||||
Cookie uint32
|
||||
Len uint32
|
||||
}
|
||||
|
||||
const SizeofInotifyEvent = 0x10
|
||||
|
||||
type PtraceRegs struct {
|
||||
Regs [16]uint64
|
||||
Tstate uint64
|
||||
Tpc uint64
|
||||
Tnpc uint64
|
||||
Y uint32
|
||||
Magic uint32
|
||||
}
|
||||
|
||||
type ptracePsw struct {
|
||||
}
|
||||
|
||||
type ptraceFpregs struct {
|
||||
}
|
||||
|
||||
type ptracePer struct {
|
||||
}
|
||||
|
||||
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
|
||||
Pad_cgo_0 [4]byte
|
||||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]int8
|
||||
Pad_cgo_1 [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
|
||||
Pad_cgo_0 [4]byte
|
||||
Tinode uint64
|
||||
Fname [6]int8
|
||||
Fpack [6]int8
|
||||
Pad_cgo_1 [4]byte
|
||||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
X_padFd 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 = 0x800
|
||||
POLLERR = 0x8
|
||||
POLLHUP = 0x10
|
||||
POLLNVAL = 0x20
|
||||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
}
|
||||
|
||||
const _SC_PAGESIZE = 0x1e
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Line uint8
|
||||
Cc [19]uint8
|
||||
Ispeed uint32
|
||||
Ospeed uint32
|
||||
}
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
// +build amd64,solaris
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_solaris.go
|
||||
// cgo -godefs types_solaris.go | go run mkpost.go
|
||||
|
||||
package unix
|
||||
|
||||
@@ -11,6 +11,7 @@ const (
|
||||
sizeofLong = 0x8
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x400
|
||||
MaxHostNameLen = 0x100
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
+4
@@ -114,6 +114,8 @@ func (p *Proc) Addr() uintptr {
|
||||
return p.addr
|
||||
}
|
||||
|
||||
//go:uintptrescapes
|
||||
|
||||
// Call executes procedure p with arguments a. It will panic, if more then 15 arguments
|
||||
// are supplied.
|
||||
//
|
||||
@@ -293,6 +295,8 @@ func (p *LazyProc) Addr() uintptr {
|
||||
return p.proc.Addr()
|
||||
}
|
||||
|
||||
//go:uintptrescapes
|
||||
|
||||
// Call executes procedure p with arguments a. It will panic, if more then 15 arguments
|
||||
// are supplied.
|
||||
//
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// 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.
|
||||
|
||||
package windows
|
||||
|
||||
//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
|
||||
+27
-5
@@ -57,11 +57,12 @@ const (
|
||||
// An application can use these keys as entry points to the registry.
|
||||
// Normally these keys are used in OpenKey to open new keys,
|
||||
// but they can also be used anywhere a Key is required.
|
||||
CLASSES_ROOT = Key(syscall.HKEY_CLASSES_ROOT)
|
||||
CURRENT_USER = Key(syscall.HKEY_CURRENT_USER)
|
||||
LOCAL_MACHINE = Key(syscall.HKEY_LOCAL_MACHINE)
|
||||
USERS = Key(syscall.HKEY_USERS)
|
||||
CURRENT_CONFIG = Key(syscall.HKEY_CURRENT_CONFIG)
|
||||
CLASSES_ROOT = Key(syscall.HKEY_CLASSES_ROOT)
|
||||
CURRENT_USER = Key(syscall.HKEY_CURRENT_USER)
|
||||
LOCAL_MACHINE = Key(syscall.HKEY_LOCAL_MACHINE)
|
||||
USERS = Key(syscall.HKEY_USERS)
|
||||
CURRENT_CONFIG = Key(syscall.HKEY_CURRENT_CONFIG)
|
||||
PERFORMANCE_DATA = Key(syscall.HKEY_PERFORMANCE_DATA)
|
||||
)
|
||||
|
||||
// Close closes open key k.
|
||||
@@ -87,6 +88,27 @@ func OpenKey(k Key, path string, access uint32) (Key, error) {
|
||||
return Key(subkey), nil
|
||||
}
|
||||
|
||||
// OpenRemoteKey opens a predefined registry key on another
|
||||
// computer pcname. The key to be opened is specified by k, but
|
||||
// can only be one of LOCAL_MACHINE, PERFORMANCE_DATA or USERS.
|
||||
// If pcname is "", OpenRemoteKey returns local computer key.
|
||||
func OpenRemoteKey(pcname string, k Key) (Key, error) {
|
||||
var err error
|
||||
var p *uint16
|
||||
if pcname != "" {
|
||||
p, err = syscall.UTF16PtrFromString(`\\` + pcname)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
var remoteKey syscall.Handle
|
||||
err = regConnectRegistry(p, syscall.Handle(k), &remoteKey)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return Key(remoteKey), nil
|
||||
}
|
||||
|
||||
// ReadSubKeyNames returns the names of subkeys of key k.
|
||||
// The parameter n controls the number of returned names,
|
||||
// analogous to the way os.File.Readdirnames works.
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package registry
|
||||
|
||||
//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go
|
||||
+1
-2
@@ -8,8 +8,6 @@ package registry
|
||||
|
||||
import "syscall"
|
||||
|
||||
//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go
|
||||
|
||||
const (
|
||||
_REG_OPTION_NON_VOLATILE = 0
|
||||
|
||||
@@ -29,5 +27,6 @@ func LoadRegLoadMUIString() error {
|
||||
//sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegEnumValueW
|
||||
//sys regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) = advapi32.RegDeleteValueW
|
||||
//sys regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) = advapi32.RegLoadMUIStringW
|
||||
//sys regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) = advapi32.RegConnectRegistryW
|
||||
|
||||
//sys expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW
|
||||
|
||||
+37
-2
@@ -3,13 +3,39 @@
|
||||
package registry
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
var _ unsafe.Pointer
|
||||
|
||||
// Do the interface allocations only once for common
|
||||
// Errno values.
|
||||
const (
|
||||
errnoERROR_IO_PENDING = 997
|
||||
)
|
||||
|
||||
var (
|
||||
errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
|
||||
)
|
||||
|
||||
// errnoErr returns common boxed Errno values, to prevent
|
||||
// allocations at runtime.
|
||||
func errnoErr(e syscall.Errno) error {
|
||||
switch e {
|
||||
case 0:
|
||||
return nil
|
||||
case errnoERROR_IO_PENDING:
|
||||
return errERROR_IO_PENDING
|
||||
}
|
||||
// TODO: add more here, after collecting data on the common
|
||||
// error values see on Windows. (perhaps when running
|
||||
// all.bat?)
|
||||
return e
|
||||
}
|
||||
|
||||
var (
|
||||
modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
|
||||
modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
|
||||
@@ -20,6 +46,7 @@ var (
|
||||
procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW")
|
||||
procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW")
|
||||
procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW")
|
||||
procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW")
|
||||
procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW")
|
||||
)
|
||||
|
||||
@@ -71,12 +98,20 @@ func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint
|
||||
return
|
||||
}
|
||||
|
||||
func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
|
||||
n = uint32(r0)
|
||||
if n == 0 {
|
||||
if e1 != 0 {
|
||||
err = error(e1)
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
|
||||
-2
@@ -14,8 +14,6 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
|
||||
|
||||
type Handle uintptr
|
||||
|
||||
const InvalidHandle = ^Handle(0)
|
||||
|
||||
+167
-142
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user