| @@ -18,8 +18,8 @@ package compression | ||||
|  | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"crypto/rand" | ||||
| 	"io/ioutil" | ||||
| 	"math/rand" | ||||
| 	"testing" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -21,8 +21,13 @@ import ( | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/containerd/containerd/cmd/containerd/command" | ||||
| 	"github.com/containerd/containerd/pkg/seed" | ||||
| ) | ||||
|  | ||||
| func init() { | ||||
| 	seed.WithTimeAndRand() | ||||
| } | ||||
|  | ||||
| func main() { | ||||
| 	app := command.App() | ||||
| 	if err := app.Run(os.Args); err != nil { | ||||
|   | ||||
| @@ -21,11 +21,16 @@ import ( | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/containerd/containerd/cmd/ctr/app" | ||||
| 	"github.com/containerd/containerd/pkg/seed" | ||||
| 	"github.com/urfave/cli" | ||||
| ) | ||||
|  | ||||
| var pluginCmds = []cli.Command{} | ||||
|  | ||||
| func init() { | ||||
| 	seed.WithTimeAndRand() | ||||
| } | ||||
|  | ||||
| func main() { | ||||
| 	app := app.New() | ||||
| 	app.Commands = append(app.Commands, pluginCmds...) | ||||
|   | ||||
| @@ -20,12 +20,11 @@ import ( | ||||
| 	"bufio" | ||||
| 	"bytes" | ||||
| 	"context" | ||||
| 	"crypto/rand" | ||||
| 	_ "crypto/sha256" // required for digest package | ||||
| 	"fmt" | ||||
| 	"io" | ||||
| 	"io/ioutil" | ||||
| 	mrand "math/rand" | ||||
| 	"math/rand" | ||||
| 	"os" | ||||
| 	"path/filepath" | ||||
| 	"reflect" | ||||
| @@ -266,9 +265,9 @@ func generateBlobs(t checker, nblobs, maxsize int64) map[digest.Digest][]byte { | ||||
| 	blobs := map[digest.Digest][]byte{} | ||||
|  | ||||
| 	for i := int64(0); i < nblobs; i++ { | ||||
| 		p := make([]byte, mrand.Int63n(maxsize)) | ||||
| 		p := make([]byte, rand.Int63n(maxsize)) | ||||
|  | ||||
| 		if _, err := mrand.Read(p); err != nil { | ||||
| 		if _, err := rand.Read(p); err != nil { | ||||
| 			t.Fatal(err) | ||||
| 		} | ||||
|  | ||||
|   | ||||
							
								
								
									
										38
									
								
								pkg/seed/seed.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								pkg/seed/seed.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| /* | ||||
|    Copyright The containerd Authors. | ||||
|  | ||||
|    Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|    you may not use this file except in compliance with the License. | ||||
|    You may obtain a copy of the License at | ||||
|  | ||||
|        http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
|    Unless required by applicable law or agreed to in writing, software | ||||
|    distributed under the License is distributed on an "AS IS" BASIS, | ||||
|    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|    See the License for the specific language governing permissions and | ||||
|    limitations under the License. | ||||
| */ | ||||
|  | ||||
| package seed | ||||
|  | ||||
| import ( | ||||
| 	"math/rand" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| // WithTimeAndRand seeds the global math rand generator with nanoseconds | ||||
| // XOR'ed with a crypto component if available for uniqueness. | ||||
| func WithTimeAndRand() { | ||||
| 	var ( | ||||
| 		b [4]byte | ||||
| 		u int64 | ||||
| 	) | ||||
|  | ||||
| 	tryReadRandom(b[:]) | ||||
|  | ||||
| 	// Set higher 32 bits, bottom 32 will be set with nanos | ||||
| 	u |= (int64(b[0]) << 56) | (int64(b[1]) << 48) | (int64(b[2]) << 40) | (int64(b[3]) << 32) | ||||
|  | ||||
| 	rand.Seed(u ^ time.Now().UnixNano()) | ||||
| } | ||||
							
								
								
									
										24
									
								
								pkg/seed/seed_linux.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								pkg/seed/seed_linux.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| /* | ||||
|    Copyright The containerd Authors. | ||||
|  | ||||
|    Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|    you may not use this file except in compliance with the License. | ||||
|    You may obtain a copy of the License at | ||||
|  | ||||
|        http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
|    Unless required by applicable law or agreed to in writing, software | ||||
|    distributed under the License is distributed on an "AS IS" BASIS, | ||||
|    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|    See the License for the specific language governing permissions and | ||||
|    limitations under the License. | ||||
| */ | ||||
|  | ||||
| package seed | ||||
|  | ||||
| import "golang.org/x/sys/unix" | ||||
|  | ||||
| func tryReadRandom(p []byte) { | ||||
| 	// Ignore errors, just decreases uniqueness of seed | ||||
| 	unix.Getrandom(p, unix.GRND_NONBLOCK) | ||||
| } | ||||
							
								
								
									
										28
									
								
								pkg/seed/seed_other.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								pkg/seed/seed_other.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| // +build !linux | ||||
|  | ||||
| /* | ||||
|    Copyright The containerd Authors. | ||||
|  | ||||
|    Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|    you may not use this file except in compliance with the License. | ||||
|    You may obtain a copy of the License at | ||||
|  | ||||
|        http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
|    Unless required by applicable law or agreed to in writing, software | ||||
|    distributed under the License is distributed on an "AS IS" BASIS, | ||||
|    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|    See the License for the specific language governing permissions and | ||||
|    limitations under the License. | ||||
| */ | ||||
|  | ||||
| package seed | ||||
|  | ||||
| import ( | ||||
| 	"crypto/rand" | ||||
| 	"io" | ||||
| ) | ||||
|  | ||||
| func tryReadRandom(p []byte) { | ||||
| 	io.ReadFull(rand.Reader, p) | ||||
| } | ||||
| @@ -27,7 +27,7 @@ golang.org/x/net b3756b4b77d7b13260a0a2ec658753cf48922eac | ||||
| google.golang.org/grpc v1.12.0 | ||||
| github.com/pkg/errors v0.8.0 | ||||
| github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7 | ||||
| golang.org/x/sys 314a259e304ff91bd6985da2a7149bbf91237993 https://github.com/golang/sys | ||||
| golang.org/x/sys 1b2967e3c290b7c545b3db0deeda16e9be4f98a2 https://github.com/golang/sys | ||||
| github.com/opencontainers/image-spec v1.0.1 | ||||
| golang.org/x/sync 450f422ab23cf9881c94e2db30cac0eb1b7cf80c | ||||
| github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895 | ||||
|   | ||||
							
								
								
									
										38
									
								
								vendor/golang.org/x/sys/cpu/cpu.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								vendor/golang.org/x/sys/cpu/cpu.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // Package cpu implements processor feature detection for | ||||
| // various CPU architectures. | ||||
| package cpu | ||||
|  | ||||
| // CacheLinePad is used to pad structs to avoid false sharing. | ||||
| type CacheLinePad struct{ _ [cacheLineSize]byte } | ||||
|  | ||||
| // X86 contains the supported CPU features of the | ||||
| // current X86/AMD64 platform. If the current platform | ||||
| // is not X86/AMD64 then all feature flags are false. | ||||
| // | ||||
| // X86 is padded to avoid false sharing. Further the HasAVX | ||||
| // and HasAVX2 are only set if the OS supports XMM and YMM | ||||
| // registers in addition to the CPUID feature bit being set. | ||||
| var X86 struct { | ||||
| 	_            CacheLinePad | ||||
| 	HasAES       bool // AES hardware implementation (AES NI) | ||||
| 	HasADX       bool // Multi-precision add-carry instruction extensions | ||||
| 	HasAVX       bool // Advanced vector extension | ||||
| 	HasAVX2      bool // Advanced vector extension 2 | ||||
| 	HasBMI1      bool // Bit manipulation instruction set 1 | ||||
| 	HasBMI2      bool // Bit manipulation instruction set 2 | ||||
| 	HasERMS      bool // Enhanced REP for MOVSB and STOSB | ||||
| 	HasFMA       bool // Fused-multiply-add instructions | ||||
| 	HasOSXSAVE   bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers. | ||||
| 	HasPCLMULQDQ bool // PCLMULQDQ instruction - most often used for AES-GCM | ||||
| 	HasPOPCNT    bool // Hamming weight instruction POPCNT. | ||||
| 	HasSSE2      bool // Streaming SIMD extension 2 (always available on amd64) | ||||
| 	HasSSE3      bool // Streaming SIMD extension 3 | ||||
| 	HasSSSE3     bool // Supplemental streaming SIMD extension 3 | ||||
| 	HasSSE41     bool // Streaming SIMD extension 4 and 4.1 | ||||
| 	HasSSE42     bool // Streaming SIMD extension 4 and 4.2 | ||||
| 	_            CacheLinePad | ||||
| } | ||||
							
								
								
									
										7
									
								
								vendor/golang.org/x/sys/cpu/cpu_arm.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								vendor/golang.org/x/sys/cpu/cpu_arm.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 32 | ||||
							
								
								
									
										7
									
								
								vendor/golang.org/x/sys/cpu/cpu_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								vendor/golang.org/x/sys/cpu/cpu_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 64 | ||||
							
								
								
									
										16
									
								
								vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build 386 amd64 amd64p32 | ||||
| // +build !gccgo | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| // cpuid is implemented in cpu_x86.s for gc compiler | ||||
| // and in cpu_gccgo.c for gccgo. | ||||
| func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) | ||||
|  | ||||
| // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler | ||||
| // and in cpu_gccgo.c for gccgo. | ||||
| func xgetbv() (eax, edx uint32) | ||||
							
								
								
									
										43
									
								
								vendor/golang.org/x/sys/cpu/cpu_gccgo.c
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								vendor/golang.org/x/sys/cpu/cpu_gccgo.c
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build 386 amd64 amd64p32 | ||||
| // +build gccgo | ||||
|  | ||||
| #include <cpuid.h> | ||||
| #include <stdint.h> | ||||
|  | ||||
| // Need to wrap __get_cpuid_count because it's declared as static. | ||||
| int | ||||
| gccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf, | ||||
|                    uint32_t *eax, uint32_t *ebx, | ||||
|                    uint32_t *ecx, uint32_t *edx) | ||||
| { | ||||
| 	return __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx); | ||||
| } | ||||
|  | ||||
| // xgetbv reads the contents of an XCR (Extended Control Register) | ||||
| // specified in the ECX register into registers EDX:EAX. | ||||
| // Currently, the only supported value for XCR is 0. | ||||
| // | ||||
| // TODO: Replace with a better alternative: | ||||
| // | ||||
| //     #include <xsaveintrin.h> | ||||
| // | ||||
| //     #pragma GCC target("xsave") | ||||
| // | ||||
| //     void gccgoXgetbv(uint32_t *eax, uint32_t *edx) { | ||||
| //       unsigned long long x = _xgetbv(0); | ||||
| //       *eax = x & 0xffffffff; | ||||
| //       *edx = (x >> 32) & 0xffffffff; | ||||
| //     } | ||||
| // | ||||
| // Note that _xgetbv is defined starting with GCC 8. | ||||
| void | ||||
| gccgoXgetbv(uint32_t *eax, uint32_t *edx) | ||||
| { | ||||
| 	__asm("  xorl %%ecx, %%ecx\n" | ||||
| 	      "  xgetbv" | ||||
| 	    : "=a"(*eax), "=d"(*edx)); | ||||
| } | ||||
							
								
								
									
										26
									
								
								vendor/golang.org/x/sys/cpu/cpu_gccgo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								vendor/golang.org/x/sys/cpu/cpu_gccgo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build 386 amd64 amd64p32 | ||||
| // +build gccgo | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| //extern gccgoGetCpuidCount | ||||
| func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32) | ||||
|  | ||||
| func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) { | ||||
| 	var a, b, c, d uint32 | ||||
| 	gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d) | ||||
| 	return a, b, c, d | ||||
| } | ||||
|  | ||||
| //extern gccgoXgetbv | ||||
| func gccgoXgetbv(eax, edx *uint32) | ||||
|  | ||||
| func xgetbv() (eax, edx uint32) { | ||||
| 	var a, d uint32 | ||||
| 	gccgoXgetbv(&a, &d) | ||||
| 	return a, d | ||||
| } | ||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_mips64x.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_mips64x.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build mips64 mips64le | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 32 | ||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_mipsx.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_mipsx.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build mips mipsle | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 32 | ||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build ppc64 ppc64le | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 128 | ||||
							
								
								
									
										7
									
								
								vendor/golang.org/x/sys/cpu/cpu_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								vendor/golang.org/x/sys/cpu/cpu_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 256 | ||||
							
								
								
									
										55
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build 386 amd64 amd64p32 | ||||
|  | ||||
| package cpu | ||||
|  | ||||
| const cacheLineSize = 64 | ||||
|  | ||||
| func init() { | ||||
| 	maxID, _, _, _ := cpuid(0, 0) | ||||
|  | ||||
| 	if maxID < 1 { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	_, _, ecx1, edx1 := cpuid(1, 0) | ||||
| 	X86.HasSSE2 = isSet(26, edx1) | ||||
|  | ||||
| 	X86.HasSSE3 = isSet(0, ecx1) | ||||
| 	X86.HasPCLMULQDQ = isSet(1, ecx1) | ||||
| 	X86.HasSSSE3 = isSet(9, ecx1) | ||||
| 	X86.HasFMA = isSet(12, ecx1) | ||||
| 	X86.HasSSE41 = isSet(19, ecx1) | ||||
| 	X86.HasSSE42 = isSet(20, ecx1) | ||||
| 	X86.HasPOPCNT = isSet(23, ecx1) | ||||
| 	X86.HasAES = isSet(25, ecx1) | ||||
| 	X86.HasOSXSAVE = isSet(27, ecx1) | ||||
|  | ||||
| 	osSupportsAVX := false | ||||
| 	// For XGETBV, OSXSAVE bit is required and sufficient. | ||||
| 	if X86.HasOSXSAVE { | ||||
| 		eax, _ := xgetbv() | ||||
| 		// Check if XMM and YMM registers have OS support. | ||||
| 		osSupportsAVX = isSet(1, eax) && isSet(2, eax) | ||||
| 	} | ||||
|  | ||||
| 	X86.HasAVX = isSet(28, ecx1) && osSupportsAVX | ||||
|  | ||||
| 	if maxID < 7 { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	_, ebx7, _, _ := cpuid(7, 0) | ||||
| 	X86.HasBMI1 = isSet(3, ebx7) | ||||
| 	X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX | ||||
| 	X86.HasBMI2 = isSet(8, ebx7) | ||||
| 	X86.HasERMS = isSet(9, ebx7) | ||||
| 	X86.HasADX = isSet(19, ebx7) | ||||
| } | ||||
|  | ||||
| func isSet(bitpos uint, value uint32) bool { | ||||
| 	return value&(1<<bitpos) != 0 | ||||
| } | ||||
							
								
								
									
										27
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.s
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build 386 amd64 amd64p32 | ||||
| // +build !gccgo | ||||
|  | ||||
| #include "textflag.h" | ||||
|  | ||||
| // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) | ||||
| TEXT ·cpuid(SB), NOSPLIT, $0-24 | ||||
| 	MOVL eaxArg+0(FP), AX | ||||
| 	MOVL ecxArg+4(FP), CX | ||||
| 	CPUID | ||||
| 	MOVL AX, eax+8(FP) | ||||
| 	MOVL BX, ebx+12(FP) | ||||
| 	MOVL CX, ecx+16(FP) | ||||
| 	MOVL DX, edx+20(FP) | ||||
| 	RET | ||||
|  | ||||
| // func xgetbv() (eax, edx uint32) | ||||
| TEXT ·xgetbv(SB),NOSPLIT,$0-8 | ||||
| 	MOVL $0, CX | ||||
| 	XGETBV | ||||
| 	MOVL AX, eax+0(FP) | ||||
| 	MOVL DX, edx+4(FP) | ||||
| 	RET | ||||
							
								
								
									
										124
									
								
								vendor/golang.org/x/sys/unix/affinity_linux.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								vendor/golang.org/x/sys/unix/affinity_linux.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,124 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // CPU affinity functions | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| const cpuSetSize = _CPU_SETSIZE / _NCPUBITS | ||||
|  | ||||
| // CPUSet represents a CPU affinity mask. | ||||
| type CPUSet [cpuSetSize]cpuMask | ||||
|  | ||||
| func schedAffinity(trap uintptr, pid int, set *CPUSet) error { | ||||
| 	_, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set))) | ||||
| 	if e != 0 { | ||||
| 		return errnoErr(e) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. | ||||
| // If pid is 0 the calling thread is used. | ||||
| func SchedGetaffinity(pid int, set *CPUSet) error { | ||||
| 	return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set) | ||||
| } | ||||
|  | ||||
| // SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. | ||||
| // If pid is 0 the calling thread is used. | ||||
| func SchedSetaffinity(pid int, set *CPUSet) error { | ||||
| 	return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set) | ||||
| } | ||||
|  | ||||
| // Zero clears the set s, so that it contains no CPUs. | ||||
| func (s *CPUSet) Zero() { | ||||
| 	for i := range s { | ||||
| 		s[i] = 0 | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func cpuBitsIndex(cpu int) int { | ||||
| 	return cpu / _NCPUBITS | ||||
| } | ||||
|  | ||||
| func cpuBitsMask(cpu int) cpuMask { | ||||
| 	return cpuMask(1 << (uint(cpu) % _NCPUBITS)) | ||||
| } | ||||
|  | ||||
| // Set adds cpu to the set s. | ||||
| func (s *CPUSet) Set(cpu int) { | ||||
| 	i := cpuBitsIndex(cpu) | ||||
| 	if i < len(s) { | ||||
| 		s[i] |= cpuBitsMask(cpu) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Clear removes cpu from the set s. | ||||
| func (s *CPUSet) Clear(cpu int) { | ||||
| 	i := cpuBitsIndex(cpu) | ||||
| 	if i < len(s) { | ||||
| 		s[i] &^= cpuBitsMask(cpu) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // IsSet reports whether cpu is in the set s. | ||||
| func (s *CPUSet) IsSet(cpu int) bool { | ||||
| 	i := cpuBitsIndex(cpu) | ||||
| 	if i < len(s) { | ||||
| 		return s[i]&cpuBitsMask(cpu) != 0 | ||||
| 	} | ||||
| 	return false | ||||
| } | ||||
|  | ||||
| // Count returns the number of CPUs in the set s. | ||||
| func (s *CPUSet) Count() int { | ||||
| 	c := 0 | ||||
| 	for _, b := range s { | ||||
| 		c += onesCount64(uint64(b)) | ||||
| 	} | ||||
| 	return c | ||||
| } | ||||
|  | ||||
| // onesCount64 is a copy of Go 1.9's math/bits.OnesCount64. | ||||
| // Once this package can require Go 1.9, we can delete this | ||||
| // and update the caller to use bits.OnesCount64. | ||||
| func onesCount64(x uint64) int { | ||||
| 	const m0 = 0x5555555555555555 // 01010101 ... | ||||
| 	const m1 = 0x3333333333333333 // 00110011 ... | ||||
| 	const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ... | ||||
| 	const m3 = 0x00ff00ff00ff00ff // etc. | ||||
| 	const m4 = 0x0000ffff0000ffff | ||||
|  | ||||
| 	// Implementation: Parallel summing of adjacent bits. | ||||
| 	// See "Hacker's Delight", Chap. 5: Counting Bits. | ||||
| 	// The following pattern shows the general approach: | ||||
| 	// | ||||
| 	//   x = x>>1&(m0&m) + x&(m0&m) | ||||
| 	//   x = x>>2&(m1&m) + x&(m1&m) | ||||
| 	//   x = x>>4&(m2&m) + x&(m2&m) | ||||
| 	//   x = x>>8&(m3&m) + x&(m3&m) | ||||
| 	//   x = x>>16&(m4&m) + x&(m4&m) | ||||
| 	//   x = x>>32&(m5&m) + x&(m5&m) | ||||
| 	//   return int(x) | ||||
| 	// | ||||
| 	// Masking (& operations) can be left away when there's no | ||||
| 	// danger that a field's sum will carry over into the next | ||||
| 	// field: Since the result cannot be > 64, 8 bits is enough | ||||
| 	// and we can ignore the masks for the shifts by 8 and up. | ||||
| 	// Per "Hacker's Delight", the first line can be simplified | ||||
| 	// more, but it saves at best one instruction, so we leave | ||||
| 	// it alone for clarity. | ||||
| 	const m = 1<<64 - 1 | ||||
| 	x = x>>1&(m0&m) + x&(m0&m) | ||||
| 	x = x>>2&(m1&m) + x&(m1&m) | ||||
| 	x = (x>>4 + x) & (m2 & m) | ||||
| 	x += x >> 8 | ||||
| 	x += x >> 16 | ||||
| 	x += x >> 32 | ||||
| 	return int(x) & (1<<7 - 1) | ||||
| } | ||||
							
								
								
									
										10
									
								
								vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -13,17 +13,17 @@ | ||||
| // Just jump to package syscall's implementation for all these functions. | ||||
| // The runtime may know about them. | ||||
|  | ||||
| TEXT	·Syscall(SB),NOSPLIT,$0-64 | ||||
| TEXT	·Syscall(SB),NOSPLIT,$0-56 | ||||
| 	JMP	syscall·Syscall(SB) | ||||
|  | ||||
| TEXT	·Syscall6(SB),NOSPLIT,$0-88 | ||||
| TEXT	·Syscall6(SB),NOSPLIT,$0-80 | ||||
| 	JMP	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT	·Syscall9(SB),NOSPLIT,$0-112 | ||||
| TEXT	·Syscall9(SB),NOSPLIT,$0-104 | ||||
| 	JMP	syscall·Syscall9(SB) | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-64 | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-56 | ||||
| 	JMP	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT	·RawSyscall6(SB),NOSPLIT,$0-88 | ||||
| TEXT	·RawSyscall6(SB),NOSPLIT,$0-80 | ||||
| 	JMP	syscall·RawSyscall6(SB) | ||||
|   | ||||
							
								
								
									
										30
									
								
								vendor/golang.org/x/sys/unix/asm_linux_386.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								vendor/golang.org/x/sys/unix/asm_linux_386.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -10,6 +10,10 @@ | ||||
| // System calls for 386, Linux | ||||
| // | ||||
|  | ||||
| // See ../runtime/sys_linux_386.s for the reason why we always use int 0x80 | ||||
| // instead of the glibc-specific "CALL 0x10(GS)". | ||||
| #define INVOKE_SYSCALL	INT	$0x80 | ||||
|  | ||||
| // Just jump to package syscall's implementation for all these functions. | ||||
| // The runtime may know about them. | ||||
|  | ||||
| @@ -19,12 +23,38 @@ TEXT	·Syscall(SB),NOSPLIT,$0-28 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-40 | ||||
| 	JMP	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 | ||||
| 	CALL	runtime·entersyscall(SB) | ||||
| 	MOVL	trap+0(FP), AX  // syscall entry | ||||
| 	MOVL	a1+4(FP), BX | ||||
| 	MOVL	a2+8(FP), CX | ||||
| 	MOVL	a3+12(FP), DX | ||||
| 	MOVL	$0, SI | ||||
| 	MOVL	$0, DI | ||||
| 	INVOKE_SYSCALL | ||||
| 	MOVL	AX, r1+16(FP) | ||||
| 	MOVL	DX, r2+20(FP) | ||||
| 	CALL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-28 | ||||
| 	JMP	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 | ||||
| 	JMP	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 | ||||
| 	MOVL	trap+0(FP), AX  // syscall entry | ||||
| 	MOVL	a1+4(FP), BX | ||||
| 	MOVL	a2+8(FP), CX | ||||
| 	MOVL	a3+12(FP), DX | ||||
| 	MOVL	$0, SI | ||||
| 	MOVL	$0, DI | ||||
| 	INVOKE_SYSCALL | ||||
| 	MOVL	AX, r1+16(FP) | ||||
| 	MOVL	DX, r2+20(FP) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·socketcall(SB),NOSPLIT,$0-36 | ||||
| 	JMP	syscall·socketcall(SB) | ||||
|  | ||||
|   | ||||
							
								
								
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_amd64.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_amd64.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -19,11 +19,39 @@ TEXT	·Syscall(SB),NOSPLIT,$0-56 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-80 | ||||
| 	JMP	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	CALL	runtime·entersyscall(SB) | ||||
| 	MOVQ	a1+8(FP), DI | ||||
| 	MOVQ	a2+16(FP), SI | ||||
| 	MOVQ	a3+24(FP), DX | ||||
| 	MOVQ	$0, R10 | ||||
| 	MOVQ	$0, R8 | ||||
| 	MOVQ	$0, R9 | ||||
| 	MOVQ	trap+0(FP), AX	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVQ	AX, r1+32(FP) | ||||
| 	MOVQ	DX, r2+40(FP) | ||||
| 	CALL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-56 | ||||
| 	JMP	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 | ||||
| 	JMP	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	MOVQ	a1+8(FP), DI | ||||
| 	MOVQ	a2+16(FP), SI | ||||
| 	MOVQ	a3+24(FP), DX | ||||
| 	MOVQ	$0, R10 | ||||
| 	MOVQ	$0, R8 | ||||
| 	MOVQ	$0, R9 | ||||
| 	MOVQ	trap+0(FP), AX	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVQ	AX, r1+32(FP) | ||||
| 	MOVQ	DX, r2+40(FP) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·gettimeofday(SB),NOSPLIT,$0-16 | ||||
| 	JMP	syscall·gettimeofday(SB) | ||||
|   | ||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_linux_arm.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/asm_linux_arm.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -19,11 +19,38 @@ TEXT	·Syscall(SB),NOSPLIT,$0-28 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-40 | ||||
| 	B	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 | ||||
| 	BL	runtime·entersyscall(SB) | ||||
| 	MOVW	trap+0(FP), R7 | ||||
| 	MOVW	a1+4(FP), R0 | ||||
| 	MOVW	a2+8(FP), R1 | ||||
| 	MOVW	a3+12(FP), R2 | ||||
| 	MOVW	$0, R3 | ||||
| 	MOVW	$0, R4 | ||||
| 	MOVW	$0, R5 | ||||
| 	SWI	$0 | ||||
| 	MOVW	R0, r1+16(FP) | ||||
| 	MOVW	$0, R0 | ||||
| 	MOVW	R0, r2+20(FP) | ||||
| 	BL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-28 | ||||
| 	B	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 | ||||
| 	B	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·seek(SB),NOSPLIT,$0-32 | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 | ||||
| 	MOVW	trap+0(FP), R7	// syscall entry | ||||
| 	MOVW	a1+4(FP), R0 | ||||
| 	MOVW	a2+8(FP), R1 | ||||
| 	MOVW	a3+12(FP), R2 | ||||
| 	SWI	$0 | ||||
| 	MOVW	R0, r1+16(FP) | ||||
| 	MOVW	$0, R0 | ||||
| 	MOVW	R0, r2+20(FP) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·seek(SB),NOSPLIT,$0-28 | ||||
| 	B	syscall·seek(SB) | ||||
|   | ||||
							
								
								
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_arm64.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -17,8 +17,36 @@ TEXT	·Syscall(SB),NOSPLIT,$0-56 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-80 | ||||
| 	B	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	BL	runtime·entersyscall(SB) | ||||
| 	MOVD	a1+8(FP), R0 | ||||
| 	MOVD	a2+16(FP), R1 | ||||
| 	MOVD	a3+24(FP), R2 | ||||
| 	MOVD	$0, R3 | ||||
| 	MOVD	$0, R4 | ||||
| 	MOVD	$0, R5 | ||||
| 	MOVD	trap+0(FP), R8	// syscall entry | ||||
| 	SVC | ||||
| 	MOVD	R0, r1+32(FP)	// r1 | ||||
| 	MOVD	R1, r2+40(FP)	// r2 | ||||
| 	BL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-56 | ||||
| 	B	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 | ||||
| 	B	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	MOVD	a1+8(FP), R0 | ||||
| 	MOVD	a2+16(FP), R1 | ||||
| 	MOVD	a3+24(FP), R2 | ||||
| 	MOVD	$0, R3 | ||||
| 	MOVD	$0, R4 | ||||
| 	MOVD	$0, R5 | ||||
| 	MOVD	trap+0(FP), R8	// syscall entry | ||||
| 	SVC | ||||
| 	MOVD	R0, r1+32(FP) | ||||
| 	MOVD	R1, r2+40(FP) | ||||
| 	RET | ||||
|   | ||||
							
								
								
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -21,8 +21,36 @@ TEXT	·Syscall(SB),NOSPLIT,$0-56 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-80 | ||||
| 	JMP	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	JAL	runtime·entersyscall(SB) | ||||
| 	MOVV	a1+8(FP), R4 | ||||
| 	MOVV	a2+16(FP), R5 | ||||
| 	MOVV	a3+24(FP), R6 | ||||
| 	MOVV	R0, R7 | ||||
| 	MOVV	R0, R8 | ||||
| 	MOVV	R0, R9 | ||||
| 	MOVV	trap+0(FP), R2	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVV	R2, r1+32(FP) | ||||
| 	MOVV	R3, r2+40(FP) | ||||
| 	JAL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-56 | ||||
| 	JMP	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 | ||||
| 	JMP	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	MOVV	a1+8(FP), R4 | ||||
| 	MOVV	a2+16(FP), R5 | ||||
| 	MOVV	a3+24(FP), R6 | ||||
| 	MOVV	R0, R7 | ||||
| 	MOVV	R0, R8 | ||||
| 	MOVV	R0, R9 | ||||
| 	MOVV	trap+0(FP), R2	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVV	R2, r1+32(FP) | ||||
| 	MOVV	R3, r2+40(FP) | ||||
| 	RET | ||||
|   | ||||
							
								
								
									
										23
									
								
								vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -24,8 +24,31 @@ TEXT	·Syscall6(SB),NOSPLIT,$0-40 | ||||
| TEXT ·Syscall9(SB),NOSPLIT,$0-52 | ||||
| 	JMP syscall·Syscall9(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 | ||||
| 	JAL	runtime·entersyscall(SB) | ||||
| 	MOVW	a1+4(FP), R4 | ||||
| 	MOVW	a2+8(FP), R5 | ||||
| 	MOVW	a3+12(FP), R6 | ||||
| 	MOVW	R0, R7 | ||||
| 	MOVW	trap+0(FP), R2	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVW	R2, r1+16(FP)	// r1 | ||||
| 	MOVW	R3, r2+20(FP)	// r2 | ||||
| 	JAL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-28 | ||||
| 	JMP syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 | ||||
| 	JMP syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 | ||||
| 	MOVW	a1+4(FP), R4 | ||||
| 	MOVW	a2+8(FP), R5 | ||||
| 	MOVW	a3+12(FP), R6 | ||||
| 	MOVW	trap+0(FP), R2	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVW	R2, r1+16(FP) | ||||
| 	MOVW	R3, r2+20(FP) | ||||
| 	RET | ||||
|   | ||||
							
								
								
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -21,8 +21,36 @@ TEXT	·Syscall(SB),NOSPLIT,$0-56 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-80 | ||||
| 	BR	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	BL	runtime·entersyscall(SB) | ||||
| 	MOVD	a1+8(FP), R3 | ||||
| 	MOVD	a2+16(FP), R4 | ||||
| 	MOVD	a3+24(FP), R5 | ||||
| 	MOVD	R0, R6 | ||||
| 	MOVD	R0, R7 | ||||
| 	MOVD	R0, R8 | ||||
| 	MOVD	trap+0(FP), R9	// syscall entry | ||||
| 	SYSCALL R9 | ||||
| 	MOVD	R3, r1+32(FP) | ||||
| 	MOVD	R4, r2+40(FP) | ||||
| 	BL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-56 | ||||
| 	BR	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 | ||||
| 	BR	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	MOVD	a1+8(FP), R3 | ||||
| 	MOVD	a2+16(FP), R4 | ||||
| 	MOVD	a3+24(FP), R5 | ||||
| 	MOVD	R0, R6 | ||||
| 	MOVD	R0, R7 | ||||
| 	MOVD	R0, R8 | ||||
| 	MOVD	trap+0(FP), R9	// syscall entry | ||||
| 	SYSCALL R9 | ||||
| 	MOVD	R3, r1+32(FP) | ||||
| 	MOVD	R4, r2+40(FP) | ||||
| 	RET | ||||
|   | ||||
							
								
								
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_s390x.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/golang.org/x/sys/unix/asm_linux_s390x.s
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -21,8 +21,36 @@ TEXT ·Syscall(SB),NOSPLIT,$0-56 | ||||
| TEXT ·Syscall6(SB),NOSPLIT,$0-80 | ||||
| 	BR	syscall·Syscall6(SB) | ||||
|  | ||||
| TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	BL	runtime·entersyscall(SB) | ||||
| 	MOVD	a1+8(FP), R2 | ||||
| 	MOVD	a2+16(FP), R3 | ||||
| 	MOVD	a3+24(FP), R4 | ||||
| 	MOVD	$0, R5 | ||||
| 	MOVD	$0, R6 | ||||
| 	MOVD	$0, R7 | ||||
| 	MOVD	trap+0(FP), R1	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVD	R2, r1+32(FP) | ||||
| 	MOVD	R3, r2+40(FP) | ||||
| 	BL	runtime·exitsyscall(SB) | ||||
| 	RET | ||||
|  | ||||
| TEXT ·RawSyscall(SB),NOSPLIT,$0-56 | ||||
| 	BR	syscall·RawSyscall(SB) | ||||
|  | ||||
| TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 | ||||
| 	BR	syscall·RawSyscall6(SB) | ||||
|  | ||||
| TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 | ||||
| 	MOVD	a1+8(FP), R2 | ||||
| 	MOVD	a2+16(FP), R3 | ||||
| 	MOVD	a3+24(FP), R4 | ||||
| 	MOVD	$0, R5 | ||||
| 	MOVD	$0, R6 | ||||
| 	MOVD	$0, R7 | ||||
| 	MOVD	trap+0(FP), R1	// syscall entry | ||||
| 	SYSCALL | ||||
| 	MOVD	R2, r1+32(FP) | ||||
| 	MOVD	R3, r2+40(FP) | ||||
| 	RET | ||||
|   | ||||
							
								
								
									
										30
									
								
								vendor/golang.org/x/sys/unix/cap_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								vendor/golang.org/x/sys/unix/cap_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -7,7 +7,7 @@ | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	errorspkg "errors" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| ) | ||||
|  | ||||
| @@ -60,26 +60,26 @@ func CapRightsSet(rights *CapRights, setrights []uint64) error { | ||||
|  | ||||
| 	n := caparsize(rights) | ||||
| 	if n < capArSizeMin || n > capArSizeMax { | ||||
| 		return errorspkg.New("bad rights size") | ||||
| 		return errors.New("bad rights size") | ||||
| 	} | ||||
|  | ||||
| 	for _, right := range setrights { | ||||
| 		if caprver(right) != CAP_RIGHTS_VERSION_00 { | ||||
| 			return errorspkg.New("bad right version") | ||||
| 			return errors.New("bad right version") | ||||
| 		} | ||||
| 		i, err := rightToIndex(right) | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		if i >= n { | ||||
| 			return errorspkg.New("index overflow") | ||||
| 			return errors.New("index overflow") | ||||
| 		} | ||||
| 		if capidxbit(rights.Rights[i]) != capidxbit(right) { | ||||
| 			return errorspkg.New("index mismatch") | ||||
| 			return errors.New("index mismatch") | ||||
| 		} | ||||
| 		rights.Rights[i] |= right | ||||
| 		if capidxbit(rights.Rights[i]) != capidxbit(right) { | ||||
| 			return errorspkg.New("index mismatch (after assign)") | ||||
| 			return errors.New("index mismatch (after assign)") | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| @@ -95,26 +95,26 @@ func CapRightsClear(rights *CapRights, clearrights []uint64) error { | ||||
|  | ||||
| 	n := caparsize(rights) | ||||
| 	if n < capArSizeMin || n > capArSizeMax { | ||||
| 		return errorspkg.New("bad rights size") | ||||
| 		return errors.New("bad rights size") | ||||
| 	} | ||||
|  | ||||
| 	for _, right := range clearrights { | ||||
| 		if caprver(right) != CAP_RIGHTS_VERSION_00 { | ||||
| 			return errorspkg.New("bad right version") | ||||
| 			return errors.New("bad right version") | ||||
| 		} | ||||
| 		i, err := rightToIndex(right) | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		if i >= n { | ||||
| 			return errorspkg.New("index overflow") | ||||
| 			return errors.New("index overflow") | ||||
| 		} | ||||
| 		if capidxbit(rights.Rights[i]) != capidxbit(right) { | ||||
| 			return errorspkg.New("index mismatch") | ||||
| 			return errors.New("index mismatch") | ||||
| 		} | ||||
| 		rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF) | ||||
| 		if capidxbit(rights.Rights[i]) != capidxbit(right) { | ||||
| 			return errorspkg.New("index mismatch (after assign)") | ||||
| 			return errors.New("index mismatch (after assign)") | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| @@ -130,22 +130,22 @@ func CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) { | ||||
|  | ||||
| 	n := caparsize(rights) | ||||
| 	if n < capArSizeMin || n > capArSizeMax { | ||||
| 		return false, errorspkg.New("bad rights size") | ||||
| 		return false, errors.New("bad rights size") | ||||
| 	} | ||||
|  | ||||
| 	for _, right := range setrights { | ||||
| 		if caprver(right) != CAP_RIGHTS_VERSION_00 { | ||||
| 			return false, errorspkg.New("bad right version") | ||||
| 			return false, errors.New("bad right version") | ||||
| 		} | ||||
| 		i, err := rightToIndex(right) | ||||
| 		if err != nil { | ||||
| 			return false, err | ||||
| 		} | ||||
| 		if i >= n { | ||||
| 			return false, errorspkg.New("index overflow") | ||||
| 			return false, errors.New("index overflow") | ||||
| 		} | ||||
| 		if capidxbit(rights.Rights[i]) != capidxbit(right) { | ||||
| 			return false, errorspkg.New("index mismatch") | ||||
| 			return false, errors.New("index mismatch") | ||||
| 		} | ||||
| 		if (rights.Rights[i] & right) != right { | ||||
| 			return false, nil | ||||
|   | ||||
							
								
								
									
										89
									
								
								vendor/golang.org/x/sys/unix/dirent.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										89
									
								
								vendor/golang.org/x/sys/unix/dirent.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,97 +6,12 @@ | ||||
|  | ||||
| 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") | ||||
| 	} | ||||
| } | ||||
| import "syscall" | ||||
|  | ||||
| // 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 | ||||
| 	return syscall.ParseDirent(buf, max, names) | ||||
| } | ||||
|   | ||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/env_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/env_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -25,3 +25,7 @@ func Clearenv() { | ||||
| func Environ() []string { | ||||
| 	return syscall.Environ() | ||||
| } | ||||
|  | ||||
| func Unsetenv(key string) error { | ||||
| 	return syscall.Unsetenv(key) | ||||
| } | ||||
|   | ||||
							
								
								
									
										14
									
								
								vendor/golang.org/x/sys/unix/env_unset.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/golang.org/x/sys/unix/env_unset.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,14 +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 go1.4 | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import "syscall" | ||||
|  | ||||
| func Unsetenv(key string) error { | ||||
| 	// This was added in Go 1.4. | ||||
| 	return syscall.Unsetenv(key) | ||||
| } | ||||
							
								
								
									
										10
									
								
								vendor/golang.org/x/sys/unix/flock.go → vendor/golang.org/x/sys/unix/fcntl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/golang.org/x/sys/unix/flock.go → vendor/golang.org/x/sys/unix/fcntl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -12,6 +12,16 @@ import "unsafe" | ||||
| // systems by flock_linux_32bit.go to be SYS_FCNTL64. | ||||
| var fcntl64Syscall uintptr = SYS_FCNTL | ||||
| 
 | ||||
| // FcntlInt performs a fcntl syscall on fd with the provided command and argument. | ||||
| func FcntlInt(fd uintptr, cmd, arg int) (int, error) { | ||||
| 	valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) | ||||
| 	var err error | ||||
| 	if errno != 0 { | ||||
| 		err = errno | ||||
| 	} | ||||
| 	return int(valptr), err | ||||
| } | ||||
| 
 | ||||
| // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. | ||||
| func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { | ||||
| 	_, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) | ||||
							
								
								
									
										27
									
								
								vendor/golang.org/x/sys/unix/file_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								vendor/golang.org/x/sys/unix/file_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,27 +0,0 @@ | ||||
| // 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 | ||||
| } | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/gccgo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/gccgo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,9 +11,19 @@ import "syscall" | ||||
| // We can't use the gc-syntax .s files for gccgo. On the plus side | ||||
| // much of the functionality can be written directly in Go. | ||||
|  | ||||
| //extern gccgoRealSyscallNoError | ||||
| func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr) | ||||
|  | ||||
| //extern gccgoRealSyscall | ||||
| func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) | ||||
|  | ||||
| func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { | ||||
| 	syscall.Entersyscall() | ||||
| 	r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) | ||||
| 	syscall.Exitsyscall() | ||||
| 	return r, 0 | ||||
| } | ||||
|  | ||||
| func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { | ||||
| 	syscall.Entersyscall() | ||||
| 	r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) | ||||
| @@ -35,6 +45,11 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, | ||||
| 	return r, 0, syscall.Errno(errno) | ||||
| } | ||||
|  | ||||
| func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { | ||||
| 	r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) | ||||
| 	return r, 0 | ||||
| } | ||||
|  | ||||
| func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { | ||||
| 	r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) | ||||
| 	return r, 0, syscall.Errno(errno) | ||||
|   | ||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/unix/gccgo_c.c
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/unix/gccgo_c.c
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -31,11 +31,8 @@ gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintp | ||||
| 	return r; | ||||
| } | ||||
|  | ||||
| // Define the use function in C so that it is not inlined. | ||||
|  | ||||
| extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); | ||||
|  | ||||
| void | ||||
| use(void *p __attribute__ ((unused))) | ||||
| uintptr_t | ||||
| gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) | ||||
| { | ||||
| 	return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); | ||||
| } | ||||
|   | ||||
							
								
								
									
										4
									
								
								vendor/golang.org/x/sys/unix/openbsd_pledge.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/golang.org/x/sys/unix/openbsd_pledge.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -13,7 +13,7 @@ import ( | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	SYS_PLEDGE = 108 | ||||
| 	_SYS_PLEDGE = 108 | ||||
| ) | ||||
|  | ||||
| // Pledge implements the pledge syscall. For more information see pledge(2). | ||||
| @@ -30,7 +30,7 @@ func Pledge(promises string, paths []string) error { | ||||
| 		} | ||||
| 		pathsUnsafe = unsafe.Pointer(&pathsPtr[0]) | ||||
| 	} | ||||
| 	_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(promisesUnsafe), uintptr(pathsUnsafe), 0) | ||||
| 	_, _, e := syscall.Syscall(_SYS_PLEDGE, uintptr(promisesUnsafe), uintptr(pathsUnsafe), 0) | ||||
| 	if e != 0 { | ||||
| 		return e | ||||
| 	} | ||||
|   | ||||
							
								
								
									
										27
									
								
								vendor/golang.org/x/sys/unix/syscall.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								vendor/golang.org/x/sys/unix/syscall.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,25 +11,28 @@ | ||||
