Updated Dependencies

This commit is contained in:
Brian Buller 2017-07-28 06:49:00 -05:00
parent 34df547e09
commit 1509bbdbe6
148 changed files with 41138 additions and 18153 deletions

9
Godeps/Godeps.json generated
View File

@ -5,8 +5,8 @@
"Deps": [
{
"ImportPath": "github.com/boltdb/bolt",
"Comment": "v1.3.0-21-gf0d0212",
"Rev": "f0d021274dede8e672f17a2dbcb997c5f0760c41"
"Comment": "v1.3.1",
"Rev": "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8"
},
{
"ImportPath": "github.com/br0xen/boltease",
@ -14,11 +14,12 @@
},
{
"ImportPath": "github.com/pborman/uuid",
"Rev": "dee7705ef7b324f27ceb85a121c61f2c2e8ce988"
"Comment": "v1.1",
"Rev": "e790cca94e6cc75c7064b1332e63811d4aae1a53"
},
{
"ImportPath": "golang.org/x/sys/unix",
"Rev": "8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9"
"Rev": "35ef4487ce0a1ea5d4b616ffe71e34febe723695"
}
]
}

View File

@ -17,7 +17,7 @@ and setting values. That's it.
Bolt is stable, the API is fixed, and the file format is fixed. Full unit
test coverage and randomized black box testing are used to ensure database
consistency and thread safety. Bolt is currently in high-load production
consistency and thread safety. Bolt is currently used in high-load production
environments serving databases as large as 1TB. Many companies such as
Shopify and Heroku use Bolt-backed services every day.
@ -395,7 +395,7 @@ db.View(func(tx *bolt.Tx) error {
c := tx.Bucket([]byte("MyBucket")).Cursor()
prefix := []byte("1234")
for k, v := c.Seek(prefix); bytes.HasPrefix(k, prefix); k, v = c.Next() {
for k, v := c.Seek(prefix); k != nil && bytes.HasPrefix(k, prefix); k, v = c.Next() {
fmt.Printf("key=%s, value=%s\n", k, v)
}
@ -464,6 +464,55 @@ func (*Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error)
func (*Bucket) DeleteBucket(key []byte) error
```
Say you had a multi-tenant application where the root level bucket was the account bucket. Inside of this bucket was a sequence of accounts which themselves are buckets. And inside the sequence bucket you could have many buckets pertaining to the Account itself (Users, Notes, etc) isolating the information into logical groupings.
```go
// createUser creates a new user in the given account.
func createUser(accountID int, u *User) error {
// Start the transaction.
tx, err := db.Begin(true)
if err != nil {
return err
}
defer tx.Rollback()
// Retrieve the root bucket for the account.
// Assume this has already been created when the account was set up.
root := tx.Bucket([]byte(strconv.FormatUint(accountID, 10)))
// Setup the users bucket.
bkt, err := root.CreateBucketIfNotExists([]byte("USERS"))
if err != nil {
return err
}
// Generate an ID for the new user.
userID, err := bkt.NextSequence()
if err != nil {
return err
}
u.ID = userID
// Marshal and save the encoded user.
if buf, err := json.Marshal(u); err != nil {
return err
} else if err := bkt.Put([]byte(strconv.FormatUint(u.ID, 10)), buf); err != nil {
return err
}
// Commit the transaction.
if err := tx.Commit(); err != nil {
return err
}
return nil
}
```
### Database backups
@ -719,6 +768,9 @@ Here are a few things to note when evaluating and using Bolt:
can be reused by a new page or can be unmapped from virtual memory and you'll
see an `unexpected fault address` panic when accessing it.
* Bolt uses an exclusive write lock on the database file so it cannot be
shared by multiple processes.
* Be careful when using `Bucket.FillPercent`. Setting a high fill percent for
buckets that have random inserts will cause your database to have very poor
page utilization.
@ -853,5 +905,12 @@ Below is a list of public, open source projects that use Bolt:
* [MuLiFS](https://github.com/dankomiocevic/mulifs) - Music Library Filesystem creates a filesystem to organise your music files.
* [GoShort](https://github.com/pankajkhairnar/goShort) - GoShort is a URL shortener written in Golang and BoltDB for persistent key/value storage and for routing it's using high performent HTTPRouter.
* [torrent](https://github.com/anacrolix/torrent) - Full-featured BitTorrent client package and utilities in Go. BoltDB is a storage backend in development.
* [gopherpit](https://github.com/gopherpit/gopherpit) - A web service to manage Go remote import paths with custom domains
* [bolter](https://github.com/hasit/bolter) - Command-line app for viewing BoltDB file in your terminal.
* [btcwallet](https://github.com/btcsuite/btcwallet) - A bitcoin wallet.
* [dcrwallet](https://github.com/decred/dcrwallet) - A wallet for the Decred cryptocurrency.
* [Ironsmith](https://github.com/timshannon/ironsmith) - A simple, script-driven continuous integration (build - > test -> release) tool, with no external dependencies
* [BoltHold](https://github.com/timshannon/bolthold) - An embeddable NoSQL store for Go types built on BoltDB
* [Ponzu CMS](https://ponzu-cms.org) - Headless CMS + automatic JSON API with auto-HTTPS, HTTP/2 Server Push, and flexible server framework.
If you are using Bolt in a project please send a pull request to add it to the list.

View File

@ -7,3 +7,6 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF
// Are unaligned load/stores broken on this arch?
var brokenUnaligned = false

View File

@ -175,9 +175,8 @@ func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) {
if bytes.Equal(key, k) {
if (flags & bucketLeafFlag) != 0 {
return nil, ErrBucketExists
} else {
return nil, ErrIncompatibleValue
}
return nil, ErrIncompatibleValue
}
// Create empty, inline bucket.

View File

@ -552,7 +552,10 @@ func (db *DB) removeTx(tx *Tx) {
// Remove the transaction.
for i, t := range db.txs {
if t == tx {
db.txs = append(db.txs[:i], db.txs[i+1:]...)
last := len(db.txs) - 1
db.txs[i] = db.txs[last]
db.txs[last] = nil
db.txs = db.txs[:last]
break
}
}

View File

@ -24,7 +24,12 @@ func newFreelist() *freelist {
// size returns the size of the page after serialization.
func (f *freelist) size() int {
return pageHeaderSize + (int(unsafe.Sizeof(pgid(0))) * f.count())
n := f.count()
if n >= 0xFFFF {
// The first element will be used to store the count. See freelist.write.
n++
}
return pageHeaderSize + (int(unsafe.Sizeof(pgid(0))) * n)
}
// count returns count of pages on the freelist
@ -46,16 +51,15 @@ func (f *freelist) pending_count() int {
return count
}
// all returns a list of all free ids and all pending ids in one sorted list.
func (f *freelist) all() []pgid {
m := make(pgids, 0)
// copyall copies into dst a list of all free ids and all pending ids in one sorted list.
// f.count returns the minimum length required for dst.
func (f *freelist) copyall(dst []pgid) {
m := make(pgids, 0, f.pending_count())
for _, list := range f.pending {
m = append(m, list...)
}
sort.Sort(m)
return pgids(f.ids).merge(m)
mergepgids(dst, f.ids, m)
}
// allocate returns the starting page id of a contiguous list of pages of a given size.
@ -186,22 +190,22 @@ func (f *freelist) read(p *page) {
// become free.
func (f *freelist) write(p *page) error {
// Combine the old free pgids and pgids waiting on an open transaction.
ids := f.all()
// Update the header flag.
p.flags |= freelistPageFlag
// The page.count can only hold up to 64k elements so if we overflow that
// number then we handle it by putting the size in the first element.
if len(ids) == 0 {
p.count = uint16(len(ids))
} else if len(ids) < 0xFFFF {
p.count = uint16(len(ids))
copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:], ids)
lenids := f.count()
if lenids == 0 {
p.count = uint16(lenids)
} else if lenids < 0xFFFF {
p.count = uint16(lenids)
f.copyall(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:])
} else {
p.count = 0xFFFF
((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0] = pgid(len(ids))
copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[1:], ids)
((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0] = pgid(lenids)
f.copyall(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[1:])
}
return nil

View File

@ -145,12 +145,33 @@ func (a pgids) merge(b pgids) pgids {
// Return the opposite slice if one is nil.
if len(a) == 0 {
return b
} else if len(b) == 0 {
}
if len(b) == 0 {
return a
}
merged := make(pgids, len(a)+len(b))
mergepgids(merged, a, b)
return merged
}
// Create a list to hold all elements from both lists.
merged := make(pgids, 0, len(a)+len(b))
// mergepgids copies the sorted union of a and b into dst.
// If dst is too small, it panics.
func mergepgids(dst, a, b pgids) {
if len(dst) < len(a)+len(b) {
panic(fmt.Errorf("mergepgids bad len %d < %d + %d", len(dst), len(a), len(b)))
}
// Copy in the opposite slice if one is nil.
if len(a) == 0 {
copy(dst, b)
return
}
if len(b) == 0 {
copy(dst, a)
return
}
// Merged will hold all elements from both lists.
merged := dst[:0]
// Assign lead to the slice with a lower starting value, follow to the higher value.
lead, follow := a, b
@ -172,7 +193,5 @@ func (a pgids) merge(b pgids) pgids {
}
// Append what's left in follow.
merged = append(merged, follow...)
return merged
_ = append(merged, follow...)
}

View File

@ -381,7 +381,9 @@ func (tx *Tx) Check() <-chan error {
func (tx *Tx) check(ch chan error) {
// Check if any pages are double freed.
freed := make(map[pgid]bool)
for _, id := range tx.db.freelist.all() {
all := make([]pgid, tx.db.freelist.count())
tx.db.freelist.copyall(all)
for _, id := range all {
if freed[id] {
ch <- fmt.Errorf("page %d: already freed", id)
}

9
vendor/github.com/pborman/uuid/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,9 @@
language: go
go:
- 1.4.3
- 1.5.3
- tip
script:
- go test -v ./...

10
vendor/github.com/pborman/uuid/CONTRIBUTING.md generated vendored Normal file
View File

@ -0,0 +1,10 @@
# How to contribute
We definitely welcome patches and contribution to this project!
### Legal requirements
In order to protect both you and ourselves, you will need to sign the
[Contributor License Agreement](https://cla.developers.google.com/clas).
You may have already signed it for other Google projects.

13
vendor/github.com/pborman/uuid/README.md generated vendored Normal file
View File

@ -0,0 +1,13 @@
This project was automatically exported from code.google.com/p/go-uuid
# uuid ![build status](https://travis-ci.org/pborman/uuid.svg?branch=master)
The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services.
###### Install
`go get github.com/pborman/uuid`
###### Documentation
[![GoDoc](https://godoc.org/github.com/pborman/uuid?status.svg)](http://godoc.org/github.com/pborman/uuid)
Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here:
http://godoc.org/github.com/pborman/uuid

0
vendor/github.com/pborman/uuid/dce.go generated vendored Executable file → Normal file
View File

0
vendor/github.com/pborman/uuid/doc.go generated vendored Executable file → Normal file
View File

View File

@ -19,7 +19,7 @@ var (
NIL = Parse("00000000-0000-0000-0000-000000000000")
)
// NewHash returns a new UUID dervied from the hash of space concatenated with
// NewHash returns a new UUID derived from the hash of space concatenated with
// data generated by h. The hash should be at least 16 byte in length. The
// first 16 bytes of the hash are used to form the UUID. The version of the
// UUID will be the lower 4 bits of version. NewHash is used to implement

View File

@ -1,30 +0,0 @@
// Copyright 2014 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package uuid
import "errors"
func (u UUID) MarshalJSON() ([]byte, error) {
if len(u) == 0 {
return []byte(`""`), nil
}
return []byte(`"` + u.String() + `"`), nil
}
func (u *UUID) UnmarshalJSON(data []byte) error {
if len(data) == 0 || string(data) == `""` {
return nil
}
if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
return errors.New("invalid UUID format")
}
data = data[1 : len(data)-1]
uu := Parse(string(data))
if uu == nil {
return errors.New("invalid UUID format")
}
*u = uu
return nil
}

83
vendor/github.com/pborman/uuid/marshal.go generated vendored Normal file
View File

@ -0,0 +1,83 @@
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package uuid
import (
"errors"
"fmt"
)
// MarshalText implements encoding.TextMarshaler.
func (u UUID) MarshalText() ([]byte, error) {
if len(u) != 16 {
return nil, nil
}
var js [36]byte
encodeHex(js[:], u)
return js[:], nil
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (u *UUID) UnmarshalText(data []byte) error {
if len(data) == 0 {
return nil
}
id := Parse(string(data))
if id == nil {
return errors.New("invalid UUID")
}
*u = id
return nil
}
// MarshalBinary implements encoding.BinaryMarshaler.
func (u UUID) MarshalBinary() ([]byte, error) {
return u[:], nil
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (u *UUID) UnmarshalBinary(data []byte) error {
if len(data) == 0 {
return nil
}
if len(data) != 16 {
return fmt.Errorf("invalid UUID (got %d bytes)", len(data))
}
var id [16]byte
copy(id[:], data)
*u = id[:]
return nil
}
// MarshalText implements encoding.TextMarshaler.
func (u Array) MarshalText() ([]byte, error) {
var js [36]byte
encodeHex(js[:], u[:])
return js[:], nil
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (u *Array) UnmarshalText(data []byte) error {
id := Parse(string(data))
if id == nil {
return errors.New("invalid UUID")
}
*u = id.Array()
return nil
}
// MarshalBinary implements encoding.BinaryMarshaler.
func (u Array) MarshalBinary() ([]byte, error) {
return u[:], nil
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler.
func (u *Array) UnmarshalBinary(data []byte) error {
if len(data) != 16 {
return fmt.Errorf("invalid UUID (got %d bytes)", len(data))
}
copy(u[:], data)
return nil
}

20
vendor/github.com/pborman/uuid/node.go generated vendored Executable file → Normal file
View File

@ -4,9 +4,13 @@
package uuid
import "net"
import (
"net"
"sync"
)
var (
nodeMu sync.Mutex
interfaces []net.Interface // cached list of interfaces
ifname string // name of interface being used
nodeID []byte // hardware for version 1 UUIDs
@ -16,6 +20,8 @@ var (
// derived. The interface "user" is returned if the NodeID was set by
// SetNodeID.
func NodeInterface() string {
defer nodeMu.Unlock()
nodeMu.Lock()
return ifname
}
@ -26,6 +32,12 @@ func NodeInterface() string {
//
// SetNodeInterface never fails when name is "".
func SetNodeInterface(name string) bool {
defer nodeMu.Unlock()
nodeMu.Lock()
return setNodeInterface(name)
}
func setNodeInterface(name string) bool {
if interfaces == nil {
var err error
interfaces, err = net.Interfaces()
@ -59,8 +71,10 @@ func SetNodeInterface(name string) bool {
// NodeID returns a slice of a copy of the current Node ID, setting the Node ID
// if not already set.
func NodeID() []byte {
defer nodeMu.Unlock()
nodeMu.Lock()
if nodeID == nil {
SetNodeInterface("")
setNodeInterface("")
}
nid := make([]byte, 6)
copy(nid, nodeID)
@ -71,6 +85,8 @@ func NodeID() []byte {
// of id are used. If id is less than 6 bytes then false is returned and the
// Node ID is not set.
func SetNodeID(id []byte) bool {
defer nodeMu.Unlock()
nodeMu.Lock()
if setNodeID(id) {
ifname = "user"
return true

View File

@ -5,6 +5,7 @@
package uuid
import (
"database/sql/driver"
"errors"
"fmt"
)
@ -15,6 +16,11 @@ import (
func (uuid *UUID) Scan(src interface{}) error {
switch src.(type) {
case string:
// if an empty UUID comes from a table, we return a null UUID
if src.(string) == "" {
return nil
}
// see uuid.Parse for required string format
parsed := Parse(src.(string))
@ -26,6 +32,11 @@ func (uuid *UUID) Scan(src interface{}) error {
case []byte:
b := src.([]byte)
// if an empty UUID comes from a table, we return a null UUID
if len(b) == 0 {
return nil
}
// assumes a simple slice of bytes if 16 bytes
// otherwise attempts to parse
if len(b) == 16 {
@ -46,3 +57,10 @@ func (uuid *UUID) Scan(src interface{}) error {
return nil
}
// Value implements sql.Valuer so that UUIDs can be written to databases
// transparently. Currently, UUIDs map to strings. Please consult
// database-specific driver documentation for matching types.
func (uuid UUID) Value() (driver.Value, error) {
return uuid.String(), nil
}

14
vendor/github.com/pborman/uuid/time.go generated vendored Executable file → Normal file
View File

@ -23,7 +23,7 @@ const (
)
var (
mu sync.Mutex
timeMu sync.Mutex
lasttime uint64 // last time we returned
clock_seq uint16 // clock sequence for this run
@ -43,8 +43,8 @@ func (t Time) UnixTime() (sec, nsec int64) {
// clock sequence as well as adjusting the clock sequence as needed. An error
// is returned if the current time cannot be determined.
func GetTime() (Time, uint16, error) {
defer mu.Unlock()
mu.Lock()
defer timeMu.Unlock()
timeMu.Lock()
return getTime()
}
@ -75,8 +75,8 @@ func getTime() (Time, uint16, error) {
// ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated
// for
func ClockSequence() int {
defer mu.Unlock()
mu.Lock()
defer timeMu.Unlock()
timeMu.Lock()
return clockSequence()
}
@ -90,8 +90,8 @@ func clockSequence() int {
// SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to
// -1 causes a new sequence to be generated.
func SetClockSequence(seq int) {
defer mu.Unlock()
mu.Lock()
defer timeMu.Unlock()
timeMu.Lock()
setClockSequence(seq)
}

View File

@ -16,7 +16,7 @@ func randomBits(b []byte) {
}
// xvalues returns the value of a byte as a hexadecimal digit or 255.
var xvalues = []byte{
var xvalues = [256]byte{
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,

66
vendor/github.com/pborman/uuid/uuid.go generated vendored Executable file → Normal file
View File

@ -7,11 +7,26 @@ package uuid
import (
"bytes"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
"strings"
)
// Array is a pass-by-value UUID that can be used as an effecient key in a map.
type Array [16]byte
// UUID converts uuid into a slice.
func (uuid Array) UUID() UUID {
return uuid[:]
}
// String returns the string representation of uuid,
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
func (uuid Array) String() string {
return uuid.UUID().String()
}
// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
// 4122.
type UUID []byte
@ -54,8 +69,8 @@ func Parse(s string) UUID {
if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
return nil
}
uuid := make([]byte, 16)
for i, x := range []int{
var uuid [16]byte
for i, x := range [16]int{
0, 2, 4, 6,
9, 11,
14, 16,
@ -67,7 +82,7 @@ func Parse(s string) UUID {
uuid[i] = v
}
}
return uuid
return uuid[:]
}
// Equal returns true if uuid1 and uuid2 are equal.
@ -75,26 +90,50 @@ func Equal(uuid1, uuid2 UUID) bool {
return bytes.Equal(uuid1, uuid2)
}
// Array returns an array representation of uuid that can be used as a map key.
// Array panics if uuid is not valid.
func (uuid UUID) Array() Array {
if len(uuid) != 16 {
panic("invalid uuid")
}
var a Array
copy(a[:], uuid)
return a
}
// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// , or "" if uuid is invalid.
func (uuid UUID) String() string {
if uuid == nil || len(uuid) != 16 {
if len(uuid) != 16 {
return ""
}
b := []byte(uuid)
return fmt.Sprintf("%08x-%04x-%04x-%04x-%012x",
b[:4], b[4:6], b[6:8], b[8:10], b[10:])
var buf [36]byte
encodeHex(buf[:], uuid)
return string(buf[:])
}
// URN returns the RFC 2141 URN form of uuid,
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid.
func (uuid UUID) URN() string {
if uuid == nil || len(uuid) != 16 {
if len(uuid) != 16 {
return ""
}
b := []byte(uuid)
return fmt.Sprintf("urn:uuid:%08x-%04x-%04x-%04x-%012x",
b[:4], b[4:6], b[6:8], b[8:10], b[10:])
var buf [36 + 9]byte
copy(buf[:], "urn:uuid:")
encodeHex(buf[9:], uuid)
return string(buf[:])
}
func encodeHex(dst []byte, uuid UUID) {
hex.Encode(dst[:], uuid[:4])
dst[8] = '-'
hex.Encode(dst[9:13], uuid[4:6])
dst[13] = '-'
hex.Encode(dst[14:18], uuid[6:8])
dst[18] = '-'
hex.Encode(dst[19:23], uuid[8:10])
dst[23] = '-'
hex.Encode(dst[24:], uuid[10:])
}
// Variant returns the variant encoded in uuid. It returns Invalid if
@ -113,10 +152,9 @@ func (uuid UUID) Variant() Variant {
default:
return Reserved
}
panic("unreachable")
}
// Version returns the verison of uuid. It returns false if uuid is not
// Version returns the version of uuid. It returns false if uuid is not
// valid.
func (uuid UUID) Version() (Version, bool) {
if len(uuid) != 16 {
@ -148,7 +186,7 @@ func (v Variant) String() string {
return fmt.Sprintf("BadVariant%d", int(v))
}
// SetRand sets the random number generator to r, which implents io.Reader.
// SetRand sets the random number generator to r, which implements io.Reader.
// If r.Read returns an error when the package requests random data then
// a panic will be issued.
//

173
vendor/golang.org/x/sys/unix/README.md generated vendored Normal file
View File

@ -0,0 +1,173 @@
# Building `sys/unix`
The sys/unix package provides access to the raw system call interface of the
underlying operating system. See: https://godoc.org/golang.org/x/sys/unix
Porting Go to a new architecture/OS combination or adding syscalls, types, or
constants to an existing architecture/OS pair requires some manual effort;
however, there are tools that automate much of the process.
## Build Systems
There are currently two ways we generate the necessary files. We are currently
migrating the build system to use containers so the builds are reproducible.
This is being done on an OS-by-OS basis. Please update this documentation as
components of the build system change.
### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
The old build system generates the Go files based on the C header files
present on your system. This means that files
for a given GOOS/GOARCH pair must be generated on a system with that OS and
architecture. This also means that the generated code can differ from system
to system, based on differences in the header files.
To avoid this, if you are using the old build system, only generate the Go
files on an installation with unmodified header files. It is also important to
keep track of which version of the OS the files were generated from (ex.
Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes
and have each OS upgrade correspond to a single change.
To build the files for your current OS and architecture, make sure GOOS and
GOARCH are set correctly and run `mkall.sh`. This will generate the files for
your specific system. Running `mkall.sh -n` shows the commands that will be run.
Requirements: bash, perl, go
### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
The new build system uses a Docker container to generate the go files directly
from source checkouts of the kernel and various system libraries. This means
that on any platform that supports Docker, all the files using the new build
system can be generated at once, and generated files will not change based on
what the person running the scripts has installed on their computer.
The OS specific files for the new build system are located in the `${GOOS}`
directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When
the kernel or system library updates, modify the Dockerfile at
`${GOOS}/Dockerfile` to checkout the new release of the source.
To build all the files under the new build system, you must be on an amd64/Linux
system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
then generate all of the files for all of the GOOS/GOARCH pairs in the new build
system. Running `mkall.sh -n` shows the commands that will be run.
Requirements: bash, perl, go, docker
## Component files
This section describes the various files used in the code generation process.
It also contains instructions on how to modify these files to add a new
architecture/OS or to add additional syscalls, types, or constants. Note that
if you are using the new build system, the scripts cannot be called normally.
They must be called from within the docker container.
### asm files
The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system
call dispatch. There are three entry points:
```
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
```
The first and second are the standard ones; they differ only in how many
arguments can be passed to the kernel. The third is for low-level use by the
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
let it know that a system call is running.
When porting Go to an new architecture/OS, this file must be implemented for
each GOOS/GOARCH pair.
### mksysnum
Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
for the old system). This script takes in a list of header files containing the
syscall number declarations and parses them to produce the corresponding list of
Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
constants.
Adding new syscall numbers is mostly done by running the build on a sufficiently
new installation of the target OS (or updating the source checkouts for the
new build system). However, depending on the OS, you make need to update the
parsing in mksysnum.
### mksyscall.pl
The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
hand-written Go files which implement system calls (for unix, the specific OS,
or the specific OS/Architecture pair respectively) that need special handling
and list `//sys` comments giving prototypes for ones that can be generated.
The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
them into syscalls. This requires the name of the prototype in the comment to
match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
prototype can be exported (capitalized) or not.
Adding a new syscall often just requires adding a new `//sys` function prototype
with the desired arguments and a capitalized name so it is exported. However, if
you want the interface to the syscall to be different, often one will make an
unexported `//sys` prototype, an then write a custom wrapper in
`syscall_${GOOS}.go`.
### types files
For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or
`types_${GOOS}.go` on the old system). This file includes standard C headers and
creates Go type aliases to the corresponding C types. The file is then fed
through godef to get the Go compatible definitions. Finally, the generated code
is fed though mkpost.go to format the code correctly and remove any hidden or
private identifiers. This cleaned-up code is written to
`ztypes_${GOOS}_${GOARCH}.go`.
The hardest part about preparing this file is figuring out which headers to
include and which symbols need to be `#define`d to get the actual data
structures that pass through to the kernel system calls. Some C libraries
preset alternate versions for binary compatibility and translate them on the
way in and out of system calls, but there is almost always a `#define` that can
get the real ones.
See `types_darwin.go` and `linux/types.go` for examples.
To add a new type, add in the necessary include statement at the top of the
file (if it is not already there) and add in a type alias line. Note that if
your type is significantly different on different architectures, you may need
some `#if/#elif` macros in your include statements.
### mkerrors.sh
This script is used to generate the system's various constants. This doesn't
just include the error numbers and error strings, but also the signal numbers
an a wide variety of miscellaneous constants. The constants come from the list
of include files in the `includes_${uname}` variable. A regex then picks out
the desired `#define` statements, and generates the corresponding Go constants.
The error numbers and strings are generated from `#include <errno.h>`, and the
signal numbers and strings are generated from `#include <signal.h>`. All of
these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program,
`_errors.c`, which prints out all the constants.
To add a constant, add the header that includes it to the appropriate variable.
Then, edit the regex (if necessary) to match the desired constant. Avoid making
the regex too broad to avoid matching unintended constants.
## Generated files
### `zerror_${GOOS}_${GOARCH}.go`
A file containing all of the system's generated error numbers, error strings,
signal numbers, and constants. Generated by `mkerrors.sh` (see above).
### `zsyscall_${GOOS}_${GOARCH}.go`
A file containing all the generated syscalls for a specific GOOS and GOARCH.
Generated by `mksyscall.pl` (see above).
### `zsysnum_${GOOS}_${GOARCH}.go`
A list of numeric constants for all the syscall number of the specific GOOS
and GOARCH. Generated by mksysnum (see above).
### `ztypes_${GOOS}_${GOARCH}.go`
A file containing Go types for passing into (or returning from) syscalls.
Generated by godefs and the types file (see above).

10
vendor/golang.org/x/sys/unix/asm.s generated vendored
View File

@ -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
vendor/golang.org/x/sys/unix/asm_linux_mipsx.s generated vendored Normal file
View File

@ -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)

View File

@ -10,8 +10,8 @@
// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
//
TEXT ·sysvicall6(SB),NOSPLIT,$0-64
TEXT ·sysvicall6(SB),NOSPLIT,$0-88
JMP syscall·sysvicall6(SB)
TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
JMP syscall·rawSysvicall6(SB)

195
vendor/golang.org/x/sys/unix/cap_freebsd.go generated vendored Normal file
View File

@ -0,0 +1,195 @@
// Copyright 2017 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 freebsd,amd64
package unix
import (
errorspkg "errors"
"fmt"
)
// Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c
const (
// This is the version of CapRights this package understands. See C implementation for parallels.
capRightsGoVersion = CAP_RIGHTS_VERSION_00
capArSizeMin = CAP_RIGHTS_VERSION_00 + 2
capArSizeMax = capRightsGoVersion + 2
)
var (
bit2idx = []int{
-1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1,
4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
}
)
func capidxbit(right uint64) int {
return int((right >> 57) & 0x1f)
}
func rightToIndex(right uint64) (int, error) {
idx := capidxbit(right)
if idx < 0 || idx >= len(bit2idx) {
return -2, fmt.Errorf("index for right 0x%x out of range", right)
}
return bit2idx[idx], nil
}
func caprver(right uint64) int {
return int(right >> 62)
}
func capver(rights *CapRights) int {
return caprver(rights.Rights[0])
}
func caparsize(rights *CapRights) int {
return capver(rights) + 2
}
// CapRightsSet sets the permissions in setrights in rights.
func CapRightsSet(rights *CapRights, setrights []uint64) error {
// This is essentially a copy of cap_rights_vset()
if capver(rights) != CAP_RIGHTS_VERSION_00 {
return fmt.Errorf("bad rights version %d", capver(rights))
}
n := caparsize(rights)
if n < capArSizeMin || n > capArSizeMax {
return errorspkg.New("bad rights size")
}
for _, right := range setrights {
if caprver(right) != CAP_RIGHTS_VERSION_00 {
return errorspkg.New("bad right version")
}
i, err := rightToIndex(right)
if err != nil {
return err
}
if i >= n {
return errorspkg.New("index overflow")
}
if capidxbit(rights.Rights[i]) != capidxbit(right) {
return errorspkg.New("index mismatch")
}
rights.Rights[i] |= right
if capidxbit(rights.Rights[i]) != capidxbit(right) {
return errorspkg.New("index mismatch (after assign)")
}
}
return nil
}
// CapRightsClear clears the permissions in clearrights from rights.
func CapRightsClear(rights *CapRights, clearrights []uint64) error {
// This is essentially a copy of cap_rights_vclear()
if capver(rights) != CAP_RIGHTS_VERSION_00 {
return fmt.Errorf("bad rights version %d", capver(rights))
}
n := caparsize(rights)
if n < capArSizeMin || n > capArSizeMax {
return errorspkg.New("bad rights size")
}
for _, right := range clearrights {
if caprver(right) != CAP_RIGHTS_VERSION_00 {
return errorspkg.New("bad right version")
}
i, err := rightToIndex(right)
if err != nil {
return err
}
if i >= n {
return errorspkg.New("index overflow")
}
if capidxbit(rights.Rights[i]) != capidxbit(right) {
return errorspkg.New("index mismatch")
}
rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF)
if capidxbit(rights.Rights[i]) != capidxbit(right) {
return errorspkg.New("index mismatch (after assign)")
}
}
return nil
}
// CapRightsIsSet checks whether all the permissions in setrights are present in rights.
func CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) {
// This is essentially a copy of cap_rights_is_vset()
if capver(rights) != CAP_RIGHTS_VERSION_00 {
return false, fmt.Errorf("bad rights version %d", capver(rights))
}
n := caparsize(rights)
if n < capArSizeMin || n > capArSizeMax {
return false, errorspkg.New("bad rights size")
}
for _, right := range setrights {
if caprver(right) != CAP_RIGHTS_VERSION_00 {
return false, errorspkg.New("bad right version")
}
i, err := rightToIndex(right)
if err != nil {
return false, err
}
if i >= n {
return false, errorspkg.New("index overflow")
}
if capidxbit(rights.Rights[i]) != capidxbit(right) {
return false, errorspkg.New("index mismatch")
}
if (rights.Rights[i] & right) != right {
return false, nil
}
}
return true, nil
}
func capright(idx uint64, bit uint64) uint64 {
return ((1 << (57 + idx)) | bit)
}
// CapRightsInit returns a pointer to an initialised CapRights structure filled with rights.
// See man cap_rights_init(3) and rights(4).
func CapRightsInit(rights []uint64) (*CapRights, error) {
var r CapRights
r.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0)
r.Rights[1] = capright(1, 0)
err := CapRightsSet(&r, rights)
if err != nil {
return nil, err
}
return &r, nil
}
// CapRightsLimit reduces the operations permitted on fd to at most those contained in rights.
// The capability rights on fd can never be increased by CapRightsLimit.
// See man cap_rights_limit(2) and rights(4).
func CapRightsLimit(fd uintptr, rights *CapRights) error {
return capRightsLimit(int(fd), rights)
}
// CapRightsGet returns a CapRights structure containing the operations permitted on fd.
// See man cap_rights_get(3) and rights(4).
func CapRightsGet(fd uintptr) (*CapRights, error) {
r, err := CapRightsInit(nil)
if err != nil {
return nil, err
}
err = capRightsGet(capRightsGoVersion, int(fd), r)
if err != nil {
return nil, err
}
return r, nil
}