| // system, set $GOOS and $GOARCH to the desired system. For example, if | ||||
| // you want to view documentation for freebsd/arm on linux/amd64, set $GOOS | ||||
| // to freebsd and $GOARCH to arm. | ||||
| // | ||||
| // The primary use of this package is inside other packages that provide a more | ||||
| // portable interface to the system, such as "os", "time" and "net".  Use | ||||
| // those packages rather than this one if you can. | ||||
| // | ||||
| // For details of the functions and data types in this package consult | ||||
| // the manuals for the appropriate operating system. | ||||
| // | ||||
| // These calls return err == nil to indicate success; otherwise | ||||
| // err represents an operating system error describing the failure and | ||||
| // holds a value of type syscall.Errno. | ||||
| package unix // import "golang.org/x/sys/unix" | ||||
|  | ||||
| import "strings" | ||||
|  | ||||
| // 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). | ||||
| func ByteSliceFromString(s string) ([]byte, error) { | ||||
| 	for i := 0; i < len(s); i++ { | ||||
| 		if s[i] == 0 { | ||||
| 	if strings.IndexByte(s, 0) != -1 { | ||||
| 		return nil, EINVAL | ||||
| 	} | ||||
| 	} | ||||
| 	a := make([]byte, len(s)+1) | ||||
| 	copy(a, s) | ||||
| 	return a, nil | ||||
| @@ -49,21 +52,3 @@ func BytePtrFromString(s string) (*byte, error) { | ||||
| // Single-word zero for use when we need a valid pointer to 0 bytes. | ||||
| // See mkunix.pl. | ||||
| var _zero uintptr | ||||
|  | ||||
| func (ts *Timespec) Unix() (sec int64, nsec int64) { | ||||
| 	return int64(ts.Sec), int64(ts.Nsec) | ||||
| } | ||||
|  | ||||
| func (tv *Timeval) Unix() (sec int64, nsec int64) { | ||||
| 	return int64(tv.Sec), int64(tv.Usec) * 1000 | ||||
| } | ||||
|  | ||||
| func (ts *Timespec) Nano() int64 { | ||||
| 	return int64(ts.Sec)*1e9 + int64(ts.Nsec) | ||||
| } | ||||
|  | ||||
| func (tv *Timeval) Nano() int64 { | ||||
| 	return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 | ||||
| } | ||||
|  | ||||
| func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } | ||||
|   | ||||
							
								
								
									
										75
									
								
								vendor/golang.org/x/sys/unix/syscall_bsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										75
									
								
								vendor/golang.org/x/sys/unix/syscall_bsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -206,7 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil | ||||
| } | ||||
|  | ||||
| func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| 	switch rsa.Addr.Family { | ||||
| 	case AF_LINK: | ||||
| 		pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa)) | ||||
| @@ -286,7 +286,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { | ||||
| 		Close(nfd) | ||||
| 		return 0, nil, ECONNABORTED | ||||
| 	} | ||||
| 	sa, err = anyToSockaddr(&rsa) | ||||
| 	sa, err = anyToSockaddr(fd, &rsa) | ||||
| 	if err != nil { | ||||
| 		Close(nfd) | ||||
| 		nfd = 0 | ||||
| @@ -306,50 +306,21 @@ func Getsockname(fd int) (sa Sockaddr, err error) { | ||||
| 		rsa.Addr.Family = AF_UNIX | ||||
| 		rsa.Addr.Len = SizeofSockaddrUnix | ||||
| 	} | ||||
| 	return anyToSockaddr(&rsa) | ||||
| 	return anyToSockaddr(fd, &rsa) | ||||
| } | ||||
|  | ||||
| //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) | ||||
|  | ||||
| func GetsockoptByte(fd, level, opt int) (value byte, err error) { | ||||
| 	var n byte | ||||
| 	vallen := _Socklen(1) | ||||
| 	err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) | ||||
| 	return n, err | ||||
| // GetsockoptString returns the string value of the socket option opt for the | ||||
| // socket associated with fd at the given socket level. | ||||
| func GetsockoptString(fd, level, opt int) (string, error) { | ||||
| 	buf := make([]byte, 256) | ||||
| 	vallen := _Socklen(len(buf)) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
|  | ||||
| func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { | ||||
| 	vallen := _Socklen(4) | ||||
| 	err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) | ||||
| 	return value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { | ||||
| 	var value IPMreq | ||||
| 	vallen := _Socklen(SizeofIPMreq) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { | ||||
| 	var value IPv6Mreq | ||||
| 	vallen := _Socklen(SizeofIPv6Mreq) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { | ||||
| 	var value IPv6MTUInfo | ||||
| 	vallen := _Socklen(SizeofIPv6MTUInfo) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { | ||||
| 	var value ICMPv6Filter | ||||
| 	vallen := _Socklen(SizeofICMPv6Filter) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| 	return string(buf[:vallen-1]), nil | ||||
| } | ||||
|  | ||||
| //sys   recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) | ||||
| @@ -385,7 +356,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from | ||||
| 	recvflags = int(msg.Flags) | ||||
| 	// source address is only specified if the socket is unconnected | ||||
| 	if rsa.Addr.Family != AF_UNSPEC { | ||||
| 		from, err = anyToSockaddr(&rsa) | ||||
| 		from, err = anyToSockaddr(fd, &rsa) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| @@ -570,7 +541,12 @@ func UtimesNano(path string, ts []Timespec) error { | ||||
| 	if len(ts) != 2 { | ||||
| 		return EINVAL | ||||
| 	} | ||||
| 	err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) | ||||
| 	// Darwin setattrlist can set nanosecond timestamps | ||||
| 	err := setattrlistTimes(path, ts, 0) | ||||
| 	if err != ENOSYS { | ||||
| 		return err | ||||
| 	} | ||||
| 	err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) | ||||
| 	if err != ENOSYS { | ||||
| 		return err | ||||
| 	} | ||||
| @@ -590,6 +566,10 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { | ||||
| 	if len(ts) != 2 { | ||||
| 		return EINVAL | ||||
| 	} | ||||
| 	err := setattrlistTimes(path, ts, flags) | ||||
| 	if err != ENOSYS { | ||||
| 		return err | ||||
| 	} | ||||
| 	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) | ||||
| } | ||||
|  | ||||
| @@ -607,6 +587,15 @@ func Futimes(fd int, tv []Timeval) error { | ||||
|  | ||||
| //sys	fcntl(fd int, cmd int, arg int) (val int, err error) | ||||
|  | ||||
| //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) | ||||
| } | ||||
|  | ||||
| // TODO: wrap | ||||
| //	Acct(name nil-string) (err error) | ||||
| //	Gethostuuid(uuid *byte, timeout *Timespec) (err error) | ||||
|   | ||||
							
								
								
									
										186
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										186
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -13,7 +13,7 @@ | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	errorspkg "errors" | ||||
| 	"errors" | ||||
| 	"syscall" | ||||
| 	"unsafe" | ||||
| ) | ||||
| @@ -36,6 +36,7 @@ func Getwd() (string, error) { | ||||
| 	return "", ENOTSUP | ||||
| } | ||||
|  | ||||
| // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. | ||||
| type SockaddrDatalink struct { | ||||
| 	Len    uint8 | ||||
| 	Family uint8 | ||||
| @@ -76,18 +77,6 @@ func nametomib(name string) (mib []_C_int, err error) { | ||||
| 	return buf[0 : n/siz], nil | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) | ||||
| } | ||||
|  | ||||
| //sys   ptrace(request int, pid int, addr uintptr, data uintptr) (err error) | ||||
| func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } | ||||
| func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) } | ||||
| @@ -109,7 +98,7 @@ type attrList struct { | ||||
|  | ||||
| func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) { | ||||
| 	if len(attrBuf) < 4 { | ||||
| 		return nil, errorspkg.New("attrBuf too small") | ||||
| 		return nil, errors.New("attrBuf too small") | ||||
| 	} | ||||
| 	attrList.bitmapCount = attrBitMapCount | ||||
|  | ||||
| @@ -145,12 +134,12 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) ( | ||||
| 	for i := uint32(0); int(i) < len(dat); { | ||||
| 		header := dat[i:] | ||||
| 		if len(header) < 8 { | ||||
| 			return attrs, errorspkg.New("truncated attribute header") | ||||
| 			return attrs, errors.New("truncated attribute header") | ||||
| 		} | ||||
| 		datOff := *(*int32)(unsafe.Pointer(&header[0])) | ||||
| 		attrLen := *(*uint32)(unsafe.Pointer(&header[4])) | ||||
| 		if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) { | ||||
| 			return attrs, errorspkg.New("truncated results; attrBuf too small") | ||||
| 			return attrs, errors.New("truncated results; attrBuf too small") | ||||
| 		} | ||||
| 		end := uint32(datOff) + attrLen | ||||
| 		attrs = append(attrs, dat[datOff:end]) | ||||
| @@ -187,6 +176,119 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| func xattrPointer(dest []byte) *byte { | ||||
| 	// It's only when dest is set to NULL that the OS X implementations of | ||||
| 	// getxattr() and listxattr() return the current sizes of the named attributes. | ||||
| 	// An empty byte array is not sufficient. To maintain the same behaviour as the | ||||
| 	// linux implementation, we wrap around the system calls and pass in NULL when | ||||
| 	// dest is empty. | ||||
| 	var destp *byte | ||||
| 	if len(dest) > 0 { | ||||
| 		destp = &dest[0] | ||||
| 	} | ||||
| 	return destp | ||||
| } | ||||
|  | ||||
| //sys	getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) | ||||
|  | ||||
| func Getxattr(path string, attr string, dest []byte) (sz int, err error) { | ||||
| 	return getxattr(path, attr, xattrPointer(dest), len(dest), 0, 0) | ||||
| } | ||||
|  | ||||
| func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { | ||||
| 	return getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW) | ||||
| } | ||||
|  | ||||
| //sys  setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) | ||||
|  | ||||
| func Setxattr(path string, attr string, data []byte, flags int) (err error) { | ||||
| 	// The parameters for the OS X implementation vary slightly compared to the | ||||
| 	// linux system call, specifically the position parameter: | ||||
| 	// | ||||
| 	//  linux: | ||||
| 	//      int setxattr( | ||||
| 	//          const char *path, | ||||
| 	//          const char *name, | ||||
| 	//          const void *value, | ||||
| 	//          size_t size, | ||||
| 	//          int flags | ||||
| 	//      ); | ||||
| 	// | ||||
| 	//  darwin: | ||||
| 	//      int setxattr( | ||||
| 	//          const char *path, | ||||
| 	//          const char *name, | ||||
| 	//          void *value, | ||||
| 	//          size_t size, | ||||
| 	//          u_int32_t position, | ||||
| 	//          int options | ||||
| 	//      ); | ||||
| 	// | ||||
| 	// position specifies the offset within the extended attribute. In the | ||||
| 	// current implementation, only the resource fork extended attribute makes | ||||
| 	// use of this argument. For all others, position is reserved. We simply | ||||
| 	// default to setting it to zero. | ||||
| 	return setxattr(path, attr, xattrPointer(data), len(data), 0, flags) | ||||
| } | ||||
|  | ||||
| func Lsetxattr(link string, attr string, data []byte, flags int) (err error) { | ||||
| 	return setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW) | ||||
| } | ||||
|  | ||||
| //sys removexattr(path string, attr string, options int) (err error) | ||||
|  | ||||
| func Removexattr(path string, attr string) (err error) { | ||||
| 	// We wrap around and explicitly zero out the options provided to the OS X | ||||
| 	// implementation of removexattr, we do so for interoperability with the | ||||
| 	// linux variant. | ||||
| 	return removexattr(path, attr, 0) | ||||
| } | ||||
|  | ||||
| func Lremovexattr(link string, attr string) (err error) { | ||||
| 	return removexattr(link, attr, XATTR_NOFOLLOW) | ||||
| } | ||||
|  | ||||
| //sys	listxattr(path string, dest *byte, size int, options int) (sz int, err error) | ||||
|  | ||||
| func Listxattr(path string, dest []byte) (sz int, err error) { | ||||
| 	return listxattr(path, xattrPointer(dest), len(dest), 0) | ||||
| } | ||||
|  | ||||
| func Llistxattr(link string, dest []byte) (sz int, err error) { | ||||
| 	return listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW) | ||||
| } | ||||
|  | ||||
| func setattrlistTimes(path string, times []Timespec, flags int) error { | ||||
| 	_p0, err := BytePtrFromString(path) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	var attrList attrList | ||||
| 	attrList.bitmapCount = ATTR_BIT_MAP_COUNT | ||||
| 	attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME | ||||
|  | ||||
| 	// order is mtime, atime: the opposite of Chtimes | ||||
| 	attributes := [2]Timespec{times[1], times[0]} | ||||
| 	options := 0 | ||||
| 	if flags&AT_SYMLINK_NOFOLLOW != 0 { | ||||
| 		options |= FSOPT_NOFOLLOW | ||||
| 	} | ||||
| 	_, _, e1 := Syscall6( | ||||
| 		SYS_SETATTRLIST, | ||||
| 		uintptr(unsafe.Pointer(_p0)), | ||||
| 		uintptr(unsafe.Pointer(&attrList)), | ||||
| 		uintptr(unsafe.Pointer(&attributes)), | ||||
| 		uintptr(unsafe.Sizeof(attributes)), | ||||
| 		uintptr(options), | ||||
| 		0, | ||||
| 	) | ||||
| 	if e1 != 0 { | ||||
| 		return e1 | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error { | ||||
| 	// Darwin doesn't support SYS_UTIMENSAT | ||||
| 	return ENOSYS | ||||
| @@ -239,6 +341,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func Uname(uname *Utsname) error { | ||||
| 	mib := []_C_int{CTL_KERN, KERN_OSTYPE} | ||||
| 	n := unsafe.Sizeof(uname.Sysname) | ||||
| 	if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_HOSTNAME} | ||||
| 	n = unsafe.Sizeof(uname.Nodename) | ||||
| 	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_OSRELEASE} | ||||
| 	n = unsafe.Sizeof(uname.Release) | ||||
| 	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_VERSION} | ||||
| 	n = unsafe.Sizeof(uname.Version) | ||||
| 	if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	// The version might have newlines or tabs in it, convert them to | ||||
| 	// spaces. | ||||
| 	for i, b := range uname.Version { | ||||
| 		if b == '\n' || b == '\t' { | ||||
| 			if i == len(uname.Version)-1 { | ||||
| 				uname.Version[i] = 0 | ||||
| 			} else { | ||||
| 				uname.Version[i] = ' ' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_HW, HW_MACHINE} | ||||
| 	n = unsafe.Sizeof(uname.Machine) | ||||
| 	if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Exposed directly | ||||
|  */ | ||||
| @@ -264,6 +412,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| //sys	Flock(fd int, how int) (err error) | ||||
| //sys	Fpathconf(fd int, name int) (val int, err error) | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 | ||||
| //sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 | ||||
| //sys	Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 | ||||
| //sys	Fsync(fd int) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| @@ -377,17 +526,12 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| // Searchfs | ||||
| // Delete | ||||
| // Copyfile | ||||
| // Poll | ||||
| // Watchevent | ||||
| // Waitevent | ||||
| // Modwatch | ||||
| // Getxattr | ||||
| // Fgetxattr | ||||
| // Setxattr | ||||
| // Fsetxattr | ||||
| // Removexattr | ||||
| // Fremovexattr | ||||
| // Listxattr | ||||
| // Flistxattr | ||||
| // Fsctl | ||||
| // Initgroups | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: int32(sec), Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int32(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: int32(sec), Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| //sysnb	gettimeofday(tp *Timeval) (sec int32, usec int32, err error) | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| //sysnb	gettimeofday(tp *Timeval) (sec int64, usec int32, err error) | ||||
|   | ||||
							
								
								
									
										19
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -9,19 +9,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: int32(sec), Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int32(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: int32(sec), Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| //sysnb	gettimeofday(tp *Timeval) (sec int32, usec int32, err error) | ||||
| @@ -67,3 +60,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e | ||||
| } | ||||
|  | ||||
| func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic | ||||
|  | ||||
| // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions | ||||
| // of darwin/arm the syscall is called sysctl instead of __sysctl. | ||||
| const SYS___SYSCTL = SYS_SYSCTL | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| //sysnb	gettimeofday(tp *Timeval) (sec int64, usec int32, err error) | ||||
|   | ||||
							
								
								
									
										148
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										148
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -14,6 +14,7 @@ package unix | ||||
|  | ||||
| import "unsafe" | ||||
|  | ||||
| // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. | ||||
| type SockaddrDatalink struct { | ||||
| 	Len    uint8 | ||||
| 	Family uint8 | ||||
| @@ -56,22 +57,6 @@ func nametomib(name string) (mib []_C_int, err error) { | ||||
| 	return buf[0 : n/siz], nil | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	namlen, ok := direntNamlen(buf) | ||||
| 	if !ok { | ||||
| 		return 0, false | ||||
| 	} | ||||
| 	return (16 + namlen + 1 + 7) &^ 7, true | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) | ||||
| } | ||||
|  | ||||
| //sysnb pipe() (r int, w int, err error) | ||||
|  | ||||
| func Pipe(p []int) (err error) { | ||||
| @@ -102,7 +87,7 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { | ||||
| 	if len > SizeofSockaddrAny { | ||||
| 		panic("RawSockaddrAny too small") | ||||
| 	} | ||||
| 	sa, err = anyToSockaddr(&rsa) | ||||
| 	sa, err = anyToSockaddr(fd, &rsa) | ||||
| 	if err != nil { | ||||
| 		Close(nfd) | ||||
| 		nfd = 0 | ||||
| @@ -110,6 +95,23 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| const ImplementsGetwd = true | ||||
|  | ||||
| //sys	Getcwd(buf []byte) (n int, err error) = SYS___GETCWD | ||||
|  | ||||
| func Getwd() (string, error) { | ||||
| 	var buf [PathMax]byte | ||||
| 	_, err := Getcwd(buf[0:]) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	n := clen(buf[:]) | ||||
| 	if n < 1 { | ||||
| 		return "", EINVAL | ||||
| 	} | ||||
| 	return string(buf[:n]), nil | ||||
| } | ||||
|  | ||||
| func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| 	var _p0 unsafe.Pointer | ||||
| 	var bufsize uintptr | ||||
| @@ -125,6 +127,113 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| func setattrlistTimes(path string, times []Timespec, flags int) error { | ||||
| 	// used on Darwin for UtimesNano | ||||
| 	return ENOSYS | ||||
| } | ||||
|  | ||||
| //sys	ioctl(fd int, req uint, arg uintptr) (err error) | ||||
|  | ||||
| // ioctl itself should not be exposed directly, but additional get/set | ||||
| // functions for specific types are permissible. | ||||
|  | ||||
| // IoctlSetInt performs an ioctl operation which sets an integer value | ||||
| // on fd, using the specified request number. | ||||
| func IoctlSetInt(fd int, req uint, value int) error { | ||||
| 	return ioctl(fd, req, uintptr(value)) | ||||
| } | ||||
|  | ||||
| func IoctlSetWinsize(fd int, req uint, value *Winsize) error { | ||||
| 	return ioctl(fd, req, uintptr(unsafe.Pointer(value))) | ||||
| } | ||||
|  | ||||
| func IoctlSetTermios(fd int, req uint, value *Termios) error { | ||||
| 	return ioctl(fd, req, uintptr(unsafe.Pointer(value))) | ||||
| } | ||||
|  | ||||
| // IoctlGetInt performs an ioctl operation which gets an integer value | ||||
| // from fd, using the specified request number. | ||||
| func IoctlGetInt(fd int, req uint) (int, error) { | ||||
| 	var value int | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return value, err | ||||
| } | ||||
|  | ||||
| func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { | ||||
| 	var value Winsize | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| 	var value Termios | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error { | ||||
| 	err := sysctl(mib, old, oldlen, nil, 0) | ||||
| 	if err != nil { | ||||
| 		// Utsname members on Dragonfly are only 32 bytes and | ||||
| 		// the syscall returns ENOMEM in case the actual value | ||||
| 		// is longer. | ||||
| 		if err == ENOMEM { | ||||
| 			err = nil | ||||
| 		} | ||||
| 	} | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func Uname(uname *Utsname) error { | ||||
| 	mib := []_C_int{CTL_KERN, KERN_OSTYPE} | ||||
| 	n := unsafe.Sizeof(uname.Sysname) | ||||
| 	if err := sysctlUname(mib, &uname.Sysname[0], &n); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	uname.Sysname[unsafe.Sizeof(uname.Sysname)-1] = 0 | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_HOSTNAME} | ||||
| 	n = unsafe.Sizeof(uname.Nodename) | ||||
| 	if err := sysctlUname(mib, &uname.Nodename[0], &n); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	uname.Nodename[unsafe.Sizeof(uname.Nodename)-1] = 0 | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_OSRELEASE} | ||||
| 	n = unsafe.Sizeof(uname.Release) | ||||
| 	if err := sysctlUname(mib, &uname.Release[0], &n); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	uname.Release[unsafe.Sizeof(uname.Release)-1] = 0 | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_VERSION} | ||||
| 	n = unsafe.Sizeof(uname.Version) | ||||
| 	if err := sysctlUname(mib, &uname.Version[0], &n); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	// The version might have newlines or tabs in it, convert them to | ||||
| 	// spaces. | ||||
| 	for i, b := range uname.Version { | ||||
| 		if b == '\n' || b == '\t' { | ||||
| 			if i == len(uname.Version)-1 { | ||||
| 				uname.Version[i] = 0 | ||||
| 			} else { | ||||
| 				uname.Version[i] = ' ' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_HW, HW_MACHINE} | ||||
| 	n = unsafe.Sizeof(uname.Machine) | ||||
| 	if err := sysctlUname(mib, &uname.Machine[0], &n); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	uname.Machine[unsafe.Sizeof(uname.Machine)-1] = 0 | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Exposed directly | ||||
|  */ | ||||
| @@ -142,10 +251,12 @@ func Getfsstat(buf []Statfs_t, flags int) (n 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	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	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) | ||||
| //sys	Fstatfs(fd int, stat *Statfs_t) (err error) | ||||
| //sys	Fsync(fd int) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| @@ -225,7 +336,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| // Getlogin | ||||
| // Sigpending | ||||
| // Sigaltstack | ||||
| // Ioctl | ||||
| // Reboot | ||||
| // Execve | ||||
| // Vfork | ||||
| @@ -257,7 +367,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| // Searchfs | ||||
| // Delete | ||||
| // Copyfile | ||||
| // Poll | ||||
| // Watchevent | ||||
| // Waitevent | ||||
| // Modwatch | ||||
| @@ -403,7 +512,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| // Pread_nocancel | ||||
| // Pwrite_nocancel | ||||
| // Waitid_nocancel | ||||
| // Poll_nocancel | ||||
| // Msgsnd_nocancel | ||||
| // Msgrcv_nocancel | ||||
| // Sem_wait_nocancel | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										112
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										112
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -12,8 +12,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import "unsafe" | ||||
| import ( | ||||
| 	"strings" | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. | ||||
| type SockaddrDatalink struct { | ||||
| 	Len    uint8 | ||||
| 	Family uint8 | ||||
| @@ -54,18 +58,6 @@ func nametomib(name string) (mib []_C_int, err error) { | ||||
| 	return buf[0 : n/siz], nil | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) | ||||
| } | ||||
|  | ||||
| //sysnb pipe() (r int, w int, err error) | ||||
|  | ||||
| func Pipe(p []int) (err error) { | ||||
| @@ -97,7 +89,7 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { | ||||
| 	if len > SizeofSockaddrAny { | ||||
| 		panic("RawSockaddrAny too small") | ||||
| 	} | ||||
| 	sa, err = anyToSockaddr(&rsa) | ||||
| 	sa, err = anyToSockaddr(fd, &rsa) | ||||
| 	if err != nil { | ||||
| 		Close(nfd) | ||||
| 		nfd = 0 | ||||
| @@ -105,6 +97,23 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| const ImplementsGetwd = true | ||||
|  | ||||
| //sys	Getcwd(buf []byte) (n int, err error) = SYS___GETCWD | ||||
|  | ||||
| func Getwd() (string, error) { | ||||
| 	var buf [PathMax]byte | ||||
| 	_, err := Getcwd(buf[0:]) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	n := clen(buf[:]) | ||||
| 	if n < 1 { | ||||
| 		return "", EINVAL | ||||
| 	} | ||||
| 	return string(buf[:n]), nil | ||||
| } | ||||
|  | ||||
| func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| 	var _p0 unsafe.Pointer | ||||
| 	var bufsize uintptr | ||||
| @@ -120,17 +129,15 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| func setattrlistTimes(path string, times []Timespec, flags int) error { | ||||
| 	// used on Darwin for UtimesNano | ||||
| 	return ENOSYS | ||||
| } | ||||
|  | ||||
| // Derive extattr namespace and attribute name | ||||
|  | ||||
| func xattrnamespace(fullattr string) (ns int, attr string, err error) { | ||||
| 	s := -1 | ||||
| 	for idx, val := range fullattr { | ||||
| 		if val == '.' { | ||||
| 			s = idx | ||||
| 			break | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	s := strings.IndexByte(fullattr, '.') | ||||
| 	if s == -1 { | ||||
| 		return -1, "", ENOATTR | ||||
| 	} | ||||
| @@ -271,7 +278,6 @@ func Listxattr(file string, dest []byte) (sz int, err error) { | ||||
|  | ||||
| 	// FreeBSD won't allow you to list xattrs from multiple namespaces | ||||
| 	s := 0 | ||||
| 	var e error | ||||
| 	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { | ||||
| 		stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) | ||||
|  | ||||
| @@ -283,7 +289,6 @@ func Listxattr(file string, dest []byte) (sz int, err error) { | ||||
| 		 * we don't have read permissions on, so don't ignore those errors | ||||
| 		 */ | ||||
| 		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { | ||||
| 			e = nil | ||||
| 			continue | ||||
| 		} else if e != nil { | ||||
| 			return s, e | ||||
| @@ -297,7 +302,7 @@ func Listxattr(file string, dest []byte) (sz int, err error) { | ||||
| 		d = initxattrdest(dest, s) | ||||
| 	} | ||||
|  | ||||
| 	return s, e | ||||
| 	return s, nil | ||||
| } | ||||
|  | ||||
| func Flistxattr(fd int, dest []byte) (sz int, err error) { | ||||
| @@ -305,11 +310,9 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) { | ||||
| 	destsiz := len(dest) | ||||
|  | ||||
| 	s := 0 | ||||
| 	var e error | ||||
| 	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { | ||||
| 		stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) | ||||
| 		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { | ||||
| 			e = nil | ||||
| 			continue | ||||
| 		} else if e != nil { | ||||
| 			return s, e | ||||
| @@ -323,7 +326,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) { | ||||
| 		d = initxattrdest(dest, s) | ||||
| 	} | ||||
|  | ||||
| 	return s, e | ||||
| 	return s, nil | ||||
| } | ||||
|  | ||||
| func Llistxattr(link string, dest []byte) (sz int, err error) { | ||||
| @@ -331,11 +334,9 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { | ||||
| 	destsiz := len(dest) | ||||
|  | ||||
| 	s := 0 | ||||
| 	var e error | ||||
| 	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { | ||||
| 		stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) | ||||
| 		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { | ||||
| 			e = nil | ||||
| 			continue | ||||
| 		} else if e != nil { | ||||
| 			return s, e | ||||
| @@ -349,7 +350,7 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { | ||||
| 		d = initxattrdest(dest, s) | ||||
| 	} | ||||
|  | ||||
| 	return s, e | ||||
| 	return s, nil | ||||
| } | ||||
|  | ||||
| //sys   ioctl(fd int, req uint, arg uintptr) (err error) | ||||
| @@ -391,6 +392,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func Uname(uname *Utsname) error { | ||||
| 	mib := []_C_int{CTL_KERN, KERN_OSTYPE} | ||||
| 	n := unsafe.Sizeof(uname.Sysname) | ||||
| 	if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_HOSTNAME} | ||||
| 	n = unsafe.Sizeof(uname.Nodename) | ||||
| 	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_OSRELEASE} | ||||
| 	n = unsafe.Sizeof(uname.Release) | ||||
| 	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_VERSION} | ||||
| 	n = unsafe.Sizeof(uname.Version) | ||||
| 	if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	// The version might have newlines or tabs in it, convert them to | ||||
| 	// spaces. | ||||
| 	for i, b := range uname.Version { | ||||
| 		if b == '\n' || b == '\t' { | ||||
| 			if i == len(uname.Version)-1 { | ||||
| 				uname.Version[i] = 0 | ||||
| 			} else { | ||||
| 				uname.Version[i] = ' ' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_HW, HW_MACHINE} | ||||
| 	n = unsafe.Sizeof(uname.Machine) | ||||
| 	if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Exposed directly | ||||
|  */ | ||||
| @@ -431,9 +478,11 @@ func IoctlGetTermios(fd int, req uint) (*Termios, 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	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) | ||||
| //sys	Fstatfs(fd int, stat *Statfs_t) (err error) | ||||
| //sys	Fsync(fd int) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sys	Getdents(fd int, buf []byte) (n int, err error) | ||||
| //sys	Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) | ||||
| //sys	Getdtablesize() (size int) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -550,7 +599,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| // Searchfs | ||||
| // Delete | ||||
| // Copyfile | ||||
| // Poll | ||||
| // Watchevent | ||||
| // Waitevent | ||||
| // Modwatch | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: int32(sec), Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int32(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: int32(sec), Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| func NsecToTimespec(nsec int64) (ts Timespec) { | ||||
| 	ts.Sec = nsec / 1e9 | ||||
| 	ts.Nsec = int32(nsec % 1e9) | ||||
| 	return | ||||
| func setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										226
									
								
								vendor/golang.org/x/sys/unix/syscall_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										226
									
								
								vendor/golang.org/x/sys/unix/syscall_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -148,8 +148,6 @@ func Unlink(path string) error { | ||||
|  | ||||
| //sys	Unlinkat(dirfd int, path string, flags int) (err error) | ||||
|  | ||||
| //sys	utimes(path string, times *[2]Timeval) (err error) | ||||
|  | ||||
| func Utimes(path string, tv []Timeval) error { | ||||
| 	if tv == nil { | ||||
| 		err := utimensat(AT_FDCWD, path, nil, 0) | ||||
| @@ -207,20 +205,14 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { | ||||
| 	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) | ||||
| } | ||||
|  | ||||
| //sys	futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) | ||||
|  | ||||
| func Futimesat(dirfd int, path string, tv []Timeval) error { | ||||
| 	pathp, err := BytePtrFromString(path) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	if tv == nil { | ||||
| 		return futimesat(dirfd, pathp, nil) | ||||
| 		return futimesat(dirfd, path, nil) | ||||
| 	} | ||||
| 	if len(tv) != 2 { | ||||
| 		return EINVAL | ||||
| 	} | ||||
| 	return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) | ||||
| 	return futimesat(dirfd, path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) | ||||
| } | ||||
|  | ||||
| func Futimes(fd int, tv []Timeval) (err error) { | ||||
| @@ -413,6 +405,7 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	return unsafe.Pointer(&sa.raw), sl, nil | ||||
| } | ||||
|  | ||||
| // SockaddrLinklayer implements the Sockaddr interface for AF_PACKET type sockets. | ||||
| type SockaddrLinklayer struct { | ||||
| 	Protocol uint16 | ||||
| 	Ifindex  int | ||||
| @@ -439,6 +432,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil | ||||
| } | ||||
|  | ||||
| // SockaddrNetlink implements the Sockaddr interface for AF_NETLINK type sockets. | ||||
| type SockaddrNetlink struct { | ||||
| 	Family uint16 | ||||
| 	Pad    uint16 | ||||
| @@ -455,6 +449,8 @@ func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil | ||||
| } | ||||
|  | ||||
| // SockaddrHCI implements the Sockaddr interface for AF_BLUETOOTH type sockets | ||||
| // using the HCI protocol. | ||||
| type SockaddrHCI struct { | ||||
| 	Dev     uint16 | ||||
| 	Channel uint16 | ||||
| @@ -468,6 +464,72 @@ func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil | ||||
| } | ||||
|  | ||||
| // SockaddrL2 implements the Sockaddr interface for AF_BLUETOOTH type sockets | ||||
| // using the L2CAP protocol. | ||||
| type SockaddrL2 struct { | ||||
| 	PSM      uint16 | ||||
| 	CID      uint16 | ||||
| 	Addr     [6]uint8 | ||||
| 	AddrType uint8 | ||||
| 	raw      RawSockaddrL2 | ||||
| } | ||||
|  | ||||
| func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	sa.raw.Family = AF_BLUETOOTH | ||||
| 	psm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm)) | ||||
| 	psm[0] = byte(sa.PSM) | ||||
| 	psm[1] = byte(sa.PSM >> 8) | ||||
| 	for i := 0; i < len(sa.Addr); i++ { | ||||
| 		sa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i] | ||||
| 	} | ||||
| 	cid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid)) | ||||
| 	cid[0] = byte(sa.CID) | ||||
| 	cid[1] = byte(sa.CID >> 8) | ||||
| 	sa.raw.Bdaddr_type = sa.AddrType | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil | ||||
| } | ||||
|  | ||||
| // SockaddrRFCOMM implements the Sockaddr interface for AF_BLUETOOTH type sockets | ||||
| // using the RFCOMM protocol. | ||||
| // | ||||
| // Server example: | ||||
| // | ||||
| //      fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) | ||||
| //      _ = unix.Bind(fd, &unix.SockaddrRFCOMM{ | ||||
| //      	Channel: 1, | ||||
| //      	Addr:    [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00 | ||||
| //      }) | ||||
| //      _ = Listen(fd, 1) | ||||
| //      nfd, sa, _ := Accept(fd) | ||||
| //      fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd) | ||||
| //      Read(nfd, buf) | ||||
| // | ||||
| // Client example: | ||||
| // | ||||
| //      fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) | ||||
| //      _ = Connect(fd, &SockaddrRFCOMM{ | ||||
| //      	Channel: 1, | ||||
| //      	Addr:    [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11 | ||||
| //      }) | ||||
| //      Write(fd, []byte(`hello`)) | ||||
| type SockaddrRFCOMM struct { | ||||
| 	// Addr represents a bluetooth address, byte ordering is little-endian. | ||||
| 	Addr [6]uint8 | ||||
|  | ||||
| 	// Channel is a designated bluetooth channel, only 1-30 are available for use. | ||||
| 	// Since Linux 2.6.7 and further zero value is the first available channel. | ||||
| 	Channel uint8 | ||||
|  | ||||
| 	raw RawSockaddrRFCOMM | ||||
| } | ||||
|  | ||||
| func (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	sa.raw.Family = AF_BLUETOOTH | ||||
| 	sa.raw.Channel = sa.Channel | ||||
| 	sa.raw.Bdaddr = sa.Addr | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrRFCOMM, 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 | ||||
| @@ -630,7 +692,7 @@ func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) { | ||||
| 	return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil | ||||
| } | ||||
|  | ||||
| func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| 	switch rsa.Addr.Family { | ||||
| 	case AF_NETLINK: | ||||
| 		pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa)) | ||||
| @@ -707,6 +769,30 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| 			Port: pp.Port, | ||||
| 		} | ||||
| 		return sa, nil | ||||
| 	case AF_BLUETOOTH: | ||||
| 		proto, err := GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		// only BTPROTO_L2CAP and BTPROTO_RFCOMM can accept connections | ||||
| 		switch proto { | ||||
| 		case BTPROTO_L2CAP: | ||||
| 			pp := (*RawSockaddrL2)(unsafe.Pointer(rsa)) | ||||
| 			sa := &SockaddrL2{ | ||||
| 				PSM:      pp.Psm, | ||||
| 				CID:      pp.Cid, | ||||
| 				Addr:     pp.Bdaddr, | ||||
| 				AddrType: pp.Bdaddr_type, | ||||
| 			} | ||||
| 			return sa, nil | ||||
| 		case BTPROTO_RFCOMM: | ||||
| 			pp := (*RawSockaddrRFCOMM)(unsafe.Pointer(rsa)) | ||||
| 			sa := &SockaddrRFCOMM{ | ||||
| 				Channel: pp.Channel, | ||||
| 				Addr:    pp.Bdaddr, | ||||
| 			} | ||||
| 			return sa, nil | ||||
| 		} | ||||
| 	} | ||||
| 	return nil, EAFNOSUPPORT | ||||
| } | ||||
| @@ -718,7 +804,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { | ||||
| 	if err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	sa, err = anyToSockaddr(&rsa) | ||||
| 	sa, err = anyToSockaddr(fd, &rsa) | ||||
| 	if err != nil { | ||||
| 		Close(nfd) | ||||
| 		nfd = 0 | ||||
| @@ -736,7 +822,7 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { | ||||
| 	if len > SizeofSockaddrAny { | ||||
| 		panic("RawSockaddrAny too small") | ||||
| 	} | ||||
| 	sa, err = anyToSockaddr(&rsa) | ||||
| 	sa, err = anyToSockaddr(fd, &rsa) | ||||
| 	if err != nil { | ||||
| 		Close(nfd) | ||||
| 		nfd = 0 | ||||
| @@ -750,20 +836,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) { | ||||
| 	if err = getsockname(fd, &rsa, &len); err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	return anyToSockaddr(&rsa) | ||||
| } | ||||
|  | ||||
| func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { | ||||
| 	vallen := _Socklen(4) | ||||
| 	err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) | ||||
| 	return value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { | ||||
| 	var value IPMreq | ||||
| 	vallen := _Socklen(SizeofIPMreq) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| 	return anyToSockaddr(fd, &rsa) | ||||
| } | ||||
|  | ||||
| func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { | ||||
| @@ -773,27 +846,6 @@ func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { | ||||
| 	var value IPv6Mreq | ||||
| 	vallen := _Socklen(SizeofIPv6Mreq) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { | ||||
| 	var value IPv6MTUInfo | ||||
| 	vallen := _Socklen(SizeofIPv6MTUInfo) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { | ||||
| 	var value ICMPv6Filter | ||||
| 	vallen := _Socklen(SizeofICMPv6Filter) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptUcred(fd, level, opt int) (*Ucred, error) { | ||||
| 	var value Ucred | ||||
| 	vallen := _Socklen(SizeofUcred) | ||||
| @@ -808,6 +860,24 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| // GetsockoptString returns the string value of the socket option opt for the | ||||
| // socket associated with fd at the given socket level. | ||||
| func GetsockoptString(fd, level, opt int) (string, error) { | ||||
| 	buf := make([]byte, 256) | ||||
| 	vallen := _Socklen(len(buf)) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) | ||||
| 	if err != nil { | ||||
| 		if err == ERANGE { | ||||
| 			buf = make([]byte, vallen) | ||||
| 			err = getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) | ||||
| 		} | ||||
| 		if err != nil { | ||||
| 			return "", err | ||||
| 		} | ||||
| 	} | ||||
| 	return string(buf[:vallen-1]), nil | ||||
| } | ||||
|  | ||||
| func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { | ||||
| 	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) | ||||
| } | ||||
| @@ -926,22 +996,24 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from | ||||
| 	msg.Namelen = uint32(SizeofSockaddrAny) | ||||
| 	var iov Iovec | ||||
| 	if len(p) > 0 { | ||||
| 		iov.Base = (*byte)(unsafe.Pointer(&p[0])) | ||||
| 		iov.Base = &p[0] | ||||
| 		iov.SetLen(len(p)) | ||||
| 	} | ||||
| 	var dummy byte | ||||
| 	if len(oob) > 0 { | ||||
| 		if len(p) == 0 { | ||||
| 			var sockType int | ||||
| 			sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) | ||||
| 			if err != nil { | ||||
| 				return | ||||
| 			} | ||||
| 			// receive at least one normal byte | ||||
| 		if sockType != SOCK_DGRAM && len(p) == 0 { | ||||
| 			if sockType != SOCK_DGRAM { | ||||
| 				iov.Base = &dummy | ||||
| 				iov.SetLen(1) | ||||
| 			} | ||||
| 		msg.Control = (*byte)(unsafe.Pointer(&oob[0])) | ||||
| 		} | ||||
| 		msg.Control = &oob[0] | ||||
| 		msg.SetControllen(len(oob)) | ||||
| 	} | ||||
| 	msg.Iov = &iov | ||||
| @@ -953,7 +1025,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from | ||||
| 	recvflags = int(msg.Flags) | ||||
| 	// source address is only specified if the socket is unconnected | ||||
| 	if rsa.Addr.Family != AF_UNSPEC { | ||||
| 		from, err = anyToSockaddr(&rsa) | ||||
| 		from, err = anyToSockaddr(fd, &rsa) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| @@ -974,26 +1046,28 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) | ||||
| 		} | ||||
| 	} | ||||
| 	var msg Msghdr | ||||
| 	msg.Name = (*byte)(unsafe.Pointer(ptr)) | ||||
| 	msg.Name = (*byte)(ptr) | ||||
| 	msg.Namelen = uint32(salen) | ||||
| 	var iov Iovec | ||||
| 	if len(p) > 0 { | ||||
| 		iov.Base = (*byte)(unsafe.Pointer(&p[0])) | ||||
| 		iov.Base = &p[0] | ||||
| 		iov.SetLen(len(p)) | ||||
| 	} | ||||
| 	var dummy byte | ||||
| 	if len(oob) > 0 { | ||||
| 		if len(p) == 0 { | ||||
| 			var sockType int | ||||
| 			sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) | ||||
| 			if err != nil { | ||||
| 				return 0, err | ||||
| 			} | ||||
| 			// send at least one normal byte | ||||
| 		if sockType != SOCK_DGRAM && len(p) == 0 { | ||||
| 			if sockType != SOCK_DGRAM { | ||||
| 				iov.Base = &dummy | ||||
| 				iov.SetLen(1) | ||||
| 			} | ||||
| 		msg.Control = (*byte)(unsafe.Pointer(&oob[0])) | ||||
| 		} | ||||
| 		msg.Control = &oob[0] | ||||
| 		msg.SetControllen(len(oob)) | ||||
| 	} | ||||
| 	msg.Iov = &iov | ||||
| @@ -1125,6 +1199,10 @@ func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) { | ||||
| 	return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data) | ||||
| } | ||||
|  | ||||
| func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) { | ||||
| 	return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data) | ||||
| } | ||||
|  | ||||
| func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { | ||||
| 	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) | ||||
| } | ||||
| @@ -1168,22 +1246,6 @@ func ReadDirent(fd int, buf []byte) (n int, err error) { | ||||
| 	return Getdents(fd, buf) | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	reclen, ok := direntReclen(buf) | ||||
| 	if !ok { | ||||
| 		return 0, false | ||||
| 	} | ||||
| 	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true | ||||
| } | ||||
|  | ||||
| //sys	mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) | ||||
|  | ||||
| func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { | ||||
| @@ -1216,12 +1278,10 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri | ||||
| //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) | ||||
| @@ -1259,9 +1319,11 @@ func Getpgrp() (pid int) { | ||||
| //sys	Mkdirat(dirfd int, path string, mode uint32) (err error) | ||||
| //sys	Mknodat(dirfd int, path string, mode uint32, dev int) (err error) | ||||
| //sys	Nanosleep(time *Timespec, leftover *Timespec) (err error) | ||||
| //sys	PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) | ||||
| //sys	PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT | ||||
| //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	Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6 | ||||
| //sys	read(fd int, p []byte) (n int, err error) | ||||
| //sys	Removexattr(path string, attr string) (err error) | ||||
| //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) | ||||
| @@ -1288,6 +1350,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	Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) | ||||
| //sys	Sync() | ||||
| //sys	Syncfs(fd int) (err error) | ||||
| //sysnb	Sysinfo(info *Sysinfo_t) (err error) | ||||
| @@ -1298,7 +1361,6 @@ func Setgid(uid int) (err error) { | ||||
| //sysnb	Uname(buf *Utsname) (err error) | ||||
| //sys	Unmount(target string, flags int) (err error) = SYS_UMOUNT2 | ||||
| //sys	Unshare(flags int) (err error) | ||||
| //sys	Ustat(dev int, ubuf *Ustat_t) (err error) | ||||
| //sys	write(fd int, p []byte) (n int, err error) | ||||
| //sys	exitThread(code int) (err error) = SYS_EXIT | ||||
| //sys	readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ | ||||
| @@ -1348,6 +1410,17 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { | ||||
| 	return int(n), nil | ||||
| } | ||||
|  | ||||
| //sys	faccessat(dirfd int, path string, mode uint32) (err error) | ||||
|  | ||||
| func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { | ||||
| 	if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 { | ||||
| 		return EINVAL | ||||
| 	} else if flags&(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 { | ||||
| 		return EOPNOTSUPP | ||||
| 	} | ||||
| 	return faccessat(dirfd, path, mode) | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Unimplemented | ||||
|  */ | ||||
| @@ -1405,7 +1478,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { | ||||
| // Msgget | ||||
| // Msgrcv | ||||
| // Msgsnd | ||||
| // Newfstatat | ||||
| // Nfsservctl | ||||
| // Personality | ||||
| // Pselect6 | ||||
| @@ -1426,11 +1498,9 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { | ||||
| // RtSigtimedwait | ||||
| // SchedGetPriorityMax | ||||
| // SchedGetPriorityMin | ||||
| // SchedGetaffinity | ||||
| // SchedGetparam | ||||
| // SchedGetscheduler | ||||
| // SchedRrGetInterval | ||||
| // SchedSetaffinity | ||||
| // SchedSetparam | ||||
| // SchedYield | ||||
| // Security | ||||
|   | ||||
							
								
								
									
										32
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -10,23 +10,15 @@ | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	"syscall" | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: int32(sec), Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = int32(nsec / 1e9) | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: int32(sec), Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| //sysnb	pipe(p *[2]_C_int) (err error) | ||||
| @@ -58,9 +50,12 @@ func Pipe2(p []int, flags int) (err error) { | ||||
| // 64-bit file system and 32-bit uid calls | ||||
| // (386 default is 32-bit file system and 16-bit uid). | ||||
| //sys	Dup2(oldfd int, newfd int) (err error) | ||||
| //sysnb	EpollCreate(size int) (fd 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_64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 | ||||
| //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 | ||||
| //sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 | ||||
| //sysnb	Getegid() (egid int) = SYS_GETEGID32 | ||||
| //sysnb	Geteuid() (euid int) = SYS_GETEUID32 | ||||
| @@ -84,12 +79,12 @@ func Pipe2(p []int, flags int) (err error) { | ||||
| //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 | ||||
| //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error) | ||||
| //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 | ||||
| //sys	Ustat(dev int, ubuf *Ustat_t) (err error) | ||||
| //sysnb	getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32 | ||||
| //sysnb	setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32 | ||||
| //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT | ||||
|  | ||||
| //sys	mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Pause() (err error) | ||||
|  | ||||
| func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { | ||||
| @@ -163,10 +158,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) { | ||||
| 	return setrlimit(resource, &rl) | ||||
| } | ||||
|  | ||||
| // Underlying system call writes to newoffset via pointer. | ||||
| // Implemented in assembly to avoid allocation. | ||||
| func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) | ||||
|  | ||||
| func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { | ||||
| 	newoffset, errno := seek(fd, offset, whence) | ||||
| 	if errno != 0 { | ||||
| @@ -175,11 +166,11 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { | ||||
| 	return newoffset, nil | ||||
| } | ||||
|  | ||||
| // Vsyscalls on amd64. | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
| //sysnb	Time(t *Time_t) (tt Time_t, err error) | ||||
|  | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (err error) | ||||
|  | ||||
| // On x86 Linux, all the socket calls go through an extra indirection, | ||||
| // I think because the 5-register system call interface can't handle | ||||
| @@ -212,9 +203,6 @@ const ( | ||||
| 	_SENDMMSG    = 20 | ||||
| ) | ||||
|  | ||||
| func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) | ||||
| func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) | ||||
|  | ||||
| func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { | ||||
| 	fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) | ||||
| 	if e != 0 { | ||||
|   | ||||
							
								
								
									
										38
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -7,10 +7,12 @@ | ||||
| package unix | ||||
|  | ||||
| //sys	Dup2(oldfd int, newfd int) (err error) | ||||
| //sysnb	EpollCreate(size int) (fd int, err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) | ||||
| //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT | ||||
| //sys	Fstatfs(fd int, buf *Statfs_t) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -28,7 +30,15 @@ package unix | ||||
| //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) | ||||
|  | ||||
| func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { | ||||
| 	var ts *Timespec | ||||
| 	if timeout != nil { | ||||
| 		ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} | ||||
| 	} | ||||
| 	return Pselect(nfd, r, w, e, ts, nil) | ||||
| } | ||||
|  | ||||
| //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) | ||||
| @@ -39,10 +49,16 @@ package unix | ||||
| //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) | ||||
|  | ||||
| func Stat(path string, stat *Stat_t) (err error) { | ||||
| 	// Use fstatat, because Android's seccomp policy blocks stat. | ||||
| 	return Fstatat(AT_FDCWD, path, stat, 0) | ||||
| } | ||||
|  | ||||
| //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	Ustat(dev int, ubuf *Ustat_t) (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) | ||||
| @@ -61,6 +77,8 @@ package unix | ||||
| //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) | ||||
|  | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
|  | ||||
| func Gettimeofday(tv *Timeval) (err error) { | ||||
| 	errno := gettimeofday(tv) | ||||
| 	if errno != 0 { | ||||
| @@ -82,20 +100,14 @@ func Time(t *Time_t) (tt Time_t, err error) { | ||||
| } | ||||
|  | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| //sysnb	pipe(p *[2]_C_int) (err error) | ||||
|   | ||||
							
								
								
									
										26
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,19 +11,12 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: int32(sec), Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = int32(nsec / 1e9) | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: int32(sec), Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func Pipe(p []int) (err error) { | ||||
| @@ -82,8 +75,11 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { | ||||
| // 64-bit file system and 32-bit uid calls | ||||
| // (16-bit uid calls are not always supported in newer kernels) | ||||
| //sys	Dup2(oldfd int, newfd int) (err error) | ||||
| //sysnb	EpollCreate(size int) (fd 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_FCHOWN32 | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 | ||||
| //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 | ||||
| //sysnb	Getegid() (egid int) = SYS_GETEGID32 | ||||
| //sysnb	Geteuid() (euid int) = SYS_GETEUID32 | ||||
| //sysnb	Getgid() (gid int) = SYS_GETGID32 | ||||
| @@ -92,6 +88,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { | ||||
| //sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 | ||||
| //sys	Listen(s int, n int) (err error) | ||||
| //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 | ||||
| //sys	Pause() (err error) | ||||
| //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 | ||||
| //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT | ||||
| //sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32 | ||||
| @@ -103,11 +100,10 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, 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 int, err error) | ||||
| //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 | ||||
| //sys	Ustat(dev int, ubuf *Ustat_t) (err error) | ||||
|  | ||||
| // Vsyscalls on amd64. | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Pause() (err error) | ||||
|  | ||||
| func Time(t *Time_t) (Time_t, error) { | ||||
| 	var tv Timeval | ||||
| @@ -129,6 +125,8 @@ func Utime(path string, buf *Utimbuf) error { | ||||
| 	return Utimes(path, tv) | ||||
| } | ||||
|  | ||||
| //sys	utimes(path string, times *[2]Timeval) (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	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 | ||||
|   | ||||
							
								
								
									
										80
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										80
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,7 +6,17 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import "unsafe" | ||||
|  | ||||
| func EpollCreate(size int) (fd int, err error) { | ||||
| 	if size <= 0 { | ||||
| 		return -1, EINVAL | ||||
| 	} | ||||
| 	return EpollCreate1(0) | ||||
| } | ||||
|  | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) | ||||
| //sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) | ||||
| @@ -21,7 +31,15 @@ package unix | ||||
| //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_PSELECT6 | ||||
|  | ||||
| func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { | ||||
| 	var ts *Timespec | ||||
| 	if timeout != nil { | ||||
| 		ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} | ||||
| 	} | ||||
| 	return Pselect(nfd, r, w, e, ts, nil) | ||||
| } | ||||
|  | ||||
| //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) | ||||
| @@ -48,6 +66,11 @@ func Lstat(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) | ||||
|  | ||||
| func Ustat(dev int, ubuf *Ustat_t) (err error) { | ||||
| 	return ENOSYS | ||||
| } | ||||
|  | ||||
| //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) | ||||
| @@ -68,19 +91,24 @@ func Lstat(path string, stat *Stat_t) (err error) { | ||||
|  | ||||
| //sysnb	Gettimeofday(tv *Timeval) (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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { | ||||
| 	if tv == nil { | ||||
| 		return utimensat(dirfd, path, nil, 0) | ||||
| 	} | ||||
|  | ||||
| 	ts := []Timespec{ | ||||
| 		NsecToTimespec(TimevalToNsec(tv[0])), | ||||
| 		NsecToTimespec(TimevalToNsec(tv[1])), | ||||
| 	} | ||||
| 	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) | ||||
| } | ||||
|  | ||||
| func Time(t *Time_t) (Time_t, error) { | ||||
| @@ -103,6 +131,18 @@ func Utime(path string, buf *Utimbuf) error { | ||||
| 	return Utimes(path, tv) | ||||
| } | ||||
|  | ||||
| func utimes(path string, tv *[2]Timeval) (err error) { | ||||
| 	if tv == nil { | ||||
| 		return utimensat(AT_FDCWD, path, nil, 0) | ||||
| 	} | ||||
|  | ||||
| 	ts := []Timespec{ | ||||
| 		NsecToTimespec(TimevalToNsec(tv[0])), | ||||
| 		NsecToTimespec(TimevalToNsec(tv[1])), | ||||
| 	} | ||||
| 	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) | ||||
| } | ||||
|  | ||||
| func Pipe(p []int) (err error) { | ||||
| 	if len(p) != 2 { | ||||
| 		return EINVAL | ||||
| @@ -159,22 +199,6 @@ func Pause() (err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| // TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove | ||||
| // these when the deprecated syscalls that the syscall package relies on | ||||
| // are removed. | ||||
| const ( | ||||
| 	SYS_GETPGRP      = 1060 | ||||
| 	SYS_UTIMES       = 1037 | ||||
| 	SYS_FUTIMESAT    = 1066 | ||||
| 	SYS_PAUSE        = 1061 | ||||
| 	SYS_USTAT        = 1070 | ||||
| 	SYS_UTIME        = 1063 | ||||
| 	SYS_LCHOWN       = 1032 | ||||
| 	SYS_TIME         = 1062 | ||||
| 	SYS_EPOLL_CREATE = 1042 | ||||
| 	SYS_EPOLL_WAIT   = 1069 | ||||
| ) | ||||
|  | ||||
| func Poll(fds []PollFd, timeout int) (n int, err error) { | ||||
| 	var ts *Timespec | ||||
| 	if timeout >= 0 { | ||||
|   | ||||
							
								
								
									
										14
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gc.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gc.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build linux,!gccgo | ||||
|  | ||||
| package unix | ||||
|  | ||||
| // SyscallNoError may be used instead of Syscall for syscalls that don't fail. | ||||
| func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) | ||||
|  | ||||
| // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't | ||||
| // fail. | ||||
| func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) | ||||
							
								
								
									
										16
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build linux,!gccgo,386 | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import "syscall" | ||||
|  | ||||
| // Underlying system call writes to newoffset via pointer. | ||||
| // Implemented in assembly to avoid allocation. | ||||
| func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) | ||||
|  | ||||
| func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) | ||||
| func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) | ||||
							
								
								
									
										30
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build linux,gccgo,386 | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	"syscall" | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { | ||||
| 	var newoffset int64 | ||||
| 	offsetLow := uint32(offset & 0xffffffff) | ||||
| 	offsetHigh := uint32((offset >> 32) & 0xffffffff) | ||||
| 	_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) | ||||
| 	return newoffset, err | ||||
| } | ||||
|  | ||||
| func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { | ||||
| 	fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) | ||||
| 	return int(fd), err | ||||
| } | ||||
|  | ||||
| func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { | ||||
| 	fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) | ||||
| 	return int(fd), err | ||||
| } | ||||
							
								
								
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| // Copyright 2018 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| // +build linux,gccgo,arm | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	"syscall" | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { | ||||
| 	var newoffset int64 | ||||
| 	offsetLow := uint32(offset & 0xffffffff) | ||||
| 	offsetHigh := uint32((offset >> 32) & 0xffffffff) | ||||
| 	_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) | ||||
| 	return newoffset, err | ||||
| } | ||||
							
								
								
									
										31
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -8,8 +8,11 @@ | ||||
| package unix | ||||
|  | ||||
| //sys	Dup2(oldfd int, newfd int) (err error) | ||||
| //sysnb	EpollCreate(size int) (fd int, err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) | ||||
| //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT | ||||
| //sys	Fstatfs(fd int, buf *Statfs_t) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -23,7 +26,15 @@ package unix | ||||
| //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_PSELECT6 | ||||
|  | ||||
| func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { | ||||
| 	var ts *Timespec | ||||
| 	if timeout != nil { | ||||
| 		ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} | ||||
| 	} | ||||
| 	return Pselect(nfd, r, w, e, ts, nil) | ||||
| } | ||||
|  | ||||
| //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) | ||||
| @@ -37,6 +48,7 @@ package unix | ||||
| //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	Ustat(dev int, ubuf *Ustat_t) (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) | ||||
| @@ -55,6 +67,7 @@ package unix | ||||
| //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) | ||||
|  | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
|  | ||||
| func Time(t *Time_t) (tt Time_t, err error) { | ||||
| @@ -70,20 +83,14 @@ func Time(t *Time_t) (tt Time_t, err error) { | ||||
| } | ||||
|  | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func Pipe(p []int) (err error) { | ||||
|   | ||||
							
								
								
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -15,6 +15,9 @@ import ( | ||||
| 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) | ||||
| //sysnb	EpollCreate(size int) (fd int, err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -32,13 +35,12 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, | ||||
| //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	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, 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	Ustat(dev int, ubuf *Ustat_t) (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) | ||||
| @@ -60,15 +62,17 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, | ||||
| //sys	Ioperm(from int, num int, on int) (err error) | ||||
| //sys	Iopl(level int) (err error) | ||||
|  | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
| //sysnb	Time(t *Time_t) (tt Time_t, err error) | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (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	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 | ||||
| //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) { | ||||
| @@ -99,19 +103,12 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) { | ||||
| 	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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: int32(sec), Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = int32(nsec / 1e9) | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: int32(sec), Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| //sysnb pipe2(p *[2]_C_int, flags int) (err error) | ||||
|   | ||||
							
								
								
									
										24
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -7,10 +7,13 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Dup2(oldfd int, newfd int) (err error) | ||||
| //sysnb	EpollCreate(size int) (fd int, err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) | ||||
| //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT | ||||
| //sys	Fstatfs(fd int, buf *Statfs_t) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -43,6 +46,7 @@ package unix | ||||
| //sys	Statfs(path string, buf *Statfs_t) (err error) | ||||
| //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2 | ||||
| //sys	Truncate(path string, length int64) (err error) | ||||
| //sys	Ustat(dev int, ubuf *Ustat_t) (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) | ||||
| @@ -61,24 +65,18 @@ package unix | ||||
| //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) | ||||
|  | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
| //sysnb	Time(t *Time_t) (tt Time_t, err error) | ||||
|  | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func (r *PtraceRegs) PC() uint64 { return r.Nip } | ||||
|   | ||||
							
								
								
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,10 +11,12 @@ import ( | ||||
| ) | ||||
|  | ||||
| //sys	Dup2(oldfd int, newfd int) (err error) | ||||
| //sysnb	EpollCreate(size int) (fd int, err error) | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	Fchown(fd int, uid int, gid int) (err error) | ||||
| //sys	Fstat(fd int, stat *Stat_t) (err error) | ||||
| //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT | ||||
| //sys	Fstatfs(fd int, buf *Statfs_t) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -43,9 +45,11 @@ import ( | ||||
| //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	Ustat(dev int, ubuf *Ustat_t) (err error) | ||||
| //sysnb	getgroups(n int, list *_Gid_t) (nn int, err error) | ||||
| //sysnb	setgroups(n int, list *_Gid_t) (err error) | ||||
|  | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
|  | ||||
| func Time(t *Time_t) (tt Time_t, err error) { | ||||
| @@ -61,20 +65,14 @@ func Time(t *Time_t) (tt Time_t, err error) { | ||||
| } | ||||
|  | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| //sysnb pipe2(p *[2]_C_int, flags int) (err error) | ||||
|   | ||||
							
								
								
									
										19
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -7,9 +7,11 @@ | ||||
| package unix | ||||
|  | ||||
| //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||||
| //sys	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	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 | ||||
| //sys	Fstatfs(fd int, buf *Statfs_t) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -66,6 +68,7 @@ func Iopl(level int) (err error) { | ||||
| 	return ENOSYS | ||||
| } | ||||
|  | ||||
| //sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
|  | ||||
| func Time(t *Time_t) (tt Time_t, err error) { | ||||
| @@ -81,20 +84,14 @@ func Time(t *Time_t) (tt Time_t, err error) { | ||||
| } | ||||
|  | ||||
| //sys	Utime(path string, buf *Utimbuf) (err error) | ||||
| //sys	utimes(path string, times *[2]Timeval) (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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func (r *PtraceRegs) PC() uint64 { return r.Tpc } | ||||
|   | ||||
							
								
								
									
										128
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										128
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -17,6 +17,7 @@ import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. | ||||
| type SockaddrDatalink struct { | ||||
| 	Len    uint8 | ||||
| 	Family uint8 | ||||
| @@ -55,7 +56,6 @@ func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) { | ||||
| } | ||||
|  | ||||
| func nametomib(name string) (mib []_C_int, err error) { | ||||
|  | ||||
| 	// Split name into components. | ||||
| 	var parts []string | ||||
| 	last := 0 | ||||
| @@ -93,18 +93,6 @@ func nametomib(name string) (mib []_C_int, err error) { | ||||
| 	return mib, nil | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) | ||||
| } | ||||
|  | ||||
| //sysnb pipe() (fd1 int, fd2 int, err error) | ||||
| func Pipe(p []int) (err error) { | ||||
| 	if len(p) != 2 { | ||||
| @@ -119,11 +107,118 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { | ||||
| 	return getdents(fd, buf) | ||||
| } | ||||
|  | ||||
| const ImplementsGetwd = true | ||||
|  | ||||
| //sys	Getcwd(buf []byte) (n int, err error) = SYS___GETCWD | ||||
|  | ||||
| func Getwd() (string, error) { | ||||
| 	var buf [PathMax]byte | ||||
| 	_, err := Getcwd(buf[0:]) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	n := clen(buf[:]) | ||||
| 	if n < 1 { | ||||
| 		return "", EINVAL | ||||
| 	} | ||||
| 	return string(buf[:n]), nil | ||||
| } | ||||
|  | ||||
| // TODO | ||||
| func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | ||||
| 	return -1, ENOSYS | ||||
| } | ||||
|  | ||||
| func setattrlistTimes(path string, times []Timespec, flags int) error { | ||||
| 	// used on Darwin for UtimesNano | ||||
| 	return ENOSYS | ||||
| } | ||||
|  | ||||
| //sys	ioctl(fd int, req uint, arg uintptr) (err error) | ||||
|  | ||||
| // ioctl itself should not be exposed directly, but additional get/set | ||||
| // functions for specific types are permissible. | ||||
|  | ||||
| // IoctlSetInt performs an ioctl operation which sets an integer value | ||||
| // on fd, using the specified request number. | ||||
| func IoctlSetInt(fd int, req uint, value int) error { | ||||
| 	return ioctl(fd, req, uintptr(value)) | ||||
| } | ||||
|  | ||||
| func IoctlSetWinsize(fd int, req uint, value *Winsize) error { | ||||
| 	return ioctl(fd, req, uintptr(unsafe.Pointer(value))) | ||||
| } | ||||
|  | ||||
| func IoctlSetTermios(fd int, req uint, value *Termios) error { | ||||
| 	return ioctl(fd, req, uintptr(unsafe.Pointer(value))) | ||||
| } | ||||
|  | ||||
| // IoctlGetInt performs an ioctl operation which gets an integer value | ||||
| // from fd, using the specified request number. | ||||
| func IoctlGetInt(fd int, req uint) (int, error) { | ||||
| 	var value int | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return value, err | ||||
| } | ||||
|  | ||||
| func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { | ||||
| 	var value Winsize | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| 	var value Termios | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func Uname(uname *Utsname) error { | ||||
| 	mib := []_C_int{CTL_KERN, KERN_OSTYPE} | ||||
| 	n := unsafe.Sizeof(uname.Sysname) | ||||
| 	if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_HOSTNAME} | ||||
| 	n = unsafe.Sizeof(uname.Nodename) | ||||
| 	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_OSRELEASE} | ||||
| 	n = unsafe.Sizeof(uname.Release) | ||||
| 	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_VERSION} | ||||
| 	n = unsafe.Sizeof(uname.Version) | ||||
| 	if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	// The version might have newlines or tabs in it, convert them to | ||||
| 	// spaces. | ||||
| 	for i, b := range uname.Version { | ||||
| 		if b == '\n' || b == '\t' { | ||||
| 			if i == len(uname.Version)-1 { | ||||
| 				uname.Version[i] = 0 | ||||
| 			} else { | ||||
| 				uname.Version[i] = ' ' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_HW, HW_MACHINE} | ||||
| 	n = unsafe.Sizeof(uname.Machine) | ||||
| 	if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Exposed directly | ||||
|  */ | ||||
| @@ -138,13 +233,17 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e | ||||
| //sys	Dup(fd int) (nfd int, err error) | ||||
| //sys	Dup2(from int, to int) (err error) | ||||
| //sys	Exit(code int) | ||||
| //sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error) | ||||
| //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE | ||||
| //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	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	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) | ||||
| //sys	Fsync(fd int) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| //sysnb	Getegid() (egid int) | ||||
| @@ -225,7 +324,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e | ||||
| // __msync13 | ||||
| // __ntp_gettime30 | ||||
| // __posix_chown | ||||
| // __posix_fadvise50 | ||||
| // __posix_fchown | ||||
| // __posix_lchown | ||||
| // __posix_rename | ||||
| @@ -384,7 +482,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e | ||||
| // getitimer | ||||
| // getvfsstat | ||||
| // getxattr | ||||
| // ioctl | ||||
| // ktrace | ||||
| // lchflags | ||||
| // lchmod | ||||
| @@ -422,7 +519,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e | ||||
| // ntp_adjtime | ||||
| // pmc_control | ||||
| // pmc_get_info | ||||
| // poll | ||||
| // pollts | ||||
| // preadv | ||||
| // profil | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| func NsecToTimespec(nsec int64) (ts Timespec) { | ||||
| 	ts.Sec = int64(nsec / 1e9) | ||||
| 	ts.Nsec = int32(nsec % 1e9) | ||||
| 	return | ||||
| func setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| func NsecToTimespec(nsec int64) (ts Timespec) { | ||||
| 	ts.Sec = int64(nsec / 1e9) | ||||
| 	ts.Nsec = int64(nsec % 1e9) | ||||
| 	return | ||||
| func setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| func NsecToTimespec(nsec int64) (ts Timespec) { | ||||
| 	ts.Sec = int64(nsec / 1e9) | ||||
| 	ts.Nsec = int32(nsec % 1e9) | ||||
| 	return | ||||
| func setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										11
									
								
								vendor/golang.org/x/sys/unix/syscall_no_getwd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/golang.org/x/sys/unix/syscall_no_getwd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,11 +0,0 @@ | ||||
| // Copyright 2013 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 dragonfly freebsd netbsd openbsd | ||||
|  | ||||
| package unix | ||||
|  | ||||
| const ImplementsGetwd = false | ||||
|  | ||||
| func Getwd() (string, error) { return "", ENOTSUP } | ||||
							
								
								
									
										152
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										152
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -13,10 +13,12 @@ | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	"sort" | ||||
| 	"syscall" | ||||
| 	"unsafe" | ||||
| ) | ||||
|  | ||||
| // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. | ||||
| type SockaddrDatalink struct { | ||||
| 	Len    uint8 | ||||
| 	Family uint8 | ||||
| @@ -32,39 +34,15 @@ type SockaddrDatalink struct { | ||||
| func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) | ||||
|  | ||||
| func nametomib(name string) (mib []_C_int, err error) { | ||||
|  | ||||
| 	// Perform lookup via a binary search | ||||
| 	left := 0 | ||||
| 	right := len(sysctlMib) - 1 | ||||
| 	for { | ||||
| 		idx := left + (right-left)/2 | ||||
| 		switch { | ||||
| 		case name == sysctlMib[idx].ctlname: | ||||
| 			return sysctlMib[idx].ctloid, nil | ||||
| 		case name > sysctlMib[idx].ctlname: | ||||
| 			left = idx + 1 | ||||
| 		default: | ||||
| 			right = idx - 1 | ||||
| 		} | ||||
| 		if left > right { | ||||
| 			break | ||||
| 		} | ||||
| 	i := sort.Search(len(sysctlMib), func(i int) bool { | ||||
| 		return sysctlMib[i].ctlname >= name | ||||
| 	}) | ||||
| 	if i < len(sysctlMib) && sysctlMib[i].ctlname == name { | ||||
| 		return sysctlMib[i].ctloid, nil | ||||
| 	} | ||||
| 	return nil, EINVAL | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) | ||||
| } | ||||
|  | ||||
| //sysnb pipe(p *[2]_C_int) (err error) | ||||
| func Pipe(p []int) (err error) { | ||||
| 	if len(p) != 2 { | ||||
| @@ -82,6 +60,23 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { | ||||
| 	return getdents(fd, buf) | ||||
| } | ||||
|  | ||||
| const ImplementsGetwd = true | ||||
|  | ||||
| //sys	Getcwd(buf []byte) (n int, err error) = SYS___GETCWD | ||||
|  | ||||
| func Getwd() (string, error) { | ||||
| 	var buf [PathMax]byte | ||||
| 	_, err := Getcwd(buf[0:]) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	n := clen(buf[:]) | ||||
| 	if n < 1 { | ||||
| 		return "", EINVAL | ||||
| 	} | ||||
| 	return string(buf[:n]), nil | ||||
| } | ||||
|  | ||||
| // TODO | ||||
| func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | ||||
| 	return -1, ENOSYS | ||||
| @@ -102,6 +97,96 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| 	return | ||||
| } | ||||
|  | ||||
| func setattrlistTimes(path string, times []Timespec, flags int) error { | ||||
| 	// used on Darwin for UtimesNano | ||||
| 	return ENOSYS | ||||
| } | ||||
|  | ||||
| //sys	ioctl(fd int, req uint, arg uintptr) (err error) | ||||
|  | ||||
| // ioctl itself should not be exposed directly, but additional get/set | ||||
| // functions for specific types are permissible. | ||||
|  | ||||
| // IoctlSetInt performs an ioctl operation which sets an integer value | ||||
| // on fd, using the specified request number. | ||||
| func IoctlSetInt(fd int, req uint, value int) error { | ||||
| 	return ioctl(fd, req, uintptr(value)) | ||||
| } | ||||
|  | ||||
| func IoctlSetWinsize(fd int, req uint, value *Winsize) error { | ||||
| 	return ioctl(fd, req, uintptr(unsafe.Pointer(value))) | ||||
| } | ||||
|  | ||||
| func IoctlSetTermios(fd int, req uint, value *Termios) error { | ||||
| 	return ioctl(fd, req, uintptr(unsafe.Pointer(value))) | ||||
| } | ||||
|  | ||||
| // IoctlGetInt performs an ioctl operation which gets an integer value | ||||
| // from fd, using the specified request number. | ||||
| func IoctlGetInt(fd int, req uint) (int, error) { | ||||
| 	var value int | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return value, err | ||||
| } | ||||
|  | ||||
| func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { | ||||
| 	var value Winsize | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func IoctlGetTermios(fd int, req uint) (*Termios, error) { | ||||
| 	var value Termios | ||||
| 	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func Uname(uname *Utsname) error { | ||||
| 	mib := []_C_int{CTL_KERN, KERN_OSTYPE} | ||||
| 	n := unsafe.Sizeof(uname.Sysname) | ||||
| 	if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_HOSTNAME} | ||||
| 	n = unsafe.Sizeof(uname.Nodename) | ||||
| 	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_OSRELEASE} | ||||
| 	n = unsafe.Sizeof(uname.Release) | ||||
| 	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_KERN, KERN_VERSION} | ||||
| 	n = unsafe.Sizeof(uname.Version) | ||||
| 	if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	// The version might have newlines or tabs in it, convert them to | ||||
| 	// spaces. | ||||
| 	for i, b := range uname.Version { | ||||
| 		if b == '\n' || b == '\t' { | ||||
| 			if i == len(uname.Version)-1 { | ||||
| 				uname.Version[i] = 0 | ||||
| 			} else { | ||||
| 				uname.Version[i] = ' ' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	mib = []_C_int{CTL_HW, HW_MACHINE} | ||||
| 	n = unsafe.Sizeof(uname.Machine) | ||||
| 	if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Exposed directly | ||||
|  */ | ||||
| @@ -116,13 +201,16 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| //sys	Dup(fd int) (nfd int, err error) | ||||
| //sys	Dup2(from int, to 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	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	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) | ||||
| //sys	Fstatfs(fd int, stat *Statfs_t) (err error) | ||||
| //sys	Fsync(fd int) (err error) | ||||
| //sys	Ftruncate(fd int, length int64) (err error) | ||||
| @@ -135,6 +223,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| //sysnb	Getppid() (ppid int) | ||||
| //sys	Getpriority(which int, who int) (prio int, err error) | ||||
| //sysnb	Getrlimit(which int, lim *Rlimit) (err error) | ||||
| //sysnb	Getrtable() (rtable int, err error) | ||||
| //sysnb	Getrusage(who int, rusage *Rusage) (err error) | ||||
| //sysnb	Getsid(pid int) (sid int, err error) | ||||
| //sysnb	Gettimeofday(tv *Timeval) (err error) | ||||
| @@ -172,6 +261,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n 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(which int, lim *Rlimit) (err error) | ||||
| //sysnb	Setrtable(rtable int) (err error) | ||||
| //sysnb	Setsid() (pid int, err error) | ||||
| //sysnb	Settimeofday(tp *Timeval) (err error) | ||||
| //sysnb	Setuid(uid int) (err error) | ||||
| @@ -220,9 +310,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| // getlogin | ||||
| // getresgid | ||||
| // getresuid | ||||
| // getrtable | ||||
| // getthrid | ||||
| // ioctl | ||||
| // ktrace | ||||
| // lfs_bmapv | ||||
| // lfs_markv | ||||
| @@ -243,7 +331,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| // nfssvc | ||||
| // nnpfspioctl | ||||
| // openat | ||||
| // poll | ||||
| // preadv | ||||
| // profil | ||||
| // pwritev | ||||
| @@ -258,7 +345,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { | ||||
| // semop | ||||
| // setgroups | ||||
| // setitimer | ||||
| // setrtable | ||||
| // setsockopt | ||||
| // shmat | ||||
| // shmctl | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| func NsecToTimespec(nsec int64) (ts Timespec) { | ||||
| 	ts.Sec = int64(nsec / 1e9) | ||||
| 	ts.Nsec = int32(nsec % 1e9) | ||||
| 	return | ||||
| func setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										19
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	tv.Sec = nsec / 1e9 | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
| @@ -38,3 +31,7 @@ func (msghdr *Msghdr) SetControllen(length int) { | ||||
| func (cmsg *Cmsghdr) SetLen(length int) { | ||||
| 	cmsg.Len = uint32(length) | ||||
| } | ||||
|  | ||||
| // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions | ||||
| // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. | ||||
| const SYS___SYSCTL = SYS_SYSCTL | ||||
|   | ||||
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| func NsecToTimespec(nsec int64) (ts Timespec) { | ||||
| 	ts.Sec = int64(nsec / 1e9) | ||||
| 	ts.Nsec = int32(nsec % 1e9) | ||||
| 	return | ||||
| func setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: int32(nsec)} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = int32(nsec % 1e9 / 1e3) | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: int32(usec)} | ||||
| } | ||||
|  | ||||
| func SetKevent(k *Kevent_t, fd, mode, flags int) { | ||||
|   | ||||
							
								
								
									
										69
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										69
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -23,6 +23,7 @@ type syscallFunc uintptr | ||||
| func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) | ||||
| func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) | ||||
|  | ||||
| // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. | ||||
| type SockaddrDatalink struct { | ||||
| 	Family uint16 | ||||
| 	Index  uint16 | ||||
| @@ -34,31 +35,6 @@ type SockaddrDatalink struct { | ||||
| 	raw    RawSockaddrDatalink | ||||
| } | ||||
|  | ||||
| func clen(n []byte) int { | ||||
| 	for i := 0; i < len(n); i++ { | ||||
| 		if n[i] == 0 { | ||||
| 			return i | ||||
| 		} | ||||
| 	} | ||||
| 	return len(n) | ||||
| } | ||||
|  | ||||
| func direntIno(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) | ||||
| } | ||||
|  | ||||
| func direntReclen(buf []byte) (uint64, bool) { | ||||
| 	return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) | ||||
| } | ||||
|  | ||||
| func direntNamlen(buf []byte) (uint64, bool) { | ||||
| 	reclen, ok := direntReclen(buf) | ||||
| 	if !ok { | ||||
| 		return 0, false | ||||
| 	} | ||||
| 	return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true | ||||
| } | ||||
|  | ||||
| //sysnb	pipe(p *[2]_C_int) (n int, err error) | ||||
|  | ||||
| func Pipe(p []int) (err error) { | ||||
| @@ -136,7 +112,19 @@ func Getsockname(fd int) (sa Sockaddr, err error) { | ||||
| 	if err = getsockname(fd, &rsa, &len); err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	return anyToSockaddr(&rsa) | ||||
| 	return anyToSockaddr(fd, &rsa) | ||||
| } | ||||
|  | ||||
| // GetsockoptString returns the string value of the socket option opt for the | ||||
| // socket associated with fd at the given socket level. | ||||
| func GetsockoptString(fd, level, opt int) (string, error) { | ||||
| 	buf := make([]byte, 256) | ||||
| 	vallen := _Socklen(len(buf)) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	return string(buf[:vallen-1]), nil | ||||
| } | ||||
|  | ||||
| const ImplementsGetwd = true | ||||
| @@ -324,6 +312,16 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { | ||||
|  | ||||
| //sys	fcntl(fd int, cmd int, arg int) (val int, err error) | ||||
|  | ||||
| // FcntlInt performs a fcntl syscall on fd with the provided command and argument. | ||||
| func FcntlInt(fd uintptr, cmd, arg int) (int, error) { | ||||
| 	valptr, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) | ||||
| 	var err error | ||||
| 	if errno != 0 { | ||||
| 		err = errno | ||||
| 	} | ||||
| 	return int(valptr), err | ||||
| } | ||||
|  | ||||
| // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. | ||||
| func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { | ||||
| 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0) | ||||
| @@ -362,7 +360,7 @@ func Futimes(fd int, tv []Timeval) error { | ||||
| 	return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) | ||||
| } | ||||
|  | ||||
| func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { | ||||
| 	switch rsa.Addr.Family { | ||||
| 	case AF_UNIX: | ||||
| 		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) | ||||
| @@ -413,7 +411,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { | ||||
| 	if nfd == -1 { | ||||
| 		return | ||||
| 	} | ||||
| 	sa, err = anyToSockaddr(&rsa) | ||||
| 	sa, err = anyToSockaddr(fd, &rsa) | ||||
| 	if err != nil { | ||||
| 		Close(nfd) | ||||
| 		nfd = 0 | ||||
| @@ -450,7 +448,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from | ||||
| 	oobn = int(msg.Accrightslen) | ||||
| 	// source address is only specified if the socket is unconnected | ||||
| 	if rsa.Addr.Family != AF_UNSPEC { | ||||
| 		from, err = anyToSockaddr(&rsa) | ||||
| 		from, err = anyToSockaddr(fd, &rsa) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| @@ -578,6 +576,15 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| //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) | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Exposed directly | ||||
|  */ | ||||
| @@ -592,6 +599,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { | ||||
| //sys	Dup(fd int) (nfd int, err error) | ||||
| //sys	Dup2(oldfd int, newfd 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	Fchmod(fd int, mode uint32) (err error) | ||||
| //sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) | ||||
| @@ -601,6 +609,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, 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	Fstatat(fd int, path string, stat *Stat_t, flags int) (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) | ||||
| @@ -646,6 +655,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { | ||||
| //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) | ||||
| //sys	Rmdir(path string) (err error) | ||||
| //sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek | ||||
| //sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) | ||||
| //sysnb	Setegid(egid int) (err error) | ||||
| //sysnb	Seteuid(euid int) (err error) | ||||
| //sysnb	Setgid(gid int) (err error) | ||||
| @@ -677,6 +687,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { | ||||
| //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	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = libsendfile.sendfile | ||||
| //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 | ||||
|   | ||||
							
								
								
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -6,19 +6,12 @@ | ||||
|  | ||||
| package unix | ||||
|  | ||||
| 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 setTimespec(sec, nsec int64) Timespec { | ||||
| 	return Timespec{Sec: sec, Nsec: nsec} | ||||
| } | ||||
|  | ||||
| func NsecToTimeval(nsec int64) (tv Timeval) { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	tv.Usec = nsec % 1e9 / 1e3 | ||||
| 	tv.Sec = int64(nsec / 1e9) | ||||
| 	return | ||||
| func setTimeval(sec, usec int64) Timeval { | ||||
| 	return Timeval{Sec: sec, Usec: usec} | ||||
| } | ||||
|  | ||||
| func (iov *Iovec) SetLen(length int) { | ||||
| @@ -28,8 +21,3 @@ func (iov *Iovec) SetLen(length int) { | ||||
| func (cmsg *Cmsghdr) SetLen(length int) { | ||||
| 	cmsg.Len = uint32(length) | ||||
| } | ||||
|  | ||||
| func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | ||||
| 	// TODO(aram): implement this, see issue 5847. | ||||
| 	panic("unimplemented") | ||||
| } | ||||
|   | ||||
							
								
								
									
										105
									
								
								vendor/golang.org/x/sys/unix/syscall_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										105
									
								
								vendor/golang.org/x/sys/unix/syscall_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -7,7 +7,9 @@ | ||||
| package unix | ||||
|  | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"runtime" | ||||
| 	"sort" | ||||
| 	"sync" | ||||
| 	"syscall" | ||||
| 	"unsafe" | ||||
| @@ -50,6 +52,37 @@ func errnoErr(e syscall.Errno) error { | ||||
| 	return e | ||||
| } | ||||
|  | ||||
| // ErrnoName returns the error name for error number e. | ||||
| func ErrnoName(e syscall.Errno) string { | ||||
| 	i := sort.Search(len(errorList), func(i int) bool { | ||||
| 		return errorList[i].num >= e | ||||
| 	}) | ||||
| 	if i < len(errorList) && errorList[i].num == e { | ||||
| 		return errorList[i].name | ||||
| 	} | ||||
| 	return "" | ||||
| } | ||||
|  | ||||
| // SignalName returns the signal name for signal number s. | ||||
| func SignalName(s syscall.Signal) string { | ||||
| 	i := sort.Search(len(signalList), func(i int) bool { | ||||
| 		return signalList[i].num >= s | ||||
| 	}) | ||||
| 	if i < len(signalList) && signalList[i].num == s { | ||||
| 		return signalList[i].name | ||||
| 	} | ||||
| 	return "" | ||||
| } | ||||
|  | ||||
| // clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte. | ||||
| func clen(n []byte) int { | ||||
| 	i := bytes.IndexByte(n, 0) | ||||
| 	if i == -1 { | ||||
| 		i = len(n) | ||||
| 	} | ||||
| 	return i | ||||
| } | ||||
|  | ||||
| // Mmap manager, for use by operating system-specific implementations. | ||||
|  | ||||
| type mmapper struct { | ||||
| @@ -138,16 +171,19 @@ func Write(fd int, p []byte) (n int, err error) { | ||||
| // creation of IPv6 sockets to return EAFNOSUPPORT. | ||||
| var SocketDisableIPv6 bool | ||||
|  | ||||
| // Sockaddr represents a socket address. | ||||
| type Sockaddr interface { | ||||
| 	sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs | ||||
| } | ||||
|  | ||||
| // SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets. | ||||
| type SockaddrInet4 struct { | ||||
| 	Port int | ||||
| 	Addr [4]byte | ||||
| 	raw  RawSockaddrInet4 | ||||
| } | ||||
|  | ||||
| // SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets. | ||||
| type SockaddrInet6 struct { | ||||
| 	Port   int | ||||
| 	ZoneId uint32 | ||||
| @@ -155,6 +191,7 @@ type SockaddrInet6 struct { | ||||
| 	raw    RawSockaddrInet6 | ||||
| } | ||||
|  | ||||
| // SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets. | ||||
| type SockaddrUnix struct { | ||||
| 	Name string | ||||
| 	raw  RawSockaddrUnix | ||||
| @@ -182,7 +219,14 @@ func Getpeername(fd int) (sa Sockaddr, err error) { | ||||
| 	if err = getpeername(fd, &rsa, &len); err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	return anyToSockaddr(&rsa) | ||||
| 	return anyToSockaddr(fd, &rsa) | ||||
| } | ||||
|  | ||||
| func GetsockoptByte(fd, level, opt int) (value byte, err error) { | ||||
| 	var n byte | ||||
| 	vallen := _Socklen(1) | ||||
| 	err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) | ||||
| 	return n, err | ||||
| } | ||||
|  | ||||
| func GetsockoptInt(fd, level, opt int) (value int, err error) { | ||||
| @@ -192,6 +236,54 @@ func GetsockoptInt(fd, level, opt int) (value int, err error) { | ||||
| 	return int(n), err | ||||
| } | ||||
|  | ||||
| func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { | ||||
| 	vallen := _Socklen(4) | ||||
| 	err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) | ||||
| 	return value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { | ||||
| 	var value IPMreq | ||||
| 	vallen := _Socklen(SizeofIPMreq) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { | ||||
| 	var value IPv6Mreq | ||||
| 	vallen := _Socklen(SizeofIPv6Mreq) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { | ||||
| 	var value IPv6MTUInfo | ||||
| 	vallen := _Socklen(SizeofIPv6MTUInfo) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { | ||||
| 	var value ICMPv6Filter | ||||
| 	vallen := _Socklen(SizeofICMPv6Filter) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) | ||||
| 	return &value, err | ||||
| } | ||||
|  | ||||
| func GetsockoptLinger(fd, level, opt int) (*Linger, error) { | ||||
| 	var linger Linger | ||||
| 	vallen := _Socklen(SizeofLinger) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen) | ||||
| 	return &linger, err | ||||
| } | ||||
|  | ||||
| func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) { | ||||
| 	var tv Timeval | ||||
| 	vallen := _Socklen(unsafe.Sizeof(tv)) | ||||
| 	err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen) | ||||
| 	return &tv, err | ||||
| } | ||||
|  | ||||
| func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { | ||||
| 	var rsa RawSockaddrAny | ||||
| 	var len _Socklen = SizeofSockaddrAny | ||||
| @@ -199,7 +291,7 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { | ||||
| 		return | ||||
| 	} | ||||
| 	if rsa.Addr.Family != AF_UNSPEC { | ||||
| 		from, err = anyToSockaddr(&rsa) | ||||
| 		from, err = anyToSockaddr(fd, &rsa) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| @@ -291,3 +383,12 @@ func SetNonblock(fd int, nonblocking bool) (err error) { | ||||
| 	_, err = fcntl(fd, F_SETFL, flag) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| // Exec calls execve(2), which replaces the calling executable in the process | ||||
| // tree. argv0 should be the full path to an executable ("/bin/ls") and the | ||||
| // executable name should also be the first argument in argv (["ls", "-l"]). | ||||
| // envv are the environment variables that should be passed to the new | ||||
| // process (["USER=go", "PWD=/tmp"]). | ||||
| func Exec(argv0 string, argv []string, envv []string) error { | ||||
| 	return syscall.Exec(argv0, argv, envv) | ||||
| } | ||||
|   | ||||
							
								
								
									
										82
									
								
								vendor/golang.org/x/sys/unix/timestruct.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								vendor/golang.org/x/sys/unix/timestruct.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,82 @@ | ||||
| // 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 darwin dragonfly freebsd linux netbsd openbsd solaris | ||||
|  | ||||
| package unix | ||||
|  | ||||
| import "time" | ||||
|  | ||||
| // TimespecToNsec converts a Timespec value into a number of | ||||
| // nanoseconds since the Unix epoch. | ||||
| func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } | ||||
|  | ||||
| // NsecToTimespec takes a number of nanoseconds since the Unix epoch | ||||
| // and returns the corresponding Timespec value. | ||||
| func NsecToTimespec(nsec int64) Timespec { | ||||
| 	sec := nsec / 1e9 | ||||
| 	nsec = nsec % 1e9 | ||||
| 	if nsec < 0 { | ||||
| 		nsec += 1e9 | ||||
| 		sec-- | ||||
| 	} | ||||
| 	return setTimespec(sec, nsec) | ||||
| } | ||||
|  | ||||
| // TimeToTimespec converts t into a Timespec. | ||||
| // On some 32-bit systems the range of valid Timespec values are smaller | ||||
| // than that of time.Time values.  So if t is out of the valid range of | ||||
| // Timespec, it returns a zero Timespec and ERANGE. | ||||
| func TimeToTimespec(t time.Time) (Timespec, error) { | ||||
| 	sec := t.Unix() | ||||
| 	nsec := int64(t.Nanosecond()) | ||||
| 	ts := setTimespec(sec, nsec) | ||||
|  | ||||
| 	// Currently all targets have either int32 or int64 for Timespec.Sec. | ||||
| 	// If there were a new target with floating point type for it, we have | ||||
| 	// to consider the rounding error. | ||||
| 	if int64(ts.Sec) != sec { | ||||
| 		return Timespec{}, ERANGE | ||||
| 	} | ||||
| 	return ts, nil | ||||
| } | ||||
|  | ||||
| // TimevalToNsec converts a Timeval value into a number of nanoseconds | ||||
| // since the Unix epoch. | ||||
| func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } | ||||
|  | ||||
| // NsecToTimeval takes a number of nanoseconds since the Unix epoch | ||||
| // and returns the corresponding Timeval value. | ||||
| func NsecToTimeval(nsec int64) Timeval { | ||||
| 	nsec += 999 // round up to microsecond | ||||
| 	usec := nsec % 1e9 / 1e3 | ||||
| 	sec := nsec / 1e9 | ||||
| 	if usec < 0 { | ||||
| 		usec += 1e6 | ||||
| 		sec-- | ||||
| 	} | ||||
| 	return setTimeval(sec, usec) | ||||
| } | ||||
|  | ||||
| // Unix returns ts as the number of seconds and nanoseconds elapsed since the | ||||
| // Unix epoch. | ||||
| func (ts *Timespec) Unix() (sec int64, nsec int64) { | ||||
| 	return int64(ts.Sec), int64(ts.Nsec) | ||||
| } | ||||
|  | ||||
| // Unix returns tv as the number of seconds and nanoseconds elapsed since the | ||||
| // Unix epoch. | ||||
| func (tv *Timeval) Unix() (sec int64, nsec int64) { | ||||
| 	return int64(tv.Sec), int64(tv.Usec) * 1000 | ||||
| } | ||||
|  | ||||
| // Nano returns ts as the number of nanoseconds elapsed since the Unix epoch. | ||||
| func (ts *Timespec) Nano() int64 { | ||||
| 	return int64(ts.Sec)*1e9 + int64(ts.Nsec) | ||||
| } | ||||
|  | ||||
| // Nano returns tv as the number of nanoseconds elapsed since the Unix epoch. | ||||
| func (tv *Timeval) Nano() int64 { | ||||
| 	return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 | ||||
| } | ||||
							
								
								
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -49,6 +49,86 @@ const ( | ||||
| 	AF_UNSPEC                         = 0x0 | ||||
| 	AF_UTUN                           = 0x26 | ||||
| 	ALTWERASE                         = 0x200 | ||||
| 	ATTR_BIT_MAP_COUNT                = 0x5 | ||||
| 	ATTR_CMN_ACCESSMASK               = 0x20000 | ||||
| 	ATTR_CMN_ACCTIME                  = 0x1000 | ||||
| 	ATTR_CMN_ADDEDTIME                = 0x10000000 | ||||
| 	ATTR_CMN_BKUPTIME                 = 0x2000 | ||||
| 	ATTR_CMN_CHGTIME                  = 0x800 | ||||
| 	ATTR_CMN_CRTIME                   = 0x200 | ||||
| 	ATTR_CMN_DATA_PROTECT_FLAGS       = 0x40000000 | ||||
| 	ATTR_CMN_DEVID                    = 0x2 | ||||
| 	ATTR_CMN_DOCUMENT_ID              = 0x100000 | ||||
| 	ATTR_CMN_ERROR                    = 0x20000000 | ||||
| 	ATTR_CMN_EXTENDED_SECURITY        = 0x400000 | ||||
| 	ATTR_CMN_FILEID                   = 0x2000000 | ||||
| 	ATTR_CMN_FLAGS                    = 0x40000 | ||||
| 	ATTR_CMN_FNDRINFO                 = 0x4000 | ||||
| 	ATTR_CMN_FSID                     = 0x4 | ||||
| 	ATTR_CMN_FULLPATH                 = 0x8000000 | ||||
| 	ATTR_CMN_GEN_COUNT                = 0x80000 | ||||
| 	ATTR_CMN_GRPID                    = 0x10000 | ||||
| 	ATTR_CMN_GRPUUID                  = 0x1000000 | ||||
| 	ATTR_CMN_MODTIME                  = 0x400 | ||||
| 	ATTR_CMN_NAME                     = 0x1 | ||||
| 	ATTR_CMN_NAMEDATTRCOUNT           = 0x80000 | ||||
| 	ATTR_CMN_NAMEDATTRLIST            = 0x100000 | ||||
| 	ATTR_CMN_OBJID                    = 0x20 | ||||
| 	ATTR_CMN_OBJPERMANENTID           = 0x40 | ||||
| 	ATTR_CMN_OBJTAG                   = 0x10 | ||||
| 	ATTR_CMN_OBJTYPE                  = 0x8 | ||||
| 	ATTR_CMN_OWNERID                  = 0x8000 | ||||
| 	ATTR_CMN_PARENTID                 = 0x4000000 | ||||
| 	ATTR_CMN_PAROBJID                 = 0x80 | ||||
| 	ATTR_CMN_RETURNED_ATTRS           = 0x80000000 | ||||
| 	ATTR_CMN_SCRIPT                   = 0x100 | ||||
| 	ATTR_CMN_SETMASK                  = 0x41c7ff00 | ||||
| 	ATTR_CMN_USERACCESS               = 0x200000 | ||||
| 	ATTR_CMN_UUID                     = 0x800000 | ||||
| 	ATTR_CMN_VALIDMASK                = 0xffffffff | ||||
| 	ATTR_CMN_VOLSETMASK               = 0x6700 | ||||
| 	ATTR_FILE_ALLOCSIZE               = 0x4 | ||||
| 	ATTR_FILE_CLUMPSIZE               = 0x10 | ||||
| 	ATTR_FILE_DATAALLOCSIZE           = 0x400 | ||||
| 	ATTR_FILE_DATAEXTENTS             = 0x800 | ||||
| 	ATTR_FILE_DATALENGTH              = 0x200 | ||||
| 	ATTR_FILE_DEVTYPE                 = 0x20 | ||||
| 	ATTR_FILE_FILETYPE                = 0x40 | ||||
| 	ATTR_FILE_FORKCOUNT               = 0x80 | ||||
| 	ATTR_FILE_FORKLIST                = 0x100 | ||||
| 	ATTR_FILE_IOBLOCKSIZE             = 0x8 | ||||
| 	ATTR_FILE_LINKCOUNT               = 0x1 | ||||
| 	ATTR_FILE_RSRCALLOCSIZE           = 0x2000 | ||||
| 	ATTR_FILE_RSRCEXTENTS             = 0x4000 | ||||
| 	ATTR_FILE_RSRCLENGTH              = 0x1000 | ||||
| 	ATTR_FILE_SETMASK                 = 0x20 | ||||
| 	ATTR_FILE_TOTALSIZE               = 0x2 | ||||
| 	ATTR_FILE_VALIDMASK               = 0x37ff | ||||
| 	ATTR_VOL_ALLOCATIONCLUMP          = 0x40 | ||||
| 	ATTR_VOL_ATTRIBUTES               = 0x40000000 | ||||
| 	ATTR_VOL_CAPABILITIES             = 0x20000 | ||||
| 	ATTR_VOL_DIRCOUNT                 = 0x400 | ||||
| 	ATTR_VOL_ENCODINGSUSED            = 0x10000 | ||||
| 	ATTR_VOL_FILECOUNT                = 0x200 | ||||
| 	ATTR_VOL_FSTYPE                   = 0x1 | ||||
| 	ATTR_VOL_INFO                     = 0x80000000 | ||||
| 	ATTR_VOL_IOBLOCKSIZE              = 0x80 | ||||
| 	ATTR_VOL_MAXOBJCOUNT              = 0x800 | ||||
| 	ATTR_VOL_MINALLOCATION            = 0x20 | ||||
| 	ATTR_VOL_MOUNTEDDEVICE            = 0x8000 | ||||
| 	ATTR_VOL_MOUNTFLAGS               = 0x4000 | ||||
| 	ATTR_VOL_MOUNTPOINT               = 0x1000 | ||||
| 	ATTR_VOL_NAME                     = 0x2000 | ||||
| 	ATTR_VOL_OBJCOUNT                 = 0x100 | ||||
| 	ATTR_VOL_QUOTA_SIZE               = 0x10000000 | ||||
| 	ATTR_VOL_RESERVED_SIZE            = 0x20000000 | ||||
| 	ATTR_VOL_SETMASK                  = 0x80002000 | ||||
| 	ATTR_VOL_SIGNATURE                = 0x2 | ||||
| 	ATTR_VOL_SIZE                     = 0x4 | ||||
| 	ATTR_VOL_SPACEAVAIL               = 0x10 | ||||
| 	ATTR_VOL_SPACEFREE                = 0x8 | ||||
| 	ATTR_VOL_UUID                     = 0x40000 | ||||
| 	ATTR_VOL_VALIDMASK                = 0xf007ffff | ||||
| 	B0                                = 0x0 | ||||
| 	B110                              = 0x6e | ||||
| 	B115200                           = 0x1c200 | ||||
| @@ -169,6 +249,8 @@ const ( | ||||
| 	CSTOP                             = 0x13 | ||||
| 	CSTOPB                            = 0x400 | ||||
| 	CSUSP                             = 0x1a | ||||
| 	CTL_HW                            = 0x6 | ||||
| 	CTL_KERN                          = 0x1 | ||||
| 	CTL_MAXNAME                       = 0xc | ||||
| 	CTL_NET                           = 0x4 | ||||
| 	DLT_A429                          = 0xb8 | ||||
| @@ -390,6 +472,11 @@ const ( | ||||
| 	FF1                               = 0x4000 | ||||
| 	FFDLY                             = 0x4000 | ||||
| 	FLUSHO                            = 0x800000 | ||||
| 	FSOPT_ATTR_CMN_EXTENDED           = 0x20 | ||||
| 	FSOPT_NOFOLLOW                    = 0x1 | ||||
| 	FSOPT_NOINMEMUPDATE               = 0x2 | ||||
| 	FSOPT_PACK_INVAL_ATTRS            = 0x8 | ||||
| 	FSOPT_REPORT_FULLSIZE             = 0x4 | ||||
| 	F_ADDFILESIGS                     = 0x3d | ||||
| 	F_ADDFILESIGS_FOR_DYLD_SIM        = 0x53 | ||||
| 	F_ADDFILESIGS_RETURN              = 0x61 | ||||
| @@ -425,6 +512,7 @@ const ( | ||||
| 	F_PATHPKG_CHECK                   = 0x34 | ||||
| 	F_PEOFPOSMODE                     = 0x3 | ||||
| 	F_PREALLOCATE                     = 0x2a | ||||
| 	F_PUNCHHOLE                       = 0x63 | ||||
| 	F_RDADVISE                        = 0x2c | ||||
| 	F_RDAHEAD                         = 0x2d | ||||
| 	F_RDLCK                           = 0x1 | ||||
| @@ -441,10 +529,12 @@ const ( | ||||
| 	F_SINGLE_WRITER                   = 0x4c | ||||
| 	F_THAW_FS                         = 0x36 | ||||
| 	F_TRANSCODEKEY                    = 0x4b | ||||
| 	F_TRIM_ACTIVE_FILE                = 0x64 | ||||
| 	F_UNLCK                           = 0x2 | ||||
| 	F_VOLPOSMODE                      = 0x4 | ||||
| 	F_WRLCK                           = 0x3 | ||||
| 	HUPCL                             = 0x4000 | ||||
| 	HW_MACHINE                        = 0x1 | ||||
| 	ICANON                            = 0x100 | ||||
| 	ICMP6_FILTER                      = 0x12 | ||||
| 	ICRNL                             = 0x100 | ||||
| @@ -681,6 +771,7 @@ const ( | ||||
| 	IPV6_FAITH                        = 0x1d | ||||
| 	IPV6_FLOWINFO_MASK                = 0xffffff0f | ||||
| 	IPV6_FLOWLABEL_MASK               = 0xffff0f00 | ||||
| 	IPV6_FLOW_ECN_MASK                = 0x300 | ||||
| 	IPV6_FRAGTTL                      = 0x3c | ||||
| 	IPV6_FW_ADD                       = 0x1e | ||||
| 	IPV6_FW_DEL                       = 0x1f | ||||
| @@ -771,6 +862,7 @@ const ( | ||||
| 	IP_RECVOPTS                       = 0x5 | ||||
| 	IP_RECVPKTINFO                    = 0x1a | ||||
| 	IP_RECVRETOPTS                    = 0x6 | ||||
| 	IP_RECVTOS                        = 0x1b | ||||
| 	IP_RECVTTL                        = 0x18 | ||||
| 	IP_RETOPTS                        = 0x8 | ||||
| 	IP_RF                             = 0x8000 | ||||
| @@ -789,6 +881,10 @@ const ( | ||||
| 	IXANY                             = 0x800 | ||||
| 	IXOFF                             = 0x400 | ||||
| 	IXON                              = 0x200 | ||||
| 	KERN_HOSTNAME                     = 0xa | ||||
| 	KERN_OSRELEASE                    = 0x2 | ||||
| 	KERN_OSTYPE                       = 0x1 | ||||
| 	KERN_VERSION                      = 0x4 | ||||
| 	LOCK_EX                           = 0x2 | ||||
| 	LOCK_NB                           = 0x4 | ||||
| 	LOCK_SH                           = 0x1 | ||||
| @@ -1377,6 +1473,12 @@ const ( | ||||
| 	WORDSIZE                          = 0x20 | ||||
| 	WSTOPPED                          = 0x8 | ||||
| 	WUNTRACED                         = 0x2 | ||||
| 	XATTR_CREATE                      = 0x2 | ||||
| 	XATTR_NODEFAULT                   = 0x10 | ||||
| 	XATTR_NOFOLLOW                    = 0x1 | ||||
| 	XATTR_NOSECURITY                  = 0x8 | ||||
| 	XATTR_REPLACE                     = 0x4 | ||||
| 	XATTR_SHOWCOMPRESSION             = 0x20 | ||||
| ) | ||||
|  | ||||
| // Errors | ||||
| @@ -1528,146 +1630,154 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:   "operation not permitted", | ||||
| 	2:   "no such file or directory", | ||||
| 	3:   "no such process", | ||||
| 	4:   "interrupted system call", | ||||
| 	5:   "input/output error", | ||||
| 	6:   "device not configured", | ||||
| 	7:   "argument list too long", | ||||
| 	8:   "exec format error", | ||||
| 	9:   "bad file descriptor", | ||||
| 	10:  "no child processes", | ||||
| 	11:  "resource deadlock avoided", | ||||
| 	12:  "cannot allocate memory", | ||||
| 	13:  "permission denied", | ||||
| 	14:  "bad address", | ||||
| 	15:  "block device required", | ||||
| 	16:  "resource busy", | ||||
| 	17:  "file exists", | ||||
| 	18:  "cross-device link", | ||||
| 	19:  "operation not supported by device", | ||||
| 	20:  "not a directory", | ||||
| 	21:  "is a directory", | ||||
| 	22:  "invalid argument", | ||||
| 	23:  "too many open files in system", | ||||
| 	24:  "too many open files", | ||||
| 	25:  "inappropriate ioctl for device", | ||||
| 	26:  "text file busy", | ||||
| 	27:  "file too large", | ||||
| 	28:  "no space left on device", | ||||
| 	29:  "illegal seek", | ||||
| 	30:  "read-only file system", | ||||
| 	31:  "too many links", | ||||
| 	32:  "broken pipe", | ||||
| 	33:  "numerical argument out of domain", | ||||
| 	34:  "result too large", | ||||
| 	35:  "resource temporarily unavailable", | ||||
| 	36:  "operation now in progress", | ||||
| 	37:  "operation already in progress", | ||||
| 	38:  "socket operation on non-socket", | ||||
| 	39:  "destination address required", | ||||
| 	40:  "message too long", | ||||
| 	41:  "protocol wrong type for socket", | ||||
| 	42:  "protocol not available", | ||||
| 	43:  "protocol not supported", | ||||
| 	44:  "socket type not supported", | ||||
| 	45:  "operation not supported", | ||||
| 	46:  "protocol family not supported", | ||||
| 	47:  "address family not supported by protocol family", | ||||
| 	48:  "address already in use", | ||||
| 	49:  "can't assign requested address", | ||||
| 	50:  "network is down", | ||||
| 	51:  "network is unreachable", | ||||
| 	52:  "network dropped connection on reset", | ||||
| 	53:  "software caused connection abort", | ||||
| 	54:  "connection reset by peer", | ||||
| 	55:  "no buffer space available", | ||||
| 	56:  "socket is already connected", | ||||
| 	57:  "socket is not connected", | ||||
| 	58:  "can't send after socket shutdown", | ||||
| 	59:  "too many references: can't splice", | ||||
| 	60:  "operation timed out", | ||||
| 	61:  "connection refused", | ||||
| 	62:  "too many levels of symbolic links", | ||||
| 	63:  "file name too long", | ||||
| 	64:  "host is down", | ||||
| 	65:  "no route to host", | ||||
| 	66:  "directory not empty", | ||||
| 	67:  "too many processes", | ||||
| 	68:  "too many users", | ||||
| 	69:  "disc quota exceeded", | ||||
| 	70:  "stale NFS file handle", | ||||
| 	71:  "too many levels of remote in path", | ||||
| 	72:  "RPC struct is bad", | ||||
| 	73:  "RPC version wrong", | ||||
| 	74:  "RPC prog. not avail", | ||||
| 	75:  "program version wrong", | ||||
| 	76:  "bad procedure for program", | ||||
| 	77:  "no locks available", | ||||
| 	78:  "function not implemented", | ||||
| 	79:  "inappropriate file type or format", | ||||
| 	80:  "authentication error", | ||||
| 	81:  "need authenticator", | ||||
| 	82:  "device power is off", | ||||
| 	83:  "device error", | ||||
| 	84:  "value too large to be stored in data type", | ||||
| 	85:  "bad executable (or shared library)", | ||||
| 	86:  "bad CPU type in executable", | ||||
| 	87:  "shared library version mismatch", | ||||
| 	88:  "malformed Mach-o file", | ||||
| 	89:  "operation canceled", | ||||
| 	90:  "identifier removed", | ||||
| 	91:  "no message of desired type", | ||||
| 	92:  "illegal byte sequence", | ||||
| 	93:  "attribute not found", | ||||
| 	94:  "bad message", | ||||
| 	95:  "EMULTIHOP (Reserved)", | ||||
| 	96:  "no message available on STREAM", | ||||
| 	97:  "ENOLINK (Reserved)", | ||||
| 	98:  "no STREAM resources", | ||||
| 	99:  "not a STREAM", | ||||
| 	100: "protocol error", | ||||
| 	101: "STREAM ioctl timeout", | ||||
| 	102: "operation not supported on socket", | ||||
| 	103: "policy not found", | ||||
| 	104: "state not recoverable", | ||||
| 	105: "previous owner died", | ||||
| 	106: "interface output queue is full", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "resource busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "ENOTSUP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EPWROFF", "device power is off"}, | ||||
| 	{83, "EDEVERR", "device error"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "EBADEXEC", "bad executable (or shared library)"}, | ||||
| 	{86, "EBADARCH", "bad CPU type in executable"}, | ||||
| 	{87, "ESHLIBVERS", "shared library version mismatch"}, | ||||
| 	{88, "EBADMACHO", "malformed Mach-o file"}, | ||||
| 	{89, "ECANCELED", "operation canceled"}, | ||||
| 	{90, "EIDRM", "identifier removed"}, | ||||
| 	{91, "ENOMSG", "no message of desired type"}, | ||||
| 	{92, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{93, "ENOATTR", "attribute not found"}, | ||||
| 	{94, "EBADMSG", "bad message"}, | ||||
| 	{95, "EMULTIHOP", "EMULTIHOP (Reserved)"}, | ||||
| 	{96, "ENODATA", "no message available on STREAM"}, | ||||
| 	{97, "ENOLINK", "ENOLINK (Reserved)"}, | ||||
| 	{98, "ENOSR", "no STREAM resources"}, | ||||
| 	{99, "ENOSTR", "not a STREAM"}, | ||||
| 	{100, "EPROTO", "protocol error"}, | ||||
| 	{101, "ETIME", "STREAM ioctl timeout"}, | ||||
| 	{102, "EOPNOTSUPP", "operation not supported on socket"}, | ||||
| 	{103, "ENOPOLICY", "policy not found"}, | ||||
| 	{104, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{105, "EOWNERDEAD", "previous owner died"}, | ||||
| 	{106, "EQFULL", "interface output queue is full"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGABRT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -49,6 +49,86 @@ const ( | ||||
| 	AF_UNSPEC                         = 0x0 | ||||
| 	AF_UTUN                           = 0x26 | ||||
| 	ALTWERASE                         = 0x200 | ||||
| 	ATTR_BIT_MAP_COUNT                = 0x5 | ||||
| 	ATTR_CMN_ACCESSMASK               = 0x20000 | ||||
| 	ATTR_CMN_ACCTIME                  = 0x1000 | ||||
| 	ATTR_CMN_ADDEDTIME                = 0x10000000 | ||||
| 	ATTR_CMN_BKUPTIME                 = 0x2000 | ||||
| 	ATTR_CMN_CHGTIME                  = 0x800 | ||||
| 	ATTR_CMN_CRTIME                   = 0x200 | ||||
| 	ATTR_CMN_DATA_PROTECT_FLAGS       = 0x40000000 | ||||
| 	ATTR_CMN_DEVID                    = 0x2 | ||||
| 	ATTR_CMN_DOCUMENT_ID              = 0x100000 | ||||
| 	ATTR_CMN_ERROR                    = 0x20000000 | ||||
| 	ATTR_CMN_EXTENDED_SECURITY        = 0x400000 | ||||
| 	ATTR_CMN_FILEID                   = 0x2000000 | ||||
| 	ATTR_CMN_FLAGS                    = 0x40000 | ||||
| 	ATTR_CMN_FNDRINFO                 = 0x4000 | ||||
| 	ATTR_CMN_FSID                     = 0x4 | ||||
| 	ATTR_CMN_FULLPATH                 = 0x8000000 | ||||
| 	ATTR_CMN_GEN_COUNT                = 0x80000 | ||||
| 	ATTR_CMN_GRPID                    = 0x10000 | ||||
| 	ATTR_CMN_GRPUUID                  = 0x1000000 | ||||
| 	ATTR_CMN_MODTIME                  = 0x400 | ||||
| 	ATTR_CMN_NAME                     = 0x1 | ||||
| 	ATTR_CMN_NAMEDATTRCOUNT           = 0x80000 | ||||
| 	ATTR_CMN_NAMEDATTRLIST            = 0x100000 | ||||
| 	ATTR_CMN_OBJID                    = 0x20 | ||||
| 	ATTR_CMN_OBJPERMANENTID           = 0x40 | ||||
| 	ATTR_CMN_OBJTAG                   = 0x10 | ||||
| 	ATTR_CMN_OBJTYPE                  = 0x8 | ||||
| 	ATTR_CMN_OWNERID                  = 0x8000 | ||||
| 	ATTR_CMN_PARENTID                 = 0x4000000 | ||||
| 	ATTR_CMN_PAROBJID                 = 0x80 | ||||
| 	ATTR_CMN_RETURNED_ATTRS           = 0x80000000 | ||||
| 	ATTR_CMN_SCRIPT                   = 0x100 | ||||
| 	ATTR_CMN_SETMASK                  = 0x41c7ff00 | ||||
| 	ATTR_CMN_USERACCESS               = 0x200000 | ||||
| 	ATTR_CMN_UUID                     = 0x800000 | ||||
| 	ATTR_CMN_VALIDMASK                = 0xffffffff | ||||
| 	ATTR_CMN_VOLSETMASK               = 0x6700 | ||||
| 	ATTR_FILE_ALLOCSIZE               = 0x4 | ||||
| 	ATTR_FILE_CLUMPSIZE               = 0x10 | ||||
| 	ATTR_FILE_DATAALLOCSIZE           = 0x400 | ||||
| 	ATTR_FILE_DATAEXTENTS             = 0x800 | ||||
| 	ATTR_FILE_DATALENGTH              = 0x200 | ||||
| 	ATTR_FILE_DEVTYPE                 = 0x20 | ||||
| 	ATTR_FILE_FILETYPE                = 0x40 | ||||
| 	ATTR_FILE_FORKCOUNT               = 0x80 | ||||
| 	ATTR_FILE_FORKLIST                = 0x100 | ||||
| 	ATTR_FILE_IOBLOCKSIZE             = 0x8 | ||||
| 	ATTR_FILE_LINKCOUNT               = 0x1 | ||||
| 	ATTR_FILE_RSRCALLOCSIZE           = 0x2000 | ||||
| 	ATTR_FILE_RSRCEXTENTS             = 0x4000 | ||||
| 	ATTR_FILE_RSRCLENGTH              = 0x1000 | ||||
| 	ATTR_FILE_SETMASK                 = 0x20 | ||||
| 	ATTR_FILE_TOTALSIZE               = 0x2 | ||||
| 	ATTR_FILE_VALIDMASK               = 0x37ff | ||||
| 	ATTR_VOL_ALLOCATIONCLUMP          = 0x40 | ||||
| 	ATTR_VOL_ATTRIBUTES               = 0x40000000 | ||||
| 	ATTR_VOL_CAPABILITIES             = 0x20000 | ||||
| 	ATTR_VOL_DIRCOUNT                 = 0x400 | ||||
| 	ATTR_VOL_ENCODINGSUSED            = 0x10000 | ||||
| 	ATTR_VOL_FILECOUNT                = 0x200 | ||||
| 	ATTR_VOL_FSTYPE                   = 0x1 | ||||
| 	ATTR_VOL_INFO                     = 0x80000000 | ||||
| 	ATTR_VOL_IOBLOCKSIZE              = 0x80 | ||||
| 	ATTR_VOL_MAXOBJCOUNT              = 0x800 | ||||
| 	ATTR_VOL_MINALLOCATION            = 0x20 | ||||
| 	ATTR_VOL_MOUNTEDDEVICE            = 0x8000 | ||||
| 	ATTR_VOL_MOUNTFLAGS               = 0x4000 | ||||
| 	ATTR_VOL_MOUNTPOINT               = 0x1000 | ||||
| 	ATTR_VOL_NAME                     = 0x2000 | ||||
| 	ATTR_VOL_OBJCOUNT                 = 0x100 | ||||
| 	ATTR_VOL_QUOTA_SIZE               = 0x10000000 | ||||
| 	ATTR_VOL_RESERVED_SIZE            = 0x20000000 | ||||
| 	ATTR_VOL_SETMASK                  = 0x80002000 | ||||
| 	ATTR_VOL_SIGNATURE                = 0x2 | ||||
| 	ATTR_VOL_SIZE                     = 0x4 | ||||
| 	ATTR_VOL_SPACEAVAIL               = 0x10 | ||||
| 	ATTR_VOL_SPACEFREE                = 0x8 | ||||
| 	ATTR_VOL_UUID                     = 0x40000 | ||||
| 	ATTR_VOL_VALIDMASK                = 0xf007ffff | ||||
| 	B0                                = 0x0 | ||||
| 	B110                              = 0x6e | ||||
| 	B115200                           = 0x1c200 | ||||
| @@ -169,6 +249,8 @@ const ( | ||||
| 	CSTOP                             = 0x13 | ||||
| 	CSTOPB                            = 0x400 | ||||
| 	CSUSP                             = 0x1a | ||||
| 	CTL_HW                            = 0x6 | ||||
| 	CTL_KERN                          = 0x1 | ||||
| 	CTL_MAXNAME                       = 0xc | ||||
| 	CTL_NET                           = 0x4 | ||||
| 	DLT_A429                          = 0xb8 | ||||
| @@ -390,6 +472,11 @@ const ( | ||||
| 	FF1                               = 0x4000 | ||||
| 	FFDLY                             = 0x4000 | ||||
| 	FLUSHO                            = 0x800000 | ||||
| 	FSOPT_ATTR_CMN_EXTENDED           = 0x20 | ||||
| 	FSOPT_NOFOLLOW                    = 0x1 | ||||
| 	FSOPT_NOINMEMUPDATE               = 0x2 | ||||
| 	FSOPT_PACK_INVAL_ATTRS            = 0x8 | ||||
| 	FSOPT_REPORT_FULLSIZE             = 0x4 | ||||
| 	F_ADDFILESIGS                     = 0x3d | ||||
| 	F_ADDFILESIGS_FOR_DYLD_SIM        = 0x53 | ||||
| 	F_ADDFILESIGS_RETURN              = 0x61 | ||||
| @@ -425,6 +512,7 @@ const ( | ||||
| 	F_PATHPKG_CHECK                   = 0x34 | ||||
| 	F_PEOFPOSMODE                     = 0x3 | ||||
| 	F_PREALLOCATE                     = 0x2a | ||||
| 	F_PUNCHHOLE                       = 0x63 | ||||
| 	F_RDADVISE                        = 0x2c | ||||
| 	F_RDAHEAD                         = 0x2d | ||||
| 	F_RDLCK                           = 0x1 | ||||
| @@ -441,10 +529,12 @@ const ( | ||||
| 	F_SINGLE_WRITER                   = 0x4c | ||||
| 	F_THAW_FS                         = 0x36 | ||||
| 	F_TRANSCODEKEY                    = 0x4b | ||||
| 	F_TRIM_ACTIVE_FILE                = 0x64 | ||||
| 	F_UNLCK                           = 0x2 | ||||
| 	F_VOLPOSMODE                      = 0x4 | ||||
| 	F_WRLCK                           = 0x3 | ||||
| 	HUPCL                             = 0x4000 | ||||
| 	HW_MACHINE                        = 0x1 | ||||
| 	ICANON                            = 0x100 | ||||
| 	ICMP6_FILTER                      = 0x12 | ||||
| 	ICRNL                             = 0x100 | ||||
| @@ -681,6 +771,7 @@ const ( | ||||
| 	IPV6_FAITH                        = 0x1d | ||||
| 	IPV6_FLOWINFO_MASK                = 0xffffff0f | ||||
| 	IPV6_FLOWLABEL_MASK               = 0xffff0f00 | ||||
| 	IPV6_FLOW_ECN_MASK                = 0x300 | ||||
| 	IPV6_FRAGTTL                      = 0x3c | ||||
| 	IPV6_FW_ADD                       = 0x1e | ||||
| 	IPV6_FW_DEL                       = 0x1f | ||||
| @@ -771,6 +862,7 @@ const ( | ||||
| 	IP_RECVOPTS                       = 0x5 | ||||
| 	IP_RECVPKTINFO                    = 0x1a | ||||
| 	IP_RECVRETOPTS                    = 0x6 | ||||
| 	IP_RECVTOS                        = 0x1b | ||||
| 	IP_RECVTTL                        = 0x18 | ||||
| 	IP_RETOPTS                        = 0x8 | ||||
| 	IP_RF                             = 0x8000 | ||||
| @@ -789,6 +881,10 @@ const ( | ||||
| 	IXANY                             = 0x800 | ||||
| 	IXOFF                             = 0x400 | ||||
| 	IXON                              = 0x200 | ||||
| 	KERN_HOSTNAME                     = 0xa | ||||
| 	KERN_OSRELEASE                    = 0x2 | ||||
| 	KERN_OSTYPE                       = 0x1 | ||||
| 	KERN_VERSION                      = 0x4 | ||||
| 	LOCK_EX                           = 0x2 | ||||
| 	LOCK_NB                           = 0x4 | ||||
| 	LOCK_SH                           = 0x1 | ||||
| @@ -1377,6 +1473,12 @@ const ( | ||||
| 	WORDSIZE                          = 0x40 | ||||
| 	WSTOPPED                          = 0x8 | ||||
| 	WUNTRACED                         = 0x2 | ||||
| 	XATTR_CREATE                      = 0x2 | ||||
| 	XATTR_NODEFAULT                   = 0x10 | ||||
| 	XATTR_NOFOLLOW                    = 0x1 | ||||
| 	XATTR_NOSECURITY                  = 0x8 | ||||
| 	XATTR_REPLACE                     = 0x4 | ||||
| 	XATTR_SHOWCOMPRESSION             = 0x20 | ||||
| ) | ||||
|  | ||||
| // Errors | ||||
| @@ -1528,146 +1630,154 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:   "operation not permitted", | ||||
| 	2:   "no such file or directory", | ||||
| 	3:   "no such process", | ||||
| 	4:   "interrupted system call", | ||||
| 	5:   "input/output error", | ||||
| 	6:   "device not configured", | ||||
| 	7:   "argument list too long", | ||||
| 	8:   "exec format error", | ||||
| 	9:   "bad file descriptor", | ||||
| 	10:  "no child processes", | ||||
| 	11:  "resource deadlock avoided", | ||||
| 	12:  "cannot allocate memory", | ||||
| 	13:  "permission denied", | ||||
| 	14:  "bad address", | ||||
| 	15:  "block device required", | ||||
| 	16:  "resource busy", | ||||
| 	17:  "file exists", | ||||
| 	18:  "cross-device link", | ||||
| 	19:  "operation not supported by device", | ||||
| 	20:  "not a directory", | ||||
| 	21:  "is a directory", | ||||
| 	22:  "invalid argument", | ||||
| 	23:  "too many open files in system", | ||||
| 	24:  "too many open files", | ||||
| 	25:  "inappropriate ioctl for device", | ||||
| 	26:  "text file busy", | ||||
| 	27:  "file too large", | ||||
| 	28:  "no space left on device", | ||||
| 	29:  "illegal seek", | ||||
| 	30:  "read-only file system", | ||||
| 	31:  "too many links", | ||||
| 	32:  "broken pipe", | ||||
| 	33:  "numerical argument out of domain", | ||||
| 	34:  "result too large", | ||||
| 	35:  "resource temporarily unavailable", | ||||
| 	36:  "operation now in progress", | ||||
| 	37:  "operation already in progress", | ||||
| 	38:  "socket operation on non-socket", | ||||
| 	39:  "destination address required", | ||||
| 	40:  "message too long", | ||||
| 	41:  "protocol wrong type for socket", | ||||
| 	42:  "protocol not available", | ||||
| 	43:  "protocol not supported", | ||||
| 	44:  "socket type not supported", | ||||
| 	45:  "operation not supported", | ||||
| 	46:  "protocol family not supported", | ||||
| 	47:  "address family not supported by protocol family", | ||||
| 	48:  "address already in use", | ||||
| 	49:  "can't assign requested address", | ||||
| 	50:  "network is down", | ||||
| 	51:  "network is unreachable", | ||||
| 	52:  "network dropped connection on reset", | ||||
| 	53:  "software caused connection abort", | ||||
| 	54:  "connection reset by peer", | ||||
| 	55:  "no buffer space available", | ||||
| 	56:  "socket is already connected", | ||||
| 	57:  "socket is not connected", | ||||
| 	58:  "can't send after socket shutdown", | ||||
| 	59:  "too many references: can't splice", | ||||
| 	60:  "operation timed out", | ||||
| 	61:  "connection refused", | ||||
| 	62:  "too many levels of symbolic links", | ||||
| 	63:  "file name too long", | ||||
| 	64:  "host is down", | ||||
| 	65:  "no route to host", | ||||
| 	66:  "directory not empty", | ||||
| 	67:  "too many processes", | ||||
| 	68:  "too many users", | ||||
| 	69:  "disc quota exceeded", | ||||
| 	70:  "stale NFS file handle", | ||||
| 	71:  "too many levels of remote in path", | ||||
| 	72:  "RPC struct is bad", | ||||
| 	73:  "RPC version wrong", | ||||
| 	74:  "RPC prog. not avail", | ||||
| 	75:  "program version wrong", | ||||
| 	76:  "bad procedure for program", | ||||
| 	77:  "no locks available", | ||||
| 	78:  "function not implemented", | ||||
| 	79:  "inappropriate file type or format", | ||||
| 	80:  "authentication error", | ||||
| 	81:  "need authenticator", | ||||
| 	82:  "device power is off", | ||||
| 	83:  "device error", | ||||
| 	84:  "value too large to be stored in data type", | ||||
| 	85:  "bad executable (or shared library)", | ||||
| 	86:  "bad CPU type in executable", | ||||
| 	87:  "shared library version mismatch", | ||||
| 	88:  "malformed Mach-o file", | ||||
| 	89:  "operation canceled", | ||||
| 	90:  "identifier removed", | ||||
| 	91:  "no message of desired type", | ||||
| 	92:  "illegal byte sequence", | ||||
| 	93:  "attribute not found", | ||||
| 	94:  "bad message", | ||||
| 	95:  "EMULTIHOP (Reserved)", | ||||
| 	96:  "no message available on STREAM", | ||||
| 	97:  "ENOLINK (Reserved)", | ||||
| 	98:  "no STREAM resources", | ||||
| 	99:  "not a STREAM", | ||||
| 	100: "protocol error", | ||||
| 	101: "STREAM ioctl timeout", | ||||
| 	102: "operation not supported on socket", | ||||
| 	103: "policy not found", | ||||
| 	104: "state not recoverable", | ||||
| 	105: "previous owner died", | ||||
| 	106: "interface output queue is full", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "resource busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "ENOTSUP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EPWROFF", "device power is off"}, | ||||
| 	{83, "EDEVERR", "device error"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "EBADEXEC", "bad executable (or shared library)"}, | ||||
| 	{86, "EBADARCH", "bad CPU type in executable"}, | ||||
| 	{87, "ESHLIBVERS", "shared library version mismatch"}, | ||||
| 	{88, "EBADMACHO", "malformed Mach-o file"}, | ||||
| 	{89, "ECANCELED", "operation canceled"}, | ||||
| 	{90, "EIDRM", "identifier removed"}, | ||||
| 	{91, "ENOMSG", "no message of desired type"}, | ||||
| 	{92, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{93, "ENOATTR", "attribute not found"}, | ||||
| 	{94, "EBADMSG", "bad message"}, | ||||
| 	{95, "EMULTIHOP", "EMULTIHOP (Reserved)"}, | ||||
| 	{96, "ENODATA", "no message available on STREAM"}, | ||||
| 	{97, "ENOLINK", "ENOLINK (Reserved)"}, | ||||
| 	{98, "ENOSR", "no STREAM resources"}, | ||||
| 	{99, "ENOSTR", "not a STREAM"}, | ||||
| 	{100, "EPROTO", "protocol error"}, | ||||
| 	{101, "ETIME", "STREAM ioctl timeout"}, | ||||
| 	{102, "EOPNOTSUPP", "operation not supported on socket"}, | ||||
| 	{103, "ENOPOLICY", "policy not found"}, | ||||
| 	{104, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{105, "EOWNERDEAD", "previous owner died"}, | ||||
| 	{106, "EQFULL", "interface output queue is full"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGABRT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -49,6 +49,86 @@ const ( | ||||
| 	AF_UNSPEC                         = 0x0 | ||||
| 	AF_UTUN                           = 0x26 | ||||
| 	ALTWERASE                         = 0x200 | ||||
| 	ATTR_BIT_MAP_COUNT                = 0x5 | ||||
| 	ATTR_CMN_ACCESSMASK               = 0x20000 | ||||
| 	ATTR_CMN_ACCTIME                  = 0x1000 | ||||
| 	ATTR_CMN_ADDEDTIME                = 0x10000000 | ||||
| 	ATTR_CMN_BKUPTIME                 = 0x2000 | ||||
| 	ATTR_CMN_CHGTIME                  = 0x800 | ||||
| 	ATTR_CMN_CRTIME                   = 0x200 | ||||
| 	ATTR_CMN_DATA_PROTECT_FLAGS       = 0x40000000 | ||||
| 	ATTR_CMN_DEVID                    = 0x2 | ||||
| 	ATTR_CMN_DOCUMENT_ID              = 0x100000 | ||||
| 	ATTR_CMN_ERROR                    = 0x20000000 | ||||
| 	ATTR_CMN_EXTENDED_SECURITY        = 0x400000 | ||||
| 	ATTR_CMN_FILEID                   = 0x2000000 | ||||
| 	ATTR_CMN_FLAGS                    = 0x40000 | ||||
| 	ATTR_CMN_FNDRINFO                 = 0x4000 | ||||
| 	ATTR_CMN_FSID                     = 0x4 | ||||
| 	ATTR_CMN_FULLPATH                 = 0x8000000 | ||||
| 	ATTR_CMN_GEN_COUNT                = 0x80000 | ||||
| 	ATTR_CMN_GRPID                    = 0x10000 | ||||
| 	ATTR_CMN_GRPUUID                  = 0x1000000 | ||||
| 	ATTR_CMN_MODTIME                  = 0x400 | ||||
| 	ATTR_CMN_NAME                     = 0x1 | ||||
| 	ATTR_CMN_NAMEDATTRCOUNT           = 0x80000 | ||||
| 	ATTR_CMN_NAMEDATTRLIST            = 0x100000 | ||||
| 	ATTR_CMN_OBJID                    = 0x20 | ||||
| 	ATTR_CMN_OBJPERMANENTID           = 0x40 | ||||
| 	ATTR_CMN_OBJTAG                   = 0x10 | ||||
| 	ATTR_CMN_OBJTYPE                  = 0x8 | ||||
| 	ATTR_CMN_OWNERID                  = 0x8000 | ||||
| 	ATTR_CMN_PARENTID                 = 0x4000000 | ||||
| 	ATTR_CMN_PAROBJID                 = 0x80 | ||||
| 	ATTR_CMN_RETURNED_ATTRS           = 0x80000000 | ||||
| 	ATTR_CMN_SCRIPT                   = 0x100 | ||||
| 	ATTR_CMN_SETMASK                  = 0x41c7ff00 | ||||
| 	ATTR_CMN_USERACCESS               = 0x200000 | ||||
| 	ATTR_CMN_UUID                     = 0x800000 | ||||
| 	ATTR_CMN_VALIDMASK                = 0xffffffff | ||||
| 	ATTR_CMN_VOLSETMASK               = 0x6700 | ||||
| 	ATTR_FILE_ALLOCSIZE               = 0x4 | ||||
| 	ATTR_FILE_CLUMPSIZE               = 0x10 | ||||
| 	ATTR_FILE_DATAALLOCSIZE           = 0x400 | ||||
| 	ATTR_FILE_DATAEXTENTS             = 0x800 | ||||
| 	ATTR_FILE_DATALENGTH              = 0x200 | ||||
| 	ATTR_FILE_DEVTYPE                 = 0x20 | ||||
| 	ATTR_FILE_FILETYPE                = 0x40 | ||||
| 	ATTR_FILE_FORKCOUNT               = 0x80 | ||||
| 	ATTR_FILE_FORKLIST                = 0x100 | ||||
| 	ATTR_FILE_IOBLOCKSIZE             = 0x8 | ||||
| 	ATTR_FILE_LINKCOUNT               = 0x1 | ||||
| 	ATTR_FILE_RSRCALLOCSIZE           = 0x2000 | ||||
| 	ATTR_FILE_RSRCEXTENTS             = 0x4000 | ||||
| 	ATTR_FILE_RSRCLENGTH              = 0x1000 | ||||
| 	ATTR_FILE_SETMASK                 = 0x20 | ||||
| 	ATTR_FILE_TOTALSIZE               = 0x2 | ||||
| 	ATTR_FILE_VALIDMASK               = 0x37ff | ||||
| 	ATTR_VOL_ALLOCATIONCLUMP          = 0x40 | ||||
| 	ATTR_VOL_ATTRIBUTES               = 0x40000000 | ||||
| 	ATTR_VOL_CAPABILITIES             = 0x20000 | ||||
| 	ATTR_VOL_DIRCOUNT                 = 0x400 | ||||
| 	ATTR_VOL_ENCODINGSUSED            = 0x10000 | ||||
| 	ATTR_VOL_FILECOUNT                = 0x200 | ||||
| 	ATTR_VOL_FSTYPE                   = 0x1 | ||||
| 	ATTR_VOL_INFO                     = 0x80000000 | ||||
| 	ATTR_VOL_IOBLOCKSIZE              = 0x80 | ||||
| 	ATTR_VOL_MAXOBJCOUNT              = 0x800 | ||||
| 	ATTR_VOL_MINALLOCATION            = 0x20 | ||||
| 	ATTR_VOL_MOUNTEDDEVICE            = 0x8000 | ||||
| 	ATTR_VOL_MOUNTFLAGS               = 0x4000 | ||||
| 	ATTR_VOL_MOUNTPOINT               = 0x1000 | ||||
| 	ATTR_VOL_NAME                     = 0x2000 | ||||
| 	ATTR_VOL_OBJCOUNT                 = 0x100 | ||||
| 	ATTR_VOL_QUOTA_SIZE               = 0x10000000 | ||||
| 	ATTR_VOL_RESERVED_SIZE            = 0x20000000 | ||||
| 	ATTR_VOL_SETMASK                  = 0x80002000 | ||||
| 	ATTR_VOL_SIGNATURE                = 0x2 | ||||
| 	ATTR_VOL_SIZE                     = 0x4 | ||||
| 	ATTR_VOL_SPACEAVAIL               = 0x10 | ||||
| 	ATTR_VOL_SPACEFREE                = 0x8 | ||||
| 	ATTR_VOL_UUID                     = 0x40000 | ||||
| 	ATTR_VOL_VALIDMASK                = 0xf007ffff | ||||
| 	B0                                = 0x0 | ||||
| 	B110                              = 0x6e | ||||
| 	B115200                           = 0x1c200 | ||||
| @@ -169,6 +249,8 @@ const ( | ||||
| 	CSTOP                             = 0x13 | ||||
| 	CSTOPB                            = 0x400 | ||||
| 	CSUSP                             = 0x1a | ||||
| 	CTL_HW                            = 0x6 | ||||
| 	CTL_KERN                          = 0x1 | ||||
| 	CTL_MAXNAME                       = 0xc | ||||
| 	CTL_NET                           = 0x4 | ||||
| 	DLT_A429                          = 0xb8 | ||||
| @@ -390,6 +472,11 @@ const ( | ||||
| 	FF1                               = 0x4000 | ||||
| 	FFDLY                             = 0x4000 | ||||
| 	FLUSHO                            = 0x800000 | ||||
| 	FSOPT_ATTR_CMN_EXTENDED           = 0x20 | ||||
| 	FSOPT_NOFOLLOW                    = 0x1 | ||||
| 	FSOPT_NOINMEMUPDATE               = 0x2 | ||||
| 	FSOPT_PACK_INVAL_ATTRS            = 0x8 | ||||
| 	FSOPT_REPORT_FULLSIZE             = 0x4 | ||||
| 	F_ADDFILESIGS                     = 0x3d | ||||
| 	F_ADDFILESIGS_FOR_DYLD_SIM        = 0x53 | ||||
| 	F_ADDFILESIGS_RETURN              = 0x61 | ||||
| @@ -425,6 +512,7 @@ const ( | ||||
| 	F_PATHPKG_CHECK                   = 0x34 | ||||
| 	F_PEOFPOSMODE                     = 0x3 | ||||
| 	F_PREALLOCATE                     = 0x2a | ||||
| 	F_PUNCHHOLE                       = 0x63 | ||||
| 	F_RDADVISE                        = 0x2c | ||||
| 	F_RDAHEAD                         = 0x2d | ||||
| 	F_RDLCK                           = 0x1 | ||||
| @@ -441,10 +529,12 @@ const ( | ||||
| 	F_SINGLE_WRITER                   = 0x4c | ||||
| 	F_THAW_FS                         = 0x36 | ||||
| 	F_TRANSCODEKEY                    = 0x4b | ||||
| 	F_TRIM_ACTIVE_FILE                = 0x64 | ||||
| 	F_UNLCK                           = 0x2 | ||||
| 	F_VOLPOSMODE                      = 0x4 | ||||
| 	F_WRLCK                           = 0x3 | ||||
| 	HUPCL                             = 0x4000 | ||||
| 	HW_MACHINE                        = 0x1 | ||||
| 	ICANON                            = 0x100 | ||||
| 	ICMP6_FILTER                      = 0x12 | ||||
| 	ICRNL                             = 0x100 | ||||
| @@ -681,6 +771,7 @@ const ( | ||||
| 	IPV6_FAITH                        = 0x1d | ||||
| 	IPV6_FLOWINFO_MASK                = 0xffffff0f | ||||
| 	IPV6_FLOWLABEL_MASK               = 0xffff0f00 | ||||
| 	IPV6_FLOW_ECN_MASK                = 0x300 | ||||
| 	IPV6_FRAGTTL                      = 0x3c | ||||
| 	IPV6_FW_ADD                       = 0x1e | ||||
| 	IPV6_FW_DEL                       = 0x1f | ||||
| @@ -771,6 +862,7 @@ const ( | ||||
| 	IP_RECVOPTS                       = 0x5 | ||||
| 	IP_RECVPKTINFO                    = 0x1a | ||||
| 	IP_RECVRETOPTS                    = 0x6 | ||||
| 	IP_RECVTOS                        = 0x1b | ||||
| 	IP_RECVTTL                        = 0x18 | ||||
| 	IP_RETOPTS                        = 0x8 | ||||
| 	IP_RF                             = 0x8000 | ||||
| @@ -789,6 +881,10 @@ const ( | ||||
| 	IXANY                             = 0x800 | ||||
| 	IXOFF                             = 0x400 | ||||
| 	IXON                              = 0x200 | ||||
| 	KERN_HOSTNAME                     = 0xa | ||||
| 	KERN_OSRELEASE                    = 0x2 | ||||
| 	KERN_OSTYPE                       = 0x1 | ||||
| 	KERN_VERSION                      = 0x4 | ||||
| 	LOCK_EX                           = 0x2 | ||||
| 	LOCK_NB                           = 0x4 | ||||
| 	LOCK_SH                           = 0x1 | ||||
| @@ -1377,6 +1473,12 @@ const ( | ||||
| 	WORDSIZE                          = 0x40 | ||||
| 	WSTOPPED                          = 0x8 | ||||
| 	WUNTRACED                         = 0x2 | ||||
| 	XATTR_CREATE                      = 0x2 | ||||
| 	XATTR_NODEFAULT                   = 0x10 | ||||
| 	XATTR_NOFOLLOW                    = 0x1 | ||||
| 	XATTR_NOSECURITY                  = 0x8 | ||||
| 	XATTR_REPLACE                     = 0x4 | ||||
| 	XATTR_SHOWCOMPRESSION             = 0x20 | ||||
| ) | ||||
|  | ||||
| // Errors | ||||
| @@ -1528,146 +1630,154 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:   "operation not permitted", | ||||
| 	2:   "no such file or directory", | ||||
| 	3:   "no such process", | ||||
| 	4:   "interrupted system call", | ||||
| 	5:   "input/output error", | ||||
| 	6:   "device not configured", | ||||
| 	7:   "argument list too long", | ||||
| 	8:   "exec format error", | ||||
| 	9:   "bad file descriptor", | ||||
| 	10:  "no child processes", | ||||
| 	11:  "resource deadlock avoided", | ||||
| 	12:  "cannot allocate memory", | ||||
| 	13:  "permission denied", | ||||
| 	14:  "bad address", | ||||
| 	15:  "block device required", | ||||
| 	16:  "resource busy", | ||||
| 	17:  "file exists", | ||||
| 	18:  "cross-device link", | ||||
| 	19:  "operation not supported by device", | ||||
| 	20:  "not a directory", | ||||
| 	21:  "is a directory", | ||||
| 	22:  "invalid argument", | ||||
| 	23:  "too many open files in system", | ||||
| 	24:  "too many open files", | ||||
| 	25:  "inappropriate ioctl for device", | ||||
| 	26:  "text file busy", | ||||
| 	27:  "file too large", | ||||
| 	28:  "no space left on device", | ||||
| 	29:  "illegal seek", | ||||
| 	30:  "read-only file system", | ||||
| 	31:  "too many links", | ||||
| 	32:  "broken pipe", | ||||
| 	33:  "numerical argument out of domain", | ||||
| 	34:  "result too large", | ||||
| 	35:  "resource temporarily unavailable", | ||||
| 	36:  "operation now in progress", | ||||
| 	37:  "operation already in progress", | ||||
| 	38:  "socket operation on non-socket", | ||||
| 	39:  "destination address required", | ||||
| 	40:  "message too long", | ||||
| 	41:  "protocol wrong type for socket", | ||||
| 	42:  "protocol not available", | ||||
| 	43:  "protocol not supported", | ||||
| 	44:  "socket type not supported", | ||||
| 	45:  "operation not supported", | ||||
| 	46:  "protocol family not supported", | ||||
| 	47:  "address family not supported by protocol family", | ||||
| 	48:  "address already in use", | ||||
| 	49:  "can't assign requested address", | ||||
| 	50:  "network is down", | ||||
| 	51:  "network is unreachable", | ||||
| 	52:  "network dropped connection on reset", | ||||
| 	53:  "software caused connection abort", | ||||
| 	54:  "connection reset by peer", | ||||
| 	55:  "no buffer space available", | ||||
| 	56:  "socket is already connected", | ||||
| 	57:  "socket is not connected", | ||||
| 	58:  "can't send after socket shutdown", | ||||
| 	59:  "too many references: can't splice", | ||||
| 	60:  "operation timed out", | ||||
| 	61:  "connection refused", | ||||
| 	62:  "too many levels of symbolic links", | ||||
| 	63:  "file name too long", | ||||
| 	64:  "host is down", | ||||
| 	65:  "no route to host", | ||||
| 	66:  "directory not empty", | ||||
| 	67:  "too many processes", | ||||
| 	68:  "too many users", | ||||
| 	69:  "disc quota exceeded", | ||||
| 	70:  "stale NFS file handle", | ||||
| 	71:  "too many levels of remote in path", | ||||
| 	72:  "RPC struct is bad", | ||||
| 	73:  "RPC version wrong", | ||||
| 	74:  "RPC prog. not avail", | ||||
| 	75:  "program version wrong", | ||||
| 	76:  "bad procedure for program", | ||||
| 	77:  "no locks available", | ||||
| 	78:  "function not implemented", | ||||
| 	79:  "inappropriate file type or format", | ||||
| 	80:  "authentication error", | ||||
| 	81:  "need authenticator", | ||||
| 	82:  "device power is off", | ||||
| 	83:  "device error", | ||||
| 	84:  "value too large to be stored in data type", | ||||
| 	85:  "bad executable (or shared library)", | ||||
| 	86:  "bad CPU type in executable", | ||||
| 	87:  "shared library version mismatch", | ||||
| 	88:  "malformed Mach-o file", | ||||
| 	89:  "operation canceled", | ||||
| 	90:  "identifier removed", | ||||
| 	91:  "no message of desired type", | ||||
| 	92:  "illegal byte sequence", | ||||
| 	93:  "attribute not found", | ||||
| 	94:  "bad message", | ||||
| 	95:  "EMULTIHOP (Reserved)", | ||||
| 	96:  "no message available on STREAM", | ||||
| 	97:  "ENOLINK (Reserved)", | ||||
| 	98:  "no STREAM resources", | ||||
| 	99:  "not a STREAM", | ||||
| 	100: "protocol error", | ||||
| 	101: "STREAM ioctl timeout", | ||||
| 	102: "operation not supported on socket", | ||||
| 	103: "policy not found", | ||||
| 	104: "state not recoverable", | ||||
| 	105: "previous owner died", | ||||
| 	106: "interface output queue is full", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "resource busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "ENOTSUP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EPWROFF", "device power is off"}, | ||||
| 	{83, "EDEVERR", "device error"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "EBADEXEC", "bad executable (or shared library)"}, | ||||
| 	{86, "EBADARCH", "bad CPU type in executable"}, | ||||
| 	{87, "ESHLIBVERS", "shared library version mismatch"}, | ||||
| 	{88, "EBADMACHO", "malformed Mach-o file"}, | ||||
| 	{89, "ECANCELED", "operation canceled"}, | ||||
| 	{90, "EIDRM", "identifier removed"}, | ||||
| 	{91, "ENOMSG", "no message of desired type"}, | ||||
| 	{92, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{93, "ENOATTR", "attribute not found"}, | ||||
| 	{94, "EBADMSG", "bad message"}, | ||||
| 	{95, "EMULTIHOP", "EMULTIHOP (Reserved)"}, | ||||
| 	{96, "ENODATA", "no message available on STREAM"}, | ||||
| 	{97, "ENOLINK", "ENOLINK (Reserved)"}, | ||||
| 	{98, "ENOSR", "no STREAM resources"}, | ||||
| 	{99, "ENOSTR", "not a STREAM"}, | ||||
| 	{100, "EPROTO", "protocol error"}, | ||||
| 	{101, "ETIME", "STREAM ioctl timeout"}, | ||||
| 	{102, "EOPNOTSUPP", "operation not supported on socket"}, | ||||
| 	{103, "ENOPOLICY", "policy not found"}, | ||||
| 	{104, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{105, "EOWNERDEAD", "previous owner died"}, | ||||
| 	{106, "EQFULL", "interface output queue is full"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGABRT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										388
									
								
								vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -49,6 +49,86 @@ const ( | ||||
| 	AF_UNSPEC                         = 0x0 | ||||
| 	AF_UTUN                           = 0x26 | ||||
| 	ALTWERASE                         = 0x200 | ||||
| 	ATTR_BIT_MAP_COUNT                = 0x5 | ||||
| 	ATTR_CMN_ACCESSMASK               = 0x20000 | ||||
| 	ATTR_CMN_ACCTIME                  = 0x1000 | ||||
| 	ATTR_CMN_ADDEDTIME                = 0x10000000 | ||||
| 	ATTR_CMN_BKUPTIME                 = 0x2000 | ||||
| 	ATTR_CMN_CHGTIME                  = 0x800 | ||||
| 	ATTR_CMN_CRTIME                   = 0x200 | ||||
| 	ATTR_CMN_DATA_PROTECT_FLAGS       = 0x40000000 | ||||
| 	ATTR_CMN_DEVID                    = 0x2 | ||||
| 	ATTR_CMN_DOCUMENT_ID              = 0x100000 | ||||
| 	ATTR_CMN_ERROR                    = 0x20000000 | ||||
| 	ATTR_CMN_EXTENDED_SECURITY        = 0x400000 | ||||
| 	ATTR_CMN_FILEID                   = 0x2000000 | ||||
| 	ATTR_CMN_FLAGS                    = 0x40000 | ||||
| 	ATTR_CMN_FNDRINFO                 = 0x4000 | ||||
| 	ATTR_CMN_FSID                     = 0x4 | ||||
| 	ATTR_CMN_FULLPATH                 = 0x8000000 | ||||
| 	ATTR_CMN_GEN_COUNT                = 0x80000 | ||||
| 	ATTR_CMN_GRPID                    = 0x10000 | ||||
| 	ATTR_CMN_GRPUUID                  = 0x1000000 | ||||
| 	ATTR_CMN_MODTIME                  = 0x400 | ||||
| 	ATTR_CMN_NAME                     = 0x1 | ||||
| 	ATTR_CMN_NAMEDATTRCOUNT           = 0x80000 | ||||
| 	ATTR_CMN_NAMEDATTRLIST            = 0x100000 | ||||
| 	ATTR_CMN_OBJID                    = 0x20 | ||||
| 	ATTR_CMN_OBJPERMANENTID           = 0x40 | ||||
| 	ATTR_CMN_OBJTAG                   = 0x10 | ||||
| 	ATTR_CMN_OBJTYPE                  = 0x8 | ||||
| 	ATTR_CMN_OWNERID                  = 0x8000 | ||||
| 	ATTR_CMN_PARENTID                 = 0x4000000 | ||||
| 	ATTR_CMN_PAROBJID                 = 0x80 | ||||
| 	ATTR_CMN_RETURNED_ATTRS           = 0x80000000 | ||||
| 	ATTR_CMN_SCRIPT                   = 0x100 | ||||
| 	ATTR_CMN_SETMASK                  = 0x41c7ff00 | ||||
| 	ATTR_CMN_USERACCESS               = 0x200000 | ||||
| 	ATTR_CMN_UUID                     = 0x800000 | ||||
| 	ATTR_CMN_VALIDMASK                = 0xffffffff | ||||
| 	ATTR_CMN_VOLSETMASK               = 0x6700 | ||||
| 	ATTR_FILE_ALLOCSIZE               = 0x4 | ||||
| 	ATTR_FILE_CLUMPSIZE               = 0x10 | ||||
| 	ATTR_FILE_DATAALLOCSIZE           = 0x400 | ||||
| 	ATTR_FILE_DATAEXTENTS             = 0x800 | ||||
| 	ATTR_FILE_DATALENGTH              = 0x200 | ||||
| 	ATTR_FILE_DEVTYPE                 = 0x20 | ||||
| 	ATTR_FILE_FILETYPE                = 0x40 | ||||
| 	ATTR_FILE_FORKCOUNT               = 0x80 | ||||
| 	ATTR_FILE_FORKLIST                = 0x100 | ||||
| 	ATTR_FILE_IOBLOCKSIZE             = 0x8 | ||||
| 	ATTR_FILE_LINKCOUNT               = 0x1 | ||||
| 	ATTR_FILE_RSRCALLOCSIZE           = 0x2000 | ||||
| 	ATTR_FILE_RSRCEXTENTS             = 0x4000 | ||||
| 	ATTR_FILE_RSRCLENGTH              = 0x1000 | ||||
| 	ATTR_FILE_SETMASK                 = 0x20 | ||||
| 	ATTR_FILE_TOTALSIZE               = 0x2 | ||||
| 	ATTR_FILE_VALIDMASK               = 0x37ff | ||||
| 	ATTR_VOL_ALLOCATIONCLUMP          = 0x40 | ||||
| 	ATTR_VOL_ATTRIBUTES               = 0x40000000 | ||||
| 	ATTR_VOL_CAPABILITIES             = 0x20000 | ||||
| 	ATTR_VOL_DIRCOUNT                 = 0x400 | ||||
| 	ATTR_VOL_ENCODINGSUSED            = 0x10000 | ||||
| 	ATTR_VOL_FILECOUNT                = 0x200 | ||||
| 	ATTR_VOL_FSTYPE                   = 0x1 | ||||
| 	ATTR_VOL_INFO                     = 0x80000000 | ||||
| 	ATTR_VOL_IOBLOCKSIZE              = 0x80 | ||||
| 	ATTR_VOL_MAXOBJCOUNT              = 0x800 | ||||
| 	ATTR_VOL_MINALLOCATION            = 0x20 | ||||
| 	ATTR_VOL_MOUNTEDDEVICE            = 0x8000 | ||||
| 	ATTR_VOL_MOUNTFLAGS               = 0x4000 | ||||
| 	ATTR_VOL_MOUNTPOINT               = 0x1000 | ||||
| 	ATTR_VOL_NAME                     = 0x2000 | ||||
| 	ATTR_VOL_OBJCOUNT                 = 0x100 | ||||
| 	ATTR_VOL_QUOTA_SIZE               = 0x10000000 | ||||
| 	ATTR_VOL_RESERVED_SIZE            = 0x20000000 | ||||
| 	ATTR_VOL_SETMASK                  = 0x80002000 | ||||
| 	ATTR_VOL_SIGNATURE                = 0x2 | ||||
| 	ATTR_VOL_SIZE                     = 0x4 | ||||
| 	ATTR_VOL_SPACEAVAIL               = 0x10 | ||||
| 	ATTR_VOL_SPACEFREE                = 0x8 | ||||
| 	ATTR_VOL_UUID                     = 0x40000 | ||||
| 	ATTR_VOL_VALIDMASK                = 0xf007ffff | ||||
| 	B0                                = 0x0 | ||||
| 	B110                              = 0x6e | ||||
| 	B115200                           = 0x1c200 | ||||
| @@ -169,6 +249,8 @@ const ( | ||||
| 	CSTOP                             = 0x13 | ||||
| 	CSTOPB                            = 0x400 | ||||
| 	CSUSP                             = 0x1a | ||||
| 	CTL_HW                            = 0x6 | ||||
| 	CTL_KERN                          = 0x1 | ||||
| 	CTL_MAXNAME                       = 0xc | ||||
| 	CTL_NET                           = 0x4 | ||||
| 	DLT_A429                          = 0xb8 | ||||
| @@ -390,6 +472,11 @@ const ( | ||||
| 	FF1                               = 0x4000 | ||||
| 	FFDLY                             = 0x4000 | ||||
| 	FLUSHO                            = 0x800000 | ||||
| 	FSOPT_ATTR_CMN_EXTENDED           = 0x20 | ||||
| 	FSOPT_NOFOLLOW                    = 0x1 | ||||
| 	FSOPT_NOINMEMUPDATE               = 0x2 | ||||
| 	FSOPT_PACK_INVAL_ATTRS            = 0x8 | ||||
| 	FSOPT_REPORT_FULLSIZE             = 0x4 | ||||
| 	F_ADDFILESIGS                     = 0x3d | ||||
| 	F_ADDFILESIGS_FOR_DYLD_SIM        = 0x53 | ||||
| 	F_ADDFILESIGS_RETURN              = 0x61 | ||||
| @@ -425,6 +512,7 @@ const ( | ||||
| 	F_PATHPKG_CHECK                   = 0x34 | ||||
| 	F_PEOFPOSMODE                     = 0x3 | ||||
| 	F_PREALLOCATE                     = 0x2a | ||||
| 	F_PUNCHHOLE                       = 0x63 | ||||
| 	F_RDADVISE                        = 0x2c | ||||
| 	F_RDAHEAD                         = 0x2d | ||||
| 	F_RDLCK                           = 0x1 | ||||
| @@ -441,10 +529,12 @@ const ( | ||||
| 	F_SINGLE_WRITER                   = 0x4c | ||||
| 	F_THAW_FS                         = 0x36 | ||||
| 	F_TRANSCODEKEY                    = 0x4b | ||||
| 	F_TRIM_ACTIVE_FILE                = 0x64 | ||||
| 	F_UNLCK                           = 0x2 | ||||
| 	F_VOLPOSMODE                      = 0x4 | ||||
| 	F_WRLCK                           = 0x3 | ||||
| 	HUPCL                             = 0x4000 | ||||
| 	HW_MACHINE                        = 0x1 | ||||
| 	ICANON                            = 0x100 | ||||
| 	ICMP6_FILTER                      = 0x12 | ||||
| 	ICRNL                             = 0x100 | ||||
| @@ -681,6 +771,7 @@ const ( | ||||
| 	IPV6_FAITH                        = 0x1d | ||||
| 	IPV6_FLOWINFO_MASK                = 0xffffff0f | ||||
| 	IPV6_FLOWLABEL_MASK               = 0xffff0f00 | ||||
| 	IPV6_FLOW_ECN_MASK                = 0x300 | ||||
| 	IPV6_FRAGTTL                      = 0x3c | ||||
| 	IPV6_FW_ADD                       = 0x1e | ||||
| 	IPV6_FW_DEL                       = 0x1f | ||||
| @@ -771,6 +862,7 @@ const ( | ||||
| 	IP_RECVOPTS                       = 0x5 | ||||
| 	IP_RECVPKTINFO                    = 0x1a | ||||
| 	IP_RECVRETOPTS                    = 0x6 | ||||
| 	IP_RECVTOS                        = 0x1b | ||||
| 	IP_RECVTTL                        = 0x18 | ||||
| 	IP_RETOPTS                        = 0x8 | ||||
| 	IP_RF                             = 0x8000 | ||||
| @@ -789,6 +881,10 @@ const ( | ||||
| 	IXANY                             = 0x800 | ||||
| 	IXOFF                             = 0x400 | ||||
| 	IXON                              = 0x200 | ||||
| 	KERN_HOSTNAME                     = 0xa | ||||
| 	KERN_OSRELEASE                    = 0x2 | ||||
| 	KERN_OSTYPE                       = 0x1 | ||||
| 	KERN_VERSION                      = 0x4 | ||||
| 	LOCK_EX                           = 0x2 | ||||
| 	LOCK_NB                           = 0x4 | ||||
| 	LOCK_SH                           = 0x1 | ||||
| @@ -1377,6 +1473,12 @@ const ( | ||||
| 	WORDSIZE                          = 0x40 | ||||
| 	WSTOPPED                          = 0x8 | ||||
| 	WUNTRACED                         = 0x2 | ||||
| 	XATTR_CREATE                      = 0x2 | ||||
| 	XATTR_NODEFAULT                   = 0x10 | ||||
| 	XATTR_NOFOLLOW                    = 0x1 | ||||
| 	XATTR_NOSECURITY                  = 0x8 | ||||
| 	XATTR_REPLACE                     = 0x4 | ||||
| 	XATTR_SHOWCOMPRESSION             = 0x20 | ||||
| ) | ||||
|  | ||||
| // Errors | ||||
| @@ -1528,146 +1630,154 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:   "operation not permitted", | ||||
| 	2:   "no such file or directory", | ||||
| 	3:   "no such process", | ||||
| 	4:   "interrupted system call", | ||||
| 	5:   "input/output error", | ||||
| 	6:   "device not configured", | ||||
| 	7:   "argument list too long", | ||||
| 	8:   "exec format error", | ||||
| 	9:   "bad file descriptor", | ||||
| 	10:  "no child processes", | ||||
| 	11:  "resource deadlock avoided", | ||||
| 	12:  "cannot allocate memory", | ||||
| 	13:  "permission denied", | ||||
| 	14:  "bad address", | ||||
| 	15:  "block device required", | ||||
| 	16:  "resource busy", | ||||
| 	17:  "file exists", | ||||
| 	18:  "cross-device link", | ||||
| 	19:  "operation not supported by device", | ||||
| 	20:  "not a directory", | ||||
| 	21:  "is a directory", | ||||
| 	22:  "invalid argument", | ||||
| 	23:  "too many open files in system", | ||||
| 	24:  "too many open files", | ||||
| 	25:  "inappropriate ioctl for device", | ||||
| 	26:  "text file busy", | ||||
| 	27:  "file too large", | ||||
| 	28:  "no space left on device", | ||||
| 	29:  "illegal seek", | ||||
| 	30:  "read-only file system", | ||||
| 	31:  "too many links", | ||||
| 	32:  "broken pipe", | ||||
| 	33:  "numerical argument out of domain", | ||||
| 	34:  "result too large", | ||||
| 	35:  "resource temporarily unavailable", | ||||
| 	36:  "operation now in progress", | ||||
| 	37:  "operation already in progress", | ||||
| 	38:  "socket operation on non-socket", | ||||
| 	39:  "destination address required", | ||||
| 	40:  "message too long", | ||||
| 	41:  "protocol wrong type for socket", | ||||
| 	42:  "protocol not available", | ||||
| 	43:  "protocol not supported", | ||||
| 	44:  "socket type not supported", | ||||
| 	45:  "operation not supported", | ||||
| 	46:  "protocol family not supported", | ||||
| 	47:  "address family not supported by protocol family", | ||||
| 	48:  "address already in use", | ||||
| 	49:  "can't assign requested address", | ||||
| 	50:  "network is down", | ||||
| 	51:  "network is unreachable", | ||||
| 	52:  "network dropped connection on reset", | ||||
| 	53:  "software caused connection abort", | ||||
| 	54:  "connection reset by peer", | ||||
| 	55:  "no buffer space available", | ||||
| 	56:  "socket is already connected", | ||||
| 	57:  "socket is not connected", | ||||
| 	58:  "can't send after socket shutdown", | ||||
| 	59:  "too many references: can't splice", | ||||
| 	60:  "operation timed out", | ||||
| 	61:  "connection refused", | ||||
| 	62:  "too many levels of symbolic links", | ||||
| 	63:  "file name too long", | ||||
| 	64:  "host is down", | ||||
| 	65:  "no route to host", | ||||
| 	66:  "directory not empty", | ||||
| 	67:  "too many processes", | ||||
| 	68:  "too many users", | ||||
| 	69:  "disc quota exceeded", | ||||
| 	70:  "stale NFS file handle", | ||||
| 	71:  "too many levels of remote in path", | ||||
| 	72:  "RPC struct is bad", | ||||
| 	73:  "RPC version wrong", | ||||
| 	74:  "RPC prog. not avail", | ||||
| 	75:  "program version wrong", | ||||
| 	76:  "bad procedure for program", | ||||
| 	77:  "no locks available", | ||||
| 	78:  "function not implemented", | ||||
| 	79:  "inappropriate file type or format", | ||||
| 	80:  "authentication error", | ||||
| 	81:  "need authenticator", | ||||
| 	82:  "device power is off", | ||||
| 	83:  "device error", | ||||
| 	84:  "value too large to be stored in data type", | ||||
| 	85:  "bad executable (or shared library)", | ||||
| 	86:  "bad CPU type in executable", | ||||
| 	87:  "shared library version mismatch", | ||||
| 	88:  "malformed Mach-o file", | ||||
| 	89:  "operation canceled", | ||||
| 	90:  "identifier removed", | ||||
| 	91:  "no message of desired type", | ||||
| 	92:  "illegal byte sequence", | ||||
| 	93:  "attribute not found", | ||||
| 	94:  "bad message", | ||||
| 	95:  "EMULTIHOP (Reserved)", | ||||
| 	96:  "no message available on STREAM", | ||||
| 	97:  "ENOLINK (Reserved)", | ||||
| 	98:  "no STREAM resources", | ||||
| 	99:  "not a STREAM", | ||||
| 	100: "protocol error", | ||||
| 	101: "STREAM ioctl timeout", | ||||
| 	102: "operation not supported on socket", | ||||
| 	103: "policy not found", | ||||
| 	104: "state not recoverable", | ||||
| 	105: "previous owner died", | ||||
| 	106: "interface output queue is full", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "resource busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "ENOTSUP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EPWROFF", "device power is off"}, | ||||
| 	{83, "EDEVERR", "device error"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "EBADEXEC", "bad executable (or shared library)"}, | ||||
| 	{86, "EBADARCH", "bad CPU type in executable"}, | ||||
| 	{87, "ESHLIBVERS", "shared library version mismatch"}, | ||||
| 	{88, "EBADMACHO", "malformed Mach-o file"}, | ||||
| 	{89, "ECANCELED", "operation canceled"}, | ||||
| 	{90, "EIDRM", "identifier removed"}, | ||||
| 	{91, "ENOMSG", "no message of desired type"}, | ||||
| 	{92, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{93, "ENOATTR", "attribute not found"}, | ||||
| 	{94, "EBADMSG", "bad message"}, | ||||
| 	{95, "EMULTIHOP", "EMULTIHOP (Reserved)"}, | ||||
| 	{96, "ENODATA", "no message available on STREAM"}, | ||||
| 	{97, "ENOLINK", "ENOLINK (Reserved)"}, | ||||
| 	{98, "ENOSR", "no STREAM resources"}, | ||||
| 	{99, "ENOSTR", "not a STREAM"}, | ||||
| 	{100, "EPROTO", "protocol error"}, | ||||
| 	{101, "ETIME", "STREAM ioctl timeout"}, | ||||
| 	{102, "EOPNOTSUPP", "operation not supported on socket"}, | ||||
| 	{103, "ENOPOLICY", "policy not found"}, | ||||
| 	{104, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{105, "EOWNERDEAD", "previous owner died"}, | ||||
| 	{106, "EQFULL", "interface output queue is full"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGABRT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										288
									
								
								vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										288
									
								
								vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -168,6 +168,8 @@ const ( | ||||
| 	CSTOP                             = 0x13 | ||||
| 	CSTOPB                            = 0x400 | ||||
| 	CSUSP                             = 0x1a | ||||
| 	CTL_HW                            = 0x6 | ||||
| 	CTL_KERN                          = 0x1 | ||||
| 	CTL_MAXNAME                       = 0xc | ||||
| 	CTL_NET                           = 0x4 | ||||
| 	DLT_A429                          = 0xb8 | ||||
| @@ -353,6 +355,7 @@ const ( | ||||
| 	F_UNLCK                           = 0x2 | ||||
| 	F_WRLCK                           = 0x3 | ||||
| 	HUPCL                             = 0x4000 | ||||
| 	HW_MACHINE                        = 0x1 | ||||
| 	ICANON                            = 0x100 | ||||
| 	ICMP6_FILTER                      = 0x12 | ||||
| 	ICRNL                             = 0x100 | ||||
| @@ -835,6 +838,10 @@ const ( | ||||
| 	IXANY                             = 0x800 | ||||
| 	IXOFF                             = 0x400 | ||||
| 	IXON                              = 0x200 | ||||
| 	KERN_HOSTNAME                     = 0xa | ||||
| 	KERN_OSRELEASE                    = 0x2 | ||||
| 	KERN_OSTYPE                       = 0x1 | ||||
| 	KERN_VERSION                      = 0x4 | ||||
| 	LOCK_EX                           = 0x2 | ||||
| 	LOCK_NB                           = 0x4 | ||||
| 	LOCK_SH                           = 0x1 | ||||
| @@ -973,7 +980,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 | ||||
| @@ -1427,142 +1437,150 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:  "operation not permitted", | ||||
| 	2:  "no such file or directory", | ||||
| 	3:  "no such process", | ||||
| 	4:  "interrupted system call", | ||||
| 	5:  "input/output error", | ||||
| 	6:  "device not configured", | ||||
| 	7:  "argument list too long", | ||||
| 	8:  "exec format error", | ||||
| 	9:  "bad file descriptor", | ||||
| 	10: "no child processes", | ||||
| 	11: "resource deadlock avoided", | ||||
| 	12: "cannot allocate memory", | ||||
| 	13: "permission denied", | ||||
| 	14: "bad address", | ||||
| 	15: "block device required", | ||||
| 	16: "device busy", | ||||
| 	17: "file exists", | ||||
| 	18: "cross-device link", | ||||
| 	19: "operation not supported by device", | ||||
| 	20: "not a directory", | ||||
| 	21: "is a directory", | ||||
| 	22: "invalid argument", | ||||
| 	23: "too many open files in system", | ||||
| 	24: "too many open files", | ||||
| 	25: "inappropriate ioctl for device", | ||||
| 	26: "text file busy", | ||||
| 	27: "file too large", | ||||
| 	28: "no space left on device", | ||||
| 	29: "illegal seek", | ||||
| 	30: "read-only file system", | ||||
| 	31: "too many links", | ||||
| 	32: "broken pipe", | ||||
| 	33: "numerical argument out of domain", | ||||
| 	34: "result too large", | ||||
| 	35: "resource temporarily unavailable", | ||||
| 	36: "operation now in progress", | ||||
| 	37: "operation already in progress", | ||||
| 	38: "socket operation on non-socket", | ||||
| 	39: "destination address required", | ||||
| 	40: "message too long", | ||||
| 	41: "protocol wrong type for socket", | ||||
| 	42: "protocol not available", | ||||
| 	43: "protocol not supported", | ||||
| 	44: "socket type not supported", | ||||
| 	45: "operation not supported", | ||||
| 	46: "protocol family not supported", | ||||
| 	47: "address family not supported by protocol family", | ||||
| 	48: "address already in use", | ||||
| 	49: "can't assign requested address", | ||||
| 	50: "network is down", | ||||
| 	51: "network is unreachable", | ||||
| 	52: "network dropped connection on reset", | ||||
| 	53: "software caused connection abort", | ||||
| 	54: "connection reset by peer", | ||||
| 	55: "no buffer space available", | ||||
| 	56: "socket is already connected", | ||||
| 	57: "socket is not connected", | ||||
| 	58: "can't send after socket shutdown", | ||||
| 	59: "too many references: can't splice", | ||||
| 	60: "operation timed out", | ||||
| 	61: "connection refused", | ||||
| 	62: "too many levels of symbolic links", | ||||
| 	63: "file name too long", | ||||
| 	64: "host is down", | ||||
| 	65: "no route to host", | ||||
| 	66: "directory not empty", | ||||
| 	67: "too many processes", | ||||
| 	68: "too many users", | ||||
| 	69: "disc quota exceeded", | ||||
| 	70: "stale NFS file handle", | ||||
| 	71: "too many levels of remote in path", | ||||
| 	72: "RPC struct is bad", | ||||
| 	73: "RPC version wrong", | ||||
| 	74: "RPC prog. not avail", | ||||
| 	75: "program version wrong", | ||||
| 	76: "bad procedure for program", | ||||
| 	77: "no locks available", | ||||
| 	78: "function not implemented", | ||||
| 	79: "inappropriate file type or format", | ||||
| 	80: "authentication error", | ||||
| 	81: "need authenticator", | ||||
| 	82: "identifier removed", | ||||
| 	83: "no message of desired type", | ||||
| 	84: "value too large to be stored in data type", | ||||
| 	85: "operation canceled", | ||||
| 	86: "illegal byte sequence", | ||||
| 	87: "attribute not found", | ||||
| 	88: "programming error", | ||||
| 	89: "bad message", | ||||
| 	90: "multihop attempted", | ||||
| 	91: "link has been severed", | ||||
| 	92: "protocol error", | ||||
| 	93: "no medium found", | ||||
| 	94: "unknown error: 94", | ||||
| 	95: "unknown error: 95", | ||||
| 	96: "unknown error: 96", | ||||
| 	97: "unknown error: 97", | ||||
| 	98: "unknown error: 98", | ||||
| 	99: "unknown error: 99", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "device busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EWOULDBLOCK", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "EOPNOTSUPP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EIDRM", "identifier removed"}, | ||||
| 	{83, "ENOMSG", "no message of desired type"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "ECANCELED", "operation canceled"}, | ||||
| 	{86, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{87, "ENOATTR", "attribute not found"}, | ||||
| 	{88, "EDOOFUS", "programming error"}, | ||||
| 	{89, "EBADMSG", "bad message"}, | ||||
| 	{90, "EMULTIHOP", "multihop attempted"}, | ||||
| 	{91, "ENOLINK", "link has been severed"}, | ||||
| 	{92, "EPROTO", "protocol error"}, | ||||
| 	{93, "ENOMEDIUM", "no medium found"}, | ||||
| 	{94, "EUNUSED94", "unknown error: 94"}, | ||||
| 	{95, "EUNUSED95", "unknown error: 95"}, | ||||
| 	{96, "EUNUSED96", "unknown error: 96"}, | ||||
| 	{97, "EUNUSED97", "unknown error: 97"}, | ||||
| 	{98, "EUNUSED98", "unknown error: 98"}, | ||||
| 	{99, "ELAST", "unknown error: 99"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| 	32: "thread Scheduler", | ||||
| 	33: "checkPoint", | ||||
| 	34: "checkPointExit", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGIOT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| 	{32, "SIGTHR", "thread Scheduler"}, | ||||
| 	{33, "SIGCKPT", "checkPoint"}, | ||||
| 	{34, "SIGCKPTEXIT", "checkPointExit"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										320
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										320
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -351,6 +351,8 @@ const ( | ||||
| 	CSTOP                          = 0x13 | ||||
| 	CSTOPB                         = 0x400 | ||||
| 	CSUSP                          = 0x1a | ||||
| 	CTL_HW                         = 0x6 | ||||
| 	CTL_KERN                       = 0x1 | ||||
| 	CTL_MAXNAME                    = 0x18 | ||||
| 	CTL_NET                        = 0x4 | ||||
| 	DLT_A429                       = 0xb8 | ||||
| @@ -608,6 +610,7 @@ const ( | ||||
| 	F_UNLCKSYS                     = 0x4 | ||||
| 	F_WRLCK                        = 0x3 | ||||
| 	HUPCL                          = 0x4000 | ||||
| 	HW_MACHINE                     = 0x1 | ||||
| 	ICANON                         = 0x100 | ||||
| 	ICMP6_FILTER                   = 0x12 | ||||
| 	ICRNL                          = 0x100 | ||||
| @@ -944,6 +947,10 @@ const ( | ||||
| 	IXANY                          = 0x800 | ||||
| 	IXOFF                          = 0x400 | ||||
| 	IXON                           = 0x200 | ||||
| 	KERN_HOSTNAME                  = 0xa | ||||
| 	KERN_OSRELEASE                 = 0x2 | ||||
| 	KERN_OSTYPE                    = 0x1 | ||||
| 	KERN_VERSION                   = 0x4 | ||||
| 	LOCK_EX                        = 0x2 | ||||
| 	LOCK_NB                        = 0x4 | ||||
| 	LOCK_SH                        = 0x1 | ||||
| @@ -981,6 +988,49 @@ const ( | ||||
| 	MAP_STACK                      = 0x400 | ||||
| 	MCL_CURRENT                    = 0x1 | ||||
| 	MCL_FUTURE                     = 0x2 | ||||
| 	MNT_ACLS                       = 0x8000000 | ||||
| 	MNT_ASYNC                      = 0x40 | ||||
| 	MNT_AUTOMOUNTED                = 0x200000000 | ||||
| 	MNT_BYFSID                     = 0x8000000 | ||||
| 	MNT_CMDFLAGS                   = 0xd0f0000 | ||||
| 	MNT_DEFEXPORTED                = 0x200 | ||||
| 	MNT_DELEXPORT                  = 0x20000 | ||||
| 	MNT_EXKERB                     = 0x800 | ||||
| 	MNT_EXPORTANON                 = 0x400 | ||||
| 	MNT_EXPORTED                   = 0x100 | ||||
| 	MNT_EXPUBLIC                   = 0x20000000 | ||||
| 	MNT_EXRDONLY                   = 0x80 | ||||
| 	MNT_FORCE                      = 0x80000 | ||||
| 	MNT_GJOURNAL                   = 0x2000000 | ||||
| 	MNT_IGNORE                     = 0x800000 | ||||
| 	MNT_LAZY                       = 0x3 | ||||
| 	MNT_LOCAL                      = 0x1000 | ||||
| 	MNT_MULTILABEL                 = 0x4000000 | ||||
| 	MNT_NFS4ACLS                   = 0x10 | ||||
| 	MNT_NOATIME                    = 0x10000000 | ||||
| 	MNT_NOCLUSTERR                 = 0x40000000 | ||||
| 	MNT_NOCLUSTERW                 = 0x80000000 | ||||
| 	MNT_NOEXEC                     = 0x4 | ||||
| 	MNT_NONBUSY                    = 0x4000000 | ||||
| 	MNT_NOSUID                     = 0x8 | ||||
| 	MNT_NOSYMFOLLOW                = 0x400000 | ||||
| 	MNT_NOWAIT                     = 0x2 | ||||
| 	MNT_QUOTA                      = 0x2000 | ||||
| 	MNT_RDONLY                     = 0x1 | ||||
| 	MNT_RELOAD                     = 0x40000 | ||||
| 	MNT_ROOTFS                     = 0x4000 | ||||
| 	MNT_SNAPSHOT                   = 0x1000000 | ||||
| 	MNT_SOFTDEP                    = 0x200000 | ||||
| 	MNT_SUIDDIR                    = 0x100000 | ||||
| 	MNT_SUJ                        = 0x100000000 | ||||
| 	MNT_SUSPEND                    = 0x4 | ||||
| 	MNT_SYNCHRONOUS                = 0x2 | ||||
| 	MNT_UNION                      = 0x20 | ||||
| 	MNT_UPDATE                     = 0x10000 | ||||
| 	MNT_UPDATEMASK                 = 0x2d8d0807e | ||||
| 	MNT_USER                       = 0x8000 | ||||
| 	MNT_VISFLAGMASK                = 0x3fef0ffff | ||||
| 	MNT_WAIT                       = 0x1 | ||||
| 	MSG_CMSG_CLOEXEC               = 0x40000 | ||||
| 	MSG_COMPAT                     = 0x8000 | ||||
| 	MSG_CTRUNC                     = 0x20 | ||||
| @@ -1569,138 +1619,146 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:  "operation not permitted", | ||||
| 	2:  "no such file or directory", | ||||
| 	3:  "no such process", | ||||
| 	4:  "interrupted system call", | ||||
| 	5:  "input/output error", | ||||
| 	6:  "device not configured", | ||||
| 	7:  "argument list too long", | ||||
| 	8:  "exec format error", | ||||
| 	9:  "bad file descriptor", | ||||
| 	10: "no child processes", | ||||
| 	11: "resource deadlock avoided", | ||||
| 	12: "cannot allocate memory", | ||||
| 	13: "permission denied", | ||||
| 	14: "bad address", | ||||
| 	15: "block device required", | ||||
| 	16: "device busy", | ||||
| 	17: "file exists", | ||||
| 	18: "cross-device link", | ||||
| 	19: "operation not supported by device", | ||||
| 	20: "not a directory", | ||||
| 	21: "is a directory", | ||||
| 	22: "invalid argument", | ||||
| 	23: "too many open files in system", | ||||
| 	24: "too many open files", | ||||
| 	25: "inappropriate ioctl for device", | ||||
| 	26: "text file busy", | ||||
| 	27: "file too large", | ||||
| 	28: "no space left on device", | ||||
| 	29: "illegal seek", | ||||
| 	30: "read-only file system", | ||||
| 	31: "too many links", | ||||
| 	32: "broken pipe", | ||||
| 	33: "numerical argument out of domain", | ||||
| 	34: "result too large", | ||||
| 	35: "resource temporarily unavailable", | ||||
| 	36: "operation now in progress", | ||||
| 	37: "operation already in progress", | ||||
| 	38: "socket operation on non-socket", | ||||
| 	39: "destination address required", | ||||
| 	40: "message too long", | ||||
| 	41: "protocol wrong type for socket", | ||||
| 	42: "protocol not available", | ||||
| 	43: "protocol not supported", | ||||
| 	44: "socket type not supported", | ||||
| 	45: "operation not supported", | ||||
| 	46: "protocol family not supported", | ||||
| 	47: "address family not supported by protocol family", | ||||
| 	48: "address already in use", | ||||
| 	49: "can't assign requested address", | ||||
| 	50: "network is down", | ||||
| 	51: "network is unreachable", | ||||
| 	52: "network dropped connection on reset", | ||||
| 	53: "software caused connection abort", | ||||
| 	54: "connection reset by peer", | ||||
| 	55: "no buffer space available", | ||||
| 	56: "socket is already connected", | ||||
| 	57: "socket is not connected", | ||||
| 	58: "can't send after socket shutdown", | ||||
| 	59: "too many references: can't splice", | ||||
| 	60: "operation timed out", | ||||
| 	61: "connection refused", | ||||
| 	62: "too many levels of symbolic links", | ||||
| 	63: "file name too long", | ||||
| 	64: "host is down", | ||||
| 	65: "no route to host", | ||||
| 	66: "directory not empty", | ||||
| 	67: "too many processes", | ||||
| 	68: "too many users", | ||||
| 	69: "disc quota exceeded", | ||||
| 	70: "stale NFS file handle", | ||||
| 	71: "too many levels of remote in path", | ||||
| 	72: "RPC struct is bad", | ||||
| 	73: "RPC version wrong", | ||||
| 	74: "RPC prog. not avail", | ||||
| 	75: "program version wrong", | ||||
| 	76: "bad procedure for program", | ||||
| 	77: "no locks available", | ||||
| 	78: "function not implemented", | ||||
| 	79: "inappropriate file type or format", | ||||
| 	80: "authentication error", | ||||
| 	81: "need authenticator", | ||||
| 	82: "identifier removed", | ||||
| 	83: "no message of desired type", | ||||
| 	84: "value too large to be stored in data type", | ||||
| 	85: "operation canceled", | ||||
| 	86: "illegal byte sequence", | ||||
| 	87: "attribute not found", | ||||
| 	88: "programming error", | ||||
| 	89: "bad message", | ||||
| 	90: "multihop attempted", | ||||
| 	91: "link has been severed", | ||||
| 	92: "protocol error", | ||||
| 	93: "capabilities insufficient", | ||||
| 	94: "not permitted in capability mode", | ||||
| 	95: "state not recoverable", | ||||
| 	96: "previous owner died", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "device busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "EOPNOTSUPP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EIDRM", "identifier removed"}, | ||||
| 	{83, "ENOMSG", "no message of desired type"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "ECANCELED", "operation canceled"}, | ||||
| 	{86, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{87, "ENOATTR", "attribute not found"}, | ||||
| 	{88, "EDOOFUS", "programming error"}, | ||||
| 	{89, "EBADMSG", "bad message"}, | ||||
| 	{90, "EMULTIHOP", "multihop attempted"}, | ||||
| 	{91, "ENOLINK", "link has been severed"}, | ||||
| 	{92, "EPROTO", "protocol error"}, | ||||
| 	{93, "ENOTCAPABLE", "capabilities insufficient"}, | ||||
| 	{94, "ECAPMODE", "not permitted in capability mode"}, | ||||
| 	{95, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{96, "EOWNERDEAD", "previous owner died"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| 	32: "unknown signal", | ||||
| 	33: "unknown signal", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGIOT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| 	{32, "SIGTHR", "unknown signal"}, | ||||
| 	{33, "SIGLIBRT", "unknown signal"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										320
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										320
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -351,6 +351,8 @@ const ( | ||||
| 	CSTOP                          = 0x13 | ||||
| 	CSTOPB                         = 0x400 | ||||
| 	CSUSP                          = 0x1a | ||||
| 	CTL_HW                         = 0x6 | ||||
| 	CTL_KERN                       = 0x1 | ||||
| 	CTL_MAXNAME                    = 0x18 | ||||
| 	CTL_NET                        = 0x4 | ||||
| 	DLT_A429                       = 0xb8 | ||||
| @@ -608,6 +610,7 @@ const ( | ||||
| 	F_UNLCKSYS                     = 0x4 | ||||
| 	F_WRLCK                        = 0x3 | ||||
| 	HUPCL                          = 0x4000 | ||||
| 	HW_MACHINE                     = 0x1 | ||||
| 	ICANON                         = 0x100 | ||||
| 	ICMP6_FILTER                   = 0x12 | ||||
| 	ICRNL                          = 0x100 | ||||
| @@ -944,6 +947,10 @@ const ( | ||||
| 	IXANY                          = 0x800 | ||||
| 	IXOFF                          = 0x400 | ||||
| 	IXON                           = 0x200 | ||||
| 	KERN_HOSTNAME                  = 0xa | ||||
| 	KERN_OSRELEASE                 = 0x2 | ||||
| 	KERN_OSTYPE                    = 0x1 | ||||
| 	KERN_VERSION                   = 0x4 | ||||
| 	LOCK_EX                        = 0x2 | ||||
| 	LOCK_NB                        = 0x4 | ||||
| 	LOCK_SH                        = 0x1 | ||||
| @@ -982,6 +989,49 @@ const ( | ||||
| 	MAP_STACK                      = 0x400 | ||||
| 	MCL_CURRENT                    = 0x1 | ||||
| 	MCL_FUTURE                     = 0x2 | ||||
| 	MNT_ACLS                       = 0x8000000 | ||||
| 	MNT_ASYNC                      = 0x40 | ||||
| 	MNT_AUTOMOUNTED                = 0x200000000 | ||||
| 	MNT_BYFSID                     = 0x8000000 | ||||
| 	MNT_CMDFLAGS                   = 0xd0f0000 | ||||
| 	MNT_DEFEXPORTED                = 0x200 | ||||
| 	MNT_DELEXPORT                  = 0x20000 | ||||
| 	MNT_EXKERB                     = 0x800 | ||||
| 	MNT_EXPORTANON                 = 0x400 | ||||
| 	MNT_EXPORTED                   = 0x100 | ||||
| 	MNT_EXPUBLIC                   = 0x20000000 | ||||
| 	MNT_EXRDONLY                   = 0x80 | ||||
| 	MNT_FORCE                      = 0x80000 | ||||
| 	MNT_GJOURNAL                   = 0x2000000 | ||||
| 	MNT_IGNORE                     = 0x800000 | ||||
| 	MNT_LAZY                       = 0x3 | ||||
| 	MNT_LOCAL                      = 0x1000 | ||||
| 	MNT_MULTILABEL                 = 0x4000000 | ||||
| 	MNT_NFS4ACLS                   = 0x10 | ||||
| 	MNT_NOATIME                    = 0x10000000 | ||||
| 	MNT_NOCLUSTERR                 = 0x40000000 | ||||
| 	MNT_NOCLUSTERW                 = 0x80000000 | ||||
| 	MNT_NOEXEC                     = 0x4 | ||||
| 	MNT_NONBUSY                    = 0x4000000 | ||||
| 	MNT_NOSUID                     = 0x8 | ||||
| 	MNT_NOSYMFOLLOW                = 0x400000 | ||||
| 	MNT_NOWAIT                     = 0x2 | ||||
| 	MNT_QUOTA                      = 0x2000 | ||||
| 	MNT_RDONLY                     = 0x1 | ||||
| 	MNT_RELOAD                     = 0x40000 | ||||
| 	MNT_ROOTFS                     = 0x4000 | ||||
| 	MNT_SNAPSHOT                   = 0x1000000 | ||||
| 	MNT_SOFTDEP                    = 0x200000 | ||||
| 	MNT_SUIDDIR                    = 0x100000 | ||||
| 	MNT_SUJ                        = 0x100000000 | ||||
| 	MNT_SUSPEND                    = 0x4 | ||||
| 	MNT_SYNCHRONOUS                = 0x2 | ||||
| 	MNT_UNION                      = 0x20 | ||||
| 	MNT_UPDATE                     = 0x10000 | ||||
| 	MNT_UPDATEMASK                 = 0x2d8d0807e | ||||
| 	MNT_USER                       = 0x8000 | ||||
| 	MNT_VISFLAGMASK                = 0x3fef0ffff | ||||
| 	MNT_WAIT                       = 0x1 | ||||
| 	MSG_CMSG_CLOEXEC               = 0x40000 | ||||
| 	MSG_COMPAT                     = 0x8000 | ||||
| 	MSG_CTRUNC                     = 0x20 | ||||
| @@ -1570,138 +1620,146 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:  "operation not permitted", | ||||
| 	2:  "no such file or directory", | ||||
| 	3:  "no such process", | ||||
| 	4:  "interrupted system call", | ||||
| 	5:  "input/output error", | ||||
| 	6:  "device not configured", | ||||
| 	7:  "argument list too long", | ||||
| 	8:  "exec format error", | ||||
| 	9:  "bad file descriptor", | ||||
| 	10: "no child processes", | ||||
| 	11: "resource deadlock avoided", | ||||
| 	12: "cannot allocate memory", | ||||
| 	13: "permission denied", | ||||
| 	14: "bad address", | ||||
| 	15: "block device required", | ||||
| 	16: "device busy", | ||||
| 	17: "file exists", | ||||
| 	18: "cross-device link", | ||||
| 	19: "operation not supported by device", | ||||
| 	20: "not a directory", | ||||
| 	21: "is a directory", | ||||
| 	22: "invalid argument", | ||||
| 	23: "too many open files in system", | ||||
| 	24: "too many open files", | ||||
| 	25: "inappropriate ioctl for device", | ||||
| 	26: "text file busy", | ||||
| 	27: "file too large", | ||||
| 	28: "no space left on device", | ||||
| 	29: "illegal seek", | ||||
| 	30: "read-only file system", | ||||
| 	31: "too many links", | ||||
| 	32: "broken pipe", | ||||
| 	33: "numerical argument out of domain", | ||||
| 	34: "result too large", | ||||
| 	35: "resource temporarily unavailable", | ||||
| 	36: "operation now in progress", | ||||
| 	37: "operation already in progress", | ||||
| 	38: "socket operation on non-socket", | ||||
| 	39: "destination address required", | ||||
| 	40: "message too long", | ||||
| 	41: "protocol wrong type for socket", | ||||
| 	42: "protocol not available", | ||||
| 	43: "protocol not supported", | ||||
| 	44: "socket type not supported", | ||||
| 	45: "operation not supported", | ||||
| 	46: "protocol family not supported", | ||||
| 	47: "address family not supported by protocol family", | ||||
| 	48: "address already in use", | ||||
| 	49: "can't assign requested address", | ||||
| 	50: "network is down", | ||||
| 	51: "network is unreachable", | ||||
| 	52: "network dropped connection on reset", | ||||
| 	53: "software caused connection abort", | ||||
| 	54: "connection reset by peer", | ||||
| 	55: "no buffer space available", | ||||
| 	56: "socket is already connected", | ||||
| 	57: "socket is not connected", | ||||
| 	58: "can't send after socket shutdown", | ||||
| 	59: "too many references: can't splice", | ||||
| 	60: "operation timed out", | ||||
| 	61: "connection refused", | ||||
| 	62: "too many levels of symbolic links", | ||||
| 	63: "file name too long", | ||||
| 	64: "host is down", | ||||
| 	65: "no route to host", | ||||
| 	66: "directory not empty", | ||||
| 	67: "too many processes", | ||||
| 	68: "too many users", | ||||
| 	69: "disc quota exceeded", | ||||
| 	70: "stale NFS file handle", | ||||
| 	71: "too many levels of remote in path", | ||||
| 	72: "RPC struct is bad", | ||||
| 	73: "RPC version wrong", | ||||
| 	74: "RPC prog. not avail", | ||||
| 	75: "program version wrong", | ||||
| 	76: "bad procedure for program", | ||||
| 	77: "no locks available", | ||||
| 	78: "function not implemented", | ||||
| 	79: "inappropriate file type or format", | ||||
| 	80: "authentication error", | ||||
| 	81: "need authenticator", | ||||
| 	82: "identifier removed", | ||||
| 	83: "no message of desired type", | ||||
| 	84: "value too large to be stored in data type", | ||||
| 	85: "operation canceled", | ||||
| 	86: "illegal byte sequence", | ||||
| 	87: "attribute not found", | ||||
| 	88: "programming error", | ||||
| 	89: "bad message", | ||||
| 	90: "multihop attempted", | ||||
| 	91: "link has been severed", | ||||
| 	92: "protocol error", | ||||
| 	93: "capabilities insufficient", | ||||
| 	94: "not permitted in capability mode", | ||||
| 	95: "state not recoverable", | ||||
| 	96: "previous owner died", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "device busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "EOPNOTSUPP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EIDRM", "identifier removed"}, | ||||
| 	{83, "ENOMSG", "no message of desired type"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "ECANCELED", "operation canceled"}, | ||||
| 	{86, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{87, "ENOATTR", "attribute not found"}, | ||||
| 	{88, "EDOOFUS", "programming error"}, | ||||
| 	{89, "EBADMSG", "bad message"}, | ||||
| 	{90, "EMULTIHOP", "multihop attempted"}, | ||||
| 	{91, "ENOLINK", "link has been severed"}, | ||||
| 	{92, "EPROTO", "protocol error"}, | ||||
| 	{93, "ENOTCAPABLE", "capabilities insufficient"}, | ||||
| 	{94, "ECAPMODE", "not permitted in capability mode"}, | ||||
| 	{95, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{96, "EOWNERDEAD", "previous owner died"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| 	32: "unknown signal", | ||||
| 	33: "unknown signal", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGIOT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| 	{32, "SIGTHR", "unknown signal"}, | ||||
| 	{33, "SIGLIBRT", "unknown signal"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										320
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										320
									
								
								vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -351,6 +351,8 @@ const ( | ||||
| 	CSTOP                          = 0x13 | ||||
| 	CSTOPB                         = 0x400 | ||||
| 	CSUSP                          = 0x1a | ||||
| 	CTL_HW                         = 0x6 | ||||
| 	CTL_KERN                       = 0x1 | ||||
| 	CTL_MAXNAME                    = 0x18 | ||||
| 	CTL_NET                        = 0x4 | ||||
| 	DLT_A429                       = 0xb8 | ||||
| @@ -615,6 +617,7 @@ const ( | ||||
| 	F_UNLCKSYS                     = 0x4 | ||||
| 	F_WRLCK                        = 0x3 | ||||
| 	HUPCL                          = 0x4000 | ||||
| 	HW_MACHINE                     = 0x1 | ||||
| 	ICANON                         = 0x100 | ||||
| 	ICMP6_FILTER                   = 0x12 | ||||
| 	ICRNL                          = 0x100 | ||||
| @@ -951,6 +954,10 @@ const ( | ||||
| 	IXANY                          = 0x800 | ||||
| 	IXOFF                          = 0x400 | ||||
| 	IXON                           = 0x200 | ||||
| 	KERN_HOSTNAME                  = 0xa | ||||
| 	KERN_OSRELEASE                 = 0x2 | ||||
| 	KERN_OSTYPE                    = 0x1 | ||||
| 	KERN_VERSION                   = 0x4 | ||||
| 	LOCK_EX                        = 0x2 | ||||
| 	LOCK_NB                        = 0x4 | ||||
| 	LOCK_SH                        = 0x1 | ||||
| @@ -989,6 +996,49 @@ const ( | ||||
| 	MAP_STACK                      = 0x400 | ||||
| 	MCL_CURRENT                    = 0x1 | ||||
| 	MCL_FUTURE                     = 0x2 | ||||
| 	MNT_ACLS                       = 0x8000000 | ||||
| 	MNT_ASYNC                      = 0x40 | ||||
| 	MNT_AUTOMOUNTED                = 0x200000000 | ||||
| 	MNT_BYFSID                     = 0x8000000 | ||||
| 	MNT_CMDFLAGS                   = 0xd0f0000 | ||||
| 	MNT_DEFEXPORTED                = 0x200 | ||||
| 	MNT_DELEXPORT                  = 0x20000 | ||||
| 	MNT_EXKERB                     = 0x800 | ||||
| 	MNT_EXPORTANON                 = 0x400 | ||||
| 	MNT_EXPORTED                   = 0x100 | ||||
| 	MNT_EXPUBLIC                   = 0x20000000 | ||||
| 	MNT_EXRDONLY                   = 0x80 | ||||
| 	MNT_FORCE                      = 0x80000 | ||||
| 	MNT_GJOURNAL                   = 0x2000000 | ||||
| 	MNT_IGNORE                     = 0x800000 | ||||
| 	MNT_LAZY                       = 0x3 | ||||
| 	MNT_LOCAL                      = 0x1000 | ||||
| 	MNT_MULTILABEL                 = 0x4000000 | ||||
| 	MNT_NFS4ACLS                   = 0x10 | ||||
| 	MNT_NOATIME                    = 0x10000000 | ||||
| 	MNT_NOCLUSTERR                 = 0x40000000 | ||||
| 	MNT_NOCLUSTERW                 = 0x80000000 | ||||
| 	MNT_NOEXEC                     = 0x4 | ||||
| 	MNT_NONBUSY                    = 0x4000000 | ||||
| 	MNT_NOSUID                     = 0x8 | ||||
| 	MNT_NOSYMFOLLOW                = 0x400000 | ||||
| 	MNT_NOWAIT                     = 0x2 | ||||
| 	MNT_QUOTA                      = 0x2000 | ||||
| 	MNT_RDONLY                     = 0x1 | ||||
| 	MNT_RELOAD                     = 0x40000 | ||||
| 	MNT_ROOTFS                     = 0x4000 | ||||
| 	MNT_SNAPSHOT                   = 0x1000000 | ||||
| 	MNT_SOFTDEP                    = 0x200000 | ||||
| 	MNT_SUIDDIR                    = 0x100000 | ||||
| 	MNT_SUJ                        = 0x100000000 | ||||
| 	MNT_SUSPEND                    = 0x4 | ||||
| 	MNT_SYNCHRONOUS                = 0x2 | ||||
| 	MNT_UNION                      = 0x20 | ||||
| 	MNT_UPDATE                     = 0x10000 | ||||
| 	MNT_UPDATEMASK                 = 0x2d8d0807e | ||||
| 	MNT_USER                       = 0x8000 | ||||
| 	MNT_VISFLAGMASK                = 0x3fef0ffff | ||||
| 	MNT_WAIT                       = 0x1 | ||||
| 	MSG_CMSG_CLOEXEC               = 0x40000 | ||||
| 	MSG_COMPAT                     = 0x8000 | ||||
| 	MSG_CTRUNC                     = 0x20 | ||||
| @@ -1578,138 +1628,146 @@ const ( | ||||
| ) | ||||
|  | ||||
| // Error table | ||||
| var errors = [...]string{ | ||||
| 	1:  "operation not permitted", | ||||
| 	2:  "no such file or directory", | ||||
| 	3:  "no such process", | ||||
| 	4:  "interrupted system call", | ||||
| 	5:  "input/output error", | ||||
| 	6:  "device not configured", | ||||
| 	7:  "argument list too long", | ||||
| 	8:  "exec format error", | ||||
| 	9:  "bad file descriptor", | ||||
| 	10: "no child processes", | ||||
| 	11: "resource deadlock avoided", | ||||
| 	12: "cannot allocate memory", | ||||
| 	13: "permission denied", | ||||
| 	14: "bad address", | ||||
| 	15: "block device required", | ||||
| 	16: "device busy", | ||||
| 	17: "file exists", | ||||
| 	18: "cross-device link", | ||||
| 	19: "operation not supported by device", | ||||
| 	20: "not a directory", | ||||
| 	21: "is a directory", | ||||
| 	22: "invalid argument", | ||||
| 	23: "too many open files in system", | ||||
| 	24: "too many open files", | ||||
| 	25: "inappropriate ioctl for device", | ||||
| 	26: "text file busy", | ||||
| 	27: "file too large", | ||||
| 	28: "no space left on device", | ||||
| 	29: "illegal seek", | ||||
| 	30: "read-only file system", | ||||
| 	31: "too many links", | ||||
| 	32: "broken pipe", | ||||
| 	33: "numerical argument out of domain", | ||||
| 	34: "result too large", | ||||
| 	35: "resource temporarily unavailable", | ||||
| 	36: "operation now in progress", | ||||
| 	37: "operation already in progress", | ||||
| 	38: "socket operation on non-socket", | ||||
| 	39: "destination address required", | ||||
| 	40: "message too long", | ||||
| 	41: "protocol wrong type for socket", | ||||
| 	42: "protocol not available", | ||||
| 	43: "protocol not supported", | ||||
| 	44: "socket type not supported", | ||||
| 	45: "operation not supported", | ||||
| 	46: "protocol family not supported", | ||||
| 	47: "address family not supported by protocol family", | ||||
| 	48: "address already in use", | ||||
| 	49: "can't assign requested address", | ||||
| 	50: "network is down", | ||||
| 	51: "network is unreachable", | ||||
| 	52: "network dropped connection on reset", | ||||
| 	53: "software caused connection abort", | ||||
| 	54: "connection reset by peer", | ||||
| 	55: "no buffer space available", | ||||
| 	56: "socket is already connected", | ||||
| 	57: "socket is not connected", | ||||
| 	58: "can't send after socket shutdown", | ||||
| 	59: "too many references: can't splice", | ||||
| 	60: "operation timed out", | ||||
| 	61: "connection refused", | ||||
| 	62: "too many levels of symbolic links", | ||||
| 	63: "file name too long", | ||||
| 	64: "host is down", | ||||
| 	65: "no route to host", | ||||
| 	66: "directory not empty", | ||||
| 	67: "too many processes", | ||||
| 	68: "too many users", | ||||
| 	69: "disc quota exceeded", | ||||
| 	70: "stale NFS file handle", | ||||
| 	71: "too many levels of remote in path", | ||||
| 	72: "RPC struct is bad", | ||||
| 	73: "RPC version wrong", | ||||
| 	74: "RPC prog. not avail", | ||||
| 	75: "program version wrong", | ||||
| 	76: "bad procedure for program", | ||||
| 	77: "no locks available", | ||||
| 	78: "function not implemented", | ||||
| 	79: "inappropriate file type or format", | ||||
| 	80: "authentication error", | ||||
| 	81: "need authenticator", | ||||
| 	82: "identifier removed", | ||||
| 	83: "no message of desired type", | ||||
| 	84: "value too large to be stored in data type", | ||||
| 	85: "operation canceled", | ||||
| 	86: "illegal byte sequence", | ||||
| 	87: "attribute not found", | ||||
| 	88: "programming error", | ||||
| 	89: "bad message", | ||||
| 	90: "multihop attempted", | ||||
| 	91: "link has been severed", | ||||
| 	92: "protocol error", | ||||
| 	93: "capabilities insufficient", | ||||
| 	94: "not permitted in capability mode", | ||||
| 	95: "state not recoverable", | ||||
| 	96: "previous owner died", | ||||
| var errorList = [...]struct { | ||||
| 	num  syscall.Errno | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "EPERM", "operation not permitted"}, | ||||
| 	{2, "ENOENT", "no such file or directory"}, | ||||
| 	{3, "ESRCH", "no such process"}, | ||||
| 	{4, "EINTR", "interrupted system call"}, | ||||
| 	{5, "EIO", "input/output error"}, | ||||
| 	{6, "ENXIO", "device not configured"}, | ||||
| 	{7, "E2BIG", "argument list too long"}, | ||||
| 	{8, "ENOEXEC", "exec format error"}, | ||||
| 	{9, "EBADF", "bad file descriptor"}, | ||||
| 	{10, "ECHILD", "no child processes"}, | ||||
| 	{11, "EDEADLK", "resource deadlock avoided"}, | ||||
| 	{12, "ENOMEM", "cannot allocate memory"}, | ||||
| 	{13, "EACCES", "permission denied"}, | ||||
| 	{14, "EFAULT", "bad address"}, | ||||
| 	{15, "ENOTBLK", "block device required"}, | ||||
| 	{16, "EBUSY", "device busy"}, | ||||
| 	{17, "EEXIST", "file exists"}, | ||||
| 	{18, "EXDEV", "cross-device link"}, | ||||
| 	{19, "ENODEV", "operation not supported by device"}, | ||||
| 	{20, "ENOTDIR", "not a directory"}, | ||||
| 	{21, "EISDIR", "is a directory"}, | ||||
| 	{22, "EINVAL", "invalid argument"}, | ||||
| 	{23, "ENFILE", "too many open files in system"}, | ||||
| 	{24, "EMFILE", "too many open files"}, | ||||
| 	{25, "ENOTTY", "inappropriate ioctl for device"}, | ||||
| 	{26, "ETXTBSY", "text file busy"}, | ||||
| 	{27, "EFBIG", "file too large"}, | ||||
| 	{28, "ENOSPC", "no space left on device"}, | ||||
| 	{29, "ESPIPE", "illegal seek"}, | ||||
| 	{30, "EROFS", "read-only file system"}, | ||||
| 	{31, "EMLINK", "too many links"}, | ||||
| 	{32, "EPIPE", "broken pipe"}, | ||||
| 	{33, "EDOM", "numerical argument out of domain"}, | ||||
| 	{34, "ERANGE", "result too large"}, | ||||
| 	{35, "EAGAIN", "resource temporarily unavailable"}, | ||||
| 	{36, "EINPROGRESS", "operation now in progress"}, | ||||
| 	{37, "EALREADY", "operation already in progress"}, | ||||
| 	{38, "ENOTSOCK", "socket operation on non-socket"}, | ||||
| 	{39, "EDESTADDRREQ", "destination address required"}, | ||||
| 	{40, "EMSGSIZE", "message too long"}, | ||||
| 	{41, "EPROTOTYPE", "protocol wrong type for socket"}, | ||||
| 	{42, "ENOPROTOOPT", "protocol not available"}, | ||||
| 	{43, "EPROTONOSUPPORT", "protocol not supported"}, | ||||
| 	{44, "ESOCKTNOSUPPORT", "socket type not supported"}, | ||||
| 	{45, "EOPNOTSUPP", "operation not supported"}, | ||||
| 	{46, "EPFNOSUPPORT", "protocol family not supported"}, | ||||
| 	{47, "EAFNOSUPPORT", "address family not supported by protocol family"}, | ||||
| 	{48, "EADDRINUSE", "address already in use"}, | ||||
| 	{49, "EADDRNOTAVAIL", "can't assign requested address"}, | ||||
| 	{50, "ENETDOWN", "network is down"}, | ||||
| 	{51, "ENETUNREACH", "network is unreachable"}, | ||||
| 	{52, "ENETRESET", "network dropped connection on reset"}, | ||||
| 	{53, "ECONNABORTED", "software caused connection abort"}, | ||||
| 	{54, "ECONNRESET", "connection reset by peer"}, | ||||
| 	{55, "ENOBUFS", "no buffer space available"}, | ||||
| 	{56, "EISCONN", "socket is already connected"}, | ||||
| 	{57, "ENOTCONN", "socket is not connected"}, | ||||
| 	{58, "ESHUTDOWN", "can't send after socket shutdown"}, | ||||
| 	{59, "ETOOMANYREFS", "too many references: can't splice"}, | ||||
| 	{60, "ETIMEDOUT", "operation timed out"}, | ||||
| 	{61, "ECONNREFUSED", "connection refused"}, | ||||
| 	{62, "ELOOP", "too many levels of symbolic links"}, | ||||
| 	{63, "ENAMETOOLONG", "file name too long"}, | ||||
| 	{64, "EHOSTDOWN", "host is down"}, | ||||
| 	{65, "EHOSTUNREACH", "no route to host"}, | ||||
| 	{66, "ENOTEMPTY", "directory not empty"}, | ||||
| 	{67, "EPROCLIM", "too many processes"}, | ||||
| 	{68, "EUSERS", "too many users"}, | ||||
| 	{69, "EDQUOT", "disc quota exceeded"}, | ||||
| 	{70, "ESTALE", "stale NFS file handle"}, | ||||
| 	{71, "EREMOTE", "too many levels of remote in path"}, | ||||
| 	{72, "EBADRPC", "RPC struct is bad"}, | ||||
| 	{73, "ERPCMISMATCH", "RPC version wrong"}, | ||||
| 	{74, "EPROGUNAVAIL", "RPC prog. not avail"}, | ||||
| 	{75, "EPROGMISMATCH", "program version wrong"}, | ||||
| 	{76, "EPROCUNAVAIL", "bad procedure for program"}, | ||||
| 	{77, "ENOLCK", "no locks available"}, | ||||
| 	{78, "ENOSYS", "function not implemented"}, | ||||
| 	{79, "EFTYPE", "inappropriate file type or format"}, | ||||
| 	{80, "EAUTH", "authentication error"}, | ||||
| 	{81, "ENEEDAUTH", "need authenticator"}, | ||||
| 	{82, "EIDRM", "identifier removed"}, | ||||
| 	{83, "ENOMSG", "no message of desired type"}, | ||||
| 	{84, "EOVERFLOW", "value too large to be stored in data type"}, | ||||
| 	{85, "ECANCELED", "operation canceled"}, | ||||
| 	{86, "EILSEQ", "illegal byte sequence"}, | ||||
| 	{87, "ENOATTR", "attribute not found"}, | ||||
| 	{88, "EDOOFUS", "programming error"}, | ||||
| 	{89, "EBADMSG", "bad message"}, | ||||
| 	{90, "EMULTIHOP", "multihop attempted"}, | ||||
| 	{91, "ENOLINK", "link has been severed"}, | ||||
| 	{92, "EPROTO", "protocol error"}, | ||||
| 	{93, "ENOTCAPABLE", "capabilities insufficient"}, | ||||
| 	{94, "ECAPMODE", "not permitted in capability mode"}, | ||||
| 	{95, "ENOTRECOVERABLE", "state not recoverable"}, | ||||
| 	{96, "EOWNERDEAD", "previous owner died"}, | ||||
| } | ||||
|  | ||||
| // Signal table | ||||
| var signals = [...]string{ | ||||
| 	1:  "hangup", | ||||
| 	2:  "interrupt", | ||||
| 	3:  "quit", | ||||
| 	4:  "illegal instruction", | ||||
| 	5:  "trace/BPT trap", | ||||
| 	6:  "abort trap", | ||||
| 	7:  "EMT trap", | ||||
| 	8:  "floating point exception", | ||||
| 	9:  "killed", | ||||
| 	10: "bus error", | ||||
| 	11: "segmentation fault", | ||||
| 	12: "bad system call", | ||||
| 	13: "broken pipe", | ||||
| 	14: "alarm clock", | ||||
| 	15: "terminated", | ||||
| 	16: "urgent I/O condition", | ||||
| 	17: "suspended (signal)", | ||||
| 	18: "suspended", | ||||
| 	19: "continued", | ||||
| 	20: "child exited", | ||||
| 	21: "stopped (tty input)", | ||||
| 	22: "stopped (tty output)", | ||||
| 	23: "I/O possible", | ||||
| 	24: "cputime limit exceeded", | ||||
| 	25: "filesize limit exceeded", | ||||
| 	26: "virtual timer expired", | ||||
| 	27: "profiling timer expired", | ||||
| 	28: "window size changes", | ||||
| 	29: "information request", | ||||
| 	30: "user defined signal 1", | ||||
| 	31: "user defined signal 2", | ||||
| 	32: "unknown signal", | ||||
| 	33: "unknown signal", | ||||
| var signalList = [...]struct { | ||||
| 	num  syscall.Signal | ||||
| 	name string | ||||
| 	desc string | ||||
| }{ | ||||
| 	{1, "SIGHUP", "hangup"}, | ||||
| 	{2, "SIGINT", "interrupt"}, | ||||
| 	{3, "SIGQUIT", "quit"}, | ||||
| 	{4, "SIGILL", "illegal instruction"}, | ||||
| 	{5, "SIGTRAP", "trace/BPT trap"}, | ||||
| 	{6, "SIGIOT", "abort trap"}, | ||||
| 	{7, "SIGEMT", "EMT trap"}, | ||||
| 	{8, "SIGFPE", "floating point exception"}, | ||||
| 	{9, "SIGKILL", "killed"}, | ||||
| 	{10, "SIGBUS", "bus error"}, | ||||
| 	{11, "SIGSEGV", "segmentation fault"}, | ||||
| 	{12, "SIGSYS", "bad system call"}, | ||||
| 	{13, "SIGPIPE", "broken pipe"}, | ||||
| 	{14, "SIGALRM", "alarm clock"}, | ||||
| 	{15, "SIGTERM", "terminated"}, | ||||
| 	{16, "SIGURG", "urgent I/O condition"}, | ||||
| 	{17, "SIGSTOP", "suspended (signal)"}, | ||||
| 	{18, "SIGTSTP", "suspended"}, | ||||
| 	{19, "SIGCONT", "continued"}, | ||||
| 	{20, "SIGCHLD", "child exited"}, | ||||
| 	{21, "SIGTTIN", "stopped (tty input)"}, | ||||
| 	{22, "SIGTTOU", "stopped (tty output)"}, | ||||
| 	{23, "SIGIO", "I/O possible"}, | ||||
| 	{24, "SIGXCPU", "cputime limit exceeded"}, | ||||
| 	{25, "SIGXFSZ", "filesize limit exceeded"}, | ||||
| 	{26, "SIGVTALRM", "virtual timer expired"}, | ||||
| 	{27, "SIGPROF", "profiling timer expired"}, | ||||
| 	{28, "SIGWINCH", "window size changes"}, | ||||
| 	{29, "SIGINFO", "information request"}, | ||||
| 	{30, "SIGUSR1", "user defined signal 1"}, | ||||
| 	{31, "SIGUSR2", "user defined signal 2"}, | ||||
| 	{32, "SIGTHR", "unknown signal"}, | ||||
| 	{33, "SIGLIBRT", "unknown signal"}, | ||||
| } | ||||
|   | ||||
							
								
								
									
										705
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										705
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_386.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										706
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										706
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										706
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										706
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										707
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										707
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										709
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										709
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										711
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										711
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										711
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										711
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										709
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										709
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										707
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										707
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										707
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										707
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										705
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										705
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,5 +1,5 @@ | ||||
| // mkerrors.sh -m64 | ||||
| // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT | ||||
| // Code generated by the command above; DO NOT EDIT. | ||||
|  | ||||
| // +build sparc64,linux | ||||
|  | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	 Phil Estes
					Phil Estes