42
vendor/golang.org/x/sys/unix/dev_linux.go generated vendored Normal file
View File

@ -0,0 +1,42 @@
// Copyright 2017 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.
// Functions to access/create device major and minor numbers matching the
// encoding used by the Linux kernel and glibc.
//
// The information below is extracted and adapted from bits/sysmacros.h in the
// glibc sources:
//
// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
// number and m is a hex digit of the minor number. This is backward compatible
// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
// backward compatible with the Linux kernel, which for some architectures uses
// 32-bit dev_t, encoded as mmmM MMmm.
package unix
// Major returns the major component of a Linux device number.
func Major(dev uint64) uint32 {
major := uint32((dev & 0x00000000000fff00) >> 8)
major |= uint32((dev & 0xfffff00000000000) >> 32)
return major
}
// Minor returns the minor component of a Linux device number.
func Minor(dev uint64) uint32 {
minor := uint32((dev & 0x00000000000000ff) >> 0)
minor |= uint32((dev & 0x00000ffffff00000) >> 12)
return minor
}
// Mkdev returns a Linux device number generated from the given major and minor
// components.
func Mkdev(major, minor uint32) uint64 {
dev := uint64((major & 0x00000fff) << 8)
dev |= uint64((major & 0xfffff000) << 32)
dev |= uint64((minor & 0x000000ff) << 0)
dev |= uint64((minor & 0xffffff00) << 12)
return dev
}

102
vendor/golang.org/x/sys/unix/dirent.go generated vendored Normal file
View File

@ -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
vendor/golang.org/x/sys/unix/endian_big.go generated vendored Normal file
View File

@ -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 mips mips64
package unix
const isBigEndian = true

9
vendor/golang.org/x/sys/unix/endian_little.go generated vendored Normal file
View File

@ -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 mipsle mips64le
package unix
const isBigEndian = false

27
vendor/golang.org/x/sys/unix/file_unix.go generated vendored Normal file
View File

@ -0,0 +1,27 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package unix
import (
"os"
"syscall"
)
// FIXME: unexported function from os
// syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
func syscallMode(i os.FileMode) (o uint32) {
o |= uint32(i.Perm())
if i&os.ModeSetuid != 0 {
o |= syscall.S_ISUID
}
if i&os.ModeSetgid != 0 {
o |= syscall.S_ISGID
}
if i&os.ModeSticky != 0 {
o |= syscall.S_ISVTX
}
// No mapping for Go's ModeTemporary (plan9 only).
return
}

View File

@ -1,5 +1,3 @@
// +build linux darwin freebsd openbsd netbsd dragonfly
// 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.

View File

@ -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
vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go generated vendored Normal file
View File

@ -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
}

146
vendor/golang.org/x/sys/unix/mkall.sh generated vendored
View File

@ -3,75 +3,9 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# The unix package provides access to the raw system call
# interface of the underlying operating system. Porting Go to
# a new architecture/operating system combination requires
# some manual effort, though there are tools that automate
# much of the process. The auto-generated files have names
# beginning with z.
#
# This script runs or (given -n) prints suggested commands to generate z files
# for the current system. Running those commands is not automatic.
# This script is documentation more than anything else.
#
# * asm_${GOOS}_${GOARCH}.s
#
# This hand-written assembly file implements system call dispatch.
# There are three entry points:
#
# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
#
# The first and second are the standard ones; they differ only in
# how many arguments can be passed to the kernel.
# The third is for low-level use by the ForkExec wrapper;
# unlike the first two, it does not call into the scheduler to
# let it know that a system call is running.
#
# * syscall_${GOOS}.go
#
# This hand-written Go file implements system calls that need
# special handling and lists "//sys" comments giving prototypes
# for ones that can be auto-generated. Mksyscall reads those
# comments to generate the stubs.
#
# * syscall_${GOOS}_${GOARCH}.go
#
# Same as syscall_${GOOS}.go except that it contains code specific
# to ${GOOS} on one particular architecture.
#
# * types_${GOOS}.c
#
# This hand-written C file includes standard C headers and then
# creates typedef or enum names beginning with a dollar sign
# (use of $ in variable names is a gcc extension). The hardest
# part about preparing this file is figuring out which headers to
# include and which symbols need to be #defined to get the
# actual data structures that pass through to the kernel system calls.
# Some C libraries present alternate versions for binary compatibility
# and translate them on the way in and out of system calls, but
# there is almost always a #define that can get the real ones.
# See types_darwin.c and types_linux.c for examples.
#
# * zerror_${GOOS}_${GOARCH}.go
#
# This machine-generated file defines the system's error numbers,
# error strings, and signal numbers. The generator is "mkerrors.sh".
# Usually no arguments are needed, but mkerrors.sh will pass its
# arguments on to godefs.
#
# * zsyscall_${GOOS}_${GOARCH}.go
#
# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
#
# * zsysnum_${GOOS}_${GOARCH}.go
#
# Generated by mksysnum_${GOOS}.
#
# * ztypes_${GOOS}_${GOARCH}.go
#
# Generated by godefs; see types_${GOOS}.c above.
# This script runs or (given -n) prints suggested commands to generate files for
# the Architecture/OS specified by the GOARCH and GOOS environment variables.
# See README.md for more information about how the build system works.
GOOSARCH="${GOOS}_${GOARCH}"
@ -84,11 +18,14 @@ zsysctl="zsysctl_$GOOSARCH.go"
mksysnum=
mktypes=
run="sh"
cmd=""
case "$1" in
-syscalls)
for i in zsyscall*go
do
# Run the command line that appears in the first line
# of the generated file to regenerate it.
sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
rm _$i
done
@ -96,6 +33,7 @@ case "$1" in
;;
-n)
run="cat"
cmd="echo"
shift
esac
@ -107,6 +45,14 @@ case "$#" in
exit 2
esac
if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
# Use then new build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
$cmd docker build --tag generate:$GOOS $GOOS
$cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
exit
fi
GOOSARCH_in=syscall_$GOOSARCH.go
case "$GOOSARCH" in
_* | *_ | _)
@ -165,64 +111,13 @@ freebsd_arm)
# API consistent across over platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
linux_386)
mkerrors="$mkerrors -m32"
mksyscall="./mksyscall.pl -l32"
mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
linux_amd64)
unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
if [ "$unistd_h" = "" ]; then
echo >&2 cannot find unistd_64.h
exit 1
fi
linux_sparc64)
GOOSARCH_in=syscall_linux_sparc64.go
unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
mkerrors="$mkerrors -m64"
mksysnum="./mksysnum_linux.pl $unistd_h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
linux_arm)
mkerrors="$mkerrors"
mksyscall="./mksyscall.pl -l32 -arm"
mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
linux_arm64)
unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1)
if [ "$unistd_h" = "" ]; then
echo >&2 cannot find unistd_64.h
exit 1
fi
mksysnum="./mksysnum_linux.pl $unistd_h"
# Let the type of C char be signed for making the bare syscall
# API consistent across over platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
linux_ppc64)
GOOSARCH_in=syscall_linux_ppc64x.go
unistd_h=/usr/include/asm/unistd.h
mkerrors="$mkerrors -m64"
mksysnum="./mksysnum_linux.pl $unistd_h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
linux_ppc64le)
GOOSARCH_in=syscall_linux_ppc64x.go
unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
mkerrors="$mkerrors -m64"
mksysnum="./mksysnum_linux.pl $unistd_h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
linux_s390x)
GOOSARCH_in=syscall_linux_s390x.go
unistd_h=/usr/include/asm/unistd.h
mkerrors="$mkerrors -m64"
mksysnum="./mksysnum_linux.pl $unistd_h"
# Let the type of C char be signed to make the bare sys
# API more consistent between platforms.
# This is a deliberate departure from the way the syscall
# package generates its version of the types file.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
netbsd_386)
mkerrors="$mkerrors -m32"
mksyscall="./mksyscall.pl -l32 -netbsd"
@ -273,13 +168,12 @@ esac
syscall_goos="syscall_bsd.go $syscall_goos"
;;
esac
if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
;;
esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
if [ -n "$mktypes" ]; then
echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go";
echo "$mktypes types_$GOOS.go | go run mkpost.go >>ztypes_$GOOSARCH.go";
echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
fi
) | $run

View File

@ -16,6 +16,15 @@ if test -z "$GOARCH" -o -z "$GOOS"; then
exit 1
fi
# Check that we are using the new build system if we should
if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then
echo 1>&2 "In the new build system, mkerrors should not be called directly."
echo 1>&2 "See README.md"
exit 1
fi
fi
CC=${CC:-cc}
if [[ "$GOOS" -eq "solaris" ]]; then
@ -66,6 +75,7 @@ includes_DragonFly='
'
includes_FreeBSD='
#include <sys/capability.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/event.h>
@ -102,8 +112,39 @@ includes_Linux='
#endif
#define _GNU_SOURCE
// <sys/ioctl.h> is broken on powerpc64, as it fails to include definitions of
// these structures. We just include them copied from <bits/termios.h>.
#if defined(__powerpc__)
struct sgttyb {
char sg_ispeed;
char sg_ospeed;
char sg_erase;
char sg_kill;
short sg_flags;
};
struct tchars {
char t_intrc;
char t_quitc;
char t_startc;
char t_stopc;
char t_eofc;
char t_brkc;
};
struct ltchars {
char t_suspc;
char t_dsuspc;
char t_rprntc;
char t_flushc;
char t_werasc;
char t_lnextc;
};
#endif
#include <bits/sockaddr.h>
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/inotify.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
@ -113,20 +154,32 @@ includes_Linux='
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/xattr.h>
#include <linux/if.h>
#include <linux/if_alg.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/if_tun.h>
#include <linux/if_packet.h>
#include <linux/if_addr.h>
#include <linux/falloc.h>
#include <linux/filter.h>
#include <linux/fs.h>
#include <linux/keyctl.h>
#include <linux/netlink.h>
#include <linux/perf_event.h>
#include <linux/random.h>
#include <linux/reboot.h>
#include <linux/rtnetlink.h>
#include <linux/ptrace.h>
#include <linux/sched.h>
#include <linux/seccomp.h>
#include <linux/sockios.h>
#include <linux/wait.h>
#include <linux/icmpv6.h>
#include <linux/serial.h>
#include <linux/can.h>
#include <linux/vm_sockets.h>
#include <net/route.h>
#include <asm/termbits.h>
@ -141,6 +194,21 @@ includes_Linux='
#ifndef PTRACE_SETREGS
#define PTRACE_SETREGS 0xd
#endif
#ifndef SOL_NETLINK
#define SOL_NETLINK 270
#endif
#ifdef SOL_BLUETOOTH
// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
// but it is already in bluetooth_linux.go
#undef SOL_BLUETOOTH
#endif
// Certain constants are missing from the fs/crypto UAPI
#define FS_KEY_DESC_PREFIX "fscrypt:"
#define FS_KEY_DESC_PREFIX_SIZE 8
#define FS_MAX_KEY_SIZE 64
'
includes_NetBSD='
@ -304,15 +372,16 @@ ccflags="$@"
$2 ~ /^IN_/ ||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
$2 ~ /^FALLOC_/ ||
$2 == "ICMPV6_FILTER" ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
$2 ~ /^SYSCTL_VERS/ ||
$2 ~ /^(MS|MNT)_/ ||
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
$2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
$2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
$2 !~ "NLA_TYPE_MASK" &&
@ -326,14 +395,27 @@ ccflags="$@"
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
$2 ~ /^BIOC/ ||
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
$2 ~ /^CLONE_[A-Z_]+/ ||
$2 !~ /^(BPF_TIMEVAL)$/ &&
$2 ~ /^(BPF|DLT)_/ ||
$2 ~ /^CLOCK_/ ||
$2 ~ /^CAN_/ ||
$2 ~ /^CAP_/ ||
$2 ~ /^ALG_/ ||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
$2 ~ /^GRND_/ ||
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
$2 ~ /^KEYCTL_/ ||
$2 ~ /^PERF_EVENT_IOC_/ ||
$2 ~ /^SECCOMP_MODE_/ ||
$2 ~ /^SPLICE_/ ||
$2 ~ /^(VM|VMADDR)_/ ||
$2 ~ /^XATTR_(CREATE|REPLACE)/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^W[A-Z0-9]+$/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@ -368,7 +450,7 @@ echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
echo
echo "// +build ${GOARCH},${GOOS}"
echo
@ -430,7 +512,7 @@ intcmp(const void *a, const void *b)
int
main(void)
{
int i, j, e;
int i, e;
char buf[1024], *p;
printf("\n\n// Error table\n");

View File

@ -8,10 +8,11 @@
// modify the generated types. It is used to clean up
// the sys API in an architecture specific manner.
//
// mkpost is run after cgo -godefs by mkall.sh.
// mkpost is run after cgo -godefs; see README.md.
package main
import (
"bytes"
"fmt"
"go/format"
"io/ioutil"
@ -21,42 +22,67 @@ import (
)
func main() {
// Get the OS and architecture (using GOARCH_TARGET if it exists)
goos := os.Getenv("GOOS")
goarch := os.Getenv("GOARCH_TARGET")
if goarch == "" {
goarch = os.Getenv("GOARCH")
}
// Check that we are using the new build system if we should be.
if goos == "linux" && goarch != "sparc64" {
if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n")
os.Stderr.WriteString("See README.md\n")
os.Exit(1)
}
}
b, err := ioutil.ReadAll(os.Stdin)
if err != nil {
log.Fatal(err)
}
s := string(b)
goarch := os.Getenv("GOARCH")
goos := os.Getenv("GOOS")
if goarch == "s390x" && goos == "linux" {
// Export the types of PtraceRegs fields.
re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)")
s = re.ReplaceAllString(s, "Ptrace$1")
// Replace padding fields inserted by cgo with blank identifiers.
re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*")
s = re.ReplaceAllString(s, "_")
// Replace other unwanted fields with blank identifiers.
re = regexp.MustCompile("X_[A-Za-z0-9_]*")
s = re.ReplaceAllString(s, "_")
// If we have empty Ptrace structs, we should delete them. Only s390x emits
// nonempty Ptrace structs.
ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
b = ptraceRexexp.ReplaceAll(b, nil)
// Replace the control_regs union with a blank identifier for now.
re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64")
s = re.ReplaceAllString(s, "_ [0]uint64")
controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`)
b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64"))
// Remove fields that are added by glibc
// Note that this is unstable as the identifers are private.
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
// We refuse to export private fields on s390x
if goarch == "s390x" && goos == "linux" {
// Remove cgo padding fields
removeFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
// Remove padding, hidden, or unused fields
removeFieldsRegex = regexp.MustCompile(`X_\S+`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
}
// Remove the first line of warning from cgo
b = b[bytes.IndexByte(b, '\n')+1:]
// Modify the command in the header to include:
// mkpost, our own warning, and a build tag.
replacement := fmt.Sprintf(`$1 | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build %s,%s`, goarch, goos)
cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`)
b = cgoCommandRegex.ReplaceAll(b, []byte(replacement))
// gofmt
b, err = format.Source([]byte(s))
b, err = format.Source(b)
if err != nil {
log.Fatal(err)
}
// Append this command to the header to show where the new file
// came from.
re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)")
b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go"))
fmt.Printf("%s", b)
os.Stdout.Write(b)
}

View File

@ -29,6 +29,7 @@ my $openbsd = 0;
my $netbsd = 0;
my $dragonfly = 0;
my $arm = 0; # 64-bit value should use (even, odd)-pair
my $tags = ""; # build tags
if($ARGV[0] eq "-b32") {
$_32bit = "big-endian";
@ -57,16 +58,26 @@ if($ARGV[0] eq "-arm") {
$arm = 1;
shift;
}
if($ARGV[0] eq "-tags") {
shift;
$tags = $ARGV[0];
shift;
}
if($ARGV[0] =~ /^-/) {
print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
exit 1;
}
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
print STDERR "GOARCH or GOOS not defined in environment\n";
# Check that we are using the new build system if we should
if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") {
if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
print STDERR "In the new build system, mksyscall should not be called directly.\n";
print STDERR "See README.md\n";
exit 1;
}
}
sub parseparamlist($) {
my ($list) = @_;
@ -132,7 +143,6 @@ while(<>) {
# Prepare arguments to Syscall.
my @args = ();
my @uses = ();
my $n = 0;
foreach my $p (@in) {
my ($name, $type) = parseparam($p);
@ -143,14 +153,12 @@ while(<>) {
$text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type eq "string") {
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
$text .= "\tvar _p$n *byte\n";
$text .= "\t_p$n, _ = BytePtrFromString($name)\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type =~ /^\[\](.*)/) {
# Convert slice into pointer, length.
@ -278,9 +286,6 @@ while(<>) {
} else {
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
}
foreach my $use (@uses) {
$text .= "\t$use\n";
}
$text .= $body;
if ($plan9 && $ret[2] eq "e1") {
@ -305,9 +310,9 @@ if($errors) {
print <<EOF;
// $cmdline
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
// +build $tags
package unix

View File

@ -22,6 +22,7 @@ use strict;
my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
my $errors = 0;
my $_32bit = "";
my $tags = ""; # build tags
binmode STDOUT;
@ -32,14 +33,14 @@ if($ARGV[0] eq "-b32") {
$_32bit = "little-endian";
shift;
}
if($ARGV[0] =~ /^-/) {
print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [file ...]\n";
exit 1;
if($ARGV[0] eq "-tags") {
shift;
$tags = $ARGV[0];
shift;
}
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
print STDERR "GOARCH or GOOS not defined in environment\n";
if($ARGV[0] =~ /^-/) {
print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
exit 1;
}
@ -138,7 +139,6 @@ while(<>) {
# Prepare arguments to Syscall.
my @args = ();
my @uses = ();
my $n = 0;
foreach my $p (@in) {
my ($name, $type) = parseparam($p);
@ -149,14 +149,12 @@ while(<>) {
$text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type eq "string") {
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
$text .= "\tvar _p$n $strconvtype\n";
$text .= "\t_p$n, _ = $strconvfunc($name)\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type =~ /^\[\](.*)/) {
# Convert slice into pointer, length.
@ -243,9 +241,6 @@ while(<>) {
} else {
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
}
foreach my $use (@uses) {
$text .= "\t$use\n";
}
$text .= $body;
if ($do_errno) {
@ -263,9 +258,9 @@ if($errors) {
print <<EOF;
// $cmdline
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
// +build $tags
package $package

View File

@ -16,7 +16,7 @@ my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
print <<EOF;
// $command
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}

View File

@ -17,7 +17,7 @@ my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
print <<EOF;
// $command
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}

View File

@ -17,7 +17,7 @@ my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
print <<EOF;
// $command
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
@ -40,21 +40,8 @@ while(<>){
if($name eq 'SYS_SYS_EXIT'){
$name = 'SYS_EXIT';
}
if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
next
}
print " $name = $num; // $proto\n";
# We keep Capsicum syscall numbers for FreeBSD
# 9-STABLE here because we are not sure whether they
# are mature and stable.
if($num == 513){
print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
}
}
}

View File

@ -1,58 +0,0 @@
#!/usr/bin/env perl
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
use strict;
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
print STDERR "GOARCH or GOOS not defined in environment\n";
exit 1;
}
my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
print <<EOF;
// $command
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
package unix
const(
EOF
sub fmt {
my ($name, $num) = @_;
if($num > 999){
# ignore deprecated syscalls that are no longer implemented
# https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
return;
}
$name =~ y/a-z/A-Z/;
print " SYS_$name = $num;\n";
}
my $prev;
open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
while(<GCC>){
if(/^#define __NR_syscalls\s+/) {
# ignore redefinitions of __NR_syscalls
}
elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
$prev = $2;
fmt($1, $2);
}
elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
$prev = $2;
fmt($1, $2);
}
elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
fmt($1, $prev+$2)
}
}
print <<EOF;
)
EOF

View File

@ -17,7 +17,7 @@ my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
print <<EOF;
// $command
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}

View File

@ -17,7 +17,7 @@ my $command = "mksysnum_openbsd.pl " . join(' ', @ARGV);
print <<EOF;
// $command
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build $ENV{'GOARCH'},$ENV{'GOOS'}

38
vendor/golang.org/x/sys/unix/openbsd_pledge.go generated vendored Normal file
View File

@ -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
}

View File

@ -13,9 +13,10 @@ import "unsafe"
// Round the length of a raw sockaddr up to align it properly.
func cmsgAlignOf(salen int) int {
salign := sizeofPtr
// NOTE: It seems like 64-bit Darwin and DragonFly BSD kernels
// still require 32-bit aligned access to network subsystem.
if darwin64Bit || dragonfly64Bit {
// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
// Solaris kernels still require 32-bit aligned access to
// network subsystem.
if darwin64Bit || dragonfly64Bit || solaris64Bit {
salign = 4
}
return (salen + salign - 1) & ^(salign - 1)

View File

@ -21,8 +21,6 @@
// holds a value of type syscall.Errno.
package 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)

View File

@ -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' {

View File

@ -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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
}
buf = buf[dirent.Reclen:]
if dirent.Ino == 0 { // File absent in directory.
continue
func direntReclen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
}
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 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
@ -228,10 +210,13 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys Dup2(from int, to int) (err error)
//sys Exchangedata(path1 string, path2 string, options int) (err error)
//sys Exit(code int)
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchdir(fd int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@ -256,23 +241,29 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys Kqueue() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error)
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
//sys Listen(s int, backlog int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Mkdir(path string, mode uint32) (err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Msync(b []byte, flags int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error)
//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
@ -293,11 +284,13 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
//sys Symlink(path string, link string) (err error)
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
//sys Sync() (err error)
//sys Truncate(path string, length int64) (err error)
//sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (err error)
//sys Unlink(path string) (err error)
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
@ -487,7 +480,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
// Sendmsg_nocancel
// Recvfrom_nocancel
// Accept_nocancel
// Msync_nocancel
// Fcntl_nocancel
// Select_nocancel
// Fsync_nocancel

View File

@ -11,8 +11,6 @@ import (
"unsafe"
)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }

View File

@ -1,8 +1,8 @@
// Copyright 2009,2010 The Go Authors. All rights reserved.
// 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.
// FreeBSD system calls.
// DragonFly BSD system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates system call stubs.
@ -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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
}
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
var name = string(bytes[0:dirent.Namlen])
if name == "." || name == ".." { // Useless names
continue
func direntReclen(buf []byte) (uint64, bool) {
namlen, ok := direntNamlen(buf)
if !ok {
return 0, false
}
max--
count++
names = append(names, name)
return (16 + namlen + 1 + 7) &^ 7, true
}
return origlen - len(buf), count, names
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)
@ -101,6 +92,24 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
return extpwrite(fd, p, 0, offset)
}
func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
nfd, err = accept4(fd, &rsa, &len, flags)
if err != nil {
return
}
if len > SizeofSockaddrAny {
panic("RawSockaddrAny too small")
}
sa, err = anyToSockaddr(&rsa)
if err != nil {
Close(nfd)
nfd = 0
}
return
}
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
var _p0 unsafe.Pointer
var bufsize uintptr
@ -109,7 +118,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
@ -209,6 +217,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
/*
* Unimplemented
@ -244,6 +253,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Kdebug_trace
// Sigreturn
// Mmap
// Mlock
// Munlock
// Atsocket
// Kqueue_from_portset_np
// Kqueue_portset
@ -336,6 +347,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Lio_listio
// __pthread_cond_wait
// Iopolicysys
// Mlockall
// Munlockall
// __pthread_kill
// __pthread_sigmask
// __sigwait

View File

@ -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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
}
buf = buf[dirent.Reclen:]
if dirent.Fileno == 0 { // File absent in directory.
continue
func direntReclen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
}
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 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
@ -374,6 +357,9 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
*/
//sys Access(path string, mode uint32) (err error)
//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
//sys CapEnter() (err error)
//sys capRightsGet(version int, fd int, rightsp *CapRights) (err error) = SYS___CAP_RIGHTS_GET
//sys capRightsLimit(fd int, rightsp *CapRights) (err error)
//sys Chdir(path string) (err error)
//sys Chflags(path string, flags int) (err error)
//sys Chmod(path string, mode uint32) (err error)
@ -438,6 +424,7 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)

View File

@ -36,6 +36,59 @@ func Creat(path string, mode uint32) (fd int, err error) {
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
}
//sys fchmodat(dirfd int, path string, mode uint32) (err error)
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
// Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior
// and check the flags. Otherwise the mode would be applied to the symlink
// destination which is not what the user expects.
if flags&^AT_SYMLINK_NOFOLLOW != 0 {
return EINVAL
} else if flags&AT_SYMLINK_NOFOLLOW != 0 {
return EOPNOTSUPP
}
return fchmodat(dirfd, path, mode)
}
//sys ioctl(fd int, req uint, arg uintptr) (err error)
// ioctl itself should not be exposed directly, but additional get/set
// functions for specific types are permissible.
// IoctlSetInt performs an ioctl operation which sets an integer value
// on fd, using the specified request number.
func IoctlSetInt(fd int, req uint, value int) error {
return ioctl(fd, req, uintptr(value))
}
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
func IoctlSetTermios(fd int, req uint, value *Termios) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
// IoctlGetInt performs an ioctl operation which gets an integer value
// from fd, using the specified request number.
func IoctlGetInt(fd int, req uint) (int, error) {
var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return value, err
}
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
var value Termios
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
func Link(oldpath string, newpath string) (err error) {
@ -69,10 +122,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 +133,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 +192,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])))
}
@ -304,10 +352,14 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
return
}
func Mkfifo(path string, mode uint32) (err error) {
func Mkfifo(path string, mode uint32) error {
return Mknod(path, mode|S_IFIFO, 0)
}
func Mkfifoat(dirfd int, path string, mode uint32) error {
return Mknodat(dirfd, path, mode|S_IFIFO, 0)
}
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Port < 0 || sa.Port > 0xFFFF {
return nil, 0, EINVAL
@ -416,6 +468,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 +699,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,10 +801,124 @@ 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))
}
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
// KeyctlInt calls keyctl commands in which each argument is an int.
// These commands are KEYCTL_REVOKE, KEYCTL_CHOWN, KEYCTL_CLEAR, KEYCTL_LINK,
// KEYCTL_UNLINK, KEYCTL_NEGATE, KEYCTL_SET_REQKEY_KEYRING, KEYCTL_SET_TIMEOUT,
// KEYCTL_ASSUME_AUTHORITY, KEYCTL_SESSION_TO_PARENT, KEYCTL_REJECT,
// KEYCTL_INVALIDATE, and KEYCTL_GET_PERSISTENT.
//sys KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) = SYS_KEYCTL
// KeyctlBuffer calls keyctl commands in which the third and fourth
// arguments are a buffer and its length, respectively.
// These commands are KEYCTL_UPDATE, KEYCTL_READ, and KEYCTL_INSTANTIATE.
//sys KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) = SYS_KEYCTL
// KeyctlString calls keyctl commands which return a string.
// These commands are KEYCTL_DESCRIBE and KEYCTL_GET_SECURITY.
func KeyctlString(cmd int, id int) (string, error) {
// We must loop as the string data may change in between the syscalls.
// We could allocate a large buffer here to reduce the chance that the
// syscall needs to be called twice; however, this is unnecessary as
// the performance loss is negligible.
var buffer []byte
for {
// Try to fill the buffer with data
length, err := KeyctlBuffer(cmd, id, buffer, 0)
if err != nil {
return "", err
}
// Check if the data was written
if length <= len(buffer) {
// Exclude the null terminator
return string(buffer[:length-1]), nil
}
// Make a bigger buffer if needed
buffer = make([]byte, length)
}
}
// Keyctl commands with special signatures.
// KeyctlGetKeyringID implements the KEYCTL_GET_KEYRING_ID command.
// See the full documentation at:
// http://man7.org/linux/man-pages/man3/keyctl_get_keyring_ID.3.html
func KeyctlGetKeyringID(id int, create bool) (ringid int, err error) {
createInt := 0
if create {
createInt = 1
}
return KeyctlInt(KEYCTL_GET_KEYRING_ID, id, createInt, 0, 0)
}
// KeyctlSetperm implements the KEYCTL_SETPERM command. The perm value is the
// key handle permission mask as described in the "keyctl setperm" section of
// http://man7.org/linux/man-pages/man1/keyctl.1.html.
// See the full documentation at:
// http://man7.org/linux/man-pages/man3/keyctl_setperm.3.html
func KeyctlSetperm(id int, perm uint32) error {
_, err := KeyctlInt(KEYCTL_SETPERM, id, int(perm), 0, 0)
return err
}
//sys keyctlJoin(cmd int, arg2 string) (ret int, err error) = SYS_KEYCTL
// KeyctlJoinSessionKeyring implements the KEYCTL_JOIN_SESSION_KEYRING command.
// See the full documentation at:
// http://man7.org/linux/man-pages/man3/keyctl_join_session_keyring.3.html
func KeyctlJoinSessionKeyring(name string) (ringid int, err error) {
return keyctlJoin(KEYCTL_JOIN_SESSION_KEYRING, name)
}
//sys keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) = SYS_KEYCTL
// KeyctlSearch implements the KEYCTL_SEARCH command.
// See the full documentation at:
// http://man7.org/linux/man-pages/man3/keyctl_search.3.html
func KeyctlSearch(ringid int, keyType, description string, destRingid int) (id int, err error) {
return keyctlSearch(KEYCTL_SEARCH, ringid, keyType, description, destRingid)
}
//sys keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) = SYS_KEYCTL
// KeyctlInstantiateIOV implements the KEYCTL_INSTANTIATE_IOV command. This
// command is similar to KEYCTL_INSTANTIATE, except that the payload is a slice
// of Iovec (each of which represents a buffer) instead of a single buffer.
// See the full documentation at:
// http://man7.org/linux/man-pages/man3/keyctl_instantiate_iov.3.html
func KeyctlInstantiateIOV(id int, payload []Iovec, ringid int) error {
return keyctlIOV(KEYCTL_INSTANTIATE_IOV, id, payload, ringid)
}
//sys keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) = SYS_KEYCTL
// KeyctlDHCompute implements the KEYCTL_DH_COMPUTE command. This command
// computes a Diffie-Hellman shared secret based on the provide params. The
// secret is written to the provided buffer and the returned size is the number
// of bytes written (returning an error if there is insufficient space in the
// buffer). If a nil buffer is passed in, this function returns the minimum
// buffer length needed to store the appropriate data. Note that this differs
// from KEYCTL_READ's behavior which always returns the requested payload size.
// See the full documentation at:
// http://man7.org/linux/man-pages/man3/keyctl_dh_compute.3.html
func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error) {
return keyctlDH(KEYCTL_DH_COMPUTE, params, buffer)
}
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
var rsa RawSockaddrAny
@ -716,6 +1052,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 +1154,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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
}
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
var name = string(bytes[0:clen(bytes[:])])
if name == "." || name == ".." { // Useless names
continue
func direntReclen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
}
max--
count++
names = append(names, name)
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)
@ -871,22 +1197,24 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
* Direct access
*/
//sys Acct(path string) (err error)
//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
//sys Adjtimex(buf *Timex) (state int, err error)
//sys Chdir(path string) (err error)
//sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error)
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Dup(oldfd int) (fd int, err error)
//sys Dup3(oldfd int, newfd int, flags int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sysnb EpollCreate1(flag int) (fd int, err error)
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
//sys Exit(code int) = SYS_EXIT_GROUP
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
//sys Fchdir(fd int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
//sys Fdatasync(fd int) (err error)
@ -903,7 +1231,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)
@ -911,16 +1241,21 @@ func Getpgrp() (pid int) {
//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
//sysnb Kill(pid int, sig syscall.Signal) (err error)
//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
//sys Lgetxattr(path string, attr string, dest []byte) (sz int, err error)
//sys Listxattr(path string, dest []byte) (sz int, err error)
//sys Llistxattr(path string, dest []byte) (sz int, err error)
//sys Lremovexattr(path string, attr string) (err error)
//sys Lsetxattr(path string, attr string, data []byte, flags int) (err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys 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)
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
//sys Setdomainname(p []byte) (err error)
//sys Sethostname(p []byte) (err error)
//sysnb Setpgid(pid int, pgid int) (err error)
@ -944,6 +1279,7 @@ func Setgid(uid int) (err error) {
//sys Setpriority(which int, who int, prio int) (err error)
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
//sys Sync()
//sys Syncfs(fd int) (err error)
//sysnb Sysinfo(info *Sysinfo_t) (err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
@ -980,12 +1316,31 @@ func Munmap(b []byte) (err error) {
//sys Mlock(b []byte) (err error)
//sys Munlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Msync(b []byte, 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
*/
// AddKey
// AfsSyscall
// Alarm
// ArchPrctl
@ -1001,7 +1356,6 @@ func Munmap(b []byte) (err error) {
// EpollCtlOld
// EpollPwait
// EpollWaitOld
// Eventfd
// Execve
// Fgetxattr
// Flistxattr
@ -1020,16 +1374,10 @@ func Munmap(b []byte) (err error) {
// IoGetevents
// IoSetup
// IoSubmit
// Ioctl
// IoprioGet
// IoprioSet
// KexecLoad
// Keyctl
// Lgetxattr
// Llistxattr
// LookupDcookie
// Lremovexattr
// Lsetxattr
// Mbind
// MigratePages
// Mincore
@ -1048,7 +1396,6 @@ func Munmap(b []byte) (err error) {
// Msgget
// Msgrcv
// Msgsnd
// Msync
// Newfstatat
// Nfsservctl
// Personality
@ -1060,7 +1407,6 @@ func Munmap(b []byte) (err error) {
// Readahead
// Readv
// RemapFilePages
// RequestKey
// RestartSyscall
// RtSigaction
// RtSigpending
@ -1109,7 +1455,6 @@ func Munmap(b []byte) (err error) {
// Utimensat
// Vfork
// Vhangup
// Vmsplice
// Vserver
// Waitid
// _Sysctl

View File

@ -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
vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go generated vendored Normal file
View File

@ -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)

View File

@ -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)

View File

@ -7,13 +7,7 @@
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 Dup2(oldfd int, newfd int) (err error)
//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)
@ -189,9 +183,9 @@ func fillStat_t(s *Stat_t, st *stat_t) {
s.Blocks = st.Blocks
}
func (r *PtraceRegs) PC() uint64 { return r.Regs[64] }
func (r *PtraceRegs) PC() uint64 { return r.Epc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
func (iov *Iovec) SetLen(length int) {
iov.Len = uint64(length)

239
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go generated vendored Normal file
View File

@ -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 r.Epc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = 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 }

View File

@ -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
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go generated vendored Normal file
View File

@ -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)
}

View File

@ -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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
}
buf = buf[dirent.Reclen:]
if dirent.Fileno == 0 { // File absent in directory.
continue
func direntReclen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
}
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 direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
//sysnb pipe() (fd1 int, fd2 int, err error)

View File

@ -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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
}
buf = buf[dirent.Reclen:]
if dirent.Fileno == 0 { // File absent in directory.
continue
func direntReclen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
}
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 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

View File

@ -44,32 +44,20 @@ 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
func direntIno(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
}
buf = buf[dirent.Reclen:]
if dirent.Ino == 0 { // File absent in directory.
continue
func direntReclen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
}
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
var name = string(bytes[0:clen(bytes[:])])
if name == "." || name == ".." { // Useless names
continue
func direntNamlen(buf []byte) (uint64, bool) {
reclen, ok := direntReclen(buf)
if !ok {
return 0, false
}
max--
count++
names = append(names, name)
}
return origlen - len(buf), count, names
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
}
//sysnb pipe(p *[2]_C_int) (n int, err error)
@ -434,7 +422,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
return
}
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
@ -453,7 +441,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
iov.Base = &dummy
iov.SetLen(1)
}
msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
msg.Accrightslen = int32(len(oob))
}
msg.Iov = &iov
msg.Iovlen = 1
@ -473,7 +461,7 @@ func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
return
}
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
var ptr unsafe.Pointer
@ -499,7 +487,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
iov.Base = &dummy
iov.SetLen(1)
}
msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
msg.Accrightslen = int32(len(oob))
}
msg.Iov = &iov
msg.Iovlen = 1
@ -531,43 +519,43 @@ func Acct(path string) (err error) {
* Expose the ioctl function
*/
//sys ioctl(fd int, req int, arg uintptr) (err error)
//sys ioctl(fd int, req uint, arg uintptr) (err error)
func IoctlSetInt(fd int, req int, value int) (err error) {
func IoctlSetInt(fd int, req uint, value int) (err error) {
return ioctl(fd, req, uintptr(value))
}
func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) {
func IoctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
func IoctlSetTermios(fd int, req int, value *Termios) (err error) {
func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
func IoctlSetTermio(fd int, req int, value *Termio) (err error) {
func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
func IoctlGetInt(fd int, req int) (int, error) {
func IoctlGetInt(fd int, req uint) (int, error) {
var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return value, err
}
func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
func IoctlGetTermios(fd int, req int) (*Termios, error) {
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
var value Termios
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
func IoctlGetTermio(fd int, req int) (*Termio, error) {
func IoctlGetTermio(fd int, req uint) (*Termio, error) {
var value Termio
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
@ -595,6 +583,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sys Fdatasync(fd int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error)
//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
//sysnb Getgid() (gid int)
//sysnb Getpid() (pid int)
@ -611,7 +600,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sys Kill(pid int, signum syscall.Signal) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error)
//sys Listen(s int, backlog int) (err error) = libsocket.listen
//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Madvise(b []byte, advice int) (err error)
//sys Mkdir(path string, mode uint32) (err error)
@ -651,6 +640,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sysnb Setuid(uid int) (err error)
//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statvfs(path string, vfsstat *Statvfs_t) (err error)
//sys Symlink(path string, link string) (err error)
//sys Sync() (err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error)
@ -664,15 +654,15 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys Utime(path string, buf *Utimbuf) (err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto
//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto
//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair
//sys write(fd int, p []byte) (n int, err error)
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.__xnet_getsockopt
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom

View File

@ -23,6 +23,7 @@ const (
darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
solaris64Bit = runtime.GOOS == "solaris" && sizeofPtr == 8
)
// Do the interface allocations only once for common
@ -49,11 +50,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
vendor/golang.org/x/sys/unix/syscall_unix_gc.go generated vendored Normal file
View File

@ -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)

View File

@ -5,7 +5,7 @@
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
Input to cgo -godefs. See README.md
*/
// +godefs map struct_in_addr [4]byte /* in_addr */
@ -246,5 +246,7 @@ type Termios C.struct_termios
const (
AT_FDCWD = C.AT_FDCWD
AT_REMOVEDIR = C.AT_REMOVEDIR
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)

View File

@ -5,7 +5,7 @@
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
Input to cgo -godefs. See README.md
*/
// +godefs map struct_in_addr [4]byte /* in_addr */

View File

@ -5,7 +5,7 @@
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
Input to cgo -godefs. See README.md
*/
// +godefs map struct_in_addr [4]byte /* in_addr */
@ -21,6 +21,7 @@ package unix
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/capability.h>
#include <sys/event.h>
#include <sys/mman.h>
#include <sys/mount.h>
@ -130,7 +131,10 @@ struct if_data8 {
u_long ifi_iqdrops;
u_long ifi_noproto;
u_long ifi_hwassist;
// FIXME: these are now unions, so maybe need to change definitions?
#undef ifi_epoch
time_t ifi_epoch;
#undef ifi_lastchange
struct timeval ifi_lastchange;
};
@ -351,3 +355,7 @@ type BpfZbufHeader C.struct_bpf_zbuf_header
// Terminal handling
type Termios C.struct_termios
// Capabilities
type CapRights C.struct_cap_rights

View File

@ -1,450 +0,0 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
*/
// +godefs map struct_in_addr [4]byte /* in_addr */
// +godefs map struct_in6_addr [16]byte /* in6_addr */
package unix
/*
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS 64
#define _GNU_SOURCE
#include <dirent.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netpacket/packet.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
#include <sys/epoll.h>
#include <sys/inotify.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/ptrace.h>
#include <sys/resource.h>
#include <sys/select.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/sysinfo.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/timex.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/user.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <linux/filter.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/icmpv6.h>
#include <asm/termbits.h>
#include <time.h>
#include <unistd.h>
#include <ustat.h>
#include <utime.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#ifdef TCSETS2
// On systems that have "struct termios2" use this as type Termios.
typedef struct termios2 termios_t;
#else
typedef struct termios termios_t;
#endif
enum {
sizeofPtr = sizeof(void*),
};
union sockaddr_all {
struct sockaddr s1; // this one gets used for fields
struct sockaddr_in s2; // these pad it out
struct sockaddr_in6 s3;
struct sockaddr_un s4;
struct sockaddr_ll s5;
struct sockaddr_nl s6;
};
struct sockaddr_any {
struct sockaddr addr;
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
};
// copied from /usr/include/linux/un.h
struct my_sockaddr_un {
sa_family_t sun_family;
#if defined(__ARM_EABI__) || defined(__powerpc64__)
// on ARM char is by default unsigned
signed char sun_path[108];
#else
char sun_path[108];
#endif
};
#ifdef __ARM_EABI__
typedef struct user_regs PtraceRegs;
#elif defined(__aarch64__)
typedef struct user_pt_regs PtraceRegs;
#elif defined(__powerpc64__)
typedef struct pt_regs PtraceRegs;
#elif defined(__mips__)
typedef struct user PtraceRegs;
#elif defined(__s390x__)
typedef struct _user_regs_struct PtraceRegs;
#else
typedef struct user_regs_struct PtraceRegs;
#endif
#if defined(__s390x__)
typedef struct _user_psw_struct ptracePsw;
typedef struct _user_fpregs_struct ptraceFpregs;
typedef struct _user_per_struct ptracePer;
#else
typedef struct {} ptracePsw;
typedef struct {} ptraceFpregs;
typedef struct {} ptracePer;
#endif
// The real epoll_event is a union, and godefs doesn't handle it well.
struct my_epoll_event {
uint32_t events;
#if defined(__ARM_EABI__) || defined(__aarch64__)
// padding is not specified in linux/eventpoll.h but added to conform to the
// alignment requirements of EABI
int32_t padFd;
#elif defined(__powerpc64__) || defined(__s390x__)
int32_t _padFd;
#endif
int32_t fd;
int32_t pad;
};
*/
import "C"
// Machine characteristics; for internal use.
const (
sizeofPtr = C.sizeofPtr
sizeofShort = C.sizeof_short
sizeofInt = C.sizeof_int
sizeofLong = C.sizeof_long
sizeofLongLong = C.sizeof_longlong
PathMax = C.PATH_MAX
)
// Basic types
type (
_C_short C.short
_C_int C.int
_C_long C.long
_C_long_long C.longlong
)
// Time
type Timespec C.struct_timespec
type Timeval C.struct_timeval
type Timex C.struct_timex
type Time_t C.time_t
type Tms C.struct_tms
type Utimbuf C.struct_utimbuf
// Processes
type Rusage C.struct_rusage
type Rlimit C.struct_rlimit
type _Gid_t C.gid_t
// Files
type Stat_t C.struct_stat
type Statfs_t C.struct_statfs
type Dirent C.struct_dirent
type Fsid C.fsid_t
type Flock_t C.struct_flock
// Advice to Fadvise
const (
FADV_NORMAL = C.POSIX_FADV_NORMAL
FADV_RANDOM = C.POSIX_FADV_RANDOM
FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
FADV_WILLNEED = C.POSIX_FADV_WILLNEED
FADV_DONTNEED = C.POSIX_FADV_DONTNEED
FADV_NOREUSE = C.POSIX_FADV_NOREUSE
)
// Sockets
type RawSockaddrInet4 C.struct_sockaddr_in
type RawSockaddrInet6 C.struct_sockaddr_in6
type RawSockaddrUnix C.struct_my_sockaddr_un
type RawSockaddrLinklayer C.struct_sockaddr_ll
type RawSockaddrNetlink C.struct_sockaddr_nl
type RawSockaddrHCI C.struct_sockaddr_hci
type RawSockaddr C.struct_sockaddr
type RawSockaddrAny C.struct_sockaddr_any
type _Socklen C.socklen_t
type Linger C.struct_linger
type Iovec C.struct_iovec
type IPMreq C.struct_ip_mreq
type IPMreqn C.struct_ip_mreqn
type IPv6Mreq C.struct_ipv6_mreq
type Msghdr C.struct_msghdr
type Cmsghdr C.struct_cmsghdr
type Inet4Pktinfo C.struct_in_pktinfo
type Inet6Pktinfo C.struct_in6_pktinfo
type IPv6MTUInfo C.struct_ip6_mtuinfo
type ICMPv6Filter C.struct_icmp6_filter
type Ucred C.struct_ucred
type TCPInfo C.struct_tcp_info
const (
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
SizeofLinger = C.sizeof_struct_linger
SizeofIPMreq = C.sizeof_struct_ip_mreq
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
SizeofMsghdr = C.sizeof_struct_msghdr
SizeofCmsghdr = C.sizeof_struct_cmsghdr
SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
SizeofUcred = C.sizeof_struct_ucred
SizeofTCPInfo = C.sizeof_struct_tcp_info
)
// Netlink routing and interface messages
const (
IFA_UNSPEC = C.IFA_UNSPEC
IFA_ADDRESS = C.IFA_ADDRESS
IFA_LOCAL = C.IFA_LOCAL
IFA_LABEL = C.IFA_LABEL
IFA_BROADCAST = C.IFA_BROADCAST
IFA_ANYCAST = C.IFA_ANYCAST
IFA_CACHEINFO = C.IFA_CACHEINFO
IFA_MULTICAST = C.IFA_MULTICAST
IFLA_UNSPEC = C.IFLA_UNSPEC
IFLA_ADDRESS = C.IFLA_ADDRESS
IFLA_BROADCAST = C.IFLA_BROADCAST
IFLA_IFNAME = C.IFLA_IFNAME
IFLA_MTU = C.IFLA_MTU
IFLA_LINK = C.IFLA_LINK
IFLA_QDISC = C.IFLA_QDISC
IFLA_STATS = C.IFLA_STATS
IFLA_COST = C.IFLA_COST
IFLA_PRIORITY = C.IFLA_PRIORITY
IFLA_MASTER = C.IFLA_MASTER
IFLA_WIRELESS = C.IFLA_WIRELESS
IFLA_PROTINFO = C.IFLA_PROTINFO
IFLA_TXQLEN = C.IFLA_TXQLEN
IFLA_MAP = C.IFLA_MAP
IFLA_WEIGHT = C.IFLA_WEIGHT
IFLA_OPERSTATE = C.IFLA_OPERSTATE
IFLA_LINKMODE = C.IFLA_LINKMODE
IFLA_LINKINFO = C.IFLA_LINKINFO
IFLA_NET_NS_PID = C.IFLA_NET_NS_PID
IFLA_IFALIAS = C.IFLA_IFALIAS
IFLA_MAX = C.IFLA_MAX
RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE
RT_SCOPE_SITE = C.RT_SCOPE_SITE
RT_SCOPE_LINK = C.RT_SCOPE_LINK
RT_SCOPE_HOST = C.RT_SCOPE_HOST
RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE
RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC
RT_TABLE_COMPAT = C.RT_TABLE_COMPAT
RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT
RT_TABLE_MAIN = C.RT_TABLE_MAIN
RT_TABLE_LOCAL = C.RT_TABLE_LOCAL
RT_TABLE_MAX = C.RT_TABLE_MAX
RTA_UNSPEC = C.RTA_UNSPEC
RTA_DST = C.RTA_DST
RTA_SRC = C.RTA_SRC
RTA_IIF = C.RTA_IIF
RTA_OIF = C.RTA_OIF
RTA_GATEWAY = C.RTA_GATEWAY
RTA_PRIORITY = C.RTA_PRIORITY
RTA_PREFSRC = C.RTA_PREFSRC
RTA_METRICS = C.RTA_METRICS
RTA_MULTIPATH = C.RTA_MULTIPATH
RTA_FLOW = C.RTA_FLOW
RTA_CACHEINFO = C.RTA_CACHEINFO
RTA_TABLE = C.RTA_TABLE
RTN_UNSPEC = C.RTN_UNSPEC
RTN_UNICAST = C.RTN_UNICAST
RTN_LOCAL = C.RTN_LOCAL
RTN_BROADCAST = C.RTN_BROADCAST
RTN_ANYCAST = C.RTN_ANYCAST
RTN_MULTICAST = C.RTN_MULTICAST
RTN_BLACKHOLE = C.RTN_BLACKHOLE
RTN_UNREACHABLE = C.RTN_UNREACHABLE
RTN_PROHIBIT = C.RTN_PROHIBIT
RTN_THROW = C.RTN_THROW
RTN_NAT = C.RTN_NAT
RTN_XRESOLVE = C.RTN_XRESOLVE
RTNLGRP_NONE = C.RTNLGRP_NONE
RTNLGRP_LINK = C.RTNLGRP_LINK
RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY
RTNLGRP_NEIGH = C.RTNLGRP_NEIGH
RTNLGRP_TC = C.RTNLGRP_TC
RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR
RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE
RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE
RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE
RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR
RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE
RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE
RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO
RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX
RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE
RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT
SizeofNlMsghdr = C.sizeof_struct_nlmsghdr
SizeofNlMsgerr = C.sizeof_struct_nlmsgerr
SizeofRtGenmsg = C.sizeof_struct_rtgenmsg
SizeofNlAttr = C.sizeof_struct_nlattr
SizeofRtAttr = C.sizeof_struct_rtattr
SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
SizeofRtMsg = C.sizeof_struct_rtmsg
SizeofRtNexthop = C.sizeof_struct_rtnexthop
)
type NlMsghdr C.struct_nlmsghdr
type NlMsgerr C.struct_nlmsgerr
type RtGenmsg C.struct_rtgenmsg
type NlAttr C.struct_nlattr
type RtAttr C.struct_rtattr
type IfInfomsg C.struct_ifinfomsg
type IfAddrmsg C.struct_ifaddrmsg
type RtMsg C.struct_rtmsg
type RtNexthop C.struct_rtnexthop
// Linux socket filter
const (
SizeofSockFilter = C.sizeof_struct_sock_filter
SizeofSockFprog = C.sizeof_struct_sock_fprog
)
type SockFilter C.struct_sock_filter
type SockFprog C.struct_sock_fprog
// Inotify
type InotifyEvent C.struct_inotify_event
const SizeofInotifyEvent = C.sizeof_struct_inotify_event
// Ptrace
// Register structures
type PtraceRegs C.PtraceRegs
// Structures contained in PtraceRegs on s390x (exported by mkpost.go)
type ptracePsw C.ptracePsw
type ptraceFpregs C.ptraceFpregs
type ptracePer C.ptracePer
// Misc
type FdSet C.fd_set
type Sysinfo_t C.struct_sysinfo
type Utsname C.struct_utsname
type Ustat_t C.struct_ustat
type EpollEvent C.struct_my_epoll_event
const (
AT_FDCWD = C.AT_FDCWD
AT_REMOVEDIR = C.AT_REMOVEDIR
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)
type PollFd C.struct_pollfd
const (
POLLIN = C.POLLIN
POLLPRI = C.POLLPRI
POLLOUT = C.POLLOUT
POLLRDHUP = C.POLLRDHUP
POLLERR = C.POLLERR
POLLHUP = C.POLLHUP
POLLNVAL = C.POLLNVAL
)
type Sigset_t C.sigset_t
// Terminal handling
type Termios C.termios_t

View File

@ -5,7 +5,7 @@
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
Input to cgo -godefs. See README.md
*/
// +godefs map struct_in_addr [4]byte /* in_addr */

View File

@ -5,7 +5,7 @@
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
Input to cgo -godefs. See README.md
*/
// +godefs map struct_in_addr [4]byte /* in_addr */

View File

@ -5,7 +5,7 @@
// +build ignore
/*
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
Input to cgo -godefs. See README.md
*/
// +godefs map struct_in_addr [4]byte /* in_addr */
@ -37,6 +37,7 @@ package unix
#include <sys/signal.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/types.h>
@ -139,6 +140,12 @@ type Flock_t C.struct_flock
type Dirent C.struct_dirent
// Filesystems
type _Fsblkcnt_t C.fsblkcnt_t
type Statvfs_t C.struct_statvfs
// Sockets
type RawSockaddrInet4 C.struct_sockaddr_in

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m32
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build 386,darwin
@ -48,6 +48,7 @@ const (
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -138,9 +139,26 @@ const (
BPF_W = 0x0
BPF_X = 0x8
BRKINT = 0x2
BS0 = 0x0
BS1 = 0x8000
BSDLY = 0x8000
CFLUSH = 0xf
CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_MONOTONIC_RAW_APPROX = 0x5
CLOCK_PROCESS_CPUTIME_ID = 0xc
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
CR3 = 0x3000
CRDLY = 0x3000
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
CS6 = 0x100
CS7 = 0x200
@ -332,13 +350,14 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0xf
EVFILT_FS = -0x9
EVFILT_MACHPORT = -0x8
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xe
EVFILT_THREADMARKER = 0xe
EVFILT_SYSCOUNT = 0xf
EVFILT_THREADMARKER = 0xf
EVFILT_TIMER = -0x7
EVFILT_USER = -0xa
EVFILT_VM = -0xc
@ -349,6 +368,7 @@ const (
EV_DELETE = 0x2
EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_DISPATCH2 = 0x180
EV_ENABLE = 0x4
EV_EOF = 0x8000
EV_ERROR = 0x4000
@ -359,16 +379,25 @@ const (
EV_POLL = 0x1000
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EV_UDATA_SPECIFIC = 0x100
EV_VANISHED = 0x200
EXTA = 0x4b00
EXTB = 0x9600
EXTPROC = 0x800
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61
F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2
F_BARRIERFSYNC = 0x55
F_CHECK_LV = 0x62
F_CHKCLEAN = 0x29
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x43
@ -770,11 +799,13 @@ const (
MADV_FREE_REUSABLE = 0x7
MADV_FREE_REUSE = 0x8
MADV_NORMAL = 0x0
MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2
MAP_FILE = 0x0
MAP_FIXED = 0x10
@ -786,6 +817,8 @@ const (
MAP_PRIVATE = 0x2
MAP_RENAME = 0x20
MAP_RESERVED0080 = 0x80
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
@ -819,7 +852,13 @@ const (
NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ABSOLUTE = 0x8
NOTE_ATTRIB = 0x8
NOTE_BACKGROUND = 0x40
@ -843,11 +882,14 @@ const (
NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000
NOTE_FUNLOCK = 0x100
NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10
NOTE_LOWAT = 0x1
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4
NOTE_OOB = 0x2
NOTE_PCTRLMASK = -0x100000
NOTE_PDATAMASK = 0xfffff
NOTE_REAP = 0x10000000
@ -872,6 +914,7 @@ const (
ONOCR = 0x20
ONOEOT = 0x8
OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3
O_ALERT = 0x20000000
O_APPEND = 0x8
@ -880,6 +923,7 @@ const (
O_CREAT = 0x200
O_DIRECTORY = 0x100000
O_DP_GETRAWENCRYPTED = 0x1
O_DP_GETRAWUNENCRYPTED = 0x2
O_DSYNC = 0x400000
O_EVTONLY = 0x8000
O_EXCL = 0x800
@ -932,7 +976,10 @@ const (
RLIMIT_CPU_USAGE_MONITOR = 0x2
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
@ -1102,6 +1149,8 @@ const (
SO_LABEL = 0x1010
SO_LINGER = 0x80
SO_LINGER_SEC = 0x1080
SO_NETSVC_MARKING_LEVEL = 0x1119
SO_NET_SERVICE_TYPE = 0x1116
SO_NKE = 0x1021
SO_NOADDRERR = 0x1023
SO_NOSIGPIPE = 0x1022
@ -1157,11 +1206,22 @@ const (
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0x4
TABDLY = 0xc04
TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CONNECTIONTIMEOUT = 0x20
TCP_CONNECTION_INFO = 0x106
TCP_ENABLE_ECN = 0x104
TCP_FASTOPEN = 0x105
TCP_KEEPALIVE = 0x10
TCP_KEEPCNT = 0x102
TCP_KEEPINTVL = 0x101
@ -1261,6 +1321,11 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
VM_LOADAVG = 0x2
VM_MACHFACTOR = 0x4
VM_MAXID = 0x6
VM_METER = 0x1
VM_SWAPUSAGE = 0x5
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,darwin
@ -48,6 +48,7 @@ const (
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -138,9 +139,26 @@ const (
BPF_W = 0x0
BPF_X = 0x8
BRKINT = 0x2
BS0 = 0x0
BS1 = 0x8000
BSDLY = 0x8000
CFLUSH = 0xf
CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_MONOTONIC_RAW_APPROX = 0x5
CLOCK_PROCESS_CPUTIME_ID = 0xc
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
CR3 = 0x3000
CRDLY = 0x3000
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
CS6 = 0x100
CS7 = 0x200
@ -332,13 +350,14 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0xf
EVFILT_FS = -0x9
EVFILT_MACHPORT = -0x8
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xe
EVFILT_THREADMARKER = 0xe
EVFILT_SYSCOUNT = 0xf
EVFILT_THREADMARKER = 0xf
EVFILT_TIMER = -0x7
EVFILT_USER = -0xa
EVFILT_VM = -0xc
@ -349,6 +368,7 @@ const (
EV_DELETE = 0x2
EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_DISPATCH2 = 0x180
EV_ENABLE = 0x4
EV_EOF = 0x8000
EV_ERROR = 0x4000
@ -359,16 +379,25 @@ const (
EV_POLL = 0x1000
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EV_UDATA_SPECIFIC = 0x100
EV_VANISHED = 0x200
EXTA = 0x4b00
EXTB = 0x9600
EXTPROC = 0x800
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61
F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2
F_BARRIERFSYNC = 0x55
F_CHECK_LV = 0x62
F_CHKCLEAN = 0x29
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x43
@ -770,11 +799,13 @@ const (
MADV_FREE_REUSABLE = 0x7
MADV_FREE_REUSE = 0x8
MADV_NORMAL = 0x0
MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2
MAP_FILE = 0x0
MAP_FIXED = 0x10
@ -786,6 +817,8 @@ const (
MAP_PRIVATE = 0x2
MAP_RENAME = 0x20
MAP_RESERVED0080 = 0x80
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
@ -819,7 +852,13 @@ const (
NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ABSOLUTE = 0x8
NOTE_ATTRIB = 0x8
NOTE_BACKGROUND = 0x40
@ -843,11 +882,14 @@ const (
NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000
NOTE_FUNLOCK = 0x100
NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10
NOTE_LOWAT = 0x1
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4
NOTE_OOB = 0x2
NOTE_PCTRLMASK = -0x100000
NOTE_PDATAMASK = 0xfffff
NOTE_REAP = 0x10000000
@ -872,6 +914,7 @@ const (
ONOCR = 0x20
ONOEOT = 0x8
OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3
O_ALERT = 0x20000000
O_APPEND = 0x8
@ -880,6 +923,7 @@ const (
O_CREAT = 0x200
O_DIRECTORY = 0x100000
O_DP_GETRAWENCRYPTED = 0x1
O_DP_GETRAWUNENCRYPTED = 0x2
O_DSYNC = 0x400000
O_EVTONLY = 0x8000
O_EXCL = 0x800
@ -932,7 +976,10 @@ const (
RLIMIT_CPU_USAGE_MONITOR = 0x2
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
@ -1102,6 +1149,8 @@ const (
SO_LABEL = 0x1010
SO_LINGER = 0x80
SO_LINGER_SEC = 0x1080
SO_NETSVC_MARKING_LEVEL = 0x1119
SO_NET_SERVICE_TYPE = 0x1116
SO_NKE = 0x1021
SO_NOADDRERR = 0x1023
SO_NOSIGPIPE = 0x1022
@ -1157,11 +1206,22 @@ const (
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0x4
TABDLY = 0xc04
TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CONNECTIONTIMEOUT = 0x20
TCP_CONNECTION_INFO = 0x106
TCP_ENABLE_ECN = 0x104
TCP_FASTOPEN = 0x105
TCP_KEEPALIVE = 0x10
TCP_KEEPCNT = 0x102
TCP_KEEPINTVL = 0x101
@ -1261,6 +1321,11 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
VM_LOADAVG = 0x2
VM_MACHFACTOR = 0x4
VM_MAXID = 0x6
VM_METER = 0x1
VM_SWAPUSAGE = 0x5
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,dragonfly
@ -37,8 +37,8 @@ const (
AF_MAX = 0x24
AF_MPLS = 0x22
AF_NATM = 0x1d
AF_NETBIOS = 0x6
AF_NETGRAPH = 0x20
AF_NS = 0x6
AF_OSI = 0x7
AF_PUP = 0x4
AF_ROUTE = 0x11
@ -46,6 +46,7 @@ const (
AF_SNA = 0xb
AF_UNIX = 0x1
AF_UNSPEC = 0x0
ALTWERASE = 0x200
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -141,7 +142,22 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x4
CLOCK_MONOTONIC_FAST = 0xc
CLOCK_MONOTONIC_PRECISE = 0xb
CLOCK_PROCESS_CPUTIME_ID = 0xf
CLOCK_PROF = 0x2
CLOCK_REALTIME = 0x0
CLOCK_REALTIME_FAST = 0xa
CLOCK_REALTIME_PRECISE = 0x9
CLOCK_SECOND = 0xd
CLOCK_THREAD_CPUTIME_ID = 0xe
CLOCK_UPTIME = 0x5
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
CS6 = 0x100
CS7 = 0x200
@ -286,24 +302,28 @@ const (
ECHOPRT = 0x20
EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0x8
EVFILT_FS = -0xa
EVFILT_MARKER = 0xf
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0x8
EVFILT_SYSCOUNT = 0xa
EVFILT_TIMER = -0x7
EVFILT_USER = -0x9
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_ENABLE = 0x4
EV_EOF = 0x8000
EV_ERROR = 0x4000
EV_FLAG1 = 0x2000
EV_NODATA = 0x1000
EV_ONESHOT = 0x10
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
EXTB = 0x9600
@ -679,7 +699,6 @@ const (
IPPROTO_SATEXPAK = 0x40
IPPROTO_SATMON = 0x45
IPPROTO_SCCSP = 0x60
IPPROTO_SCTP = 0x84
IPPROTO_SDRP = 0x2a
IPPROTO_SEP = 0x21
IPPROTO_SKIP = 0x39
@ -730,6 +749,7 @@ const (
IPV6_LEAVE_GROUP = 0xd
IPV6_MAXHLIM = 0xff
IPV6_MAXPACKET = 0xffff
IPV6_MINHLIM = 0x28
IPV6_MMTU = 0x500
IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
@ -778,6 +798,7 @@ const (
IP_FW_FLUSH = 0x34
IP_FW_GET = 0x36
IP_FW_RESETLOG = 0x37
IP_FW_X = 0x31
IP_FW_ZERO = 0x35
IP_HDRINCL = 0x2
IP_IPSEC_POLICY = 0x15
@ -833,6 +854,7 @@ const (
MADV_SETMAP = 0xb
MADV_WILLNEED = 0x3
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2
MAP_FILE = 0x0
MAP_FIXED = 0x10
@ -851,6 +873,7 @@ const (
MAP_VPAGETABLE = 0x2000
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MSG_CMSG_CLOEXEC = 0x1000
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80
@ -860,11 +883,11 @@ const (
MSG_FMASK = 0xffff0000
MSG_FNONBLOCKING = 0x20000
MSG_NOSIGNAL = 0x400
MSG_NOTIFICATION = 0x200
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_SYNC = 0x800
MSG_TRUNC = 0x10
MSG_UNUSED09 = 0x200
MSG_WAITALL = 0x40
MS_ASYNC = 0x1
MS_INVALIDATE = 0x2
@ -875,12 +898,19 @@ const (
NET_RT_IFLIST = 0x3
NET_RT_MAXID = 0x4
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_DELETE = 0x1
NOTE_EXEC = 0x20000000
NOTE_EXIT = 0x80000000
NOTE_EXTEND = 0x4
NOTE_FFAND = 0x40000000
NOTE_FFCOPY = 0xc0000000
NOTE_FFCTRLMASK = 0xc0000000
NOTE_FFLAGSMASK = 0xffffff
NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000
NOTE_LINK = 0x10
NOTE_LOWAT = 0x1
@ -891,6 +921,7 @@ const (
NOTE_REVOKE = 0x40
NOTE_TRACK = 0x1
NOTE_TRACKERR = 0x2
NOTE_TRIGGER = 0x1000000
NOTE_WRITE = 0x2
OCRNL = 0x10
ONLCR = 0x2
@ -898,6 +929,7 @@ const (
ONOCR = 0x20
ONOEOT = 0x8
OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3
O_APPEND = 0x8
O_ASYNC = 0x40
@ -910,14 +942,11 @@ const (
O_FAPPEND = 0x100000
O_FASYNCWRITE = 0x800000
O_FBLOCKING = 0x40000
O_FBUFFERED = 0x2000000
O_FMASK = 0x7fc0000
O_FMASK = 0xfc0000
O_FNONBLOCKING = 0x80000
O_FOFFSET = 0x200000
O_FSYNC = 0x80
O_FSYNCWRITE = 0x400000
O_FUNBUFFERED = 0x1000000
O_MAPONREAD = 0x4000000
O_NDELAY = 0x4
O_NOCTTY = 0x8000
O_NOFOLLOW = 0x100
@ -1096,8 +1125,10 @@ const (
SIOCSLIFPHYADDR = 0x8118694a
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SOCK_CLOEXEC = 0x10000000
SOCK_DGRAM = 0x2
SOCK_MAXADDRLEN = 0xff
SOCK_NONBLOCK = 0x20000000
SOCK_RAW = 0x3
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
@ -1107,6 +1138,7 @@ const (
SO_ACCEPTCONN = 0x2
SO_ACCEPTFILTER = 0x1000
SO_BROADCAST = 0x20
SO_CPUHINT = 0x1030
SO_DEBUG = 0x1
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
@ -1127,8 +1159,12 @@ const (
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_FASTKEEP = 0x80
TCP_KEEPCNT = 0x400
TCP_KEEPIDLE = 0x100
@ -1227,6 +1263,8 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
VM_BCACHE_SIZE_MAX = 0x0
VM_SWZONE_SIZE_MAX = 0x4000000000
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,freebsd
@ -98,6 +98,7 @@ const (
AF_VENDOR45 = 0x81
AF_VENDOR46 = 0x83
AF_VENDOR47 = 0x85
ALTWERASE = 0x200
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
@ -189,6 +190,7 @@ const (
BPF_MINBUFSIZE = 0x20
BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7
BPF_MOD = 0x90
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
@ -222,7 +224,105 @@ const (
BPF_T_NORMAL = 0x0
BPF_W = 0x0
BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2
CAP_ACCEPT = 0x200000020000000
CAP_ACL_CHECK = 0x400000000010000
CAP_ACL_DELETE = 0x400000000020000
CAP_ACL_GET = 0x400000000040000
CAP_ACL_SET = 0x400000000080000
CAP_ALL0 = 0x20007ffffffffff
CAP_ALL1 = 0x4000000001fffff
CAP_BIND = 0x200000040000000
CAP_BINDAT = 0x200008000000400
CAP_CHFLAGSAT = 0x200000000001400
CAP_CONNECT = 0x200000080000000
CAP_CONNECTAT = 0x200010000000400
CAP_CREATE = 0x200000000000040
CAP_EVENT = 0x400000000000020
CAP_EXTATTR_DELETE = 0x400000000001000
CAP_EXTATTR_GET = 0x400000000002000
CAP_EXTATTR_LIST = 0x400000000004000
CAP_EXTATTR_SET = 0x400000000008000
CAP_FCHDIR = 0x200000000000800
CAP_FCHFLAGS = 0x200000000001000
CAP_FCHMOD = 0x200000000002000
CAP_FCHMODAT = 0x200000000002400
CAP_FCHOWN = 0x200000000004000
CAP_FCHOWNAT = 0x200000000004400
CAP_FCNTL = 0x200000000008000
CAP_FCNTL_ALL = 0x78
CAP_FCNTL_GETFL = 0x8
CAP_FCNTL_GETOWN = 0x20
CAP_FCNTL_SETFL = 0x10
CAP_FCNTL_SETOWN = 0x40
CAP_FEXECVE = 0x200000000000080
CAP_FLOCK = 0x200000000010000
CAP_FPATHCONF = 0x200000000020000
CAP_FSCK = 0x200000000040000
CAP_FSTAT = 0x200000000080000
CAP_FSTATAT = 0x200000000080400
CAP_FSTATFS = 0x200000000100000
CAP_FSYNC = 0x200000000000100
CAP_FTRUNCATE = 0x200000000000200
CAP_FUTIMES = 0x200000000200000
CAP_FUTIMESAT = 0x200000000200400
CAP_GETPEERNAME = 0x200000100000000
CAP_GETSOCKNAME = 0x200000200000000
CAP_GETSOCKOPT = 0x200000400000000
CAP_IOCTL = 0x400000000000080
CAP_IOCTLS_ALL = 0x7fffffffffffffff
CAP_KQUEUE = 0x400000000100040
CAP_KQUEUE_CHANGE = 0x400000000100000
CAP_KQUEUE_EVENT = 0x400000000000040
CAP_LINKAT_SOURCE = 0x200020000000400
CAP_LINKAT_TARGET = 0x200000000400400
CAP_LISTEN = 0x200000800000000
CAP_LOOKUP = 0x200000000000400
CAP_MAC_GET = 0x400000000000001
CAP_MAC_SET = 0x400000000000002
CAP_MKDIRAT = 0x200000000800400
CAP_MKFIFOAT = 0x200000001000400
CAP_MKNODAT = 0x200000002000400
CAP_MMAP = 0x200000000000010
CAP_MMAP_R = 0x20000000000001d
CAP_MMAP_RW = 0x20000000000001f
CAP_MMAP_RWX = 0x20000000000003f
CAP_MMAP_RX = 0x20000000000003d
CAP_MMAP_W = 0x20000000000001e
CAP_MMAP_WX = 0x20000000000003e
CAP_MMAP_X = 0x20000000000003c
CAP_PDGETPID = 0x400000000000200
CAP_PDKILL = 0x400000000000800
CAP_PDWAIT = 0x400000000000400
CAP_PEELOFF = 0x200001000000000
CAP_POLL_EVENT = 0x400000000000020
CAP_PREAD = 0x20000000000000d
CAP_PWRITE = 0x20000000000000e
CAP_READ = 0x200000000000001
CAP_RECV = 0x200000000000001
CAP_RENAMEAT_SOURCE = 0x200000004000400
CAP_RENAMEAT_TARGET = 0x200040000000400
CAP_RIGHTS_VERSION = 0x0
CAP_RIGHTS_VERSION_00 = 0x0
CAP_SEEK = 0x20000000000000c
CAP_SEEK_TELL = 0x200000000000004
CAP_SEM_GETVALUE = 0x400000000000004
CAP_SEM_POST = 0x400000000000008
CAP_SEM_WAIT = 0x400000000000010
CAP_SEND = 0x200000000000002
CAP_SETSOCKOPT = 0x200002000000000
CAP_SHUTDOWN = 0x200004000000000
CAP_SOCK_CLIENT = 0x200007780000003
CAP_SOCK_SERVER = 0x200007f60000003
CAP_SYMLINKAT = 0x200000008000400
CAP_TTYHOOK = 0x400000000000100
CAP_UNLINKAT = 0x200000010000400
CAP_UNUSED0_44 = 0x200080000000000
CAP_UNUSED0_57 = 0x300000000000000
CAP_UNUSED1_22 = 0x400000000200000
CAP_UNUSED1_57 = 0x500000000000000
CAP_WRITE = 0x200000000000002
CFLUSH = 0xf
CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x4
@ -240,6 +340,7 @@ const (
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
CS6 = 0x100
CS7 = 0x200
@ -265,8 +366,12 @@ const (
DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5
DLT_BLUETOOTH_BREDR_BB = 0xff
DLT_BLUETOOTH_HCI_H4 = 0xbb
DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
DLT_BLUETOOTH_LE_LL = 0xfb
DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100
DLT_BLUETOOTH_LINUX_MONITOR = 0xfe
DLT_CAN20B = 0xbe
DLT_CAN_SOCKETCAN = 0xe3
DLT_CHAOS = 0x5
@ -282,6 +387,7 @@ const (
DLT_EN10MB = 0x1
DLT_EN3MB = 0x2
DLT_ENC = 0x6d
DLT_EPON = 0x103
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
@ -311,9 +417,11 @@ const (
DLT_IEEE802_15_4_NONASK_PHY = 0xd7
DLT_IEEE802_16_MAC_CPS = 0xbc
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
DLT_INFINIBAND = 0xf7
DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7
DLT_IPMB_LINUX = 0xd1
DLT_IPMI_HPM_2 = 0x104
DLT_IPNET = 0xe2
DLT_IPOIB = 0xf2
DLT_IPV4 = 0xe4
@ -352,7 +460,7 @@ const (
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
DLT_LTALK = 0x72
DLT_MATCHING_MAX = 0xf6
DLT_MATCHING_MAX = 0x104
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@ -364,6 +472,7 @@ const (
DLT_MUX27010 = 0xec
DLT_NETANALYZER = 0xf0
DLT_NETANALYZER_TRANSPARENT = 0xf1
DLT_NETLINK = 0xfd
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
@ -371,6 +480,7 @@ const (
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
DLT_PPP_BSDOS = 0x10
@ -380,11 +490,14 @@ const (
DLT_PPP_WITH_DIR = 0xcc
DLT_PPP_WITH_DIRECTION = 0xa6
DLT_PRISM_HEADER = 0x77
DLT_PROFIBUS_DL = 0x101
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
DLT_SITA = 0xc4
DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf
@ -393,6 +506,7 @@ const (
DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@ -412,6 +526,7 @@ const (
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
DT_BLK = 0x6
@ -434,9 +549,11 @@ const (
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
EVFILT_PROCDESC = -0x8
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xb
EVFILT_SYSCOUNT = 0xc
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
@ -451,6 +568,8 @@ const (
EV_EOF = 0x8000
EV_ERROR = 0x4000
EV_FLAG1 = 0x2000
EV_FLAG2 = 0x4000
EV_FORCEONESHOT = 0x100
EV_ONESHOT = 0x10
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
@ -498,7 +617,7 @@ const (
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x218f72
IFF_CANTCHANGE = 0x218f52
IFF_CANTCONFIG = 0x10000
IFF_DEBUG = 0x4
IFF_DRV_OACTIVE = 0x400
@ -518,217 +637,17 @@ const (
IFF_RENAMING = 0x400000
IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800
IFF_SMART = 0x20
IFF_STATICARP = 0x80000
IFF_UP = 0x1
IFNAMSIZ = 0x10
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
IFT_ADSL = 0x5e
IFT_AFLANE8023 = 0x3b
IFT_AFLANE8025 = 0x3c
IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ASYNC = 0x54
IFT_ATM = 0x25
IFT_ATMDXI = 0x69
IFT_ATMFUNI = 0x6a
IFT_ATMIMA = 0x6b
IFT_ATMLOGICAL = 0x50
IFT_ATMRADIO = 0xbd
IFT_ATMSUBINTERFACE = 0x86
IFT_ATMVCIENDPT = 0xc2
IFT_ATMVIRTUAL = 0x95
IFT_BGPPOLICYACCOUNTING = 0xa2
IFT_BRIDGE = 0xd1
IFT_BSC = 0x53
IFT_CARP = 0xf8
IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
IFT_CES = 0x85
IFT_CHANNEL = 0x46
IFT_CNR = 0x55
IFT_COFFEE = 0x84
IFT_COMPOSITELINK = 0x9b
IFT_DCN = 0x8d
IFT_DIGITALPOWERLINE = 0x8a
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
IFT_DLSW = 0x4a
IFT_DOCSCABLEDOWNSTREAM = 0x80
IFT_DOCSCABLEMACLAYER = 0x7f
IFT_DOCSCABLEUPSTREAM = 0x81
IFT_DS0 = 0x51
IFT_DS0BUNDLE = 0x52
IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
IFT_DTM = 0x8c
IFT_DVBASILN = 0xac
IFT_DVBASIOUT = 0xad
IFT_DVBRCCDOWNSTREAM = 0x93
IFT_DVBRCCMACLAYER = 0x92
IFT_DVBRCCUPSTREAM = 0x94
IFT_ENC = 0xf4
IFT_EON = 0x19
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
IFT_FIBRECHANNEL = 0x38
IFT_FRAMERELAYINTERCONNECT = 0x3a
IFT_FRAMERELAYMPI = 0x5c
IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_FRF16MFRBUNDLE = 0xa3
IFT_FRFORWARD = 0x9e
IFT_G703AT2MB = 0x43
IFT_G703AT64K = 0x42
IFT_GIF = 0xf0
IFT_GIGABITETHERNET = 0x75
IFT_GR303IDT = 0xb2
IFT_GR303RDT = 0xb1
IFT_H323GATEKEEPER = 0xa4
IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
IFT_HDLC = 0x76
IFT_HDSL2 = 0xa8
IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
IFT_HIPPIINTERFACE = 0x39
IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IBM370PARCHAN = 0x48
IFT_IDSL = 0x9a
IFT_IEEE1394 = 0x90
IFT_IEEE80211 = 0x47
IFT_IEEE80212 = 0x37
IFT_IEEE8023ADLAG = 0xa1
IFT_IFGSN = 0x91
IFT_IMT = 0xbe
IFT_INFINIBAND = 0xc7
IFT_INTERLEAVE = 0x7c
IFT_IP = 0x7e
IFT_IPFORWARD = 0x8e
IFT_IPOVERATM = 0x72
IFT_IPOVERCDLC = 0x6d
IFT_IPOVERCLAW = 0x6e
IFT_IPSWITCH = 0x4e
IFT_IPXIP = 0xf9
IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISDNS = 0x4b
IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88025CRFPINT = 0x62
IFT_ISO88025DTR = 0x56
IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
IFT_ISUP = 0xb3
IFT_L2VLAN = 0x87
IFT_L3IPVLAN = 0x88
IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
IFT_LAPD = 0x4d
IFT_LAPF = 0x77
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_MPC = 0x71
IFT_MPLS = 0xa6
IFT_MPLSTUNNEL = 0x96
IFT_MSDSL = 0x8f
IFT_MVL = 0xbf
IFT_MYRINET = 0x63
IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
IFT_OPTICALCHANNEL = 0xc3
IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PFLOG = 0xf6
IFT_PFSYNC = 0xf7
IFT_PLC = 0xae
IFT_POS = 0xab
IFT_PPP = 0x17
IFT_PPPMULTILINKBUNDLE = 0x6c
IFT_PROPBWAP2MP = 0xb8
IFT_PROPCNLS = 0x59
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPVIRTUAL = 0x35
IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
IFT_PVC = 0xf1
IFT_QLLC = 0x44
IFT_RADIOMAC = 0xbc
IFT_RADSL = 0x5f
IFT_REACHDSL = 0xc0
IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
IFT_RSRB = 0x4f
IFT_SDLC = 0x11
IFT_SDSL = 0x60
IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SRP = 0x97
IFT_SS7SIGLINK = 0x9c
IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
IFT_STF = 0xd7
IFT_T1 = 0x12
IFT_TDLC = 0x74
IFT_TERMPAD = 0x5b
IFT_TR008 = 0xb0
IFT_TRANSPHDLC = 0x7b
IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
IFT_USB = 0xa0
IFT_V11 = 0x40
IFT_V35 = 0x2d
IFT_V36 = 0x41
IFT_V37 = 0x78
IFT_VDSL = 0x61
IFT_VIRTUALIPADDRESS = 0x70
IFT_VOICEEM = 0x64
IFT_VOICEENCAP = 0x67
IFT_VOICEFXO = 0x65
IFT_VOICEFXS = 0x66
IFT_VOICEOVERATM = 0x98
IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68
IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25HUNTGROUP = 0x7a
IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IGNBRK = 0x1
IGNCR = 0x80
IGNPAR = 0x4
@ -811,7 +730,6 @@ const (
IPPROTO_LEAF1 = 0x19
IPPROTO_LEAF2 = 0x1a
IPPROTO_MAX = 0x100
IPPROTO_MAXID = 0x34
IPPROTO_MEAS = 0x13
IPPROTO_MH = 0x87
IPPROTO_MHRP = 0x30
@ -876,6 +794,7 @@ const (
IPPROTO_XTP = 0x24
IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDANY = 0x40
IPV6_BINDMULTI = 0x41
IPV6_BINDV6ONLY = 0x1b
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
@ -883,9 +802,10 @@ const (
IPV6_DEFHLIM = 0x40
IPV6_DONTFRAG = 0x3e
IPV6_DSTOPTS = 0x32
IPV6_FAITH = 0x1d
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@ -919,12 +839,16 @@ const (
IPV6_PORTRANGE_LOW = 0x2
IPV6_PREFER_TEMPADDR = 0x3f
IPV6_RECVDSTOPTS = 0x28
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x39
IPV6_RSSBUCKETID = 0x45
IPV6_RSS_LISTEN_BUCKET = 0x42
IPV6_RTHDR = 0x33
IPV6_RTHDRDSTOPTS = 0x23
IPV6_RTHDR_LOOSE = 0x0
@ -940,6 +864,7 @@ const (
IP_ADD_MEMBERSHIP = 0xc
IP_ADD_SOURCE_MEMBERSHIP = 0x46
IP_BINDANY = 0x18
IP_BINDMULTI = 0x19
IP_BLOCK_SOURCE = 0x48
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
@ -952,7 +877,8 @@ const (
IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40
IP_FAITH = 0x16
IP_FLOWID = 0x5a
IP_FLOWTYPE = 0x5b
IP_FW3 = 0x30
IP_FW_ADD = 0x32
IP_FW_DEL = 0x33
@ -994,13 +920,17 @@ const (
IP_PORTRANGE_HIGH = 0x1
IP_PORTRANGE_LOW = 0x2
IP_RECVDSTADDR = 0x7
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
IP_RECVTTL = 0x41
IP_RETOPTS = 0x8
IP_RF = 0x8000
IP_RSSBUCKETID = 0x5c
IP_RSS_LISTEN_BUCKET = 0x1a
IP_RSVP_OFF = 0x10
IP_RSVP_ON = 0xf
IP_RSVP_VIF_OFF = 0x12
@ -1041,11 +971,11 @@ const (
MAP_FIXED = 0x10
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NORESERVE = 0x40
MAP_NOSYNC = 0x800
MAP_PREFAULT_READ = 0x40000
MAP_PRIVATE = 0x2
MAP_RENAME = 0x20
MAP_RESERVED0020 = 0x20
MAP_RESERVED0040 = 0x40
MAP_RESERVED0080 = 0x80
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
@ -1066,6 +996,7 @@ const (
MSG_PEEK = 0x2
MSG_TRUNC = 0x10
MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x80000
MS_ASYNC = 0x1
MS_INVALIDATE = 0x2
MS_SYNC = 0x0
@ -1075,10 +1006,12 @@ const (
NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4
NET_RT_MAXID = 0x6
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
NOTE_CLOSE_WRITE = 0x200
NOTE_DELETE = 0x1
NOTE_EXEC = 0x20000000
NOTE_EXIT = 0x80000000
@ -1089,13 +1022,16 @@ const (
NOTE_FFLAGSMASK = 0xffffff
NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000
NOTE_FILE_POLL = 0x2
NOTE_FORK = 0x40000000
NOTE_LINK = 0x10
NOTE_LOWAT = 0x1
NOTE_MSECONDS = 0x2
NOTE_NSECONDS = 0x8
NOTE_OPEN = 0x80
NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff
NOTE_READ = 0x400
NOTE_RENAME = 0x20
NOTE_REVOKE = 0x40
NOTE_SECONDS = 0x1
@ -1110,6 +1046,7 @@ const (
ONOCR = 0x20
ONOEOT = 0x8
OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3
O_APPEND = 0x8
O_ASYNC = 0x40
@ -1131,6 +1068,7 @@ const (
O_SYNC = 0x80
O_TRUNC = 0x400
O_TTY_INIT = 0x80000
O_VERIFY = 0x200000
O_WRONLY = 0x1
PARENB = 0x1000
PARMRK = 0x8
@ -1148,7 +1086,10 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
@ -1172,6 +1113,7 @@ const (
RTF_BROADCAST = 0x400000
RTF_DONE = 0x40
RTF_DYNAMIC = 0x10
RTF_FIXEDMTU = 0x80000
RTF_FMASK = 0x1004d808
RTF_GATEWAY = 0x2
RTF_GWFLAG_COMPAT = 0x80000000
@ -1182,7 +1124,6 @@ const (
RTF_MODIFIED = 0x20
RTF_MULTICAST = 0x800000
RTF_PINNED = 0x100000
RTF_PRCLONING = 0x10000
RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000
RTF_PROTO3 = 0x40000
@ -1206,8 +1147,6 @@ const (
RTM_MISS = 0x7
RTM_NEWADDR = 0xc
RTM_NEWMADDR = 0xf
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240
@ -1222,9 +1161,19 @@ const (
RTV_SSTHRESH = 0x20
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
RT_HAS_HEADER_BIT = 0x4
RT_L2_ME = 0x4
RT_L2_ME_BIT = 0x2
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
@ -1236,21 +1185,18 @@ const (
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931
SIOCADDRT = 0x8040720a
SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80286987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932
SIOCDELRT = 0x8040720b
SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80286989
SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc028697b
SIOCGETSGCNT = 0xc0207210
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f
@ -1272,12 +1218,12 @@ const (
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFSTATUS = 0xc331693b
SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCGIFXMEDIA = 0xc030698b
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
SIOCGPRIVATE_1 = 0xc0206951
SIOCGTUNFIB = 0xc020695e
SIOCIFCREATE = 0xc020697a
SIOCIFCREATE2 = 0xc020697c
SIOCIFDESTROY = 0x80206979
@ -1303,9 +1249,9 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
SIOCSLIFPHYADDR = 0x8118694a
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
SOCK_CLOEXEC = 0x10000000
SOCK_DGRAM = 0x2
SOCK_MAXADDRLEN = 0xff
@ -1350,11 +1296,22 @@ const (
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
SO_VENDOR = 0x80000000
TAB0 = 0x0
TAB3 = 0x4
TABDLY = 0x4
TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
TCP_FASTOPEN = 0x401
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
TCP_KEEPCNT = 0x400
TCP_KEEPIDLE = 0x100
@ -1373,6 +1330,8 @@ const (
TCP_NODELAY = 0x1
TCP_NOOPT = 0x8
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
TIOCCBRK = 0x2000747a

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
// mkerrors.sh
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm64,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- _const.go
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
package unix
@ -24,6 +24,7 @@ const (
AF_DECnet = 0xc
AF_ECONET = 0x13
AF_FILE = 0x1
AF_IB = 0x1b
AF_IEEE802154 = 0x24
AF_INET = 0x2
AF_INET6 = 0xa
@ -31,10 +32,12 @@ const (
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x29
AF_MAX = 0x2b
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
AF_NETROM = 0x6
@ -42,6 +45,7 @@ const (
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
@ -54,6 +58,14 @@ 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
ARPHRD_ARCNET = 0x7
@ -149,6 +161,22 @@ const (
B75 = 0x2
B921600 = 0x1007
B9600 = 0xd
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
BLKRRPART = 0x125f
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
BOTHER = 0x1000
BPF_A = 0x10
BPF_ABS = 0x20
@ -170,6 +198,7 @@ const (
BPF_LD = 0x0
BPF_LDX = 0x1
BPF_LEN = 0x80
BPF_LL_OFF = -0x200000
BPF_LSH = 0x60
BPF_MAJOR_VERSION = 0x1
BPF_MAXINSNS = 0x1000
@ -181,6 +210,7 @@ const (
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
BPF_NET_OFF = -0x100000
BPF_OR = 0x40
BPF_RET = 0x6
BPF_RSH = 0x70
@ -196,6 +226,26 @@ 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_RAW_FILTER_MAX = 0x200
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
@ -213,6 +263,7 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_REALTIME_ALARM = 0x8
CLOCK_REALTIME_COARSE = 0x5
CLOCK_TAI = 0xb
CLOCK_THREAD_CPUTIME_ID = 0x3
CLOCK_TXFROMRX = 0x4
CLOCK_TXINT = 0x3
@ -274,8 +325,9 @@ const (
ECHOKE = 0x800
ECHONL = 0x40
ECHOPRT = 0x400
ELF_NGREG = 0x22
ELF_PRARGSZ = 0x50
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
EFD_SEMAPHORE = 0x1
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
@ -284,6 +336,7 @@ const (
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
@ -300,10 +353,12 @@ const (
EPOLL_CTL_ADD = 0x1
EPOLL_CTL_DEL = 0x2
EPOLL_CTL_MOD = 0x3
ESR_MAGIC = 0x45535201
ETH_P_1588 = 0x88f7
ETH_P_8021AD = 0x88a8
ETH_P_8021AH = 0x88e7
ETH_P_8021Q = 0x8100
ETH_P_80221 = 0x8917
ETH_P_802_2 = 0x4
ETH_P_802_3 = 0x1
ETH_P_802_3_MIN = 0x600
@ -337,6 +392,7 @@ const (
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
@ -348,10 +404,13 @@ const (
ETH_P_LINK_CTL = 0x886c
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
@ -374,18 +433,45 @@ const (
ETH_P_TIPC = 0x88ca
ETH_P_TRAILER = 0x1c
ETH_P_TR_802_2 = 0x11
ETH_P_TSN = 0x22f0
ETH_P_WAN_PPP = 0x7
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
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_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
FLUSHO = 0x1000
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
@ -400,6 +486,9 @@ const (
F_GETSIG = 0xb
F_LOCK = 0x1
F_NOTIFY = 0x402
F_OFD_GETLK = 0x24
F_OFD_SETLK = 0x25
F_OFD_SETLKW = 0x26
F_OK = 0x0
F_RDLCK = 0x0
F_SETFD = 0x2
@ -419,6 +508,8 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -428,38 +519,29 @@ const (
IFA_F_DADFAILED = 0x8
IFA_F_DEPRECATED = 0x20
IFA_F_HOMEADDRESS = 0x10
IFA_F_MANAGETEMPADDR = 0x100
IFA_F_MCAUTOJOIN = 0x400
IFA_F_NODAD = 0x2
IFA_F_NOPREFIXROUTE = 0x200
IFA_F_OPTIMISTIC = 0x4
IFA_F_PERMANENT = 0x80
IFA_F_SECONDARY = 0x1
IFA_F_STABLE_PRIVACY = 0x800
IFA_F_TEMPORARY = 0x1
IFA_F_TENTATIVE = 0x40
IFA_MAX = 0x7
IFF_802_1Q_VLAN = 0x1
IFA_MAX = 0x8
IFF_ALLMULTI = 0x200
IFF_ATTACH_QUEUE = 0x200
IFF_AUTOMEDIA = 0x4000
IFF_BONDING = 0x20
IFF_BRIDGE_PORT = 0x4000
IFF_BROADCAST = 0x2
IFF_DEBUG = 0x4
IFF_DETACH_QUEUE = 0x400
IFF_DISABLE_NETPOLL = 0x1000
IFF_DONT_BRIDGE = 0x800
IFF_DORMANT = 0x20000
IFF_DYNAMIC = 0x8000
IFF_EBRIDGE = 0x2
IFF_ECHO = 0x40000
IFF_ISATAP = 0x80
IFF_LIVE_ADDR_CHANGE = 0x100000
IFF_LOOPBACK = 0x8
IFF_LOWER_UP = 0x10000
IFF_MACVLAN = 0x200000
IFF_MACVLAN_PORT = 0x2000
IFF_MASTER = 0x400
IFF_MASTER_8023AD = 0x8
IFF_MASTER_ALB = 0x10
IFF_MASTER_ARPMON = 0x100
IFF_MULTICAST = 0x1000
IFF_MULTI_QUEUE = 0x100
IFF_NOARP = 0x80
@ -467,27 +549,18 @@ const (
IFF_NOTRAILERS = 0x20
IFF_NO_PI = 0x1000
IFF_ONE_QUEUE = 0x2000
IFF_OVS_DATAPATH = 0x8000
IFF_PERSIST = 0x800
IFF_POINTOPOINT = 0x10
IFF_PORTSEL = 0x2000
IFF_PROMISC = 0x100
IFF_RUNNING = 0x40
IFF_SLAVE = 0x800
IFF_SLAVE_INACTIVE = 0x4
IFF_SLAVE_NEEDARP = 0x40
IFF_SUPP_NOFCS = 0x80000
IFF_TAP = 0x2
IFF_TEAM_PORT = 0x40000
IFF_TUN = 0x1
IFF_TUN_EXCL = 0x8000
IFF_TX_SKB_SHARING = 0x10000
IFF_UNICAST_FLT = 0x20000
IFF_UP = 0x1
IFF_VNET_HDR = 0x4000
IFF_VOLATILE = 0x70c5a
IFF_WAN_HDLC = 0x200
IFF_XMIT_DST_RELEASE = 0x400
IFNAMSIZ = 0x10
IGNBRK = 0x1
IGNCR = 0x80
@ -552,6 +625,7 @@ const (
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_MH = 0x87
IPPROTO_MPLS = 0x89
IPPROTO_MTP = 0x5c
IPPROTO_NONE = 0x3b
IPPROTO_PIM = 0x67
@ -574,8 +648,10 @@ const (
IPV6_ADD_MEMBERSHIP = 0x14
IPV6_AUTHHDR = 0xa
IPV6_CHECKSUM = 0x7
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
@ -589,15 +665,19 @@ const (
IPV6_MULTICAST_IF = 0x11
IPV6_MULTICAST_LOOP = 0x13
IPV6_NEXTHOP = 0x9
IPV6_PATHMTU = 0x3d
IPV6_PKTINFO = 0x32
IPV6_PMTUDISC_DO = 0x2
IPV6_PMTUDISC_DONT = 0x0
IPV6_PMTUDISC_INTERFACE = 0x4
IPV6_PMTUDISC_OMIT = 0x5
IPV6_PMTUDISC_PROBE = 0x3
IPV6_PMTUDISC_WANT = 0x1
IPV6_RECVDSTOPTS = 0x3a
IPV6_RECVERR = 0x19
IPV6_RECVHOPLIMIT = 0x33
IPV6_RECVHOPOPTS = 0x35
IPV6_RECVPATHMTU = 0x3c
IPV6_RECVPKTINFO = 0x31
IPV6_RECVRTHDR = 0x38
IPV6_RECVTCLASS = 0x42
@ -615,7 +695,9 @@ const (
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BIND_ADDRESS_NO_PORT = 0x18
IP_BLOCK_SOURCE = 0x26
IP_CHECKSUM = 0x17
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
@ -636,6 +718,7 @@ const (
IP_MULTICAST_IF = 0x20
IP_MULTICAST_LOOP = 0x22
IP_MULTICAST_TTL = 0x21
IP_NODEFRAG = 0x16
IP_OFFMASK = 0x1fff
IP_OPTIONS = 0x4
IP_ORIGDSTADDR = 0x14
@ -645,6 +728,8 @@ const (
IP_PMTUDISC = 0xa
IP_PMTUDISC_DO = 0x2
IP_PMTUDISC_DONT = 0x0
IP_PMTUDISC_INTERFACE = 0x4
IP_PMTUDISC_OMIT = 0x5
IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1
IP_RECVERR = 0xb
@ -669,6 +754,47 @@ const (
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -688,6 +814,7 @@ const (
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_MERGEABLE = 0xc
@ -718,9 +845,11 @@ const (
MAP_TYPE = 0xf
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
@ -744,10 +873,12 @@ const (
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
MS_KERNMOUNT = 0x400000
MS_LAZYTIME = 0x2000000
MS_MANDLOCK = 0x40
MS_MGC_MSK = 0xffff0000
MS_MGC_VAL = 0xc0ed0000
@ -756,6 +887,8 @@ const (
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
@ -764,7 +897,7 @@ const (
MS_REC = 0x4000
MS_RELATIME = 0x200000
MS_REMOUNT = 0x20
MS_RMT_MASK = 0x800051
MS_RMT_MASK = 0x2800051
MS_SHARED = 0x100000
MS_SILENT = 0x8000
MS_SLAVE = 0x80000
@ -772,10 +905,12 @@ const (
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
NAME_MAX = 0xff
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 +923,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 +958,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
@ -859,7 +997,7 @@ const (
O_RDWR = 0x2
O_RSYNC = 0x101000
O_SYNC = 0x101000
O_TMPFILE = 0x410000
O_TMPFILE = 0x404000
O_TRUNC = 0x200
O_WRONLY = 0x1
PACKET_ADD_MEMBERSHIP = 0x1
@ -868,16 +1006,21 @@ const (
PACKET_COPY_THRESH = 0x7
PACKET_DROP_MEMBERSHIP = 0x2
PACKET_FANOUT = 0x12
PACKET_FANOUT_CBPF = 0x6
PACKET_FANOUT_CPU = 0x2
PACKET_FANOUT_DATA = 0x16
PACKET_FANOUT_EBPF = 0x7
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
PACKET_FANOUT_HASH = 0x0
PACKET_FANOUT_LB = 0x1
PACKET_FANOUT_QM = 0x5
PACKET_FANOUT_RND = 0x4
PACKET_FANOUT_ROLLOVER = 0x3
PACKET_FASTROUTE = 0x6
PACKET_HDRLEN = 0xb
PACKET_HOST = 0x0
PACKET_KERNEL = 0x7
PACKET_LOOPBACK = 0x5
PACKET_LOSS = 0xe
PACKET_MR_ALLMULTI = 0x2
@ -888,14 +1031,17 @@ const (
PACKET_ORIGDEV = 0x9
PACKET_OTHERHOST = 0x3
PACKET_OUTGOING = 0x4
PACKET_QDISC_BYPASS = 0x14
PACKET_RECV_OUTPUT = 0x3
PACKET_RESERVE = 0xc
PACKET_ROLLOVER_STATS = 0x15
PACKET_RX_RING = 0x5
PACKET_STATISTICS = 0x6
PACKET_TIMESTAMP = 0x11
PACKET_TX_HAS_OFF = 0x13
PACKET_TX_RING = 0xd
PACKET_TX_TIMESTAMP = 0x10
PACKET_USER = 0x6
PACKET_VERSION = 0xa
PACKET_VNET_HDR = 0xf
PARENB = 0x100
@ -910,6 +1056,16 @@ const (
PARMRK = 0x8
PARODD = 0x200
PENDIN = 0x4000
PERF_EVENT_IOC_DISABLE = 0x2401
PERF_EVENT_IOC_ENABLE = 0x2400
PERF_EVENT_IOC_ID = 0x80082407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
PERF_EVENT_IOC_PERIOD = 0x40082404
PERF_EVENT_IOC_REFRESH = 0x2402
PERF_EVENT_IOC_RESET = 0x2403
PERF_EVENT_IOC_SET_BPF = 0x40042408
PERF_EVENT_IOC_SET_FILTER = 0x40082406
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@ -921,6 +1077,11 @@ const (
PROT_WRITE = 0x2
PR_CAPBSET_DROP = 0x18
PR_CAPBSET_READ = 0x17
PR_CAP_AMBIENT = 0x2f
PR_CAP_AMBIENT_CLEAR_ALL = 0x4
PR_CAP_AMBIENT_IS_SET = 0x1
PR_CAP_AMBIENT_LOWER = 0x3
PR_CAP_AMBIENT_RAISE = 0x2
PR_ENDIAN_BIG = 0x0
PR_ENDIAN_LITTLE = 0x1
PR_ENDIAN_PPC_LITTLE = 0x2
@ -936,17 +1097,21 @@ const (
PR_FP_EXC_RES = 0x80000
PR_FP_EXC_SW_ENABLE = 0x80
PR_FP_EXC_UND = 0x40000
PR_FP_MODE_FR = 0x1
PR_FP_MODE_FRE = 0x2
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
PR_GET_ENDIAN = 0x13
PR_GET_FPEMU = 0x9
PR_GET_FPEXC = 0xb
PR_GET_FP_MODE = 0x2e
PR_GET_KEEPCAPS = 0x7
PR_GET_NAME = 0x10
PR_GET_NO_NEW_PRIVS = 0x27
PR_GET_PDEATHSIG = 0x2
PR_GET_SECCOMP = 0x15
PR_GET_SECUREBITS = 0x1b
PR_GET_THP_DISABLE = 0x2a
PR_GET_TID_ADDRESS = 0x28
PR_GET_TIMERSLACK = 0x1e
PR_GET_TIMING = 0xd
@ -959,11 +1124,14 @@ const (
PR_MCE_KILL_GET = 0x22
PR_MCE_KILL_LATE = 0x0
PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14
PR_SET_FPEMU = 0xa
PR_SET_FPEXC = 0xc
PR_SET_FP_MODE = 0x2d
PR_SET_KEEPCAPS = 0x8
PR_SET_MM = 0x23
PR_SET_MM_ARG_END = 0x9
@ -975,6 +1143,8 @@ const (
PR_SET_MM_ENV_END = 0xb
PR_SET_MM_ENV_START = 0xa
PR_SET_MM_EXE_FILE = 0xd
PR_SET_MM_MAP = 0xe
PR_SET_MM_MAP_SIZE = 0xf
PR_SET_MM_START_BRK = 0x6
PR_SET_MM_START_CODE = 0x1
PR_SET_MM_START_DATA = 0x3
@ -986,6 +1156,7 @@ const (
PR_SET_PTRACER_ANY = -0x1
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
PR_SET_TIMERSLACK = 0x1d
PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a
@ -1018,7 +1189,8 @@ const (
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
PTRACE_O_EXITKILL = 0x100000
PTRACE_O_MASK = 0x1000ff
PTRACE_O_MASK = 0x3000ff
PTRACE_O_SUSPEND_SECCOMP = 0x200000
PTRACE_O_TRACECLONE = 0x8
PTRACE_O_TRACEEXEC = 0x10
PTRACE_O_TRACEEXIT = 0x40
@ -1035,6 +1207,7 @@ const (
PTRACE_POKEDATA = 0x5
PTRACE_POKETEXT = 0x4
PTRACE_POKEUSR = 0x6
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SEIZE = 0x4206
PTRACE_SETOPTIONS = 0x4200
PTRACE_SETREGS = 0xd
@ -1049,21 +1222,32 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x8
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x7
RLIMIT_NPROC = 0x6
RLIMIT_RSS = 0x5
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7
RTAX_FEATURES = 0xc
RTAX_FEATURE_ALLFRAG = 0x8
RTAX_FEATURE_ECN = 0x1
RTAX_FEATURE_MASK = 0xf
RTAX_FEATURE_SACK = 0x2
RTAX_FEATURE_TIMESTAMP = 0x4
RTAX_HOPLIMIT = 0xa
RTAX_INITCWND = 0xb
RTAX_INITRWND = 0xe
RTAX_LOCK = 0x1
RTAX_MAX = 0xf
RTAX_MAX = 0x10
RTAX_MTU = 0x2
RTAX_QUICKACK = 0xf
RTAX_REORDERING = 0x9
@ -1074,7 +1258,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x11
RTA_MAX = 0x19
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -1118,6 +1302,7 @@ const (
RTM_DELLINK = 0x11
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
RTM_DELRULE = 0x21
@ -1125,6 +1310,7 @@ const (
RTM_DELTFILTER = 0x2d
RTM_F_CLONED = 0x200
RTM_F_EQUALIZE = 0x400
RTM_F_LOOKUP_TABLE = 0x1000
RTM_F_NOTIFY = 0x100
RTM_F_PREFIX = 0x800
RTM_GETACTION = 0x32
@ -1138,12 +1324,14 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x57
RTM_MAX = 0x5f
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@ -1153,22 +1341,28 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x12
RTM_NR_MSGTYPES = 0x48
RTM_NR_FAMILIES = 0x14
RTM_NR_MSGTYPES = 0x50
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
RTNH_F_ONLINK = 0x4
RTNH_F_PERVASIVE = 0x2
RTN_MAX = 0xb
RTPROT_BABEL = 0x2a
RTPROT_BIRD = 0xc
RTPROT_BOOT = 0x3
RTPROT_DHCP = 0x10
@ -1196,8 +1390,12 @@ const (
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPNS = 0x23
SCM_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@ -1205,6 +1403,16 @@ const (
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x8905
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
@ -1212,7 +1420,9 @@ const (
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
@ -1232,13 +1442,21 @@ const (
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x8904
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x541b
SIOCOUTQ = 0x5411
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
@ -1257,11 +1475,15 @@ const (
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@ -1269,30 +1491,52 @@ const (
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0x1
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_ERROR = 0x4
SO_GET_FILTER = 0x1a
SO_INCOMING_CPU = 0x31
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@ -1328,7 +1572,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
@ -1373,6 +1628,7 @@ const (
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_CC_INFO = 0x1a
TCP_CONGESTION = 0xd
TCP_COOKIE_IN_ALWAYS = 0x1
TCP_COOKIE_MAX = 0x10
@ -1397,11 +1653,15 @@ const (
TCP_MSS_DEFAULT = 0x218
TCP_MSS_DESIRED = 0x4c4
TCP_NODELAY = 0x1
TCP_NOTSENT_LOWAT = 0x19
TCP_QUEUE_SEQ = 0x15
TCP_QUICKACK = 0xc
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
TCP_S_DATA_IN = 0x4
TCP_S_DATA_OUT = 0x8
@ -1501,7 +1761,9 @@ const (
TUNGETFILTER = 0x801054db
TUNGETIFF = 0x800454d2
TUNGETSNDBUF = 0x800454d3
TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd
TUNSETDEBUG = 0x400454c9
TUNSETGROUP = 0x400454ce
TUNSETIFF = 0x400454ca
@ -1514,7 +1776,10 @@ const (
TUNSETQUEUE = 0x400454d9
TUNSETSNDBUF = 0x400454d4
TUNSETTXFILTER = 0x400454d1
TUNSETVNETBE = 0x400454de
TUNSETVNETHDRSZ = 0x400454d8
TUNSETVNETLE = 0x400454dc
UMOUNT_NOFOLLOW = 0x8
VDISCARD = 0xd
VEOF = 0x4
VEOL = 0xb
@ -1523,7 +1788,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
@ -1545,6 +1816,8 @@ const (
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
XTABS = 0x1800
)

2189
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
// mkerrors.sh
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build mips64,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- _const.go
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
@ -32,10 +32,11 @@ const (
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x29
AF_MAX = 0x2b
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
@ -44,6 +45,7 @@ const (
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
@ -56,6 +58,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 +161,23 @@ const (
B75 = 0x2
B921600 = 0x1007
B9600 = 0xd
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
BLKRRPART = 0x2000125f
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
BOTHER = 0x1000
BPF_A = 0x10
BPF_ABS = 0x20
BPF_ADD = 0x0
@ -197,7 +223,33 @@ const (
BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2
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_RAW_FILTER_MAX = 0x200
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
CIBAUD = 0x100f0000
CLOCAL = 0x800
CLOCK_BOOTTIME = 0x7
CLOCK_BOOTTIME_ALARM = 0x9
@ -238,7 +290,14 @@ const (
CLONE_UNTRACED = 0x800000
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
CMSPAR = 0x40000000
CR0 = 0x0
CR1 = 0x200
CR2 = 0x400
CR3 = 0x600
CRDLY = 0x600
CREAD = 0x80
CRTSCTS = 0x80000000
CS5 = 0x0
CS6 = 0x10
CS7 = 0x20
@ -266,6 +325,9 @@ const (
ECHOKE = 0x800
ECHONL = 0x40
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
EFD_SEMAPHORE = 0x1
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
@ -274,6 +336,7 @@ const (
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
@ -328,6 +391,7 @@ const (
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
@ -340,10 +404,12 @@ const (
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
@ -374,9 +440,37 @@ 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_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
FLUSHO = 0x2000
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
@ -413,7 +507,10 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
ICMPV6_FILTER = 0x1
ICRNL = 0x100
@ -527,6 +624,7 @@ const (
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_MH = 0x87
IPPROTO_MPLS = 0x89
IPPROTO_MTP = 0x5c
IPPROTO_NONE = 0x3b
IPPROTO_PIM = 0x67
@ -552,6 +650,7 @@ const (
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
@ -595,6 +694,7 @@ const (
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BIND_ADDRESS_NO_PORT = 0x18
IP_BLOCK_SOURCE = 0x26
IP_CHECKSUM = 0x17
IP_DEFAULT_MULTICAST_LOOP = 0x1
@ -648,10 +748,52 @@ const (
IP_XFRM_POLICY = 0x11
ISIG = 0x1
ISTRIP = 0x20
IUCLC = 0x200
IUTF8 = 0x4000
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -671,6 +813,7 @@ const (
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_MERGEABLE = 0xc
@ -702,9 +845,11 @@ const (
MAP_TYPE = 0xf
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
@ -728,6 +873,7 @@ const (
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
@ -741,6 +887,8 @@ const (
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
@ -757,6 +905,7 @@ const (
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
NAME_MAX = 0xff
NETLINK_ADD_MEMBERSHIP = 0x1
NETLINK_AUDIT = 0x9
@ -790,10 +939,13 @@ const (
NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6
NL0 = 0x0
NL1 = 0x100
NLA_ALIGNTO = 0x4
NLA_F_NESTED = 0x8000
NLA_F_NET_BYTEORDER = 0x4000
NLA_HDRLEN = 0x4
NLDLY = 0x100
NLMSG_ALIGNTO = 0x4
NLMSG_DONE = 0x3
NLMSG_ERROR = 0x2
@ -806,6 +958,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
@ -818,6 +971,7 @@ const (
OCRNL = 0x8
OFDEL = 0x80
OFILL = 0x40
OLCUC = 0x2
ONLCR = 0x4
ONLRET = 0x20
ONOCR = 0x10
@ -902,6 +1056,16 @@ const (
PARMRK = 0x8
PARODD = 0x200
PENDIN = 0x4000
PERF_EVENT_IOC_DISABLE = 0x20002401
PERF_EVENT_IOC_ENABLE = 0x20002400
PERF_EVENT_IOC_ID = 0x40082407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
PERF_EVENT_IOC_PERIOD = 0x80082404
PERF_EVENT_IOC_REFRESH = 0x20002402
PERF_EVENT_IOC_RESET = 0x20002403
PERF_EVENT_IOC_SET_BPF = 0x80042408
PERF_EVENT_IOC_SET_FILTER = 0x80082406
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@ -1052,6 +1216,7 @@ const (
PTRACE_POKETEXT = 0x4
PTRACE_POKETEXT_3264 = 0xc2
PTRACE_POKEUSR = 0x6
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SEIZE = 0x4206
PTRACE_SETFPREGS = 0xf
PTRACE_SETOPTIONS = 0x4200
@ -1069,7 +1234,16 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x9
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x5
RLIMIT_NPROC = 0x8
RLIMIT_RSS = 0x7
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RTAX_ADVMSS = 0x8
@ -1096,7 +1270,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x16
RTA_MAX = 0x19
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -1148,6 +1322,7 @@ const (
RTM_DELTFILTER = 0x2d
RTM_F_CLONED = 0x200
RTM_F_EQUALIZE = 0x400
RTM_F_LOOKUP_TABLE = 0x1000
RTM_F_NOTIFY = 0x100
RTM_F_PREFIX = 0x800
RTM_GETACTION = 0x32
@ -1165,9 +1340,10 @@ const (
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x5b
RTM_MAX = 0x5f
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@ -1182,15 +1358,16 @@ const (
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x13
RTM_NR_MSGTYPES = 0x4c
RTM_NR_FAMILIES = 0x14
RTM_NR_MSGTYPES = 0x50
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x11
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
@ -1225,8 +1402,12 @@ const (
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPNS = 0x23
SCM_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@ -1234,6 +1415,16 @@ const (
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x40047307
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
@ -1241,7 +1432,9 @@ const (
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
@ -1261,13 +1454,21 @@ const (
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x40047309
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x467f
SIOCOUTQ = 0x7472
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
@ -1286,11 +1487,15 @@ const (
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x80
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@ -1298,26 +1503,44 @@ const (
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x2
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0xffff
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
@ -1362,7 +1585,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
@ -1390,10 +1624,23 @@ const (
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x800
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
TCGETS2 = 0x4030542a
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
TCION = 0x3
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_CC_INFO = 0x1a
TCP_CONGESTION = 0xd
TCP_COOKIE_IN_ALWAYS = 0x1
TCP_COOKIE_MAX = 0x10
@ -1418,11 +1665,15 @@ const (
TCP_MSS_DEFAULT = 0x218
TCP_MSS_DESIRED = 0x4c4
TCP_NODELAY = 0x1
TCP_NOTSENT_LOWAT = 0x19
TCP_QUEUE_SEQ = 0x15
TCP_QUICKACK = 0xc
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
TCP_S_DATA_IN = 0x4
TCP_S_DATA_OUT = 0x8
@ -1433,6 +1684,16 @@ const (
TCP_WINDOW_CLAMP = 0xa
TCSAFLUSH = 0x5410
TCSBRK = 0x5405
TCSBRKP = 0x5486
TCSETA = 0x5402
TCSETAF = 0x5404
TCSETAW = 0x5403
TCSETS = 0x540e
TCSETS2 = 0x8030542b
TCSETSF = 0x5410
TCSETSF2 = 0x8030542d
TCSETSW = 0x540f
TCSETSW2 = 0x8030542c
TCXONC = 0x5406
TIOCCBRK = 0x5428
TIOCCONS = 0x80047478
@ -1532,6 +1793,7 @@ const (
TUNSETVNETBE = 0x800454de
TUNSETVNETHDRSZ = 0x800454d8
TUNSETVNETLE = 0x800454dc
UMOUNT_NOFOLLOW = 0x8
VDISCARD = 0xd
VEOF = 0x10
VEOL = 0x11
@ -1540,7 +1802,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 = 0x4
VM_SOCKETS_INVALID_VERSION = 0xffffffff
VQUIT = 0x1
VREPRINT = 0xc
VSTART = 0x8
@ -1563,6 +1831,10 @@ const (
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
XTABS = 0x1800
)
// Errors

View File

@ -1,10 +1,10 @@
// mkerrors.sh
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build mips64le,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- _const.go
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
@ -32,10 +32,11 @@ const (
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x29
AF_MAX = 0x2b
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
@ -44,6 +45,7 @@ const (
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
@ -56,6 +58,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 +161,23 @@ const (
B75 = 0x2
B921600 = 0x1007
B9600 = 0xd
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
BLKRRPART = 0x2000125f
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
BOTHER = 0x1000
BPF_A = 0x10
BPF_ABS = 0x20
BPF_ADD = 0x0
@ -197,7 +223,33 @@ const (
BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2
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_RAW_FILTER_MAX = 0x200
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
CIBAUD = 0x100f0000
CLOCAL = 0x800
CLOCK_BOOTTIME = 0x7
CLOCK_BOOTTIME_ALARM = 0x9
@ -238,7 +290,14 @@ const (
CLONE_UNTRACED = 0x800000
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
CMSPAR = 0x40000000
CR0 = 0x0
CR1 = 0x200
CR2 = 0x400
CR3 = 0x600
CRDLY = 0x600
CREAD = 0x80
CRTSCTS = 0x80000000
CS5 = 0x0
CS6 = 0x10
CS7 = 0x20
@ -266,6 +325,9 @@ const (
ECHOKE = 0x800
ECHONL = 0x40
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x80
EFD_SEMAPHORE = 0x1
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
@ -274,6 +336,7 @@ const (
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
@ -328,6 +391,7 @@ const (
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
@ -340,10 +404,12 @@ const (
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
@ -374,9 +440,37 @@ 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_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
FLUSHO = 0x2000
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
@ -413,7 +507,10 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
ICMPV6_FILTER = 0x1
ICRNL = 0x100
@ -527,6 +624,7 @@ const (
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_MH = 0x87
IPPROTO_MPLS = 0x89
IPPROTO_MTP = 0x5c
IPPROTO_NONE = 0x3b
IPPROTO_PIM = 0x67
@ -552,6 +650,7 @@ const (
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
@ -595,6 +694,7 @@ const (
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BIND_ADDRESS_NO_PORT = 0x18
IP_BLOCK_SOURCE = 0x26
IP_CHECKSUM = 0x17
IP_DEFAULT_MULTICAST_LOOP = 0x1
@ -648,10 +748,52 @@ const (
IP_XFRM_POLICY = 0x11
ISIG = 0x1
ISTRIP = 0x20
IUCLC = 0x200
IUTF8 = 0x4000
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -671,6 +813,7 @@ const (
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_MERGEABLE = 0xc
@ -702,9 +845,11 @@ const (
MAP_TYPE = 0xf
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MCL_ONFAULT = 0x4
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
@ -728,6 +873,7 @@ const (
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
@ -741,6 +887,8 @@ const (
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
@ -757,6 +905,7 @@ const (
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
NAME_MAX = 0xff
NETLINK_ADD_MEMBERSHIP = 0x1
NETLINK_AUDIT = 0x9
@ -790,10 +939,13 @@ const (
NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6
NL0 = 0x0
NL1 = 0x100
NLA_ALIGNTO = 0x4
NLA_F_NESTED = 0x8000
NLA_F_NET_BYTEORDER = 0x4000
NLA_HDRLEN = 0x4
NLDLY = 0x100
NLMSG_ALIGNTO = 0x4
NLMSG_DONE = 0x3
NLMSG_ERROR = 0x2
@ -806,6 +958,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
@ -818,6 +971,7 @@ const (
OCRNL = 0x8
OFDEL = 0x80
OFILL = 0x40
OLCUC = 0x2
ONLCR = 0x4
ONLRET = 0x20
ONOCR = 0x10
@ -902,6 +1056,16 @@ const (
PARMRK = 0x8
PARODD = 0x200
PENDIN = 0x4000
PERF_EVENT_IOC_DISABLE = 0x20002401
PERF_EVENT_IOC_ENABLE = 0x20002400
PERF_EVENT_IOC_ID = 0x40082407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
PERF_EVENT_IOC_PERIOD = 0x80082404
PERF_EVENT_IOC_REFRESH = 0x20002402
PERF_EVENT_IOC_RESET = 0x20002403
PERF_EVENT_IOC_SET_BPF = 0x80042408
PERF_EVENT_IOC_SET_FILTER = 0x80082406
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@ -1052,6 +1216,7 @@ const (
PTRACE_POKETEXT = 0x4
PTRACE_POKETEXT_3264 = 0xc2
PTRACE_POKEUSR = 0x6
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SEIZE = 0x4206
PTRACE_SETFPREGS = 0xf
PTRACE_SETOPTIONS = 0x4200
@ -1069,7 +1234,16 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x9
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x5
RLIMIT_NPROC = 0x8
RLIMIT_RSS = 0x7
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RTAX_ADVMSS = 0x8
@ -1096,7 +1270,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x16
RTA_MAX = 0x19
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -1148,6 +1322,7 @@ const (
RTM_DELTFILTER = 0x2d
RTM_F_CLONED = 0x200
RTM_F_EQUALIZE = 0x400
RTM_F_LOOKUP_TABLE = 0x1000
RTM_F_NOTIFY = 0x100
RTM_F_PREFIX = 0x800
RTM_GETACTION = 0x32
@ -1165,9 +1340,10 @@ const (
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x5b
RTM_MAX = 0x5f
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@ -1182,15 +1358,16 @@ const (
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x13
RTM_NR_MSGTYPES = 0x4c
RTM_NR_FAMILIES = 0x14
RTM_NR_MSGTYPES = 0x50
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x11
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
@ -1225,8 +1402,12 @@ const (
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPNS = 0x23
SCM_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@ -1234,6 +1415,16 @@ const (
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x40047307
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
@ -1241,7 +1432,9 @@ const (
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
@ -1261,13 +1454,21 @@ const (
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x40047309
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x467f
SIOCOUTQ = 0x7472
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
@ -1286,11 +1487,15 @@ const (
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x80
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@ -1298,26 +1503,44 @@ const (
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x2
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0xffff
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1009
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
@ -1362,7 +1585,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
@ -1390,10 +1624,23 @@ const (
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x800
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
TCGETS2 = 0x4030542a
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
TCION = 0x3
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_CC_INFO = 0x1a
TCP_CONGESTION = 0xd
TCP_COOKIE_IN_ALWAYS = 0x1
TCP_COOKIE_MAX = 0x10
@ -1418,11 +1665,15 @@ const (
TCP_MSS_DEFAULT = 0x218
TCP_MSS_DESIRED = 0x4c4
TCP_NODELAY = 0x1
TCP_NOTSENT_LOWAT = 0x19
TCP_QUEUE_SEQ = 0x15
TCP_QUICKACK = 0xc
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
TCP_S_DATA_IN = 0x4
TCP_S_DATA_OUT = 0x8
@ -1433,6 +1684,16 @@ const (
TCP_WINDOW_CLAMP = 0xa
TCSAFLUSH = 0x5410
TCSBRK = 0x5405
TCSBRKP = 0x5486
TCSETA = 0x5402
TCSETAF = 0x5404
TCSETAW = 0x5403
TCSETS = 0x540e
TCSETS2 = 0x8030542b
TCSETSF = 0x5410
TCSETSF2 = 0x8030542d
TCSETSW = 0x540f
TCSETSW2 = 0x8030542c
TCXONC = 0x5406
TIOCCBRK = 0x5428
TIOCCONS = 0x80047478
@ -1532,6 +1793,7 @@ const (
TUNSETVNETBE = 0x800454de
TUNSETVNETHDRSZ = 0x800454d8
TUNSETVNETLE = 0x800454dc
UMOUNT_NOFOLLOW = 0x8
VDISCARD = 0xd
VEOF = 0x10
VEOL = 0x11
@ -1540,7 +1802,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 = 0x4
VM_SOCKETS_INVALID_VERSION = 0xffffffff
VQUIT = 0x1
VREPRINT = 0xc
VSTART = 0x8
@ -1563,6 +1831,10 @@ const (
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
XTABS = 0x1800
)
// Errors

2189
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build ppc64,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- -m64 _const.go
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
@ -24,6 +24,7 @@ const (
AF_DECnet = 0xc
AF_ECONET = 0x13
AF_FILE = 0x1
AF_IB = 0x1b
AF_IEEE802154 = 0x24
AF_INET = 0x2
AF_INET6 = 0xa
@ -31,10 +32,12 @@ const (
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x29
AF_MAX = 0x2b
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
AF_NETROM = 0x6
@ -42,6 +45,7 @@ const (
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
@ -54,6 +58,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 +161,22 @@ const (
B75 = 0x2
B921600 = 0x16
B9600 = 0xd
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
BLKRRPART = 0x2000125f
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
BOTHER = 0x1f
BPF_A = 0x10
BPF_ABS = 0x20
@ -171,6 +198,7 @@ const (
BPF_LD = 0x0
BPF_LDX = 0x1
BPF_LEN = 0x80
BPF_LL_OFF = -0x200000
BPF_LSH = 0x60
BPF_MAJOR_VERSION = 0x1
BPF_MAXINSNS = 0x1000
@ -182,6 +210,7 @@ const (
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
BPF_NET_OFF = -0x100000
BPF_OR = 0x40
BPF_RET = 0x6
BPF_RSH = 0x70
@ -197,6 +226,26 @@ 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_RAW_FILTER_MAX = 0x200
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
@ -214,6 +263,7 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_REALTIME_ALARM = 0x8
CLOCK_REALTIME_COARSE = 0x5
CLOCK_TAI = 0xb
CLOCK_THREAD_CPUTIME_ID = 0x3
CLOCK_TXFROMRX = 0x4
CLOCK_TXINT = 0x3
@ -275,6 +325,9 @@ const (
ECHOKE = 0x1
ECHONL = 0x10
ECHOPRT = 0x20
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
EFD_SEMAPHORE = 0x1
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
@ -283,6 +336,7 @@ const (
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
@ -337,6 +391,7 @@ const (
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
@ -349,10 +404,12 @@ const (
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
@ -375,6 +432,7 @@ const (
ETH_P_TIPC = 0x88ca
ETH_P_TRAILER = 0x1c
ETH_P_TR_802_2 = 0x11
ETH_P_TSN = 0x22f0
ETH_P_WAN_PPP = 0x7
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
@ -382,12 +440,37 @@ 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_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
@ -424,6 +507,8 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x4000
IBSHIFT = 0x10
ICANON = 0x100
@ -434,11 +519,13 @@ const (
IFA_F_DEPRECATED = 0x20
IFA_F_HOMEADDRESS = 0x10
IFA_F_MANAGETEMPADDR = 0x100
IFA_F_MCAUTOJOIN = 0x400
IFA_F_NODAD = 0x2
IFA_F_NOPREFIXROUTE = 0x200
IFA_F_OPTIMISTIC = 0x4
IFA_F_PERMANENT = 0x80
IFA_F_SECONDARY = 0x1
IFA_F_STABLE_PRIVACY = 0x800
IFA_F_TEMPORARY = 0x1
IFA_F_TENTATIVE = 0x40
IFA_MAX = 0x8
@ -537,6 +624,7 @@ const (
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_MH = 0x87
IPPROTO_MPLS = 0x89
IPPROTO_MTP = 0x5c
IPPROTO_NONE = 0x3b
IPPROTO_PIM = 0x67
@ -559,8 +647,10 @@ const (
IPV6_ADD_MEMBERSHIP = 0x14
IPV6_AUTHHDR = 0xa
IPV6_CHECKSUM = 0x7
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
@ -574,6 +664,7 @@ const (
IPV6_MULTICAST_IF = 0x11
IPV6_MULTICAST_LOOP = 0x13
IPV6_NEXTHOP = 0x9
IPV6_PATHMTU = 0x3d
IPV6_PKTINFO = 0x32
IPV6_PMTUDISC_DO = 0x2
IPV6_PMTUDISC_DONT = 0x0
@ -585,6 +676,7 @@ const (
IPV6_RECVERR = 0x19
IPV6_RECVHOPLIMIT = 0x33
IPV6_RECVHOPOPTS = 0x35
IPV6_RECVPATHMTU = 0x3c
IPV6_RECVPKTINFO = 0x31
IPV6_RECVRTHDR = 0x38
IPV6_RECVTCLASS = 0x42
@ -602,7 +694,9 @@ const (
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BIND_ADDRESS_NO_PORT = 0x18
IP_BLOCK_SOURCE = 0x26
IP_CHECKSUM = 0x17
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
@ -659,6 +753,47 @@ const (
IXANY = 0x800
IXOFF = 0x400
IXON = 0x200
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -678,6 +813,7 @@ const (
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_MERGEABLE = 0xc
@ -708,9 +844,11 @@ const (
MAP_TYPE = 0xf
MCL_CURRENT = 0x2000
MCL_FUTURE = 0x4000
MCL_ONFAULT = 0x8000
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
@ -734,10 +872,12 @@ const (
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
MS_KERNMOUNT = 0x400000
MS_LAZYTIME = 0x2000000
MS_MANDLOCK = 0x40
MS_MGC_MSK = 0xffff0000
MS_MGC_VAL = 0xc0ed0000
@ -746,6 +886,8 @@ const (
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
@ -754,7 +896,7 @@ const (
MS_REC = 0x4000
MS_RELATIME = 0x200000
MS_REMOUNT = 0x20
MS_RMT_MASK = 0x800051
MS_RMT_MASK = 0x2800051
MS_SHARED = 0x100000
MS_SILENT = 0x8000
MS_SLAVE = 0x80000
@ -762,10 +904,12 @@ const (
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
NAME_MAX = 0xff
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 +922,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 +959,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
@ -851,7 +998,7 @@ const (
O_RDWR = 0x2
O_RSYNC = 0x101000
O_SYNC = 0x101000
O_TMPFILE = 0x410000
O_TMPFILE = 0x404000
O_TRUNC = 0x200
O_WRONLY = 0x1
PACKET_ADD_MEMBERSHIP = 0x1
@ -860,7 +1007,10 @@ const (
PACKET_COPY_THRESH = 0x7
PACKET_DROP_MEMBERSHIP = 0x2
PACKET_FANOUT = 0x12
PACKET_FANOUT_CBPF = 0x6
PACKET_FANOUT_CPU = 0x2
PACKET_FANOUT_DATA = 0x16
PACKET_FANOUT_EBPF = 0x7
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
PACKET_FANOUT_HASH = 0x0
@ -885,6 +1035,7 @@ const (
PACKET_QDISC_BYPASS = 0x14
PACKET_RECV_OUTPUT = 0x3
PACKET_RESERVE = 0xc
PACKET_ROLLOVER_STATS = 0x15
PACKET_RX_RING = 0x5
PACKET_STATISTICS = 0x6
PACKET_TIMESTAMP = 0x11
@ -906,6 +1057,16 @@ const (
PARMRK = 0x8
PARODD = 0x2000
PENDIN = 0x20000000
PERF_EVENT_IOC_DISABLE = 0x20002401
PERF_EVENT_IOC_ENABLE = 0x20002400
PERF_EVENT_IOC_ID = 0x40082407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
PERF_EVENT_IOC_PERIOD = 0x80082404
PERF_EVENT_IOC_REFRESH = 0x20002402
PERF_EVENT_IOC_RESET = 0x20002403
PERF_EVENT_IOC_SET_BPF = 0x80042408
PERF_EVENT_IOC_SET_FILTER = 0x80082406
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@ -918,6 +1079,11 @@ const (
PROT_WRITE = 0x2
PR_CAPBSET_DROP = 0x18
PR_CAPBSET_READ = 0x17
PR_CAP_AMBIENT = 0x2f
PR_CAP_AMBIENT_CLEAR_ALL = 0x4
PR_CAP_AMBIENT_IS_SET = 0x1
PR_CAP_AMBIENT_LOWER = 0x3
PR_CAP_AMBIENT_RAISE = 0x2
PR_ENDIAN_BIG = 0x0
PR_ENDIAN_LITTLE = 0x1
PR_ENDIAN_PPC_LITTLE = 0x2
@ -933,11 +1099,14 @@ const (
PR_FP_EXC_RES = 0x80000
PR_FP_EXC_SW_ENABLE = 0x80
PR_FP_EXC_UND = 0x40000
PR_FP_MODE_FR = 0x1
PR_FP_MODE_FRE = 0x2
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
PR_GET_ENDIAN = 0x13
PR_GET_FPEMU = 0x9
PR_GET_FPEXC = 0xb
PR_GET_FP_MODE = 0x2e
PR_GET_KEEPCAPS = 0x7
PR_GET_NAME = 0x10
PR_GET_NO_NEW_PRIVS = 0x27
@ -957,11 +1126,14 @@ const (
PR_MCE_KILL_GET = 0x22
PR_MCE_KILL_LATE = 0x0
PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14
PR_SET_FPEMU = 0xa
PR_SET_FPEXC = 0xc
PR_SET_FP_MODE = 0x2d
PR_SET_KEEPCAPS = 0x8
PR_SET_MM = 0x23
PR_SET_MM_ARG_END = 0x9
@ -1025,7 +1197,8 @@ const (
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
PTRACE_O_EXITKILL = 0x100000
PTRACE_O_MASK = 0x1000ff
PTRACE_O_MASK = 0x3000ff
PTRACE_O_SUSPEND_SECCOMP = 0x200000
PTRACE_O_TRACECLONE = 0x8
PTRACE_O_TRACEEXEC = 0x10
PTRACE_O_TRACEEXIT = 0x40
@ -1042,6 +1215,7 @@ const (
PTRACE_POKEDATA = 0x5
PTRACE_POKETEXT = 0x4
PTRACE_POKEUSR = 0x6
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SEIZE = 0x4206
PTRACE_SETEVRREGS = 0x15
PTRACE_SETFPREGS = 0xf
@ -1116,21 +1290,32 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x8
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x7
RLIMIT_NPROC = 0x6
RLIMIT_RSS = 0x5
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7
RTAX_FEATURES = 0xc
RTAX_FEATURE_ALLFRAG = 0x8
RTAX_FEATURE_ECN = 0x1
RTAX_FEATURE_MASK = 0xf
RTAX_FEATURE_SACK = 0x2
RTAX_FEATURE_TIMESTAMP = 0x4
RTAX_HOPLIMIT = 0xa
RTAX_INITCWND = 0xb
RTAX_INITRWND = 0xe
RTAX_LOCK = 0x1
RTAX_MAX = 0xf
RTAX_MAX = 0x10
RTAX_MTU = 0x2
RTAX_QUICKACK = 0xf
RTAX_REORDERING = 0x9
@ -1141,7 +1326,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x11
RTA_MAX = 0x19
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -1185,6 +1370,7 @@ const (
RTM_DELLINK = 0x11
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
RTM_DELRULE = 0x21
@ -1192,6 +1378,7 @@ const (
RTM_DELTFILTER = 0x2d
RTM_F_CLONED = 0x200
RTM_F_EQUALIZE = 0x400
RTM_F_LOOKUP_TABLE = 0x1000
RTM_F_NOTIFY = 0x100
RTM_F_PREFIX = 0x800
RTM_GETACTION = 0x32
@ -1205,12 +1392,14 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x57
RTM_MAX = 0x5f
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@ -1220,22 +1409,28 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x12
RTM_NR_MSGTYPES = 0x48
RTM_NR_FAMILIES = 0x14
RTM_NR_MSGTYPES = 0x50
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
RTNH_F_ONLINK = 0x4
RTNH_F_PERVASIVE = 0x2
RTN_MAX = 0xb
RTPROT_BABEL = 0x2a
RTPROT_BIRD = 0xc
RTPROT_BOOT = 0x3
RTPROT_DHCP = 0x10
@ -1263,8 +1458,12 @@ const (
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPNS = 0x23
SCM_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@ -1272,6 +1471,16 @@ const (
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x8905
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
@ -1279,7 +1488,9 @@ const (
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
@ -1299,13 +1510,21 @@ const (
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x8904
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x4004667f
SIOCOUTQ = 0x40047473
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
@ -1324,11 +1543,15 @@ const (
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@ -1336,31 +1559,52 @@ const (
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0x1
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_ERROR = 0x4
SO_GET_FILTER = 0x1a
SO_INCOMING_CPU = 0x31
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@ -1396,7 +1640,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
@ -1439,6 +1694,7 @@ const (
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_CC_INFO = 0x1a
TCP_CONGESTION = 0xd
TCP_COOKIE_IN_ALWAYS = 0x1
TCP_COOKIE_MAX = 0x10
@ -1463,11 +1719,15 @@ const (
TCP_MSS_DEFAULT = 0x218
TCP_MSS_DESIRED = 0x4c4
TCP_NODELAY = 0x1
TCP_NOTSENT_LOWAT = 0x19
TCP_QUEUE_SEQ = 0x15
TCP_QUICKACK = 0xc
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
TCP_S_DATA_IN = 0x4
TCP_S_DATA_OUT = 0x8
@ -1573,7 +1833,9 @@ const (
TUNGETFILTER = 0x401054db
TUNGETIFF = 0x400454d2
TUNGETSNDBUF = 0x400454d3
TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd
TUNSETDEBUG = 0x800454c9
TUNSETGROUP = 0x800454ce
TUNSETIFF = 0x800454ca
@ -1586,7 +1848,10 @@ const (
TUNSETQUEUE = 0x800454d9
TUNSETSNDBUF = 0x800454d4
TUNSETTXFILTER = 0x800454d1
TUNSETVNETBE = 0x800454de
TUNSETVNETHDRSZ = 0x800454d8
TUNSETVNETLE = 0x800454dc
UMOUNT_NOFOLLOW = 0x8
VDISCARD = 0x10
VEOF = 0x4
VEOL = 0x6
@ -1595,7 +1860,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 = 0x5
VM_SOCKETS_INVALID_VERSION = 0xffffffff
VQUIT = 0x1
VREPRINT = 0xb
VSTART = 0xd
@ -1617,6 +1888,8 @@ const (
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4000
XTABS = 0xc00
)

View File

@ -1,10 +1,10 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build ppc64le,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- -m64 _const.go
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
@ -24,6 +24,7 @@ const (
AF_DECnet = 0xc
AF_ECONET = 0x13
AF_FILE = 0x1
AF_IB = 0x1b
AF_IEEE802154 = 0x24
AF_INET = 0x2
AF_INET6 = 0xa
@ -31,10 +32,12 @@ const (
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x29
AF_MAX = 0x2b
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
AF_NETROM = 0x6
@ -42,6 +45,7 @@ const (
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
@ -54,6 +58,14 @@ 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
ARPHRD_ARCNET = 0x7
@ -149,6 +161,22 @@ const (
B75 = 0x2
B921600 = 0x16
B9600 = 0xd
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
BLKRRPART = 0x2000125f
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
BOTHER = 0x1f
BPF_A = 0x10
BPF_ABS = 0x20
@ -170,6 +198,7 @@ const (
BPF_LD = 0x0
BPF_LDX = 0x1
BPF_LEN = 0x80
BPF_LL_OFF = -0x200000
BPF_LSH = 0x60
BPF_MAJOR_VERSION = 0x1
BPF_MAXINSNS = 0x1000
@ -181,6 +210,7 @@ const (
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
BPF_NET_OFF = -0x100000
BPF_OR = 0x40
BPF_RET = 0x6
BPF_RSH = 0x70
@ -196,6 +226,26 @@ 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_RAW_FILTER_MAX = 0x200
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
@ -213,6 +263,7 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_REALTIME_ALARM = 0x8
CLOCK_REALTIME_COARSE = 0x5
CLOCK_TAI = 0xb
CLOCK_THREAD_CPUTIME_ID = 0x3
CLOCK_TXFROMRX = 0x4
CLOCK_TXINT = 0x3
@ -274,6 +325,9 @@ const (
ECHOKE = 0x1
ECHONL = 0x10
ECHOPRT = 0x20
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
EFD_SEMAPHORE = 0x1
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
@ -282,6 +336,7 @@ const (
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
@ -302,6 +357,7 @@ const (
ETH_P_8021AD = 0x88a8
ETH_P_8021AH = 0x88e7
ETH_P_8021Q = 0x8100
ETH_P_80221 = 0x8917
ETH_P_802_2 = 0x4
ETH_P_802_3 = 0x1
ETH_P_802_3_MIN = 0x600
@ -335,6 +391,7 @@ const (
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
@ -346,10 +403,13 @@ const (
ETH_P_LINK_CTL = 0x886c
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
@ -372,18 +432,45 @@ const (
ETH_P_TIPC = 0x88ca
ETH_P_TRAILER = 0x1c
ETH_P_TR_802_2 = 0x11
ETH_P_TSN = 0x22f0
ETH_P_WAN_PPP = 0x7
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
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_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
@ -398,6 +485,9 @@ const (
F_GETSIG = 0xb
F_LOCK = 0x1
F_NOTIFY = 0x402
F_OFD_GETLK = 0x24
F_OFD_SETLK = 0x25
F_OFD_SETLKW = 0x26
F_OK = 0x0
F_RDLCK = 0x0
F_SETFD = 0x2
@ -417,6 +507,8 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x4000
IBSHIFT = 0x10
ICANON = 0x100
@ -426,38 +518,29 @@ const (
IFA_F_DADFAILED = 0x8
IFA_F_DEPRECATED = 0x20
IFA_F_HOMEADDRESS = 0x10
IFA_F_MANAGETEMPADDR = 0x100
IFA_F_MCAUTOJOIN = 0x400
IFA_F_NODAD = 0x2
IFA_F_NOPREFIXROUTE = 0x200
IFA_F_OPTIMISTIC = 0x4
IFA_F_PERMANENT = 0x80
IFA_F_SECONDARY = 0x1
IFA_F_STABLE_PRIVACY = 0x800
IFA_F_TEMPORARY = 0x1
IFA_F_TENTATIVE = 0x40
IFA_MAX = 0x7
IFF_802_1Q_VLAN = 0x1
IFA_MAX = 0x8
IFF_ALLMULTI = 0x200
IFF_ATTACH_QUEUE = 0x200
IFF_AUTOMEDIA = 0x4000
IFF_BONDING = 0x20
IFF_BRIDGE_PORT = 0x4000
IFF_BROADCAST = 0x2
IFF_DEBUG = 0x4
IFF_DETACH_QUEUE = 0x400
IFF_DISABLE_NETPOLL = 0x1000
IFF_DONT_BRIDGE = 0x800
IFF_DORMANT = 0x20000
IFF_DYNAMIC = 0x8000
IFF_EBRIDGE = 0x2
IFF_ECHO = 0x40000
IFF_ISATAP = 0x80
IFF_LIVE_ADDR_CHANGE = 0x100000
IFF_LOOPBACK = 0x8
IFF_LOWER_UP = 0x10000
IFF_MACVLAN = 0x200000
IFF_MACVLAN_PORT = 0x2000
IFF_MASTER = 0x400
IFF_MASTER_8023AD = 0x8
IFF_MASTER_ALB = 0x10
IFF_MASTER_ARPMON = 0x100
IFF_MULTICAST = 0x1000
IFF_MULTI_QUEUE = 0x100
IFF_NOARP = 0x80
@ -465,27 +548,18 @@ const (
IFF_NOTRAILERS = 0x20
IFF_NO_PI = 0x1000
IFF_ONE_QUEUE = 0x2000
IFF_OVS_DATAPATH = 0x8000
IFF_PERSIST = 0x800
IFF_POINTOPOINT = 0x10
IFF_PORTSEL = 0x2000
IFF_PROMISC = 0x100
IFF_RUNNING = 0x40
IFF_SLAVE = 0x800
IFF_SLAVE_INACTIVE = 0x4
IFF_SLAVE_NEEDARP = 0x40
IFF_SUPP_NOFCS = 0x80000
IFF_TAP = 0x2
IFF_TEAM_PORT = 0x40000
IFF_TUN = 0x1
IFF_TUN_EXCL = 0x8000
IFF_TX_SKB_SHARING = 0x10000
IFF_UNICAST_FLT = 0x20000
IFF_UP = 0x1
IFF_VNET_HDR = 0x4000
IFF_VOLATILE = 0x70c5a
IFF_WAN_HDLC = 0x200
IFF_XMIT_DST_RELEASE = 0x400
IFNAMSIZ = 0x10
IGNBRK = 0x1
IGNCR = 0x80
@ -550,6 +624,7 @@ const (
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_MH = 0x87
IPPROTO_MPLS = 0x89
IPPROTO_MTP = 0x5c
IPPROTO_NONE = 0x3b
IPPROTO_PIM = 0x67
@ -572,8 +647,10 @@ const (
IPV6_ADD_MEMBERSHIP = 0x14
IPV6_AUTHHDR = 0xa
IPV6_CHECKSUM = 0x7
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
@ -587,15 +664,19 @@ const (
IPV6_MULTICAST_IF = 0x11
IPV6_MULTICAST_LOOP = 0x13
IPV6_NEXTHOP = 0x9
IPV6_PATHMTU = 0x3d
IPV6_PKTINFO = 0x32
IPV6_PMTUDISC_DO = 0x2
IPV6_PMTUDISC_DONT = 0x0
IPV6_PMTUDISC_INTERFACE = 0x4
IPV6_PMTUDISC_OMIT = 0x5
IPV6_PMTUDISC_PROBE = 0x3
IPV6_PMTUDISC_WANT = 0x1
IPV6_RECVDSTOPTS = 0x3a
IPV6_RECVERR = 0x19
IPV6_RECVHOPLIMIT = 0x33
IPV6_RECVHOPOPTS = 0x35
IPV6_RECVPATHMTU = 0x3c
IPV6_RECVPKTINFO = 0x31
IPV6_RECVRTHDR = 0x38
IPV6_RECVTCLASS = 0x42
@ -613,7 +694,9 @@ const (
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BIND_ADDRESS_NO_PORT = 0x18
IP_BLOCK_SOURCE = 0x26
IP_CHECKSUM = 0x17
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
@ -634,6 +717,7 @@ const (
IP_MULTICAST_IF = 0x20
IP_MULTICAST_LOOP = 0x22
IP_MULTICAST_TTL = 0x21
IP_NODEFRAG = 0x16
IP_OFFMASK = 0x1fff
IP_OPTIONS = 0x4
IP_ORIGDSTADDR = 0x14
@ -643,6 +727,8 @@ const (
IP_PMTUDISC = 0xa
IP_PMTUDISC_DO = 0x2
IP_PMTUDISC_DONT = 0x0
IP_PMTUDISC_INTERFACE = 0x4
IP_PMTUDISC_OMIT = 0x5
IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1
IP_RECVERR = 0xb
@ -667,6 +753,47 @@ const (
IXANY = 0x800
IXOFF = 0x400
IXON = 0x200
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -686,6 +813,7 @@ const (
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_MERGEABLE = 0xc
@ -716,9 +844,11 @@ const (
MAP_TYPE = 0xf
MCL_CURRENT = 0x2000
MCL_FUTURE = 0x4000
MCL_ONFAULT = 0x8000
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
@ -742,10 +872,12 @@ const (
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
MS_KERNMOUNT = 0x400000
MS_LAZYTIME = 0x2000000
MS_MANDLOCK = 0x40
MS_MGC_MSK = 0xffff0000
MS_MGC_VAL = 0xc0ed0000
@ -754,6 +886,8 @@ const (
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
@ -762,7 +896,7 @@ const (
MS_REC = 0x4000
MS_RELATIME = 0x200000
MS_REMOUNT = 0x20
MS_RMT_MASK = 0x800051
MS_RMT_MASK = 0x2800051
MS_SHARED = 0x100000
MS_SILENT = 0x8000
MS_SLAVE = 0x80000
@ -770,10 +904,12 @@ const (
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
NAME_MAX = 0xff
NETLINK_ADD_MEMBERSHIP = 0x1
NETLINK_AUDIT = 0x9
NETLINK_BROADCAST_ERROR = 0x4
NETLINK_CAP_ACK = 0xa
NETLINK_CONNECTOR = 0xb
NETLINK_CRYPTO = 0x15
NETLINK_DNRTMSG = 0xe
@ -786,6 +922,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 +959,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
@ -859,7 +998,7 @@ const (
O_RDWR = 0x2
O_RSYNC = 0x101000
O_SYNC = 0x101000
O_TMPFILE = 0x410000
O_TMPFILE = 0x404000
O_TRUNC = 0x200
O_WRONLY = 0x1
PACKET_ADD_MEMBERSHIP = 0x1
@ -868,16 +1007,21 @@ const (
PACKET_COPY_THRESH = 0x7
PACKET_DROP_MEMBERSHIP = 0x2
PACKET_FANOUT = 0x12
PACKET_FANOUT_CBPF = 0x6
PACKET_FANOUT_CPU = 0x2
PACKET_FANOUT_DATA = 0x16
PACKET_FANOUT_EBPF = 0x7
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
PACKET_FANOUT_HASH = 0x0
PACKET_FANOUT_LB = 0x1
PACKET_FANOUT_QM = 0x5
PACKET_FANOUT_RND = 0x4
PACKET_FANOUT_ROLLOVER = 0x3
PACKET_FASTROUTE = 0x6
PACKET_HDRLEN = 0xb
PACKET_HOST = 0x0
PACKET_KERNEL = 0x7
PACKET_LOOPBACK = 0x5
PACKET_LOSS = 0xe
PACKET_MR_ALLMULTI = 0x2
@ -888,14 +1032,17 @@ const (
PACKET_ORIGDEV = 0x9
PACKET_OTHERHOST = 0x3
PACKET_OUTGOING = 0x4
PACKET_QDISC_BYPASS = 0x14
PACKET_RECV_OUTPUT = 0x3
PACKET_RESERVE = 0xc
PACKET_ROLLOVER_STATS = 0x15
PACKET_RX_RING = 0x5
PACKET_STATISTICS = 0x6
PACKET_TIMESTAMP = 0x11
PACKET_TX_HAS_OFF = 0x13
PACKET_TX_RING = 0xd
PACKET_TX_TIMESTAMP = 0x10
PACKET_USER = 0x6
PACKET_VERSION = 0xa
PACKET_VNET_HDR = 0xf
PARENB = 0x1000
@ -910,6 +1057,16 @@ const (
PARMRK = 0x8
PARODD = 0x2000
PENDIN = 0x20000000
PERF_EVENT_IOC_DISABLE = 0x20002401
PERF_EVENT_IOC_ENABLE = 0x20002400
PERF_EVENT_IOC_ID = 0x40082407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
PERF_EVENT_IOC_PERIOD = 0x80082404
PERF_EVENT_IOC_REFRESH = 0x20002402
PERF_EVENT_IOC_RESET = 0x20002403
PERF_EVENT_IOC_SET_BPF = 0x80042408
PERF_EVENT_IOC_SET_FILTER = 0x80082406
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@ -922,6 +1079,11 @@ const (
PROT_WRITE = 0x2
PR_CAPBSET_DROP = 0x18
PR_CAPBSET_READ = 0x17
PR_CAP_AMBIENT = 0x2f
PR_CAP_AMBIENT_CLEAR_ALL = 0x4
PR_CAP_AMBIENT_IS_SET = 0x1
PR_CAP_AMBIENT_LOWER = 0x3
PR_CAP_AMBIENT_RAISE = 0x2
PR_ENDIAN_BIG = 0x0
PR_ENDIAN_LITTLE = 0x1
PR_ENDIAN_PPC_LITTLE = 0x2
@ -937,17 +1099,21 @@ const (
PR_FP_EXC_RES = 0x80000
PR_FP_EXC_SW_ENABLE = 0x80
PR_FP_EXC_UND = 0x40000
PR_FP_MODE_FR = 0x1
PR_FP_MODE_FRE = 0x2
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
PR_GET_ENDIAN = 0x13
PR_GET_FPEMU = 0x9
PR_GET_FPEXC = 0xb
PR_GET_FP_MODE = 0x2e
PR_GET_KEEPCAPS = 0x7
PR_GET_NAME = 0x10
PR_GET_NO_NEW_PRIVS = 0x27
PR_GET_PDEATHSIG = 0x2
PR_GET_SECCOMP = 0x15
PR_GET_SECUREBITS = 0x1b
PR_GET_THP_DISABLE = 0x2a
PR_GET_TID_ADDRESS = 0x28
PR_GET_TIMERSLACK = 0x1e
PR_GET_TIMING = 0xd
@ -960,11 +1126,14 @@ const (
PR_MCE_KILL_GET = 0x22
PR_MCE_KILL_LATE = 0x0
PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14
PR_SET_FPEMU = 0xa
PR_SET_FPEXC = 0xc
PR_SET_FP_MODE = 0x2d
PR_SET_KEEPCAPS = 0x8
PR_SET_MM = 0x23
PR_SET_MM_ARG_END = 0x9
@ -976,6 +1145,8 @@ const (
PR_SET_MM_ENV_END = 0xb
PR_SET_MM_ENV_START = 0xa
PR_SET_MM_EXE_FILE = 0xd
PR_SET_MM_MAP = 0xe
PR_SET_MM_MAP_SIZE = 0xf
PR_SET_MM_START_BRK = 0x6
PR_SET_MM_START_CODE = 0x1
PR_SET_MM_START_DATA = 0x3
@ -987,6 +1158,7 @@ const (
PR_SET_PTRACER_ANY = -0x1
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
PR_SET_THP_DISABLE = 0x29
PR_SET_TIMERSLACK = 0x1d
PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a
@ -1025,7 +1197,8 @@ const (
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
PTRACE_O_EXITKILL = 0x100000
PTRACE_O_MASK = 0x1000ff
PTRACE_O_MASK = 0x3000ff
PTRACE_O_SUSPEND_SECCOMP = 0x200000
PTRACE_O_TRACECLONE = 0x8
PTRACE_O_TRACEEXEC = 0x10
PTRACE_O_TRACEEXIT = 0x40
@ -1042,6 +1215,7 @@ const (
PTRACE_POKEDATA = 0x5
PTRACE_POKETEXT = 0x4
PTRACE_POKEUSR = 0x6
PTRACE_SECCOMP_GET_FILTER = 0x420c
PTRACE_SEIZE = 0x4206
PTRACE_SETEVRREGS = 0x15
PTRACE_SETFPREGS = 0xf
@ -1116,21 +1290,32 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x8
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x7
RLIMIT_NPROC = 0x6
RLIMIT_RSS = 0x5
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RTAX_ADVMSS = 0x8
RTAX_CC_ALGO = 0x10
RTAX_CWND = 0x7
RTAX_FEATURES = 0xc
RTAX_FEATURE_ALLFRAG = 0x8
RTAX_FEATURE_ECN = 0x1
RTAX_FEATURE_MASK = 0xf
RTAX_FEATURE_SACK = 0x2
RTAX_FEATURE_TIMESTAMP = 0x4
RTAX_HOPLIMIT = 0xa
RTAX_INITCWND = 0xb
RTAX_INITRWND = 0xe
RTAX_LOCK = 0x1
RTAX_MAX = 0xf
RTAX_MAX = 0x10
RTAX_MTU = 0x2
RTAX_QUICKACK = 0xf
RTAX_REORDERING = 0x9
@ -1141,7 +1326,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x11
RTA_MAX = 0x19
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -1185,6 +1370,7 @@ const (
RTM_DELLINK = 0x11
RTM_DELMDB = 0x55
RTM_DELNEIGH = 0x1d
RTM_DELNSID = 0x59
RTM_DELQDISC = 0x25
RTM_DELROUTE = 0x19
RTM_DELRULE = 0x21
@ -1192,6 +1378,7 @@ const (
RTM_DELTFILTER = 0x2d
RTM_F_CLONED = 0x200
RTM_F_EQUALIZE = 0x400
RTM_F_LOOKUP_TABLE = 0x1000
RTM_F_NOTIFY = 0x100
RTM_F_PREFIX = 0x800
RTM_GETACTION = 0x32
@ -1205,12 +1392,14 @@ const (
RTM_GETNEIGH = 0x1e
RTM_GETNEIGHTBL = 0x42
RTM_GETNETCONF = 0x52
RTM_GETNSID = 0x5a
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x57
RTM_MAX = 0x5f
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@ -1220,22 +1409,28 @@ const (
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
RTM_NEWNETCONF = 0x50
RTM_NEWNSID = 0x58
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x12
RTM_NR_MSGTYPES = 0x48
RTM_NR_FAMILIES = 0x14
RTM_NR_MSGTYPES = 0x50
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
RTNH_F_ONLINK = 0x4
RTNH_F_PERVASIVE = 0x2
RTN_MAX = 0xb
RTPROT_BABEL = 0x2a
RTPROT_BIRD = 0xc
RTPROT_BOOT = 0x3
RTPROT_DHCP = 0x10
@ -1263,8 +1458,12 @@ const (
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPNS = 0x23
SCM_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@ -1272,6 +1471,16 @@ const (
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x8905
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
@ -1279,7 +1488,9 @@ const (
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
@ -1299,13 +1510,21 @@ const (
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x8904
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x4004667f
SIOCOUTQ = 0x40047473
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
@ -1324,11 +1543,15 @@ const (
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@ -1336,30 +1559,52 @@ const (
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0x1
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
SO_DOMAIN = 0x27
SO_DONTROUTE = 0x5
SO_ERROR = 0x4
SO_GET_FILTER = 0x1a
SO_INCOMING_CPU = 0x31
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@ -1395,7 +1640,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
@ -1438,6 +1694,7 @@ const (
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_CC_INFO = 0x1a
TCP_CONGESTION = 0xd
TCP_COOKIE_IN_ALWAYS = 0x1
TCP_COOKIE_MAX = 0x10
@ -1462,11 +1719,15 @@ const (
TCP_MSS_DEFAULT = 0x218
TCP_MSS_DESIRED = 0x4c4
TCP_NODELAY = 0x1
TCP_NOTSENT_LOWAT = 0x19
TCP_QUEUE_SEQ = 0x15
TCP_QUICKACK = 0xc
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
TCP_S_DATA_IN = 0x4
TCP_S_DATA_OUT = 0x8
@ -1572,7 +1833,9 @@ const (
TUNGETFILTER = 0x401054db
TUNGETIFF = 0x400454d2
TUNGETSNDBUF = 0x400454d3
TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd
TUNSETDEBUG = 0x800454c9
TUNSETGROUP = 0x800454ce
TUNSETIFF = 0x800454ca
@ -1585,7 +1848,10 @@ const (
TUNSETQUEUE = 0x800454d9
TUNSETSNDBUF = 0x800454d4
TUNSETTXFILTER = 0x800454d1
TUNSETVNETBE = 0x800454de
TUNSETVNETHDRSZ = 0x800454d8
TUNSETVNETLE = 0x800454dc
UMOUNT_NOFOLLOW = 0x8
VDISCARD = 0x10
VEOF = 0x4
VEOL = 0x6
@ -1594,7 +1860,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 = 0x5
VM_SOCKETS_INVALID_VERSION = 0xffffffff
VQUIT = 0x1
VREPRINT = 0xb
VSTART = 0xd
@ -1616,6 +1888,8 @@ const (
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4000
XTABS = 0xc00
)

View File

@ -1,10 +1,10 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build s390x,linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- -m64 _const.go
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
package unix
@ -32,10 +32,11 @@ const (
AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KCM = 0x29
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
AF_MAX = 0x29
AF_MAX = 0x2b
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
@ -44,6 +45,7 @@ const (
AF_PACKET = 0x11
AF_PHONET = 0x23
AF_PPPOX = 0x18
AF_QIPCRTR = 0x2a
AF_RDS = 0x15
AF_ROSE = 0xb
AF_ROUTE = 0x10
@ -56,6 +58,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 +161,22 @@ const (
B75 = 0x2
B921600 = 0x1007
B9600 = 0xd
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
BLKPBSZGET = 0x127b
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 +226,26 @@ 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_RAW_FILTER_MAX = 0x200
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
@ -280,6 +325,9 @@ const (
ECHOKE = 0x800
ECHONL = 0x40
ECHOPRT = 0x400
EFD_CLOEXEC = 0x80000
EFD_NONBLOCK = 0x800
EFD_SEMAPHORE = 0x1
ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4
@ -288,6 +336,7 @@ const (
ENCODING_NRZI = 0x2
EPOLLERR = 0x8
EPOLLET = 0x80000000
EPOLLEXCLUSIVE = 0x10000000
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
@ -342,6 +391,7 @@ const (
ETH_P_FCOE = 0x8906
ETH_P_FIP = 0x8914
ETH_P_HDLC = 0x19
ETH_P_HSR = 0x892f
ETH_P_IEEE802154 = 0xf6
ETH_P_IEEEPUP = 0xa00
ETH_P_IEEEPUPAT = 0xa01
@ -354,10 +404,12 @@ const (
ETH_P_LOCALTALK = 0x9
ETH_P_LOOP = 0x60
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
ETH_P_MVRP = 0x88f5
ETH_P_NCSI = 0x88f8
ETH_P_PAE = 0x888e
ETH_P_PAUSE = 0x8808
ETH_P_PHONET = 0xf5
@ -388,12 +440,37 @@ 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_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
FLUSHO = 0x1000
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
FS_KEY_DESCRIPTOR_SIZE = 0x8
FS_KEY_DESC_PREFIX = "fscrypt:"
FS_KEY_DESC_PREFIX_SIZE = 0x8
FS_MAX_KEY_SIZE = 0x40
FS_POLICY_FLAGS_PAD_16 = 0x2
FS_POLICY_FLAGS_PAD_32 = 0x3
FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
@ -430,6 +507,8 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -571,6 +650,7 @@ const (
IPV6_DONTFRAG = 0x3e
IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x3b
IPV6_HDRINCL = 0x24
IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
@ -673,6 +753,47 @@ const (
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CHOWN = 0x4
KEYCTL_CLEAR = 0x7
KEYCTL_DESCRIBE = 0x6
KEYCTL_DH_COMPUTE = 0x17
KEYCTL_GET_KEYRING_ID = 0x0
KEYCTL_GET_PERSISTENT = 0x16
KEYCTL_GET_SECURITY = 0x11
KEYCTL_INSTANTIATE = 0xc
KEYCTL_INSTANTIATE_IOV = 0x14
KEYCTL_INVALIDATE = 0x15
KEYCTL_JOIN_SESSION_KEYRING = 0x1
KEYCTL_LINK = 0x8
KEYCTL_NEGATE = 0xd
KEYCTL_READ = 0xb
KEYCTL_REJECT = 0x13
KEYCTL_REVOKE = 0x3
KEYCTL_SEARCH = 0xa
KEYCTL_SESSION_TO_PARENT = 0x12
KEYCTL_SETPERM = 0x5
KEYCTL_SET_REQKEY_KEYRING = 0xe
KEYCTL_SET_TIMEOUT = 0xf
KEYCTL_UNLINK = 0x9
KEYCTL_UPDATE = 0x2
KEY_REQKEY_DEFL_DEFAULT = 0x0
KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
KEY_REQKEY_DEFL_NO_CHANGE = -0x1
KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
KEY_REQKEY_DEFL_USER_KEYRING = 0x4
KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
KEY_SPEC_GROUP_KEYRING = -0x6
KEY_SPEC_PROCESS_KEYRING = -0x2
KEY_SPEC_REQKEY_AUTH_KEY = -0x7
KEY_SPEC_REQUESTOR_KEYRING = -0x8
KEY_SPEC_SESSION_KEYRING = -0x3
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@ -692,6 +813,7 @@ const (
MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4
MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64
MADV_MERGEABLE = 0xc
@ -726,6 +848,7 @@ const (
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
MSG_CONFIRM = 0x800
MSG_CTRUNC = 0x8
@ -749,6 +872,7 @@ const (
MS_ACTIVE = 0x40000000
MS_ASYNC = 0x1
MS_BIND = 0x1000
MS_BORN = 0x20000000
MS_DIRSYNC = 0x80
MS_INVALIDATE = 0x2
MS_I_VERSION = 0x800000
@ -762,6 +886,8 @@ const (
MS_NODEV = 0x4
MS_NODIRATIME = 0x800
MS_NOEXEC = 0x8
MS_NOREMOTELOCK = 0x8000000
MS_NOSEC = 0x10000000
MS_NOSUID = 0x2
MS_NOUSER = -0x80000000
MS_POSIXACL = 0x10000
@ -778,6 +904,7 @@ const (
MS_SYNC = 0x4
MS_SYNCHRONOUS = 0x10
MS_UNBINDABLE = 0x20000
MS_VERBOSE = 0x8000
NAME_MAX = 0xff
NETLINK_ADD_MEMBERSHIP = 0x1
NETLINK_AUDIT = 0x9
@ -928,6 +1055,16 @@ const (
PARMRK = 0x8
PARODD = 0x200
PENDIN = 0x4000
PERF_EVENT_IOC_DISABLE = 0x2401
PERF_EVENT_IOC_ENABLE = 0x2400
PERF_EVENT_IOC_ID = 0x80082407
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
PERF_EVENT_IOC_PERIOD = 0x40082404
PERF_EVENT_IOC_REFRESH = 0x2402
PERF_EVENT_IOC_RESET = 0x2403
PERF_EVENT_IOC_SET_BPF = 0x40042408
PERF_EVENT_IOC_SET_FILTER = 0x40082406
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
@ -1157,7 +1294,16 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_LOCKS = 0xa
RLIMIT_MEMLOCK = 0x8
RLIMIT_MSGQUEUE = 0xc
RLIMIT_NICE = 0xd
RLIMIT_NOFILE = 0x7
RLIMIT_NPROC = 0x6
RLIMIT_RSS = 0x5
RLIMIT_RTPRIO = 0xe
RLIMIT_RTTIME = 0xf
RLIMIT_SIGPENDING = 0xb
RLIMIT_STACK = 0x3
RLIM_INFINITY = -0x1
RTAX_ADVMSS = 0x8
@ -1184,7 +1330,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x16
RTA_MAX = 0x19
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -1254,9 +1400,10 @@ const (
RTM_GETQDISC = 0x26
RTM_GETROUTE = 0x1a
RTM_GETRULE = 0x22
RTM_GETSTATS = 0x5e
RTM_GETTCLASS = 0x2a
RTM_GETTFILTER = 0x2e
RTM_MAX = 0x5b
RTM_MAX = 0x5f
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
@ -1271,15 +1418,16 @@ const (
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
RTM_NEWRULE = 0x20
RTM_NEWSTATS = 0x5c
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NR_FAMILIES = 0x13
RTM_NR_MSGTYPES = 0x4c
RTM_NR_FAMILIES = 0x14
RTM_NR_MSGTYPES = 0x50
RTM_SETDCB = 0x4f
RTM_SETLINK = 0x13
RTM_SETNEIGHTBL = 0x43
RTNH_ALIGNTO = 0x4
RTNH_COMPARE_MASK = 0x11
RTNH_COMPARE_MASK = 0x19
RTNH_F_DEAD = 0x1
RTNH_F_LINKDOWN = 0x10
RTNH_F_OFFLOAD = 0x8
@ -1314,8 +1462,12 @@ const (
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPNS = 0x23
SCM_WIFI_STATUS = 0x29
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@ -1323,6 +1475,16 @@ const (
SIOCADDMULTI = 0x8931
SIOCADDRT = 0x890b
SIOCATMARK = 0x8905
SIOCBONDCHANGEACTIVE = 0x8995
SIOCBONDENSLAVE = 0x8990
SIOCBONDINFOQUERY = 0x8994
SIOCBONDRELEASE = 0x8991
SIOCBONDSETHWADDR = 0x8992
SIOCBONDSLAVEINFOQUERY = 0x8993
SIOCBRADDBR = 0x89a0
SIOCBRADDIF = 0x89a2
SIOCBRDELBR = 0x89a1
SIOCBRDELIF = 0x89a3
SIOCDARP = 0x8953
SIOCDELDLCI = 0x8981
SIOCDELMULTI = 0x8932
@ -1330,7 +1492,9 @@ const (
SIOCDEVPRIVATE = 0x89f0
SIOCDIFADDR = 0x8936
SIOCDRARP = 0x8960
SIOCETHTOOL = 0x8946
SIOCGARP = 0x8954
SIOCGHWTSTAMP = 0x89b1
SIOCGIFADDR = 0x8915
SIOCGIFBR = 0x8940
SIOCGIFBRDADDR = 0x8919
@ -1350,13 +1514,21 @@ const (
SIOCGIFPFLAGS = 0x8935
SIOCGIFSLAVE = 0x8929
SIOCGIFTXQLEN = 0x8942
SIOCGIFVLAN = 0x8982
SIOCGMIIPHY = 0x8947
SIOCGMIIREG = 0x8948
SIOCGPGRP = 0x8904
SIOCGRARP = 0x8961
SIOCGSKNS = 0x894c
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCINQ = 0x541b
SIOCOUTQ = 0x5411
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
SIOCSARP = 0x8955
SIOCSHWTSTAMP = 0x89b0
SIOCSIFADDR = 0x8916
SIOCSIFBR = 0x8941
SIOCSIFBRDADDR = 0x891a
@ -1375,11 +1547,15 @@ const (
SIOCSIFPFLAGS = 0x8934
SIOCSIFSLAVE = 0x8930
SIOCSIFTXQLEN = 0x8943
SIOCSIFVLAN = 0x8983
SIOCSMIIREG = 0x8949
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
SOCK_IOC_TYPE = 0x89
SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
@ -1387,26 +1563,44 @@ const (
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
SOL_CAIF = 0x116
SOL_CAN_BASE = 0x64
SOL_DCCP = 0x10d
SOL_DECNET = 0x105
SOL_ICMPV6 = 0x3a
SOL_IP = 0x0
SOL_IPV6 = 0x29
SOL_IRDA = 0x10a
SOL_IUCV = 0x115
SOL_KCM = 0x119
SOL_LLC = 0x10c
SOL_NETBEUI = 0x10b
SOL_NETLINK = 0x10e
SOL_NFC = 0x118
SOL_PACKET = 0x107
SOL_PNPIPE = 0x113
SOL_PPPOL2TP = 0x111
SOL_RAW = 0xff
SOL_RDS = 0x114
SOL_RXRPC = 0x110
SOL_SOCKET = 0x1
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_X25 = 0x106
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x1e
SO_ATTACH_BPF = 0x32
SO_ATTACH_FILTER = 0x1a
SO_ATTACH_REUSEPORT_CBPF = 0x33
SO_ATTACH_REUSEPORT_EBPF = 0x34
SO_BINDTODEVICE = 0x19
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
SO_BUSY_POLL = 0x2e
SO_CNX_ADVICE = 0x35
SO_DEBUG = 0x1
SO_DETACH_BPF = 0x1b
SO_DETACH_FILTER = 0x1b
@ -1450,7 +1644,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
@ -1526,6 +1731,7 @@ const (
TCP_REPAIR = 0x13
TCP_REPAIR_OPTIONS = 0x16
TCP_REPAIR_QUEUE = 0x14
TCP_REPAIR_WINDOW = 0x1d
TCP_SAVED_SYN = 0x1c
TCP_SAVE_SYN = 0x1b
TCP_SYNCNT = 0x7
@ -1645,6 +1851,7 @@ const (
TUNSETVNETBE = 0x400454de
TUNSETVNETHDRSZ = 0x400454d8
TUNSETVNETLE = 0x400454dc
UMOUNT_NOFOLLOW = 0x8
VDISCARD = 0xd
VEOF = 0x4
VEOL = 0xb
@ -1653,7 +1860,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
@ -1675,6 +1888,8 @@ const (
WORDSIZE = 0x40
WSTOPPED = 0x2
WUNTRACED = 0x2
XATTR_CREATE = 0x1
XATTR_REPLACE = 0x2
XCASE = 0x4
XTABS = 0x1800
)

2142
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m64
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,solaris
@ -159,7 +159,12 @@ const (
BPF_W = 0x0
BPF_X = 0x8
BRKINT = 0x2
BS0 = 0x0
BS1 = 0x2000
BSDLY = 0x2000
CBAUD = 0xf
CFLUSH = 0xf
CIBAUD = 0xf0000
CLOCAL = 0x800
CLOCK_HIGHRES = 0x4
CLOCK_LEVEL = 0xa
@ -169,7 +174,13 @@ const (
CLOCK_REALTIME = 0x3
CLOCK_THREAD_CPUTIME_ID = 0x2
CLOCK_VIRTUAL = 0x1
CR0 = 0x0
CR1 = 0x200
CR2 = 0x400
CR3 = 0x600
CRDLY = 0x600
CREAD = 0x80
CRTSCTS = 0x80000000
CS5 = 0x0
CS6 = 0x10
CS7 = 0x20
@ -276,6 +287,9 @@ const (
FD_CLOEXEC = 0x1
FD_NFDBITS = 0x40
FD_SETSIZE = 0x10000
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
FLUSHALL = 0x1
FLUSHDATA = 0x0
FLUSHO = 0x2000
@ -290,6 +304,10 @@ const (
F_DUP2FD_CLOEXEC = 0x24
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x25
F_FLOCK = 0x35
F_FLOCK64 = 0x35
F_FLOCKW = 0x36
F_FLOCKW64 = 0x36
F_FREESP = 0xb
F_FREESP64 = 0xb
F_GETFD = 0x1
@ -304,6 +322,12 @@ const (
F_MDACC = 0x20
F_NODNY = 0x0
F_NPRIV = 0x10
F_OFD_GETLK = 0x2f
F_OFD_GETLK64 = 0x2f
F_OFD_SETLK = 0x30
F_OFD_SETLK64 = 0x30
F_OFD_SETLKW = 0x31
F_OFD_SETLKW64 = 0x31
F_PRIV = 0xf
F_QUOTACTL = 0x11
F_RDACC = 0x1
@ -332,6 +356,7 @@ const (
F_WRDNY = 0x2
F_WRLCK = 0x2
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
ICRNL = 0x100
IEXTEN = 0x8000
@ -589,15 +614,21 @@ const (
IP_UNSPEC_SRC = 0x42
ISIG = 0x1
ISTRIP = 0x20
IUCLC = 0x200
IXANY = 0x800
IXOFF = 0x1000
IXON = 0x400
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
LOCK_UN = 0x8
MADV_ACCESS_DEFAULT = 0x6
MADV_ACCESS_LWP = 0x7
MADV_ACCESS_MANY = 0x8
MADV_DONTNEED = 0x4
MADV_FREE = 0x5
MADV_NORMAL = 0x0
MADV_PURGE = 0x9
MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3
@ -605,6 +636,7 @@ const (
MAP_ALIGN = 0x200
MAP_ANON = 0x100
MAP_ANONYMOUS = 0x100
MAP_FILE = 0x0
MAP_FIXED = 0x10
MAP_INITDATA = 0x800
MAP_NORESERVE = 0x40
@ -632,10 +664,14 @@ const (
MS_OLDSYNC = 0x0
MS_SYNC = 0x4
M_FLUSH = 0x86
NL0 = 0x0
NL1 = 0x100
NLDLY = 0x100
NOFLSH = 0x80
OCRNL = 0x8
OFDEL = 0x80
OFILL = 0x40
OLCUC = 0x2
ONLCR = 0x4
ONLRET = 0x20
ONOCR = 0x10
@ -955,12 +991,21 @@ const (
SO_USELOOPBACK = 0x40
SO_VRRP = 0x1017
SO_WROFF = 0x2
TAB0 = 0x0
TAB1 = 0x800
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
TCION = 0x3
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_ABORT_THRESHOLD = 0x11
TCP_ANONPRIVBIND = 0x20
TCP_CONN_ABORT_THRESHOLD = 0x13
@ -1089,6 +1134,8 @@ const (
WSTOPPED = 0x4
WTRAPPED = 0x2
WUNTRACED = 0x4
XCASE = 0x4
XTABS = 0x1800
)
// Errors

View File

@ -1,7 +1,7 @@
// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
// Code generated by the command above; see README.md. 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)
}
@ -466,6 +456,21 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
@ -496,6 +501,21 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
@ -506,6 +526,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
@ -727,7 +762,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 +782,26 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -775,7 +827,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 +842,21 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
@ -807,7 +872,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 +887,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)
}
@ -874,6 +937,22 @@ func Mprotect(b []byte, prot int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -907,7 +986,22 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@ -924,7 +1018,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 +1091,28 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@ -1020,8 +1134,26 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -1037,7 +1169,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 +1184,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 +1250,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 +1356,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 +1371,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 +1391,26 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
@ -1291,7 +1436,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 +1459,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 +1474,21 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
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))
if e1 != 0 {
err = errnoErr(e1)
}
@ -1347,7 +1504,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)
}

View File

@ -1,7 +1,7 @@
// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mksyscall.pl -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. 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)
}
@ -466,6 +456,21 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
@ -496,6 +501,21 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
@ -506,6 +526,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
@ -727,7 +762,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 +782,26 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -775,7 +827,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 +842,21 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
@ -807,7 +872,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 +887,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)
}
@ -874,6 +937,22 @@ func Mprotect(b []byte, prot int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@ -907,7 +986,22 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@ -924,7 +1018,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 +1091,28 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@ -1020,8 +1134,26 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -1037,7 +1169,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 +1184,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 +1250,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 +1356,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 +1371,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 +1391,26 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
@ -1291,7 +1436,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 +1459,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 +1474,21 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
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))
if e1 != 0 {
err = errnoErr(e1)
}
@ -1347,7 +1504,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)
}
@ -1416,22 +1572,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
sec = int64(r0)

View File

@ -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)

View File

@ -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)
}

View File

@ -1,7 +1,7 @@
// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
// Code generated by the command above; see README.md. 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)
}
@ -1411,3 +1380,14 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -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)
}

View File

@ -1,7 +1,7 @@
// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
// Code generated by the command above; see README.md. 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)
}
@ -306,6 +303,36 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func CapEnter() (err error) {
_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func capRightsLimit(fd int, rightsp *CapRights) (err error) {
_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -313,7 +340,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 +355,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 +370,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 +385,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 +400,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 +453,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 +469,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 +485,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 +516,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 +537,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 +558,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 +573,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 +594,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 +615,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 +636,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 +651,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 +951,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 +971,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 +996,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 +1011,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 +1026,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 +1041,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 +1134,22 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@ -1153,7 +1166,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 +1239,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 +1260,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 +1275,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 +1290,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 +1356,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 +1472,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 +1487,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 +1507,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 +1532,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 +1555,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 +1570,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 +1585,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)
}

View File

@ -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)
}

View File

@ -1,7 +1,7 @@
// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mksyscall.pl -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build 386,linux
// +build linux,386
package unix
@ -14,6 +14,31 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
@ -26,8 +51,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 +66,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 +86,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 +99,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 +108,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 +120,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 +128,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 +150,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 +165,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)
}
@ -195,6 +211,104 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg2)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg3)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(arg4)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
var _p0 unsafe.Pointer
if len(payload) > 0 {
_p0 = unsafe.Pointer(&payload[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
@ -212,7 +326,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 +351,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 +366,33 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(description)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(payload) > 0 {
_p2 = unsafe.Pointer(&payload[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -283,7 +419,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 +434,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)
}
@ -328,6 +462,17 @@ func Close(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), 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 Dup(oldfd int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
fd = int(r0)
@ -381,6 +526,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Eventfd(initval uint, flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
return
@ -395,7 +551,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)
}
@ -434,22 +589,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -457,7 +596,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 +700,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 +727,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 +764,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 +780,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)
@ -675,6 +838,33 @@ func Klogctl(typ int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(dest) > 0 {
_p2 = unsafe.Pointer(&dest[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -688,7 +878,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)
@ -698,6 +887,74 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Llistxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(dest) > 0 {
_p1 = unsafe.Pointer(&dest[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lremovexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(data) > 0 {
_p2 = unsafe.Pointer(&data[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -705,7 +962,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 +977,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 +1007,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 +1015,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 +1064,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 +1084,32 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(description)
if err != nil {
return
}
var _p2 *byte
_p2, err = BytePtrFromString(callback)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -944,8 +1219,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)
}
@ -961,6 +1234,16 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 {
@ -1028,7 +1311,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)
}
@ -1190,6 +1472,22 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
@ -1340,7 +1638,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 +1653,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 +1784,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 +1809,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 +1935,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)
}

View File

@ -1,7 +1,7 @@
// mksyscall.pl syscall_linux.go syscall_linux_amd64.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,linux
// +build linux,amd64
package unix
@ -14,6 +14,31 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
@ -26,8 +51,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 +66,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 +86,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 +99,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 +108,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 +120,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 +128,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 +150,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 +165,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)
}
@ -195,6 +211,104 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg2)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg3)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(arg4)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
var _p0 unsafe.Pointer
if len(payload) > 0 {
_p0 = unsafe.Pointer(&payload[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
@ -212,7 +326,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 +351,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 +366,33 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(description)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(payload) > 0 {
_p2 = unsafe.Pointer(&payload[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -283,7 +419,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 +434,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)
}
@ -328,6 +462,17 @@ func Close(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), 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 Dup(oldfd int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
fd = int(r0)
@ -381,6 +526,17 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Eventfd(initval uint, flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
return
@ -395,7 +551,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)
}
@ -434,22 +589,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -457,7 +596,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 +700,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 +727,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 +764,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 +780,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)
@ -675,6 +838,33 @@ func Klogctl(typ int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(dest) > 0 {
_p2 = unsafe.Pointer(&dest[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -688,7 +878,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)
@ -698,6 +887,74 @@ func Listxattr(path string, dest []byte) (sz int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Llistxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(dest) > 0 {
_p1 = unsafe.Pointer(&dest[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lremovexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(data) > 0 {
_p2 = unsafe.Pointer(&data[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@ -705,7 +962,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 +977,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 +1007,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 +1015,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 +1064,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 +1084,32 @@ 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)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(description)
if err != nil {
return
}
var _p2 *byte
_p2, err = BytePtrFromString(callback)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@ -944,8 +1219,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)
}
@ -961,6 +1234,16 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 {
@ -1028,7 +1311,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)
}
@ -1190,6 +1472,22 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
@ -1357,7 +1655,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 +1680,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 +1863,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 +1878,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 +1903,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 +2108,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)
}

Some files were not shown because too many files have changed in this diff Show More