Browse Source

upgrade x/text

tags/v2.12.0-rc1
Shivaram Lingamneni 1 year ago
parent
commit
05e5fe3444
100 changed files with 9190 additions and 5277 deletions
  1. 2
    2
      go.mod
  2. 4
    0
      go.sum
  3. 0
    3
      vendor/golang.org/x/sys/AUTHORS
  4. 0
    3
      vendor/golang.org/x/sys/CONTRIBUTORS
  5. 1
    0
      vendor/golang.org/x/sys/cpu/byteorder.go
  6. 3
    2
      vendor/golang.org/x/sys/cpu/cpu.go
  7. 0
    4
      vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
  8. 12
    17
      vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
  9. 13
    0
      vendor/golang.org/x/sys/cpu/cpu_loong64.go
  10. 12
    0
      vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
  11. 6
    3
      vendor/golang.org/x/sys/cpu/cpu_x86.go
  12. 0
    24
      vendor/golang.org/x/sys/cpu/cpu_x86.s
  13. 1
    1
      vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
  14. 1
    0
      vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
  15. 1
    0
      vendor/golang.org/x/sys/plan9/pwd_plan9.go
  16. 1
    0
      vendor/golang.org/x/sys/plan9/race.go
  17. 1
    0
      vendor/golang.org/x/sys/plan9/race0.go
  18. 1
    0
      vendor/golang.org/x/sys/plan9/str.go
  19. 2
    0
      vendor/golang.org/x/sys/plan9/syscall.go
  20. 14
    2
      vendor/golang.org/x/sys/plan9/syscall_plan9.go
  21. 1
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
  22. 1
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
  23. 1
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
  24. 1
    1
      vendor/golang.org/x/sys/unix/README.md
  25. 29
    0
      vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
  26. 54
    0
      vendor/golang.org/x/sys/unix/asm_linux_loong64.s
  27. 2
    2
      vendor/golang.org/x/sys/unix/endian_little.go
  28. 0
    233
      vendor/golang.org/x/sys/unix/errors_freebsd_386.go
  29. 0
    233
      vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
  30. 0
    226
      vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
  31. 0
    17
      vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
  32. 142
    0
      vendor/golang.org/x/sys/unix/ifreq_linux.go
  33. 62
    39
      vendor/golang.org/x/sys/unix/ioctl_linux.go
  34. 10
    5
      vendor/golang.org/x/sys/unix/mkall.sh
  35. 28
    8
      vendor/golang.org/x/sys/unix/mkerrors.sh
  36. 49
    0
      vendor/golang.org/x/sys/unix/sockcmsg_linux.go
  37. 24
    26
      vendor/golang.org/x/sys/unix/syscall_aix.go
  38. 31
    70
      vendor/golang.org/x/sys/unix/syscall_bsd.go
  39. 101
    49
      vendor/golang.org/x/sys/unix/syscall_darwin.go
  40. 12
    9
      vendor/golang.org/x/sys/unix/syscall_dragonfly.go
  41. 42
    300
      vendor/golang.org/x/sys/unix/syscall_freebsd.go
  42. 2
    2
      vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
  43. 2
    2
      vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
  44. 1
    1
      vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
  45. 1
    1
      vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
  46. 63
    0
      vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
  47. 10
    3
      vendor/golang.org/x/sys/unix/syscall_illumos.go
  48. 230
    175
      vendor/golang.org/x/sys/unix/syscall_linux.go
  49. 4
    50
      vendor/golang.org/x/sys/unix/syscall_linux_386.go
  50. 14
    0
      vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
  51. 3
    51
      vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
  52. 4
    47
      vendor/golang.org/x/sys/unix/syscall_linux_arm.go
  53. 5
    56
      vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
  54. 226
    0
      vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
  55. 2
    42
      vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
  56. 4
    40
      vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
  57. 5
    45
      vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
  58. 2
    41
      vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
  59. 3
    54
      vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
  60. 2
    47
      vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
  61. 2
    40
      vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
  62. 7
    16
      vendor/golang.org/x/sys/unix/syscall_netbsd.go
  63. 8
    9
      vendor/golang.org/x/sys/unix/syscall_openbsd.go
  64. 4
    0
      vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
  65. 321
    62
      vendor/golang.org/x/sys/unix/syscall_solaris.go
  66. 125
    0
      vendor/golang.org/x/sys/unix/syscall_unix.go
  67. 8
    14
      vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
  68. 21
    0
      vendor/golang.org/x/sys/unix/sysvshm_linux.go
  69. 61
    0
      vendor/golang.org/x/sys/unix/sysvshm_unix.go
  70. 14
    0
      vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
  71. 1576
    1544
      vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
  72. 1576
    1544
      vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
  73. 107
    7
      vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
  74. 105
    7
      vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
  75. 209
    16
      vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
  76. 98
    7
      vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
  77. 2148
    0
      vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
  78. 557
    17
      vendor/golang.org/x/sys/unix/zerrors_linux.go
  79. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_386.go
  80. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
  81. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
  82. 10
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
  83. 818
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
  84. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
  85. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
  86. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
  87. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
  88. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
  89. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
  90. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
  91. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
  92. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
  93. 9
    1
      vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
  94. 3
    0
      vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
  95. 3
    0
      vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
  96. 13
    13
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
  97. 12
    12
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
  98. 10
    10
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
  99. 9
    9
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
  100. 0
    0
      vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go

+ 2
- 2
go.mod View File

@@ -21,7 +21,7 @@ require (
21 21
 	github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208
22 22
 	github.com/xdg-go/scram v1.0.2
23 23
 	golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
24
-	golang.org/x/text v0.3.7
24
+	golang.org/x/text v0.6.0
25 25
 	gopkg.in/yaml.v2 v2.4.0
26 26
 )
27 27
 
@@ -36,7 +36,7 @@ require (
36 36
 	github.com/tidwall/rtred v0.1.2 // indirect
37 37
 	github.com/tidwall/tinyqueue v0.1.1 // indirect
38 38
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
39
-	golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
39
+	golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
40 40
 	golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
41 41
 )
42 42
 

+ 4
- 0
go.sum View File

@@ -97,6 +97,8 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w
97 97
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
98 98
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
99 99
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
100
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
101
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
100 102
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
101 103
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
102 104
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -104,6 +106,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
104 106
 golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
105 107
 golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
106 108
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
109
+golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
110
+golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
107 111
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
108 112
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
109 113
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

+ 0
- 3
vendor/golang.org/x/sys/AUTHORS View File

@@ -1,3 +0,0 @@
1
-# This source code refers to The Go Authors for copyright purposes.
2
-# The master list of authors is in the main Go distribution,
3
-# visible at http://tip.golang.org/AUTHORS.

+ 0
- 3
vendor/golang.org/x/sys/CONTRIBUTORS View File

@@ -1,3 +0,0 @@
1
-# This source code was written by the Go contributors.
2
-# The master list of contributors is in the main Go distribution,
3
-# visible at http://tip.golang.org/CONTRIBUTORS.

+ 1
- 0
vendor/golang.org/x/sys/cpu/byteorder.go View File

@@ -46,6 +46,7 @@ func hostByteOrder() byteOrder {
46 46
 	case "386", "amd64", "amd64p32",
47 47
 		"alpha",
48 48
 		"arm", "arm64",
49
+		"loong64",
49 50
 		"mipsle", "mips64le", "mips64p32le",
50 51
 		"nios2",
51 52
 		"ppc64le",

+ 3
- 2
vendor/golang.org/x/sys/cpu/cpu.go View File

@@ -56,6 +56,7 @@ var X86 struct {
56 56
 	HasAVX512BF16       bool // Advanced vector extension 512 BFloat16 Instructions
57 57
 	HasBMI1             bool // Bit manipulation instruction set 1
58 58
 	HasBMI2             bool // Bit manipulation instruction set 2
59
+	HasCX16             bool // Compare and exchange 16 Bytes
59 60
 	HasERMS             bool // Enhanced REP for MOVSB and STOSB
60 61
 	HasFMA              bool // Fused-multiply-add instructions
61 62
 	HasOSXSAVE          bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
@@ -105,8 +106,8 @@ var ARM64 struct {
105 106
 
106 107
 // ARM contains the supported CPU features of the current ARM (32-bit) platform.
107 108
 // All feature flags are false if:
108
-//   1. the current platform is not arm, or
109
-//   2. the current operating system is not Linux.
109
+//  1. the current platform is not arm, or
110
+//  2. the current operating system is not Linux.
110 111
 var ARM struct {
111 112
 	_           CacheLinePad
112 113
 	HasSWP      bool // SWP instruction support

+ 0
- 4
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go View File

@@ -15,7 +15,3 @@ func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
15 15
 // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
16 16
 // and in cpu_gccgo.c for gccgo.
17 17
 func xgetbv() (eax, edx uint32)
18
-
19
-// darwinSupportsAVX512 is implemented in cpu_x86.s for gc compiler
20
-// and in cpu_gccgo_x86.go for gccgo.
21
-func darwinSupportsAVX512() bool

+ 12
- 17
vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c View File

@@ -7,6 +7,7 @@
7 7
 
8 8
 #include <cpuid.h>
9 9
 #include <stdint.h>
10
+#include <x86intrin.h>
10 11
 
11 12
 // Need to wrap __get_cpuid_count because it's declared as static.
12 13
 int
@@ -17,27 +18,21 @@ gccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf,
17 18
 	return __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx);
18 19
 }
19 20
 
21
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
22
+#pragma GCC push_options
23
+#pragma GCC target("xsave")
24
+#pragma clang attribute push (__attribute__((target("xsave"))), apply_to=function)
25
+
20 26
 // xgetbv reads the contents of an XCR (Extended Control Register)
21 27
 // specified in the ECX register into registers EDX:EAX.
22 28
 // Currently, the only supported value for XCR is 0.
23
-//
24
-// TODO: Replace with a better alternative:
25
-//
26
-//     #include <xsaveintrin.h>
27
-//
28
-//     #pragma GCC target("xsave")
29
-//
30
-//     void gccgoXgetbv(uint32_t *eax, uint32_t *edx) {
31
-//       unsigned long long x = _xgetbv(0);
32
-//       *eax = x & 0xffffffff;
33
-//       *edx = (x >> 32) & 0xffffffff;
34
-//     }
35
-//
36
-// Note that _xgetbv is defined starting with GCC 8.
37 29
 void
38 30
 gccgoXgetbv(uint32_t *eax, uint32_t *edx)
39 31
 {
40
-	__asm("  xorl %%ecx, %%ecx\n"
41
-	      "  xgetbv"
42
-	    : "=a"(*eax), "=d"(*edx));
32
+	uint64_t v = _xgetbv(0);
33
+	*eax = v & 0xffffffff;
34
+	*edx = v >> 32;
43 35
 }
36
+
37
+#pragma clang attribute pop
38
+#pragma GCC pop_options

+ 13
- 0
vendor/golang.org/x/sys/cpu/cpu_loong64.go View File

@@ -0,0 +1,13 @@
1
+// Copyright 2022 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build loong64
6
+// +build loong64
7
+
8
+package cpu
9
+
10
+const cacheLineSize = 64
11
+
12
+func initOptions() {
13
+}

+ 12
- 0
vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go View File

@@ -0,0 +1,12 @@
1
+// Copyright 2022 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build !linux && riscv64
6
+// +build !linux,riscv64
7
+
8
+package cpu
9
+
10
+func archInit() {
11
+	Initialized = true
12
+}

+ 6
- 3
vendor/golang.org/x/sys/cpu/cpu_x86.go View File

@@ -39,6 +39,7 @@ func initOptions() {
39 39
 		{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
40 40
 		{Name: "bmi1", Feature: &X86.HasBMI1},
41 41
 		{Name: "bmi2", Feature: &X86.HasBMI2},
42
+		{Name: "cx16", Feature: &X86.HasCX16},
42 43
 		{Name: "erms", Feature: &X86.HasERMS},
43 44
 		{Name: "fma", Feature: &X86.HasFMA},
44 45
 		{Name: "osxsave", Feature: &X86.HasOSXSAVE},
@@ -73,6 +74,7 @@ func archInit() {
73 74
 	X86.HasPCLMULQDQ = isSet(1, ecx1)
74 75
 	X86.HasSSSE3 = isSet(9, ecx1)
75 76
 	X86.HasFMA = isSet(12, ecx1)
77
+	X86.HasCX16 = isSet(13, ecx1)
76 78
 	X86.HasSSE41 = isSet(19, ecx1)
77 79
 	X86.HasSSE42 = isSet(20, ecx1)
78 80
 	X86.HasPOPCNT = isSet(23, ecx1)
@@ -88,9 +90,10 @@ func archInit() {
88 90
 		osSupportsAVX = isSet(1, eax) && isSet(2, eax)
89 91
 
90 92
 		if runtime.GOOS == "darwin" {
91
-			// Check darwin commpage for AVX512 support. Necessary because:
92
-			// https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L175-L201
93
-			osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()
93
+			// Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
94
+			// Since users can't rely on mask register contents, let's not advertise AVX-512 support.
95
+			// See issue 49233.
96
+			osSupportsAVX512 = false
94 97
 		} else {
95 98
 			// Check if OPMASK and ZMM registers have OS support.
96 99
 			osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)

+ 0
- 24
vendor/golang.org/x/sys/cpu/cpu_x86.s View File

@@ -26,27 +26,3 @@ TEXT ·xgetbv(SB),NOSPLIT,$0-8
26 26
 	MOVL AX, eax+0(FP)
27 27
 	MOVL DX, edx+4(FP)
28 28
 	RET
29
-
30
-// func darwinSupportsAVX512() bool
31
-TEXT ·darwinSupportsAVX512(SB), NOSPLIT, $0-1
32
-    MOVB    $0, ret+0(FP) // default to false
33
-#ifdef GOOS_darwin   // return if not darwin
34
-#ifdef GOARCH_amd64  // return if not amd64
35
-// These values from:
36
-// https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/osfmk/i386/cpu_capabilities.h
37
-#define commpage64_base_address         0x00007fffffe00000
38
-#define commpage64_cpu_capabilities64   (commpage64_base_address+0x010)
39
-#define commpage64_version              (commpage64_base_address+0x01E)
40
-#define hasAVX512F                      0x0000004000000000
41
-    MOVQ    $commpage64_version, BX
42
-    CMPW    (BX), $13  // cpu_capabilities64 undefined in versions < 13
43
-    JL      no_avx512
44
-    MOVQ    $commpage64_cpu_capabilities64, BX
45
-    MOVQ    $hasAVX512F, CX
46
-    TESTQ   (BX), CX
47
-    JZ      no_avx512
48
-    MOVB    $1, ret+0(FP)
49
-no_avx512:
50
-#endif
51
-#endif
52
-    RET

+ 1
- 1
vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go View File

@@ -5,7 +5,7 @@
5 5
 // Recreate a getsystemcfg syscall handler instead of
6 6
 // using the one provided by x/sys/unix to avoid having
7 7
 // the dependency between them. (See golang.org/issue/32102)
8
-// Morever, this file will be used during the building of
8
+// Moreover, this file will be used during the building of
9 9
 // gccgo's libgo and thus must not used a CGo method.
10 10
 
11 11
 //go:build aix && gccgo

+ 1
- 0
vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build go1.5
5 6
 // +build go1.5
6 7
 
7 8
 package plan9

+ 1
- 0
vendor/golang.org/x/sys/plan9/pwd_plan9.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build !go1.5
5 6
 // +build !go1.5
6 7
 
7 8
 package plan9

+ 1
- 0
vendor/golang.org/x/sys/plan9/race.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build plan9 && race
5 6
 // +build plan9,race
6 7
 
7 8
 package plan9

+ 1
- 0
vendor/golang.org/x/sys/plan9/race0.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build plan9 && !race
5 6
 // +build plan9,!race
6 7
 
7 8
 package plan9

+ 1
- 0
vendor/golang.org/x/sys/plan9/str.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build plan9
5 6
 // +build plan9
6 7
 
7 8
 package plan9

+ 2
- 0
vendor/golang.org/x/sys/plan9/syscall.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build plan9
5 6
 // +build plan9
6 7
 
7 8
 // Package plan9 contains an interface to the low-level operating system
@@ -112,5 +113,6 @@ func (tv *Timeval) Nano() int64 {
112 113
 
113 114
 // use is a no-op, but the compiler cannot see that it is.
114 115
 // Calling use(p) ensures that p is kept live until that point.
116
+//
115 117
 //go:noescape
116 118
 func use(p unsafe.Pointer)

+ 14
- 2
vendor/golang.org/x/sys/plan9/syscall_plan9.go View File

@@ -115,6 +115,7 @@ func Write(fd int, p []byte) (n int, err error) {
115 115
 var ioSync int64
116 116
 
117 117
 //sys	fd2path(fd int, buf []byte) (err error)
118
+
118 119
 func Fd2path(fd int) (path string, err error) {
119 120
 	var buf [512]byte
120 121
 
@@ -126,14 +127,17 @@ func Fd2path(fd int) (path string, err error) {
126 127
 }
127 128
 
128 129
 //sys	pipe(p *[2]int32) (err error)
130
+
129 131
 func Pipe(p []int) (err error) {
130 132
 	if len(p) != 2 {
131 133
 		return syscall.ErrorString("bad arg in system call")
132 134
 	}
133 135
 	var pp [2]int32
134 136
 	err = pipe(&pp)
135
-	p[0] = int(pp[0])
136
-	p[1] = int(pp[1])
137
+	if err == nil {
138
+		p[0] = int(pp[0])
139
+		p[1] = int(pp[1])
140
+	}
137 141
 	return
138 142
 }
139 143
 
@@ -178,6 +182,7 @@ func (w Waitmsg) ExitStatus() int {
178 182
 }
179 183
 
180 184
 //sys	await(s []byte) (n int, err error)
185
+
181 186
 func Await(w *Waitmsg) (err error) {
182 187
 	var buf [512]byte
183 188
 	var f [5][]byte
@@ -299,42 +304,49 @@ func Getgroups() (gids []int, err error) {
299 304
 }
300 305
 
301 306
 //sys	open(path string, mode int) (fd int, err error)
307
+
302 308
 func Open(path string, mode int) (fd int, err error) {
303 309
 	fixwd()
304 310
 	return open(path, mode)
305 311
 }
306 312
 
307 313
 //sys	create(path string, mode int, perm uint32) (fd int, err error)
314
+
308 315
 func Create(path string, mode int, perm uint32) (fd int, err error) {
309 316
 	fixwd()
310 317
 	return create(path, mode, perm)
311 318
 }
312 319
 
313 320
 //sys	remove(path string) (err error)
321
+
314 322
 func Remove(path string) error {
315 323
 	fixwd()
316 324
 	return remove(path)
317 325
 }
318 326
 
319 327
 //sys	stat(path string, edir []byte) (n int, err error)
328
+
320 329
 func Stat(path string, edir []byte) (n int, err error) {
321 330
 	fixwd()
322 331
 	return stat(path, edir)
323 332
 }
324 333
 
325 334
 //sys	bind(name string, old string, flag int) (err error)
335
+
326 336
 func Bind(name string, old string, flag int) (err error) {
327 337
 	fixwd()
328 338
 	return bind(name, old, flag)
329 339
 }
330 340
 
331 341
 //sys	mount(fd int, afd int, old string, flag int, aname string) (err error)
342
+
332 343
 func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
333 344
 	fixwd()
334 345
 	return mount(fd, afd, old, flag, aname)
335 346
 }
336 347
 
337 348
 //sys	wstat(path string, edir []byte) (err error)
349
+
338 350
 func Wstat(path string, edir []byte) (err error) {
339 351
 	fixwd()
340 352
 	return wstat(path, edir)

+ 1
- 0
vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go View File

@@ -1,6 +1,7 @@
1 1
 // go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go
2 2
 // Code generated by the command above; see README.md. DO NOT EDIT.
3 3
 
4
+//go:build plan9 && 386
4 5
 // +build plan9,386
5 6
 
6 7
 package plan9

+ 1
- 0
vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go View File

@@ -1,6 +1,7 @@
1 1
 // go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go
2 2
 // Code generated by the command above; see README.md. DO NOT EDIT.
3 3
 
4
+//go:build plan9 && amd64
4 5
 // +build plan9,amd64
5 6
 
6 7
 package plan9

+ 1
- 0
vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go View File

@@ -1,6 +1,7 @@
1 1
 // go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go
2 2
 // Code generated by the command above; see README.md. DO NOT EDIT.
3 3
 
4
+//go:build plan9 && arm
4 5
 // +build plan9,arm
5 6
 
6 7
 package plan9

+ 1
- 1
vendor/golang.org/x/sys/unix/README.md View File

@@ -149,7 +149,7 @@ To add a constant, add the header that includes it to the appropriate variable.
149 149
 Then, edit the regex (if necessary) to match the desired constant. Avoid making
150 150
 the regex too broad to avoid matching unintended constants.
151 151
 
152
-### mkmerge.go
152
+### internal/mkmerge
153 153
 
154 154
 This program is used to extract duplicate const, func, and type declarations
155 155
 from the generated architecture-specific files listed below, and merge these

+ 29
- 0
vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s View File

@@ -0,0 +1,29 @@
1
+// Copyright 2021 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
6
+// +build darwin freebsd netbsd openbsd
7
+// +build gc
8
+
9
+#include "textflag.h"
10
+
11
+// System call support for RISCV64 BSD
12
+
13
+// Just jump to package syscall's implementation for all these functions.
14
+// The runtime may know about them.
15
+
16
+TEXT	·Syscall(SB),NOSPLIT,$0-56
17
+	JMP	syscall·Syscall(SB)
18
+
19
+TEXT	·Syscall6(SB),NOSPLIT,$0-80
20
+	JMP	syscall·Syscall6(SB)
21
+
22
+TEXT	·Syscall9(SB),NOSPLIT,$0-104
23
+	JMP	syscall·Syscall9(SB)
24
+
25
+TEXT	·RawSyscall(SB),NOSPLIT,$0-56
26
+	JMP	syscall·RawSyscall(SB)
27
+
28
+TEXT	·RawSyscall6(SB),NOSPLIT,$0-80
29
+	JMP	syscall·RawSyscall6(SB)

+ 54
- 0
vendor/golang.org/x/sys/unix/asm_linux_loong64.s View File

@@ -0,0 +1,54 @@
1
+// Copyright 2022 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build linux && loong64 && gc
6
+// +build linux
7
+// +build loong64
8
+// +build gc
9
+
10
+#include "textflag.h"
11
+
12
+
13
+// Just jump to package syscall's implementation for all these functions.
14
+// The runtime may know about them.
15
+
16
+TEXT ·Syscall(SB),NOSPLIT,$0-56
17
+	JMP	syscall·Syscall(SB)
18
+
19
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
20
+	JMP	syscall·Syscall6(SB)
21
+
22
+TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23
+	JAL	runtime·entersyscall(SB)
24
+	MOVV	a1+8(FP), R4
25
+	MOVV	a2+16(FP), R5
26
+	MOVV	a3+24(FP), R6
27
+	MOVV	R0, R7
28
+	MOVV	R0, R8
29
+	MOVV	R0, R9
30
+	MOVV	trap+0(FP), R11	// syscall entry
31
+	SYSCALL
32
+	MOVV	R4, r1+32(FP)
33
+	MOVV	R0, r2+40(FP)	// r2 is not used. Always set to 0
34
+	JAL	runtime·exitsyscall(SB)
35
+	RET
36
+
37
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38
+	JMP	syscall·RawSyscall(SB)
39
+
40
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41
+	JMP	syscall·RawSyscall6(SB)
42
+
43
+TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44
+	MOVV	a1+8(FP), R4
45
+	MOVV	a2+16(FP), R5
46
+	MOVV	a3+24(FP), R6
47
+	MOVV	R0, R7
48
+	MOVV	R0, R8
49
+	MOVV	R0, R9
50
+	MOVV	trap+0(FP), R11	// syscall entry
51
+	SYSCALL
52
+	MOVV	R4, r1+32(FP)
53
+	MOVV	R0, r2+40(FP)	// r2 is not used. Always set to 0
54
+	RET

+ 2
- 2
vendor/golang.org/x/sys/unix/endian_little.go View File

@@ -2,8 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 //
5
-//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6
-// +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
5
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6
+// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
7 7
 
8 8
 package unix
9 9
 

+ 0
- 233
vendor/golang.org/x/sys/unix/errors_freebsd_386.go View File

@@ -1,233 +0,0 @@
1
-// Copyright 2017 The Go Authors. All rights reserved.
2
-// Use of this source code is governed by a BSD-style
3
-// license that can be found in the LICENSE file.
4
-
5
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
6
-// them here for backwards compatibility.
7
-
8
-package unix
9
-
10
-const (
11
-	DLT_HHDLC                         = 0x79
12
-	IFF_SMART                         = 0x20
13
-	IFT_1822                          = 0x2
14
-	IFT_A12MPPSWITCH                  = 0x82
15
-	IFT_AAL2                          = 0xbb
16
-	IFT_AAL5                          = 0x31
17
-	IFT_ADSL                          = 0x5e
18
-	IFT_AFLANE8023                    = 0x3b
19
-	IFT_AFLANE8025                    = 0x3c
20
-	IFT_ARAP                          = 0x58
21
-	IFT_ARCNET                        = 0x23
22
-	IFT_ARCNETPLUS                    = 0x24
23
-	IFT_ASYNC                         = 0x54
24
-	IFT_ATM                           = 0x25
25
-	IFT_ATMDXI                        = 0x69
26
-	IFT_ATMFUNI                       = 0x6a
27
-	IFT_ATMIMA                        = 0x6b
28
-	IFT_ATMLOGICAL                    = 0x50
29
-	IFT_ATMRADIO                      = 0xbd
30
-	IFT_ATMSUBINTERFACE               = 0x86
31
-	IFT_ATMVCIENDPT                   = 0xc2
32
-	IFT_ATMVIRTUAL                    = 0x95
33
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
34
-	IFT_BSC                           = 0x53
35
-	IFT_CCTEMUL                       = 0x3d
36
-	IFT_CEPT                          = 0x13
37
-	IFT_CES                           = 0x85
38
-	IFT_CHANNEL                       = 0x46
39
-	IFT_CNR                           = 0x55
40
-	IFT_COFFEE                        = 0x84
41
-	IFT_COMPOSITELINK                 = 0x9b
42
-	IFT_DCN                           = 0x8d
43
-	IFT_DIGITALPOWERLINE              = 0x8a
44
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
45
-	IFT_DLSW                          = 0x4a
46
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
47
-	IFT_DOCSCABLEMACLAYER             = 0x7f
48
-	IFT_DOCSCABLEUPSTREAM             = 0x81
49
-	IFT_DS0                           = 0x51
50
-	IFT_DS0BUNDLE                     = 0x52
51
-	IFT_DS1FDL                        = 0xaa
52
-	IFT_DS3                           = 0x1e
53
-	IFT_DTM                           = 0x8c
54
-	IFT_DVBASILN                      = 0xac
55
-	IFT_DVBASIOUT                     = 0xad
56
-	IFT_DVBRCCDOWNSTREAM              = 0x93
57
-	IFT_DVBRCCMACLAYER                = 0x92
58
-	IFT_DVBRCCUPSTREAM                = 0x94
59
-	IFT_ENC                           = 0xf4
60
-	IFT_EON                           = 0x19
61
-	IFT_EPLRS                         = 0x57
62
-	IFT_ESCON                         = 0x49
63
-	IFT_ETHER                         = 0x6
64
-	IFT_FAITH                         = 0xf2
65
-	IFT_FAST                          = 0x7d
66
-	IFT_FASTETHER                     = 0x3e
67
-	IFT_FASTETHERFX                   = 0x45
68
-	IFT_FDDI                          = 0xf
69
-	IFT_FIBRECHANNEL                  = 0x38
70
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
71
-	IFT_FRAMERELAYMPI                 = 0x5c
72
-	IFT_FRDLCIENDPT                   = 0xc1
73
-	IFT_FRELAY                        = 0x20
74
-	IFT_FRELAYDCE                     = 0x2c
75
-	IFT_FRF16MFRBUNDLE                = 0xa3
76
-	IFT_FRFORWARD                     = 0x9e
77
-	IFT_G703AT2MB                     = 0x43
78
-	IFT_G703AT64K                     = 0x42
79
-	IFT_GIF                           = 0xf0
80
-	IFT_GIGABITETHERNET               = 0x75
81
-	IFT_GR303IDT                      = 0xb2
82
-	IFT_GR303RDT                      = 0xb1
83
-	IFT_H323GATEKEEPER                = 0xa4
84
-	IFT_H323PROXY                     = 0xa5
85
-	IFT_HDH1822                       = 0x3
86
-	IFT_HDLC                          = 0x76
87
-	IFT_HDSL2                         = 0xa8
88
-	IFT_HIPERLAN2                     = 0xb7
89
-	IFT_HIPPI                         = 0x2f
90
-	IFT_HIPPIINTERFACE                = 0x39
91
-	IFT_HOSTPAD                       = 0x5a
92
-	IFT_HSSI                          = 0x2e
93
-	IFT_HY                            = 0xe
94
-	IFT_IBM370PARCHAN                 = 0x48
95
-	IFT_IDSL                          = 0x9a
96
-	IFT_IEEE80211                     = 0x47
97
-	IFT_IEEE80212                     = 0x37
98
-	IFT_IEEE8023ADLAG                 = 0xa1
99
-	IFT_IFGSN                         = 0x91
100
-	IFT_IMT                           = 0xbe
101
-	IFT_INTERLEAVE                    = 0x7c
102
-	IFT_IP                            = 0x7e
103
-	IFT_IPFORWARD                     = 0x8e
104
-	IFT_IPOVERATM                     = 0x72
105
-	IFT_IPOVERCDLC                    = 0x6d
106
-	IFT_IPOVERCLAW                    = 0x6e
107
-	IFT_IPSWITCH                      = 0x4e
108
-	IFT_IPXIP                         = 0xf9
109
-	IFT_ISDN                          = 0x3f
110
-	IFT_ISDNBASIC                     = 0x14
111
-	IFT_ISDNPRIMARY                   = 0x15
112
-	IFT_ISDNS                         = 0x4b
113
-	IFT_ISDNU                         = 0x4c
114
-	IFT_ISO88022LLC                   = 0x29
115
-	IFT_ISO88023                      = 0x7
116
-	IFT_ISO88024                      = 0x8
117
-	IFT_ISO88025                      = 0x9
118
-	IFT_ISO88025CRFPINT               = 0x62
119
-	IFT_ISO88025DTR                   = 0x56
120
-	IFT_ISO88025FIBER                 = 0x73
121
-	IFT_ISO88026                      = 0xa
122
-	IFT_ISUP                          = 0xb3
123
-	IFT_L3IPXVLAN                     = 0x89
124
-	IFT_LAPB                          = 0x10
125
-	IFT_LAPD                          = 0x4d
126
-	IFT_LAPF                          = 0x77
127
-	IFT_LOCALTALK                     = 0x2a
128
-	IFT_LOOP                          = 0x18
129
-	IFT_MEDIAMAILOVERIP               = 0x8b
130
-	IFT_MFSIGLINK                     = 0xa7
131
-	IFT_MIOX25                        = 0x26
132
-	IFT_MODEM                         = 0x30
133
-	IFT_MPC                           = 0x71
134
-	IFT_MPLS                          = 0xa6
135
-	IFT_MPLSTUNNEL                    = 0x96
136
-	IFT_MSDSL                         = 0x8f
137
-	IFT_MVL                           = 0xbf
138
-	IFT_MYRINET                       = 0x63
139
-	IFT_NFAS                          = 0xaf
140
-	IFT_NSIP                          = 0x1b
141
-	IFT_OPTICALCHANNEL                = 0xc3
142
-	IFT_OPTICALTRANSPORT              = 0xc4
143
-	IFT_OTHER                         = 0x1
144
-	IFT_P10                           = 0xc
145
-	IFT_P80                           = 0xd
146
-	IFT_PARA                          = 0x22
147
-	IFT_PFLOG                         = 0xf6
148
-	IFT_PFSYNC                        = 0xf7
149
-	IFT_PLC                           = 0xae
150
-	IFT_POS                           = 0xab
151
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
152
-	IFT_PROPBWAP2MP                   = 0xb8
153
-	IFT_PROPCNLS                      = 0x59
154
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
155
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
156
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
157
-	IFT_PROPMUX                       = 0x36
158
-	IFT_PROPWIRELESSP2P               = 0x9d
159
-	IFT_PTPSERIAL                     = 0x16
160
-	IFT_PVC                           = 0xf1
161
-	IFT_QLLC                          = 0x44
162
-	IFT_RADIOMAC                      = 0xbc
163
-	IFT_RADSL                         = 0x5f
164
-	IFT_REACHDSL                      = 0xc0
165
-	IFT_RFC1483                       = 0x9f
166
-	IFT_RS232                         = 0x21
167
-	IFT_RSRB                          = 0x4f
168
-	IFT_SDLC                          = 0x11
169
-	IFT_SDSL                          = 0x60
170
-	IFT_SHDSL                         = 0xa9
171
-	IFT_SIP                           = 0x1f
172
-	IFT_SLIP                          = 0x1c
173
-	IFT_SMDSDXI                       = 0x2b
174
-	IFT_SMDSICIP                      = 0x34
175
-	IFT_SONET                         = 0x27
176
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
177
-	IFT_SONETPATH                     = 0x32
178
-	IFT_SONETVT                       = 0x33
179
-	IFT_SRP                           = 0x97
180
-	IFT_SS7SIGLINK                    = 0x9c
181
-	IFT_STACKTOSTACK                  = 0x6f
182
-	IFT_STARLAN                       = 0xb
183
-	IFT_STF                           = 0xd7
184
-	IFT_T1                            = 0x12
185
-	IFT_TDLC                          = 0x74
186
-	IFT_TERMPAD                       = 0x5b
187
-	IFT_TR008                         = 0xb0
188
-	IFT_TRANSPHDLC                    = 0x7b
189
-	IFT_TUNNEL                        = 0x83
190
-	IFT_ULTRA                         = 0x1d
191
-	IFT_USB                           = 0xa0
192
-	IFT_V11                           = 0x40
193
-	IFT_V35                           = 0x2d
194
-	IFT_V36                           = 0x41
195
-	IFT_V37                           = 0x78
196
-	IFT_VDSL                          = 0x61
197
-	IFT_VIRTUALIPADDRESS              = 0x70
198
-	IFT_VOICEEM                       = 0x64
199
-	IFT_VOICEENCAP                    = 0x67
200
-	IFT_VOICEFXO                      = 0x65
201
-	IFT_VOICEFXS                      = 0x66
202
-	IFT_VOICEOVERATM                  = 0x98
203
-	IFT_VOICEOVERFRAMERELAY           = 0x99
204
-	IFT_VOICEOVERIP                   = 0x68
205
-	IFT_X213                          = 0x5d
206
-	IFT_X25                           = 0x5
207
-	IFT_X25DDN                        = 0x4
208
-	IFT_X25HUNTGROUP                  = 0x7a
209
-	IFT_X25MLP                        = 0x79
210
-	IFT_X25PLE                        = 0x28
211
-	IFT_XETHER                        = 0x1a
212
-	IPPROTO_MAXID                     = 0x34
213
-	IPV6_FAITH                        = 0x1d
214
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
215
-	IP_FAITH                          = 0x16
216
-	IP_MAX_SOURCE_FILTER              = 0x400
217
-	IP_MIN_MEMBERSHIPS                = 0x1f
218
-	MAP_NORESERVE                     = 0x40
219
-	MAP_RENAME                        = 0x20
220
-	NET_RT_MAXID                      = 0x6
221
-	RTF_PRCLONING                     = 0x10000
222
-	RTM_OLDADD                        = 0x9
223
-	RTM_OLDDEL                        = 0xa
224
-	RT_CACHING_CONTEXT                = 0x1
225
-	RT_NORTREF                        = 0x2
226
-	SIOCADDRT                         = 0x8030720a
227
-	SIOCALIFADDR                      = 0x8118691b
228
-	SIOCDELRT                         = 0x8030720b
229
-	SIOCDLIFADDR                      = 0x8118691d
230
-	SIOCGLIFADDR                      = 0xc118691c
231
-	SIOCGLIFPHYADDR                   = 0xc118694b
232
-	SIOCSLIFPHYADDR                   = 0x8118694a
233
-)

+ 0
- 233
vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go View File

@@ -1,233 +0,0 @@
1
-// Copyright 2017 The Go Authors. All rights reserved.
2
-// Use of this source code is governed by a BSD-style
3
-// license that can be found in the LICENSE file.
4
-
5
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
6
-// them here for backwards compatibility.
7
-
8
-package unix
9
-
10
-const (
11
-	DLT_HHDLC                         = 0x79
12
-	IFF_SMART                         = 0x20
13
-	IFT_1822                          = 0x2
14
-	IFT_A12MPPSWITCH                  = 0x82
15
-	IFT_AAL2                          = 0xbb
16
-	IFT_AAL5                          = 0x31
17
-	IFT_ADSL                          = 0x5e
18
-	IFT_AFLANE8023                    = 0x3b
19
-	IFT_AFLANE8025                    = 0x3c
20
-	IFT_ARAP                          = 0x58
21
-	IFT_ARCNET                        = 0x23
22
-	IFT_ARCNETPLUS                    = 0x24
23
-	IFT_ASYNC                         = 0x54
24
-	IFT_ATM                           = 0x25
25
-	IFT_ATMDXI                        = 0x69
26
-	IFT_ATMFUNI                       = 0x6a
27
-	IFT_ATMIMA                        = 0x6b
28
-	IFT_ATMLOGICAL                    = 0x50
29
-	IFT_ATMRADIO                      = 0xbd
30
-	IFT_ATMSUBINTERFACE               = 0x86
31
-	IFT_ATMVCIENDPT                   = 0xc2
32
-	IFT_ATMVIRTUAL                    = 0x95
33
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
34
-	IFT_BSC                           = 0x53
35
-	IFT_CCTEMUL                       = 0x3d
36
-	IFT_CEPT                          = 0x13
37
-	IFT_CES                           = 0x85
38
-	IFT_CHANNEL                       = 0x46
39
-	IFT_CNR                           = 0x55
40
-	IFT_COFFEE                        = 0x84
41
-	IFT_COMPOSITELINK                 = 0x9b
42
-	IFT_DCN                           = 0x8d
43
-	IFT_DIGITALPOWERLINE              = 0x8a
44
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
45
-	IFT_DLSW                          = 0x4a
46
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
47
-	IFT_DOCSCABLEMACLAYER             = 0x7f
48
-	IFT_DOCSCABLEUPSTREAM             = 0x81
49
-	IFT_DS0                           = 0x51
50
-	IFT_DS0BUNDLE                     = 0x52
51
-	IFT_DS1FDL                        = 0xaa
52
-	IFT_DS3                           = 0x1e
53
-	IFT_DTM                           = 0x8c
54
-	IFT_DVBASILN                      = 0xac
55
-	IFT_DVBASIOUT                     = 0xad
56
-	IFT_DVBRCCDOWNSTREAM              = 0x93
57
-	IFT_DVBRCCMACLAYER                = 0x92
58
-	IFT_DVBRCCUPSTREAM                = 0x94
59
-	IFT_ENC                           = 0xf4
60
-	IFT_EON                           = 0x19
61
-	IFT_EPLRS                         = 0x57
62
-	IFT_ESCON                         = 0x49
63
-	IFT_ETHER                         = 0x6
64
-	IFT_FAITH                         = 0xf2
65
-	IFT_FAST                          = 0x7d
66
-	IFT_FASTETHER                     = 0x3e
67
-	IFT_FASTETHERFX                   = 0x45
68
-	IFT_FDDI                          = 0xf
69
-	IFT_FIBRECHANNEL                  = 0x38
70
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
71
-	IFT_FRAMERELAYMPI                 = 0x5c
72
-	IFT_FRDLCIENDPT                   = 0xc1
73
-	IFT_FRELAY                        = 0x20
74
-	IFT_FRELAYDCE                     = 0x2c
75
-	IFT_FRF16MFRBUNDLE                = 0xa3
76
-	IFT_FRFORWARD                     = 0x9e
77
-	IFT_G703AT2MB                     = 0x43
78
-	IFT_G703AT64K                     = 0x42
79
-	IFT_GIF                           = 0xf0
80
-	IFT_GIGABITETHERNET               = 0x75
81
-	IFT_GR303IDT                      = 0xb2
82
-	IFT_GR303RDT                      = 0xb1
83
-	IFT_H323GATEKEEPER                = 0xa4
84
-	IFT_H323PROXY                     = 0xa5
85
-	IFT_HDH1822                       = 0x3
86
-	IFT_HDLC                          = 0x76
87
-	IFT_HDSL2                         = 0xa8
88
-	IFT_HIPERLAN2                     = 0xb7
89
-	IFT_HIPPI                         = 0x2f
90
-	IFT_HIPPIINTERFACE                = 0x39
91
-	IFT_HOSTPAD                       = 0x5a
92
-	IFT_HSSI                          = 0x2e
93
-	IFT_HY                            = 0xe
94
-	IFT_IBM370PARCHAN                 = 0x48
95
-	IFT_IDSL                          = 0x9a
96
-	IFT_IEEE80211                     = 0x47
97
-	IFT_IEEE80212                     = 0x37
98
-	IFT_IEEE8023ADLAG                 = 0xa1
99
-	IFT_IFGSN                         = 0x91
100
-	IFT_IMT                           = 0xbe
101
-	IFT_INTERLEAVE                    = 0x7c
102
-	IFT_IP                            = 0x7e
103
-	IFT_IPFORWARD                     = 0x8e
104
-	IFT_IPOVERATM                     = 0x72
105
-	IFT_IPOVERCDLC                    = 0x6d
106
-	IFT_IPOVERCLAW                    = 0x6e
107
-	IFT_IPSWITCH                      = 0x4e
108
-	IFT_IPXIP                         = 0xf9
109
-	IFT_ISDN                          = 0x3f
110
-	IFT_ISDNBASIC                     = 0x14
111
-	IFT_ISDNPRIMARY                   = 0x15
112
-	IFT_ISDNS                         = 0x4b
113
-	IFT_ISDNU                         = 0x4c
114
-	IFT_ISO88022LLC                   = 0x29
115
-	IFT_ISO88023                      = 0x7
116
-	IFT_ISO88024                      = 0x8
117
-	IFT_ISO88025                      = 0x9
118
-	IFT_ISO88025CRFPINT               = 0x62
119
-	IFT_ISO88025DTR                   = 0x56
120
-	IFT_ISO88025FIBER                 = 0x73
121
-	IFT_ISO88026                      = 0xa
122
-	IFT_ISUP                          = 0xb3
123
-	IFT_L3IPXVLAN                     = 0x89
124
-	IFT_LAPB                          = 0x10
125
-	IFT_LAPD                          = 0x4d
126
-	IFT_LAPF                          = 0x77
127
-	IFT_LOCALTALK                     = 0x2a
128
-	IFT_LOOP                          = 0x18
129
-	IFT_MEDIAMAILOVERIP               = 0x8b
130
-	IFT_MFSIGLINK                     = 0xa7
131
-	IFT_MIOX25                        = 0x26
132
-	IFT_MODEM                         = 0x30
133
-	IFT_MPC                           = 0x71
134
-	IFT_MPLS                          = 0xa6
135
-	IFT_MPLSTUNNEL                    = 0x96
136
-	IFT_MSDSL                         = 0x8f
137
-	IFT_MVL                           = 0xbf
138
-	IFT_MYRINET                       = 0x63
139
-	IFT_NFAS                          = 0xaf
140
-	IFT_NSIP                          = 0x1b
141
-	IFT_OPTICALCHANNEL                = 0xc3
142
-	IFT_OPTICALTRANSPORT              = 0xc4
143
-	IFT_OTHER                         = 0x1
144
-	IFT_P10                           = 0xc
145
-	IFT_P80                           = 0xd
146
-	IFT_PARA                          = 0x22
147
-	IFT_PFLOG                         = 0xf6
148
-	IFT_PFSYNC                        = 0xf7
149
-	IFT_PLC                           = 0xae
150
-	IFT_POS                           = 0xab
151
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
152
-	IFT_PROPBWAP2MP                   = 0xb8
153
-	IFT_PROPCNLS                      = 0x59
154
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
155
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
156
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
157
-	IFT_PROPMUX                       = 0x36
158
-	IFT_PROPWIRELESSP2P               = 0x9d
159
-	IFT_PTPSERIAL                     = 0x16
160
-	IFT_PVC                           = 0xf1
161
-	IFT_QLLC                          = 0x44
162
-	IFT_RADIOMAC                      = 0xbc
163
-	IFT_RADSL                         = 0x5f
164
-	IFT_REACHDSL                      = 0xc0
165
-	IFT_RFC1483                       = 0x9f
166
-	IFT_RS232                         = 0x21
167
-	IFT_RSRB                          = 0x4f
168
-	IFT_SDLC                          = 0x11
169
-	IFT_SDSL                          = 0x60
170
-	IFT_SHDSL                         = 0xa9
171
-	IFT_SIP                           = 0x1f
172
-	IFT_SLIP                          = 0x1c
173
-	IFT_SMDSDXI                       = 0x2b
174
-	IFT_SMDSICIP                      = 0x34
175
-	IFT_SONET                         = 0x27
176
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
177
-	IFT_SONETPATH                     = 0x32
178
-	IFT_SONETVT                       = 0x33
179
-	IFT_SRP                           = 0x97
180
-	IFT_SS7SIGLINK                    = 0x9c
181
-	IFT_STACKTOSTACK                  = 0x6f
182
-	IFT_STARLAN                       = 0xb
183
-	IFT_STF                           = 0xd7
184
-	IFT_T1                            = 0x12
185
-	IFT_TDLC                          = 0x74
186
-	IFT_TERMPAD                       = 0x5b
187
-	IFT_TR008                         = 0xb0
188
-	IFT_TRANSPHDLC                    = 0x7b
189
-	IFT_TUNNEL                        = 0x83
190
-	IFT_ULTRA                         = 0x1d
191
-	IFT_USB                           = 0xa0
192
-	IFT_V11                           = 0x40
193
-	IFT_V35                           = 0x2d
194
-	IFT_V36                           = 0x41
195
-	IFT_V37                           = 0x78
196
-	IFT_VDSL                          = 0x61
197
-	IFT_VIRTUALIPADDRESS              = 0x70
198
-	IFT_VOICEEM                       = 0x64
199
-	IFT_VOICEENCAP                    = 0x67
200
-	IFT_VOICEFXO                      = 0x65
201
-	IFT_VOICEFXS                      = 0x66
202
-	IFT_VOICEOVERATM                  = 0x98
203
-	IFT_VOICEOVERFRAMERELAY           = 0x99
204
-	IFT_VOICEOVERIP                   = 0x68
205
-	IFT_X213                          = 0x5d
206
-	IFT_X25                           = 0x5
207
-	IFT_X25DDN                        = 0x4
208
-	IFT_X25HUNTGROUP                  = 0x7a
209
-	IFT_X25MLP                        = 0x79
210
-	IFT_X25PLE                        = 0x28
211
-	IFT_XETHER                        = 0x1a
212
-	IPPROTO_MAXID                     = 0x34
213
-	IPV6_FAITH                        = 0x1d
214
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
215
-	IP_FAITH                          = 0x16
216
-	IP_MAX_SOURCE_FILTER              = 0x400
217
-	IP_MIN_MEMBERSHIPS                = 0x1f
218
-	MAP_NORESERVE                     = 0x40
219
-	MAP_RENAME                        = 0x20
220
-	NET_RT_MAXID                      = 0x6
221
-	RTF_PRCLONING                     = 0x10000
222
-	RTM_OLDADD                        = 0x9
223
-	RTM_OLDDEL                        = 0xa
224
-	RT_CACHING_CONTEXT                = 0x1
225
-	RT_NORTREF                        = 0x2
226
-	SIOCADDRT                         = 0x8040720a
227
-	SIOCALIFADDR                      = 0x8118691b
228
-	SIOCDELRT                         = 0x8040720b
229
-	SIOCDLIFADDR                      = 0x8118691d
230
-	SIOCGLIFADDR                      = 0xc118691c
231
-	SIOCGLIFPHYADDR                   = 0xc118694b
232
-	SIOCSLIFPHYADDR                   = 0x8118694a
233
-)

+ 0
- 226
vendor/golang.org/x/sys/unix/errors_freebsd_arm.go View File

@@ -1,226 +0,0 @@
1
-// Copyright 2017 The Go Authors. All rights reserved.
2
-// Use of this source code is governed by a BSD-style
3
-// license that can be found in the LICENSE file.
4
-
5
-package unix
6
-
7
-const (
8
-	IFT_1822                          = 0x2
9
-	IFT_A12MPPSWITCH                  = 0x82
10
-	IFT_AAL2                          = 0xbb
11
-	IFT_AAL5                          = 0x31
12
-	IFT_ADSL                          = 0x5e
13
-	IFT_AFLANE8023                    = 0x3b
14
-	IFT_AFLANE8025                    = 0x3c
15
-	IFT_ARAP                          = 0x58
16
-	IFT_ARCNET                        = 0x23
17
-	IFT_ARCNETPLUS                    = 0x24
18
-	IFT_ASYNC                         = 0x54
19
-	IFT_ATM                           = 0x25
20
-	IFT_ATMDXI                        = 0x69
21
-	IFT_ATMFUNI                       = 0x6a
22
-	IFT_ATMIMA                        = 0x6b
23
-	IFT_ATMLOGICAL                    = 0x50
24
-	IFT_ATMRADIO                      = 0xbd
25
-	IFT_ATMSUBINTERFACE               = 0x86
26
-	IFT_ATMVCIENDPT                   = 0xc2
27
-	IFT_ATMVIRTUAL                    = 0x95
28
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
29
-	IFT_BSC                           = 0x53
30
-	IFT_CCTEMUL                       = 0x3d
31
-	IFT_CEPT                          = 0x13
32
-	IFT_CES                           = 0x85
33
-	IFT_CHANNEL                       = 0x46
34
-	IFT_CNR                           = 0x55
35
-	IFT_COFFEE                        = 0x84
36
-	IFT_COMPOSITELINK                 = 0x9b
37
-	IFT_DCN                           = 0x8d
38
-	IFT_DIGITALPOWERLINE              = 0x8a
39
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
40
-	IFT_DLSW                          = 0x4a
41
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
42
-	IFT_DOCSCABLEMACLAYER             = 0x7f
43
-	IFT_DOCSCABLEUPSTREAM             = 0x81
44
-	IFT_DS0                           = 0x51
45
-	IFT_DS0BUNDLE                     = 0x52
46
-	IFT_DS1FDL                        = 0xaa
47
-	IFT_DS3                           = 0x1e
48
-	IFT_DTM                           = 0x8c
49
-	IFT_DVBASILN                      = 0xac
50
-	IFT_DVBASIOUT                     = 0xad
51
-	IFT_DVBRCCDOWNSTREAM              = 0x93
52
-	IFT_DVBRCCMACLAYER                = 0x92
53
-	IFT_DVBRCCUPSTREAM                = 0x94
54
-	IFT_ENC                           = 0xf4
55
-	IFT_EON                           = 0x19
56
-	IFT_EPLRS                         = 0x57
57
-	IFT_ESCON                         = 0x49
58
-	IFT_ETHER                         = 0x6
59
-	IFT_FAST                          = 0x7d
60
-	IFT_FASTETHER                     = 0x3e
61
-	IFT_FASTETHERFX                   = 0x45
62
-	IFT_FDDI                          = 0xf
63
-	IFT_FIBRECHANNEL                  = 0x38
64
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
65
-	IFT_FRAMERELAYMPI                 = 0x5c
66
-	IFT_FRDLCIENDPT                   = 0xc1
67
-	IFT_FRELAY                        = 0x20
68
-	IFT_FRELAYDCE                     = 0x2c
69
-	IFT_FRF16MFRBUNDLE                = 0xa3
70
-	IFT_FRFORWARD                     = 0x9e
71
-	IFT_G703AT2MB                     = 0x43
72
-	IFT_G703AT64K                     = 0x42
73
-	IFT_GIF                           = 0xf0
74
-	IFT_GIGABITETHERNET               = 0x75
75
-	IFT_GR303IDT                      = 0xb2
76
-	IFT_GR303RDT                      = 0xb1
77
-	IFT_H323GATEKEEPER                = 0xa4
78
-	IFT_H323PROXY                     = 0xa5
79
-	IFT_HDH1822                       = 0x3
80
-	IFT_HDLC                          = 0x76
81
-	IFT_HDSL2                         = 0xa8
82
-	IFT_HIPERLAN2                     = 0xb7
83
-	IFT_HIPPI                         = 0x2f
84
-	IFT_HIPPIINTERFACE                = 0x39
85
-	IFT_HOSTPAD                       = 0x5a
86
-	IFT_HSSI                          = 0x2e
87
-	IFT_HY                            = 0xe
88
-	IFT_IBM370PARCHAN                 = 0x48
89
-	IFT_IDSL                          = 0x9a
90
-	IFT_IEEE80211                     = 0x47
91
-	IFT_IEEE80212                     = 0x37
92
-	IFT_IEEE8023ADLAG                 = 0xa1
93
-	IFT_IFGSN                         = 0x91
94
-	IFT_IMT                           = 0xbe
95
-	IFT_INTERLEAVE                    = 0x7c
96
-	IFT_IP                            = 0x7e
97
-	IFT_IPFORWARD                     = 0x8e
98
-	IFT_IPOVERATM                     = 0x72
99
-	IFT_IPOVERCDLC                    = 0x6d
100
-	IFT_IPOVERCLAW                    = 0x6e
101
-	IFT_IPSWITCH                      = 0x4e
102
-	IFT_ISDN                          = 0x3f
103
-	IFT_ISDNBASIC                     = 0x14
104
-	IFT_ISDNPRIMARY                   = 0x15
105
-	IFT_ISDNS                         = 0x4b
106
-	IFT_ISDNU                         = 0x4c
107
-	IFT_ISO88022LLC                   = 0x29
108
-	IFT_ISO88023                      = 0x7
109
-	IFT_ISO88024                      = 0x8
110
-	IFT_ISO88025                      = 0x9
111
-	IFT_ISO88025CRFPINT               = 0x62
112
-	IFT_ISO88025DTR                   = 0x56
113
-	IFT_ISO88025FIBER                 = 0x73
114
-	IFT_ISO88026                      = 0xa
115
-	IFT_ISUP                          = 0xb3
116
-	IFT_L3IPXVLAN                     = 0x89
117
-	IFT_LAPB                          = 0x10
118
-	IFT_LAPD                          = 0x4d
119
-	IFT_LAPF                          = 0x77
120
-	IFT_LOCALTALK                     = 0x2a
121
-	IFT_LOOP                          = 0x18
122
-	IFT_MEDIAMAILOVERIP               = 0x8b
123
-	IFT_MFSIGLINK                     = 0xa7
124
-	IFT_MIOX25                        = 0x26
125
-	IFT_MODEM                         = 0x30
126
-	IFT_MPC                           = 0x71
127
-	IFT_MPLS                          = 0xa6
128
-	IFT_MPLSTUNNEL                    = 0x96
129
-	IFT_MSDSL                         = 0x8f
130
-	IFT_MVL                           = 0xbf
131
-	IFT_MYRINET                       = 0x63
132
-	IFT_NFAS                          = 0xaf
133
-	IFT_NSIP                          = 0x1b
134
-	IFT_OPTICALCHANNEL                = 0xc3
135
-	IFT_OPTICALTRANSPORT              = 0xc4
136
-	IFT_OTHER                         = 0x1
137
-	IFT_P10                           = 0xc
138
-	IFT_P80                           = 0xd
139
-	IFT_PARA                          = 0x22
140
-	IFT_PFLOG                         = 0xf6
141
-	IFT_PFSYNC                        = 0xf7
142
-	IFT_PLC                           = 0xae
143
-	IFT_POS                           = 0xab
144
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
145
-	IFT_PROPBWAP2MP                   = 0xb8
146
-	IFT_PROPCNLS                      = 0x59
147
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
148
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
149
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
150
-	IFT_PROPMUX                       = 0x36
151
-	IFT_PROPWIRELESSP2P               = 0x9d
152
-	IFT_PTPSERIAL                     = 0x16
153
-	IFT_PVC                           = 0xf1
154
-	IFT_QLLC                          = 0x44
155
-	IFT_RADIOMAC                      = 0xbc
156
-	IFT_RADSL                         = 0x5f
157
-	IFT_REACHDSL                      = 0xc0
158
-	IFT_RFC1483                       = 0x9f
159
-	IFT_RS232                         = 0x21
160
-	IFT_RSRB                          = 0x4f
161
-	IFT_SDLC                          = 0x11
162
-	IFT_SDSL                          = 0x60
163
-	IFT_SHDSL                         = 0xa9
164
-	IFT_SIP                           = 0x1f
165
-	IFT_SLIP                          = 0x1c
166
-	IFT_SMDSDXI                       = 0x2b
167
-	IFT_SMDSICIP                      = 0x34
168
-	IFT_SONET                         = 0x27
169
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
170
-	IFT_SONETPATH                     = 0x32
171
-	IFT_SONETVT                       = 0x33
172
-	IFT_SRP                           = 0x97
173
-	IFT_SS7SIGLINK                    = 0x9c
174
-	IFT_STACKTOSTACK                  = 0x6f
175
-	IFT_STARLAN                       = 0xb
176
-	IFT_STF                           = 0xd7
177
-	IFT_T1                            = 0x12
178
-	IFT_TDLC                          = 0x74
179
-	IFT_TERMPAD                       = 0x5b
180
-	IFT_TR008                         = 0xb0
181
-	IFT_TRANSPHDLC                    = 0x7b
182
-	IFT_TUNNEL                        = 0x83
183
-	IFT_ULTRA                         = 0x1d
184
-	IFT_USB                           = 0xa0
185
-	IFT_V11                           = 0x40
186
-	IFT_V35                           = 0x2d
187
-	IFT_V36                           = 0x41
188
-	IFT_V37                           = 0x78
189
-	IFT_VDSL                          = 0x61
190
-	IFT_VIRTUALIPADDRESS              = 0x70
191
-	IFT_VOICEEM                       = 0x64
192
-	IFT_VOICEENCAP                    = 0x67
193
-	IFT_VOICEFXO                      = 0x65
194
-	IFT_VOICEFXS                      = 0x66
195
-	IFT_VOICEOVERATM                  = 0x98
196
-	IFT_VOICEOVERFRAMERELAY           = 0x99
197
-	IFT_VOICEOVERIP                   = 0x68
198
-	IFT_X213                          = 0x5d
199
-	IFT_X25                           = 0x5
200
-	IFT_X25DDN                        = 0x4
201
-	IFT_X25HUNTGROUP                  = 0x7a
202
-	IFT_X25MLP                        = 0x79
203
-	IFT_X25PLE                        = 0x28
204
-	IFT_XETHER                        = 0x1a
205
-
206
-	// missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
207
-	IFF_SMART       = 0x20
208
-	IFT_FAITH       = 0xf2
209
-	IFT_IPXIP       = 0xf9
210
-	IPPROTO_MAXID   = 0x34
211
-	IPV6_FAITH      = 0x1d
212
-	IP_FAITH        = 0x16
213
-	MAP_NORESERVE   = 0x40
214
-	MAP_RENAME      = 0x20
215
-	NET_RT_MAXID    = 0x6
216
-	RTF_PRCLONING   = 0x10000
217
-	RTM_OLDADD      = 0x9
218
-	RTM_OLDDEL      = 0xa
219
-	SIOCADDRT       = 0x8030720a
220
-	SIOCALIFADDR    = 0x8118691b
221
-	SIOCDELRT       = 0x8030720b
222
-	SIOCDLIFADDR    = 0x8118691d
223
-	SIOCGLIFADDR    = 0xc118691c
224
-	SIOCGLIFPHYADDR = 0xc118694b
225
-	SIOCSLIFPHYADDR = 0x8118694a
226
-)

+ 0
- 17
vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go View File

@@ -1,17 +0,0 @@
1
-// Copyright 2020 The Go Authors. All rights reserved.
2
-// Use of this source code is governed by a BSD-style
3
-// license that can be found in the LICENSE file.
4
-
5
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
6
-// them here for backwards compatibility.
7
-
8
-package unix
9
-
10
-const (
11
-	DLT_HHDLC            = 0x79
12
-	IPV6_MIN_MEMBERSHIPS = 0x1f
13
-	IP_MAX_SOURCE_FILTER = 0x400
14
-	IP_MIN_MEMBERSHIPS   = 0x1f
15
-	RT_CACHING_CONTEXT   = 0x1
16
-	RT_NORTREF           = 0x2
17
-)

+ 142
- 0
vendor/golang.org/x/sys/unix/ifreq_linux.go View File

@@ -0,0 +1,142 @@
1
+// Copyright 2021 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build linux
6
+// +build linux
7
+
8
+package unix
9
+
10
+import (
11
+	"unsafe"
12
+)
13
+
14
+// Helpers for dealing with ifreq since it contains a union and thus requires a
15
+// lot of unsafe.Pointer casts to use properly.
16
+
17
+// An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq
18
+// contains an interface name and a union of arbitrary data which can be
19
+// accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq
20
+// function.
21
+//
22
+// Use the Name method to access the stored interface name. The union data
23
+// fields can be get and set using the following methods:
24
+//   - Uint16/SetUint16: flags
25
+//   - Uint32/SetUint32: ifindex, metric, mtu
26
+type Ifreq struct{ raw ifreq }
27
+
28
+// NewIfreq creates an Ifreq with the input network interface name after
29
+// validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)
30
+// bytes.
31
+func NewIfreq(name string) (*Ifreq, error) {
32
+	// Leave room for terminating NULL byte.
33
+	if len(name) >= IFNAMSIZ {
34
+		return nil, EINVAL
35
+	}
36
+
37
+	var ifr ifreq
38
+	copy(ifr.Ifrn[:], name)
39
+
40
+	return &Ifreq{raw: ifr}, nil
41
+}
42
+
43
+// TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc.
44
+
45
+// Name returns the interface name associated with the Ifreq.
46
+func (ifr *Ifreq) Name() string {
47
+	return ByteSliceToString(ifr.raw.Ifrn[:])
48
+}
49
+
50
+// According to netdevice(7), only AF_INET addresses are returned for numerous
51
+// sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port
52
+// field and other data is always empty.
53
+
54
+// Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C
55
+// in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not
56
+// AF_INET, an error is returned.
57
+func (ifr *Ifreq) Inet4Addr() ([]byte, error) {
58
+	raw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]))
59
+	if raw.Family != AF_INET {
60
+		// Cannot safely interpret raw.Addr bytes as an IPv4 address.
61
+		return nil, EINVAL
62
+	}
63
+
64
+	return raw.Addr[:], nil
65
+}
66
+
67
+// SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an
68
+// embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length
69
+// or an error will be returned.
70
+func (ifr *Ifreq) SetInet4Addr(v []byte) error {
71
+	if len(v) != 4 {
72
+		return EINVAL
73
+	}
74
+
75
+	var addr [4]byte
76
+	copy(addr[:], v)
77
+
78
+	ifr.clear()
79
+	*(*RawSockaddrInet4)(
80
+		unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]),
81
+	) = RawSockaddrInet4{
82
+		// Always set IP family as ioctls would require it anyway.
83
+		Family: AF_INET,
84
+		Addr:   addr,
85
+	}
86
+
87
+	return nil
88
+}
89
+
90
+// Uint16 returns the Ifreq union data as a C short/Go uint16 value.
91
+func (ifr *Ifreq) Uint16() uint16 {
92
+	return *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0]))
93
+}
94
+
95
+// SetUint16 sets a C short/Go uint16 value as the Ifreq's union data.
96
+func (ifr *Ifreq) SetUint16(v uint16) {
97
+	ifr.clear()
98
+	*(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v
99
+}
100
+
101
+// Uint32 returns the Ifreq union data as a C int/Go uint32 value.
102
+func (ifr *Ifreq) Uint32() uint32 {
103
+	return *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0]))
104
+}
105
+
106
+// SetUint32 sets a C int/Go uint32 value as the Ifreq's union data.
107
+func (ifr *Ifreq) SetUint32(v uint32) {
108
+	ifr.clear()
109
+	*(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v
110
+}
111
+
112
+// clear zeroes the ifreq's union field to prevent trailing garbage data from
113
+// being sent to the kernel if an ifreq is reused.
114
+func (ifr *Ifreq) clear() {
115
+	for i := range ifr.raw.Ifru {
116
+		ifr.raw.Ifru[i] = 0
117
+	}
118
+}
119
+
120
+// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
121
+// IoctlGetEthtoolDrvinfo which use these APIs under the hood.
122
+
123
+// An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData,
124
+// use the Ifreq.withData method.
125
+type ifreqData struct {
126
+	name [IFNAMSIZ]byte
127
+	// A type separate from ifreq is required in order to comply with the
128
+	// unsafe.Pointer rules since the "pointer-ness" of data would not be
129
+	// preserved if it were cast into the byte array of a raw ifreq.
130
+	data unsafe.Pointer
131
+	// Pad to the same size as ifreq.
132
+	_ [len(ifreq{}.Ifru) - SizeofPtr]byte
133
+}
134
+
135
+// withData produces an ifreqData with the pointer p set for ioctls which require
136
+// arbitrary pointer data.
137
+func (ifr Ifreq) withData(p unsafe.Pointer) ifreqData {
138
+	return ifreqData{
139
+		name: ifr.raw.Ifrn,
140
+		data: p,
141
+	}
142
+}

+ 62
- 39
vendor/golang.org/x/sys/unix/ioctl_linux.go View File

@@ -5,7 +5,6 @@
5 5
 package unix
6 6
 
7 7
 import (
8
-	"runtime"
9 8
 	"unsafe"
10 9
 )
11 10
 
@@ -22,56 +21,42 @@ func IoctlRetInt(fd int, req uint) (int, error) {
22 21
 
23 22
 func IoctlGetUint32(fd int, req uint) (uint32, error) {
24 23
 	var value uint32
25
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
24
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
26 25
 	return value, err
27 26
 }
28 27
 
29 28
 func IoctlGetRTCTime(fd int) (*RTCTime, error) {
30 29
 	var value RTCTime
31
-	err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
30
+	err := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value))
32 31
 	return &value, err
33 32
 }
34 33
 
35 34
 func IoctlSetRTCTime(fd int, value *RTCTime) error {
36
-	err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
37
-	runtime.KeepAlive(value)
38
-	return err
35
+	return ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value))
39 36
 }
40 37
 
41 38
 func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
42 39
 	var value RTCWkAlrm
43
-	err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
40
+	err := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value))
44 41
 	return &value, err
45 42
 }
46 43
 
47 44
 func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
48
-	err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value)))
49
-	runtime.KeepAlive(value)
50
-	return err
51
-}
52
-
53
-type ifreqEthtool struct {
54
-	name [IFNAMSIZ]byte
55
-	data unsafe.Pointer
45
+	return ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value))
56 46
 }
57 47
 
58 48
 // IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
59 49
 // device specified by ifname.
60 50
 func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
61
-	// Leave room for terminating NULL byte.
62
-	if len(ifname) >= IFNAMSIZ {
63
-		return nil, EINVAL
51
+	ifr, err := NewIfreq(ifname)
52
+	if err != nil {
53
+		return nil, err
64 54
 	}
65 55
 
66
-	value := EthtoolDrvinfo{
67
-		Cmd: ETHTOOL_GDRVINFO,
68
-	}
69
-	ifreq := ifreqEthtool{
70
-		data: unsafe.Pointer(&value),
71
-	}
72
-	copy(ifreq.name[:], ifname)
73
-	err := ioctl(fd, SIOCETHTOOL, uintptr(unsafe.Pointer(&ifreq)))
74
-	runtime.KeepAlive(ifreq)
56
+	value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}
57
+	ifrd := ifr.withData(unsafe.Pointer(&value))
58
+
59
+	err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
75 60
 	return &value, err
76 61
 }
77 62
 
@@ -80,7 +65,7 @@ func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
80 65
 // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
81 66
 func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
82 67
 	var value WatchdogInfo
83
-	err := ioctl(fd, WDIOC_GETSUPPORT, uintptr(unsafe.Pointer(&value)))
68
+	err := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value))
84 69
 	return &value, err
85 70
 }
86 71
 
@@ -88,6 +73,7 @@ func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
88 73
 // more information, see:
89 74
 // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
90 75
 func IoctlWatchdogKeepalive(fd int) error {
76
+	// arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr.
91 77
 	return ioctl(fd, WDIOC_KEEPALIVE, 0)
92 78
 }
93 79
 
@@ -95,9 +81,7 @@ func IoctlWatchdogKeepalive(fd int) error {
95 81
 // range of data conveyed in value to the file associated with the file
96 82
 // descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
97 83
 func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
98
-	err := ioctl(destFd, FICLONERANGE, uintptr(unsafe.Pointer(value)))
99
-	runtime.KeepAlive(value)
100
-	return err
84
+	return ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value))
101 85
 }
102 86
 
103 87
 // IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
@@ -148,7 +132,7 @@ func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
148 132
 		rawinfo.Reserved = value.Info[i].Reserved
149 133
 	}
150 134
 
151
-	err := ioctl(srcFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(&buf[0])))
135
+	err := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0]))
152 136
 
153 137
 	// Output
154 138
 	for i := range value.Info {
@@ -166,31 +150,70 @@ func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
166 150
 }
167 151
 
168 152
 func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
169
-	err := ioctl(fd, HIDIOCGRDESC, uintptr(unsafe.Pointer(value)))
170
-	runtime.KeepAlive(value)
171
-	return err
153
+	return ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value))
172 154
 }
173 155
 
174 156
 func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
175 157
 	var value HIDRawDevInfo
176
-	err := ioctl(fd, HIDIOCGRAWINFO, uintptr(unsafe.Pointer(&value)))
158
+	err := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value))
177 159
 	return &value, err
178 160
 }
179 161
 
180 162
 func IoctlHIDGetRawName(fd int) (string, error) {
181 163
 	var value [_HIDIOCGRAWNAME_LEN]byte
182
-	err := ioctl(fd, _HIDIOCGRAWNAME, uintptr(unsafe.Pointer(&value[0])))
164
+	err := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0]))
183 165
 	return ByteSliceToString(value[:]), err
184 166
 }
185 167
 
186 168
 func IoctlHIDGetRawPhys(fd int) (string, error) {
187 169
 	var value [_HIDIOCGRAWPHYS_LEN]byte
188
-	err := ioctl(fd, _HIDIOCGRAWPHYS, uintptr(unsafe.Pointer(&value[0])))
170
+	err := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0]))
189 171
 	return ByteSliceToString(value[:]), err
190 172
 }
191 173
 
192 174
 func IoctlHIDGetRawUniq(fd int) (string, error) {
193 175
 	var value [_HIDIOCGRAWUNIQ_LEN]byte
194
-	err := ioctl(fd, _HIDIOCGRAWUNIQ, uintptr(unsafe.Pointer(&value[0])))
176
+	err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))
195 177
 	return ByteSliceToString(value[:]), err
196 178
 }
179
+
180
+// IoctlIfreq performs an ioctl using an Ifreq structure for input and/or
181
+// output. See the netdevice(7) man page for details.
182
+func IoctlIfreq(fd int, req uint, value *Ifreq) error {
183
+	// It is possible we will add more fields to *Ifreq itself later to prevent
184
+	// misuse, so pass the raw *ifreq directly.
185
+	return ioctlPtr(fd, req, unsafe.Pointer(&value.raw))
186
+}
187
+
188
+// TODO(mdlayher): export if and when IfreqData is exported.
189
+
190
+// ioctlIfreqData performs an ioctl using an ifreqData structure for input
191
+// and/or output. See the netdevice(7) man page for details.
192
+func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
193
+	// The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are
194
+	// identical so pass *IfreqData directly.
195
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
196
+}
197
+
198
+// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an
199
+// existing KCM socket, returning a structure containing the file descriptor of
200
+// the new socket.
201
+func IoctlKCMClone(fd int) (*KCMClone, error) {
202
+	var info KCMClone
203
+	if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {
204
+		return nil, err
205
+	}
206
+
207
+	return &info, nil
208
+}
209
+
210
+// IoctlKCMAttach attaches a TCP socket and associated BPF program file
211
+// descriptor to a multiplexor.
212
+func IoctlKCMAttach(fd int, info KCMAttach) error {
213
+	return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))
214
+}
215
+
216
+// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
217
+func IoctlKCMUnattach(fd int, info KCMUnattach) error {
218
+	return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
219
+}

+ 10
- 5
vendor/golang.org/x/sys/unix/mkall.sh View File

@@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
50 50
 	# Use the Docker-based build system
51 51
 	# Files generated through docker (use $cmd so you can Ctl-C the build or run)
52 52
 	$cmd docker build --tag generate:$GOOS $GOOS
53
-	$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
53
+	$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
54 54
 	exit
55 55
 fi
56 56
 
@@ -89,25 +89,30 @@ dragonfly_amd64)
89 89
 freebsd_386)
90 90
 	mkerrors="$mkerrors -m32"
91 91
 	mksyscall="go run mksyscall.go -l32"
92
-	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
92
+	mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
93 93
 	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
94 94
 	;;
95 95
 freebsd_amd64)
96 96
 	mkerrors="$mkerrors -m64"
97
-	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
97
+	mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
98 98
 	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
99 99
 	;;
100 100
 freebsd_arm)
101 101
 	mkerrors="$mkerrors"
102 102
 	mksyscall="go run mksyscall.go -l32 -arm"
103
-	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
103
+	mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
104 104
 	# Let the type of C char be signed for making the bare syscall
105 105
 	# API consistent across platforms.
106 106
 	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
107 107
 	;;
108 108
 freebsd_arm64)
109 109
 	mkerrors="$mkerrors -m64"
110
-	mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
110
+	mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
111
+	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
112
+	;;
113
+freebsd_riscv64)
114
+	mkerrors="$mkerrors -m64"
115
+	mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
111 116
 	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
112 117
 	;;
113 118
 netbsd_386)

+ 28
- 8
vendor/golang.org/x/sys/unix/mkerrors.sh View File

@@ -54,7 +54,7 @@ includes_AIX='
54 54
 
55 55
 includes_Darwin='
56 56
 #define _DARWIN_C_SOURCE
57
-#define KERNEL
57
+#define KERNEL 1
58 58
 #define _DARWIN_USE_64_BIT_INODE
59 59
 #define __APPLE_USE_RFC_3542
60 60
 #include <stdint.h>
@@ -75,6 +75,7 @@ includes_Darwin='
75 75
 #include <sys/utsname.h>
76 76
 #include <sys/wait.h>
77 77
 #include <sys/xattr.h>
78
+#include <sys/vsock.h>
78 79
 #include <net/bpf.h>
79 80
 #include <net/if.h>
80 81
 #include <net/if_types.h>
@@ -82,6 +83,9 @@ includes_Darwin='
82 83
 #include <netinet/in.h>
83 84
 #include <netinet/ip.h>
84 85
 #include <termios.h>
86
+
87
+// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
88
+#define TIOCREMOTE 0x80047469
85 89
 '
86 90
 
87 91
 includes_DragonFly='
@@ -124,6 +128,7 @@ includes_FreeBSD='
124 128
 #include <sys/mount.h>
125 129
 #include <sys/wait.h>
126 130
 #include <sys/ioctl.h>
131
+#include <sys/ptrace.h>
127 132
 #include <net/bpf.h>
128 133
 #include <net/if.h>
129 134
 #include <net/if_types.h>
@@ -198,9 +203,11 @@ struct ltchars {
198 203
 #include <sys/timerfd.h>
199 204
 #include <sys/uio.h>
200 205
 #include <sys/xattr.h>
206
+#include <linux/audit.h>
201 207
 #include <linux/bpf.h>
202 208
 #include <linux/can.h>
203 209
 #include <linux/can/error.h>
210
+#include <linux/can/netlink.h>
204 211
 #include <linux/can/raw.h>
205 212
 #include <linux/capability.h>
206 213
 #include <linux/cryptouser.h>
@@ -210,6 +217,7 @@ struct ltchars {
210 217
 #include <linux/ethtool_netlink.h>
211 218
 #include <linux/falloc.h>
212 219
 #include <linux/fanotify.h>
220
+#include <linux/fib_rules.h>
213 221
 #include <linux/filter.h>
214 222
 #include <linux/fs.h>
215 223
 #include <linux/fscrypt.h>
@@ -217,8 +225,6 @@ struct ltchars {
217 225
 #include <linux/genetlink.h>
218 226
 #include <linux/hdreg.h>
219 227
 #include <linux/hidraw.h>
220
-#include <linux/icmp.h>
221
-#include <linux/icmpv6.h>
222 228
 #include <linux/if.h>
223 229
 #include <linux/if_addr.h>
224 230
 #include <linux/if_alg.h>
@@ -229,13 +235,16 @@ struct ltchars {
229 235
 #include <linux/if_packet.h>
230 236
 #include <linux/if_xdp.h>
231 237
 #include <linux/input.h>
238
+#include <linux/kcm.h>
232 239
 #include <linux/kexec.h>
233 240
 #include <linux/keyctl.h>
241
+#include <linux/landlock.h>
234 242
 #include <linux/loop.h>
235 243
 #include <linux/lwtunnel.h>
236 244
 #include <linux/magic.h>
237 245
 #include <linux/memfd.h>
238 246
 #include <linux/module.h>
247
+#include <linux/mount.h>
239 248
 #include <linux/netfilter/nfnetlink.h>
240 249
 #include <linux/netlink.h>
241 250
 #include <linux/net_namespace.h>
@@ -257,6 +266,7 @@ struct ltchars {
257 266
 #include <linux/vm_sockets.h>
258 267
 #include <linux/wait.h>
259 268
 #include <linux/watchdog.h>
269
+#include <linux/wireguard.h>
260 270
 
261 271
 #include <mtd/ubi-user.h>
262 272
 #include <mtd/mtd-user.h>
@@ -287,6 +297,10 @@ struct ltchars {
287 297
 #define SOL_NETLINK	270
288 298
 #endif
289 299
 
300
+#ifndef SOL_SMC
301
+#define SOL_SMC 286
302
+#endif
303
+
290 304
 #ifdef SOL_BLUETOOTH
291 305
 // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
292 306
 // but it is already in bluetooth_linux.go
@@ -467,7 +481,6 @@ ccflags="$@"
467 481
 		$2 !~ /^EQUIV_/ &&
468 482
 		$2 !~ /^EXPR_/ &&
469 483
 		$2 !~ /^EVIOC/ &&
470
-		$2 !~ /^EV_/ &&
471 484
 		$2 ~ /^E[A-Z0-9_]+$/ ||
472 485
 		$2 ~ /^B[0-9_]+$/ ||
473 486
 		$2 ~ /^(OLD|NEW)DEV$/ ||
@@ -499,10 +512,12 @@ ccflags="$@"
499 512
 		$2 ~ /^O?XTABS$/ ||
500 513
 		$2 ~ /^TC[IO](ON|OFF)$/ ||
501 514
 		$2 ~ /^IN_/ ||
515
+		$2 ~ /^KCM/ ||
516
+		$2 ~ /^LANDLOCK_/ ||
502 517
 		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
503 518
 		$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
504 519
 		$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
505
-		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
520
+		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
506 521
 		$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
507 522
 		$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
508 523
 		$2 ~ /^RAW_PAYLOAD_/ ||
@@ -517,10 +532,10 @@ ccflags="$@"
517 532
 		$2 ~ /^HW_MACHINE$/ ||
518 533
 		$2 ~ /^SYSCTL_VERS/ ||
519 534
 		$2 !~ "MNT_BITS" &&
520
-		$2 ~ /^(MS|MNT|UMOUNT)_/ ||
535
+		$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
521 536
 		$2 ~ /^NS_GET_/ ||
522 537
 		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
523
-		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
538
+		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||
524 539
 		$2 ~ /^KEXEC_/ ||
525 540
 		$2 ~ /^LINUX_REBOOT_CMD_/ ||
526 541
 		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
@@ -544,6 +559,7 @@ ccflags="$@"
544 559
 		$2 ~ /^CLONE_[A-Z_]+/ ||
545 560
 		$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
546 561
 		$2 ~ /^(BPF|DLT)_/ ||
562
+		$2 ~ /^AUDIT_/ ||
547 563
 		$2 ~ /^(CLOCK|TIMER)_/ ||
548 564
 		$2 ~ /^CAN_/ ||
549 565
 		$2 ~ /^CAP_/ ||
@@ -563,9 +579,9 @@ ccflags="$@"
563 579
 		$2 ~ /^KEYCTL_/ ||
564 580
 		$2 ~ /^PERF_/ ||
565 581
 		$2 ~ /^SECCOMP_MODE_/ ||
582
+		$2 ~ /^SEEK_/ ||
566 583
 		$2 ~ /^SPLICE_/ ||
567 584
 		$2 ~ /^SYNC_FILE_RANGE_/ ||
568
-		$2 !~ /^AUDIT_RECORD_MAGIC/ &&
569 585
 		$2 !~ /IOC_MAGIC/ &&
570 586
 		$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
571 587
 		$2 ~ /^(VM|VMADDR)_/ ||
@@ -591,8 +607,10 @@ ccflags="$@"
591 607
 		$2 ~ /^DEVLINK_/ ||
592 608
 		$2 ~ /^ETHTOOL_/ ||
593 609
 		$2 ~ /^LWTUNNEL_IP/ ||
610
+		$2 ~ /^ITIMER_/ ||
594 611
 		$2 !~ "WMESGLEN" &&
595 612
 		$2 ~ /^W[A-Z0-9]+$/ ||
613
+		$2 ~ /^P_/ ||
596 614
 		$2 ~/^PPPIOC/ ||
597 615
 		$2 ~ /^FAN_|FANOTIFY_/ ||
598 616
 		$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
@@ -601,6 +619,8 @@ ccflags="$@"
601 619
 		$2 ~ /^MTD/ ||
602 620
 		$2 ~ /^OTP/ ||
603 621
 		$2 ~ /^MEM/ ||
622
+		$2 ~ /^WG/ ||
623
+		$2 ~ /^FIB_RULE_/ ||
604 624
 		$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
605 625
 		$2 ~ /^__WCOREFLAG$/ {next}
606 626
 		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}

+ 49
- 0
vendor/golang.org/x/sys/unix/sockcmsg_linux.go View File

@@ -34,3 +34,52 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
34 34
 	ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
35 35
 	return &ucred, nil
36 36
 }
37
+
38
+// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
39
+func PktInfo4(info *Inet4Pktinfo) []byte {
40
+	b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
41
+	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
42
+	h.Level = SOL_IP
43
+	h.Type = IP_PKTINFO
44
+	h.SetLen(CmsgLen(SizeofInet4Pktinfo))
45
+	*(*Inet4Pktinfo)(h.data(0)) = *info
46
+	return b
47
+}
48
+
49
+// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
50
+func PktInfo6(info *Inet6Pktinfo) []byte {
51
+	b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
52
+	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
53
+	h.Level = SOL_IPV6
54
+	h.Type = IPV6_PKTINFO
55
+	h.SetLen(CmsgLen(SizeofInet6Pktinfo))
56
+	*(*Inet6Pktinfo)(h.data(0)) = *info
57
+	return b
58
+}
59
+
60
+// ParseOrigDstAddr decodes a socket control message containing the original
61
+// destination address. To receive such a message the IP_RECVORIGDSTADDR or
62
+// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
63
+func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
64
+	switch {
65
+	case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
66
+		pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
67
+		sa := new(SockaddrInet4)
68
+		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
69
+		sa.Port = int(p[0])<<8 + int(p[1])
70
+		sa.Addr = pp.Addr
71
+		return sa, nil
72
+
73
+	case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
74
+		pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
75
+		sa := new(SockaddrInet6)
76
+		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
77
+		sa.Port = int(p[0])<<8 + int(p[1])
78
+		sa.ZoneId = pp.Scope_id
79
+		sa.Addr = pp.Addr
80
+		return sa, nil
81
+
82
+	default:
83
+		return nil, EINVAL
84
+	}
85
+}

+ 24
- 26
vendor/golang.org/x/sys/unix/syscall_aix.go View File

@@ -37,6 +37,7 @@ func Creat(path string, mode uint32) (fd int, err error) {
37 37
 }
38 38
 
39 39
 //sys	utimes(path string, times *[2]Timeval) (err error)
40
+
40 41
 func Utimes(path string, tv []Timeval) error {
41 42
 	if len(tv) != 2 {
42 43
 		return EINVAL
@@ -45,6 +46,7 @@ func Utimes(path string, tv []Timeval) error {
45 46
 }
46 47
 
47 48
 //sys	utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)
49
+
48 50
 func UtimesNano(path string, ts []Timespec) error {
49 51
 	if len(ts) != 2 {
50 52
 		return EINVAL
@@ -70,9 +72,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
70 72
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
71 73
 	p[0] = byte(sa.Port >> 8)
72 74
 	p[1] = byte(sa.Port)
73
-	for i := 0; i < len(sa.Addr); i++ {
74
-		sa.raw.Addr[i] = sa.Addr[i]
75
-	}
75
+	sa.raw.Addr = sa.Addr
76 76
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
77 77
 }
78 78
 
@@ -85,9 +85,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
85 85
 	p[0] = byte(sa.Port >> 8)
86 86
 	p[1] = byte(sa.Port)
87 87
 	sa.raw.Scope_id = sa.ZoneId
88
-	for i := 0; i < len(sa.Addr); i++ {
89
-		sa.raw.Addr[i] = sa.Addr[i]
90
-	}
88
+	sa.raw.Addr = sa.Addr
91 89
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
92 90
 }
93 91
 
@@ -219,18 +217,12 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
219 217
 	return
220 218
 }
221 219
 
222
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
220
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
223 221
 	// Recvmsg not implemented on AIX
224
-	sa := new(SockaddrUnix)
225
-	return -1, -1, -1, sa, ENOSYS
222
+	return -1, -1, -1, ENOSYS
226 223
 }
227 224
 
228
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
229
-	_, err = SendmsgN(fd, p, oob, to, flags)
230
-	return
231
-}
232
-
233
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
225
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
234 226
 	// SendmsgN not implemented on AIX
235 227
 	return -1, ENOSYS
236 228
 }
@@ -261,9 +253,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
261 253
 		sa := new(SockaddrInet4)
262 254
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
263 255
 		sa.Port = int(p[0])<<8 + int(p[1])
264
-		for i := 0; i < len(sa.Addr); i++ {
265
-			sa.Addr[i] = pp.Addr[i]
266
-		}
256
+		sa.Addr = pp.Addr
267 257
 		return sa, nil
268 258
 
269 259
 	case AF_INET6:
@@ -272,9 +262,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
272 262
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
273 263
 		sa.Port = int(p[0])<<8 + int(p[1])
274 264
 		sa.ZoneId = pp.Scope_id
275
-		for i := 0; i < len(sa.Addr); i++ {
276
-			sa.Addr[i] = pp.Addr[i]
277
-		}
265
+		sa.Addr = pp.Addr
278 266
 		return sa, nil
279 267
 	}
280 268
 	return nil, EAFNOSUPPORT
@@ -314,11 +302,13 @@ func direntNamlen(buf []byte) (uint64, bool) {
314 302
 }
315 303
 
316 304
 //sys	getdirent(fd int, buf []byte) (n int, err error)
305
+
317 306
 func Getdents(fd int, buf []byte) (n int, err error) {
318 307
 	return getdirent(fd, buf)
319 308
 }
320 309
 
321 310
 //sys	wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error)
311
+
322 312
 func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
323 313
 	var status _C_int
324 314
 	var r Pid_t
@@ -385,6 +375,12 @@ func (w WaitStatus) TrapCause() int { return -1 }
385 375
 
386 376
 //sys	fcntl(fd int, cmd int, arg int) (val int, err error)
387 377
 
378
+//sys	fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
379
+
380
+func Fsync(fd int) error {
381
+	return fsyncRange(fd, O_SYNC, 0, 0)
382
+}
383
+
388 384
 /*
389 385
  * Direct access
390 386
  */
@@ -401,7 +397,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
401 397
 //sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
402 398
 //sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
403 399
 //sys	Fdatasync(fd int) (err error)
404
-//sys	Fsync(fd int) (err error)
405 400
 // readdir_r
406 401
 //sysnb	Getpgid(pid int) (pgid int, err error)
407 402
 
@@ -462,8 +457,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
462 457
 //sys	Listen(s int, n int) (err error)
463 458
 //sys	lstat(path string, stat *Stat_t) (err error)
464 459
 //sys	Pause() (err error)
465
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
466
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
460
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = pread64
461
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
467 462
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
468 463
 //sys	Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
469 464
 //sysnb	Setregid(rgid int, egid int) (err error)
@@ -523,8 +518,10 @@ func Pipe(p []int) (err error) {
523 518
 	}
524 519
 	var pp [2]_C_int
525 520
 	err = pipe(&pp)
526
-	p[0] = int(pp[0])
527
-	p[1] = int(pp[1])
521
+	if err == nil {
522
+		p[0] = int(pp[0])
523
+		p[1] = int(pp[1])
524
+	}
528 525
 	return
529 526
 }
530 527
 
@@ -544,6 +541,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
544 541
 //sys	Getsystemcfg(label int) (n uint64)
545 542
 
546 543
 //sys	umount(target string) (err error)
544
+
547 545
 func Unmount(target string, flags int) (err error) {
548 546
 	if flags != 0 {
549 547
 		// AIX doesn't have any flags for umount.

+ 31
- 70
vendor/golang.org/x/sys/unix/syscall_bsd.go View File

@@ -163,9 +163,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
163 163
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
164 164
 	p[0] = byte(sa.Port >> 8)
165 165
 	p[1] = byte(sa.Port)
166
-	for i := 0; i < len(sa.Addr); i++ {
167
-		sa.raw.Addr[i] = sa.Addr[i]
168
-	}
166
+	sa.raw.Addr = sa.Addr
169 167
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
170 168
 }
171 169
 
@@ -179,9 +177,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
179 177
 	p[0] = byte(sa.Port >> 8)
180 178
 	p[1] = byte(sa.Port)
181 179
 	sa.raw.Scope_id = sa.ZoneId
182
-	for i := 0; i < len(sa.Addr); i++ {
183
-		sa.raw.Addr[i] = sa.Addr[i]
184
-	}
180
+	sa.raw.Addr = sa.Addr
185 181
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
186 182
 }
187 183
 
@@ -210,9 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
210 206
 	sa.raw.Nlen = sa.Nlen
211 207
 	sa.raw.Alen = sa.Alen
212 208
 	sa.raw.Slen = sa.Slen
213
-	for i := 0; i < len(sa.raw.Data); i++ {
214
-		sa.raw.Data[i] = sa.Data[i]
215
-	}
209
+	sa.raw.Data = sa.Data
216 210
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
217 211
 }
218 212
 
@@ -228,9 +222,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
228 222
 		sa.Nlen = pp.Nlen
229 223
 		sa.Alen = pp.Alen
230 224
 		sa.Slen = pp.Slen
231
-		for i := 0; i < len(sa.Data); i++ {
232
-			sa.Data[i] = pp.Data[i]
233
-		}
225
+		sa.Data = pp.Data
234 226
 		return sa, nil
235 227
 
236 228
 	case AF_UNIX:
@@ -262,9 +254,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
262 254
 		sa := new(SockaddrInet4)
263 255
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
264 256
 		sa.Port = int(p[0])<<8 + int(p[1])
265
-		for i := 0; i < len(sa.Addr); i++ {
266
-			sa.Addr[i] = pp.Addr[i]
267
-		}
257
+		sa.Addr = pp.Addr
268 258
 		return sa, nil
269 259
 
270 260
 	case AF_INET6:
@@ -273,9 +263,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
273 263
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
274 264
 		sa.Port = int(p[0])<<8 + int(p[1])
275 265
 		sa.ZoneId = pp.Scope_id
276
-		for i := 0; i < len(sa.Addr); i++ {
277
-			sa.Addr[i] = pp.Addr[i]
278
-		}
266
+		sa.Addr = pp.Addr
279 267
 		return sa, nil
280 268
 	}
281 269
 	return anyToSockaddrGOOS(fd, rsa)
@@ -337,80 +325,62 @@ func GetsockoptString(fd, level, opt int) (string, error) {
337 325
 //sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
338 326
 //sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
339 327
 
340
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
328
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
341 329
 	var msg Msghdr
342
-	var rsa RawSockaddrAny
343
-	msg.Name = (*byte)(unsafe.Pointer(&rsa))
330
+	msg.Name = (*byte)(unsafe.Pointer(rsa))
344 331
 	msg.Namelen = uint32(SizeofSockaddrAny)
345
-	var iov Iovec
346
-	if len(p) > 0 {
347
-		iov.Base = (*byte)(unsafe.Pointer(&p[0]))
348
-		iov.SetLen(len(p))
349
-	}
350 332
 	var dummy byte
351 333
 	if len(oob) > 0 {
352 334
 		// receive at least one normal byte
353
-		if len(p) == 0 {
354
-			iov.Base = &dummy
355
-			iov.SetLen(1)
335
+		if emptyIovecs(iov) {
336
+			var iova [1]Iovec
337
+			iova[0].Base = &dummy
338
+			iova[0].SetLen(1)
339
+			iov = iova[:]
356 340
 		}
357 341
 		msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
358 342
 		msg.SetControllen(len(oob))
359 343
 	}
360
-	msg.Iov = &iov
361
-	msg.Iovlen = 1
344
+	if len(iov) > 0 {
345
+		msg.Iov = &iov[0]
346
+		msg.SetIovlen(len(iov))
347
+	}
362 348
 	if n, err = recvmsg(fd, &msg, flags); err != nil {
363 349
 		return
364 350
 	}
365 351
 	oobn = int(msg.Controllen)
366 352
 	recvflags = int(msg.Flags)
367
-	// source address is only specified if the socket is unconnected
368
-	if rsa.Addr.Family != AF_UNSPEC {
369
-		from, err = anyToSockaddr(fd, &rsa)
370
-	}
371 353
 	return
372 354
 }
373 355
 
374 356
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
375 357
 
376
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
377
-	_, err = SendmsgN(fd, p, oob, to, flags)
378
-	return
379
-}
380
-
381
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
382
-	var ptr unsafe.Pointer
383
-	var salen _Socklen
384
-	if to != nil {
385
-		ptr, salen, err = to.sockaddr()
386
-		if err != nil {
387
-			return 0, err
388
-		}
389
-	}
358
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
390 359
 	var msg Msghdr
391 360
 	msg.Name = (*byte)(unsafe.Pointer(ptr))
392 361
 	msg.Namelen = uint32(salen)
393
-	var iov Iovec
394
-	if len(p) > 0 {
395
-		iov.Base = (*byte)(unsafe.Pointer(&p[0]))
396
-		iov.SetLen(len(p))
397
-	}
398 362
 	var dummy byte
363
+	var empty bool
399 364
 	if len(oob) > 0 {
400 365
 		// send at least one normal byte
401
-		if len(p) == 0 {
402
-			iov.Base = &dummy
403
-			iov.SetLen(1)
366
+		empty := emptyIovecs(iov)
367
+		if empty {
368
+			var iova [1]Iovec
369
+			iova[0].Base = &dummy
370
+			iova[0].SetLen(1)
371
+			iov = iova[:]
404 372
 		}
405 373
 		msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
406 374
 		msg.SetControllen(len(oob))
407 375
 	}
408
-	msg.Iov = &iov
409
-	msg.Iovlen = 1
376
+	if len(iov) > 0 {
377
+		msg.Iov = &iov[0]
378
+		msg.SetIovlen(len(iov))
379
+	}
410 380
 	if n, err = sendmsg(fd, &msg, flags); err != nil {
411 381
 		return 0, err
412 382
 	}
413
-	if len(oob) > 0 && len(p) == 0 {
383
+	if len(oob) > 0 && empty {
414 384
 		n = 0
415 385
 	}
416 386
 	return n, nil
@@ -583,12 +553,7 @@ func UtimesNano(path string, ts []Timespec) error {
583 553
 	if len(ts) != 2 {
584 554
 		return EINVAL
585 555
 	}
586
-	// Darwin setattrlist can set nanosecond timestamps
587
-	err := setattrlistTimes(path, ts, 0)
588
-	if err != ENOSYS {
589
-		return err
590
-	}
591
-	err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
556
+	err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
592 557
 	if err != ENOSYS {
593 558
 		return err
594 559
 	}
@@ -608,10 +573,6 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
608 573
 	if len(ts) != 2 {
609 574
 		return EINVAL
610 575
 	}
611
-	err := setattrlistTimes(path, ts, flags)
612
-	if err != ENOSYS {
613
-		return err
614
-	}
615 576
 	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
616 577
 }
617 578
 

+ 101
- 49
vendor/golang.org/x/sys/unix/syscall_darwin.go View File

@@ -13,6 +13,7 @@
13 13
 package unix
14 14
 
15 15
 import (
16
+	"fmt"
16 17
 	"runtime"
17 18
 	"syscall"
18 19
 	"unsafe"
@@ -47,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
47 48
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
48 49
 }
49 50
 
51
+// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
52
+// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
53
+// bidirectional communication between a hypervisor and its guest virtual
54
+// machines.
55
+type SockaddrVM struct {
56
+	// CID and Port specify a context ID and port address for a VM socket.
57
+	// Guests have a unique CID, and hosts may have a well-known CID of:
58
+	//  - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
59
+	//  - VMADDR_CID_LOCAL: refers to local communication (loopback).
60
+	//  - VMADDR_CID_HOST: refers to other processes on the host.
61
+	CID  uint32
62
+	Port uint32
63
+	raw  RawSockaddrVM
64
+}
65
+
66
+func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
67
+	sa.raw.Len = SizeofSockaddrVM
68
+	sa.raw.Family = AF_VSOCK
69
+	sa.raw.Port = sa.Port
70
+	sa.raw.Cid = sa.CID
71
+
72
+	return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
73
+}
74
+
50 75
 func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
51 76
 	switch rsa.Addr.Family {
52 77
 	case AF_SYSTEM:
@@ -57,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
57 82
 			sa.Unit = pp.Sc_unit
58 83
 			return sa, nil
59 84
 		}
85
+	case AF_VSOCK:
86
+		pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
87
+		sa := &SockaddrVM{
88
+			CID:  pp.Cid,
89
+			Port: pp.Port,
90
+		}
91
+		return sa, nil
60 92
 	}
61 93
 	return nil, EAFNOSUPPORT
62 94
 }
@@ -109,16 +141,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
109 141
 func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
110 142
 func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
111 143
 
112
-type attrList struct {
113
-	bitmapCount uint16
114
-	_           uint16
115
-	CommonAttr  uint32
116
-	VolAttr     uint32
117
-	DirAttr     uint32
118
-	FileAttr    uint32
119
-	Forkattr    uint32
120
-}
121
-
122 144
 //sysnb	pipe(p *[2]int32) (err error)
123 145
 
124 146
 func Pipe(p []int) (err error) {
@@ -127,8 +149,10 @@ func Pipe(p []int) (err error) {
127 149
 	}
128 150
 	var x [2]int32
129 151
 	err = pipe(&x)
130
-	p[0] = int(x[0])
131
-	p[1] = int(x[1])
152
+	if err == nil {
153
+		p[0] = int(x[0])
154
+		p[1] = int(x[1])
155
+	}
132 156
 	return
133 157
 }
134 158
 
@@ -248,36 +272,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
248 272
 	return flistxattr(fd, xattrPointer(dest), len(dest), 0)
249 273
 }
250 274
 
251
-func setattrlistTimes(path string, times []Timespec, flags int) error {
252
-	_p0, err := BytePtrFromString(path)
253
-	if err != nil {
254
-		return err
255
-	}
256
-
257
-	var attrList attrList
258
-	attrList.bitmapCount = ATTR_BIT_MAP_COUNT
259
-	attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
260
-
261
-	// order is mtime, atime: the opposite of Chtimes
262
-	attributes := [2]Timespec{times[1], times[0]}
263
-	options := 0
264
-	if flags&AT_SYMLINK_NOFOLLOW != 0 {
265
-		options |= FSOPT_NOFOLLOW
266
-	}
267
-	return setattrlist(
268
-		_p0,
269
-		unsafe.Pointer(&attrList),
270
-		unsafe.Pointer(&attributes),
271
-		unsafe.Sizeof(attributes),
272
-		options)
273
-}
274
-
275
-//sys	setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
276
-
277
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
278
-	// Darwin doesn't support SYS_UTIMENSAT
279
-	return ENOSYS
280
-}
275
+//sys	utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
281 276
 
282 277
 /*
283 278
  * Wrapped
@@ -398,8 +393,69 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
398 393
 	return x, err
399 394
 }
400 395
 
396
+func GetsockoptTCPConnectionInfo(fd, level, opt int) (*TCPConnectionInfo, error) {
397
+	var value TCPConnectionInfo
398
+	vallen := _Socklen(SizeofTCPConnectionInfo)
399
+	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
400
+	return &value, err
401
+}
402
+
403
+func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
404
+	mib, err := sysctlmib(name, args...)
405
+	if err != nil {
406
+		return nil, err
407
+	}
408
+
409
+	var kinfo KinfoProc
410
+	n := uintptr(SizeofKinfoProc)
411
+	if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
412
+		return nil, err
413
+	}
414
+	if n != SizeofKinfoProc {
415
+		return nil, EIO
416
+	}
417
+	return &kinfo, nil
418
+}
419
+
420
+func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
421
+	mib, err := sysctlmib(name, args...)
422
+	if err != nil {
423
+		return nil, err
424
+	}
425
+
426
+	// Find size.
427
+	n := uintptr(0)
428
+	if err := sysctl(mib, nil, &n, nil, 0); err != nil {
429
+		return nil, err
430
+	}
431
+	if n == 0 {
432
+		return nil, nil
433
+	}
434
+	if n%SizeofKinfoProc != 0 {
435
+		return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
436
+	}
437
+
438
+	// Read into buffer of that size.
439
+	buf := make([]KinfoProc, n/SizeofKinfoProc)
440
+	if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
441
+		return nil, err
442
+	}
443
+	if n%SizeofKinfoProc != 0 {
444
+		return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
445
+	}
446
+
447
+	// The actual call may return less than the original reported required
448
+	// size so ensure we deal with that.
449
+	return buf[:n/SizeofKinfoProc], nil
450
+}
451
+
401 452
 //sys	sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
402 453
 
454
+//sys	shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
455
+//sys	shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
456
+//sys	shmdt(addr uintptr) (err error)
457
+//sys	shmget(key int, size int, flag int) (id int, err error)
458
+
403 459
 /*
404 460
  * Exposed directly
405 461
  */
@@ -455,11 +511,12 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
455 511
 //sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
456 512
 //sys	Mkfifo(path string, mode uint32) (err error)
457 513
 //sys	Mknod(path string, mode uint32, dev int) (err error)
514
+//sys	Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)
458 515
 //sys	Open(path string, mode int, perm uint32) (fd int, err error)
459 516
 //sys	Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
460 517
 //sys	Pathconf(path string, name int) (val int, err error)
461
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
462
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
518
+//sys	pread(fd int, p []byte, offset int64) (n int, err error)
519
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error)
463 520
 //sys	read(fd int, p []byte) (n int, err error)
464 521
 //sys	Readlink(path string, buf []byte) (n int, err error)
465 522
 //sys	Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
@@ -523,7 +580,6 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
523 580
 // Nfssvc
524 581
 // Getfh
525 582
 // Quotactl
526
-// Mount
527 583
 // Csops
528 584
 // Waitid
529 585
 // Add_profil
@@ -557,10 +613,6 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
557 613
 // Msgget
558 614
 // Msgsnd
559 615
 // Msgrcv
560
-// Shmat
561
-// Shmctl
562
-// Shmdt
563
-// Shmget
564 616
 // Shm_open
565 617
 // Shm_unlink
566 618
 // Sem_open

+ 12
- 9
vendor/golang.org/x/sys/unix/syscall_dragonfly.go View File

@@ -101,7 +101,10 @@ func Pipe(p []int) (err error) {
101 101
 	if len(p) != 2 {
102 102
 		return EINVAL
103 103
 	}
104
-	p[0], p[1], err = pipe()
104
+	r, w, err := pipe()
105
+	if err == nil {
106
+		p[0], p[1] = r, w
107
+	}
105 108
 	return
106 109
 }
107 110
 
@@ -114,17 +117,22 @@ func Pipe2(p []int, flags int) (err error) {
114 117
 	var pp [2]_C_int
115 118
 	// pipe2 on dragonfly takes an fds array as an argument, but still
116 119
 	// returns the file descriptors.
117
-	p[0], p[1], err = pipe2(&pp, flags)
120
+	r, w, err := pipe2(&pp, flags)
121
+	if err == nil {
122
+		p[0], p[1] = r, w
123
+	}
118 124
 	return err
119 125
 }
120 126
 
121 127
 //sys	extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
122
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
128
+
129
+func pread(fd int, p []byte, offset int64) (n int, err error) {
123 130
 	return extpread(fd, p, 0, offset)
124 131
 }
125 132
 
126 133
 //sys	extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
127
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
134
+
135
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
128 136
 	return extpwrite(fd, p, 0, offset)
129 137
 }
130 138
 
@@ -163,11 +171,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
163 171
 	return
164 172
 }
165 173
 
166
-func setattrlistTimes(path string, times []Timespec, flags int) error {
167
-	// used on Darwin for UtimesNano
168
-	return ENOSYS
169
-}
170
-
171 174
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
172 175
 
173 176
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL

+ 42
- 300
vendor/golang.org/x/sys/unix/syscall_freebsd.go View File

@@ -17,25 +17,12 @@ import (
17 17
 	"unsafe"
18 18
 )
19 19
 
20
-const (
21
-	SYS_FSTAT_FREEBSD12         = 551 // { int fstat(int fd, _Out_ struct stat *sb); }
22
-	SYS_FSTATAT_FREEBSD12       = 552 // { int fstatat(int fd, _In_z_ char *path, \
23
-	SYS_GETDIRENTRIES_FREEBSD12 = 554 // { ssize_t getdirentries(int fd, \
24
-	SYS_STATFS_FREEBSD12        = 555 // { int statfs(_In_z_ char *path, \
25
-	SYS_FSTATFS_FREEBSD12       = 556 // { int fstatfs(int fd, \
26
-	SYS_GETFSSTAT_FREEBSD12     = 557 // { int getfsstat( \
27
-	SYS_MKNODAT_FREEBSD12       = 559 // { int mknodat(int fd, _In_z_ char *path, \
28
-)
29
-
30 20
 // See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html.
31 21
 var (
32 22
 	osreldateOnce sync.Once
33 23
 	osreldate     uint32
34 24
 )
35 25
 
36
-// INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
37
-const _ino64First = 1200031
38
-
39 26
 func supportsABI(ver uint32) bool {
40 27
 	osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
41 28
 	return osreldate >= ver
@@ -110,8 +97,10 @@ func Pipe2(p []int, flags int) error {
110 97
 	}
111 98
 	var pp [2]_C_int
112 99
 	err := pipe2(&pp, flags)
113
-	p[0] = int(pp[0])
114
-	p[1] = int(pp[1])
100
+	if err == nil {
101
+		p[0] = int(pp[0])
102
+		p[1] = int(pp[1])
103
+	}
115 104
 	return err
116 105
 }
117 106
 
@@ -157,46 +146,21 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
157 146
 
158 147
 func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
159 148
 	var (
160
-		_p0          unsafe.Pointer
161
-		bufsize      uintptr
162
-		oldBuf       []statfs_freebsd11_t
163
-		needsConvert bool
149
+		_p0     unsafe.Pointer
150
+		bufsize uintptr
164 151
 	)
165
-
166 152
 	if len(buf) > 0 {
167
-		if supportsABI(_ino64First) {
168
-			_p0 = unsafe.Pointer(&buf[0])
169
-			bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
170
-		} else {
171
-			n := len(buf)
172
-			oldBuf = make([]statfs_freebsd11_t, n)
173
-			_p0 = unsafe.Pointer(&oldBuf[0])
174
-			bufsize = unsafe.Sizeof(statfs_freebsd11_t{}) * uintptr(n)
175
-			needsConvert = true
176
-		}
153
+		_p0 = unsafe.Pointer(&buf[0])
154
+		bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
177 155
 	}
178
-	var sysno uintptr = SYS_GETFSSTAT
179
-	if supportsABI(_ino64First) {
180
-		sysno = SYS_GETFSSTAT_FREEBSD12
181
-	}
182
-	r0, _, e1 := Syscall(sysno, uintptr(_p0), bufsize, uintptr(flags))
156
+	r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
183 157
 	n = int(r0)
184 158
 	if e1 != 0 {
185 159
 		err = e1
186 160
 	}
187
-	if e1 == 0 && needsConvert {
188
-		for i := range oldBuf {
189
-			buf[i].convertFrom(&oldBuf[i])
190
-		}
191
-	}
192 161
 	return
193 162
 }
194 163
 
195
-func setattrlistTimes(path string, times []Timespec, flags int) error {
196
-	// used on Darwin for UtimesNano
197
-	return ENOSYS
198
-}
199
-
200 164
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
201 165
 
202 166
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -248,87 +212,11 @@ func Uname(uname *Utsname) error {
248 212
 }
249 213
 
250 214
 func Stat(path string, st *Stat_t) (err error) {
251
-	var oldStat stat_freebsd11_t
252
-	if supportsABI(_ino64First) {
253
-		return fstatat_freebsd12(AT_FDCWD, path, st, 0)
254
-	}
255
-	err = stat(path, &oldStat)
256
-	if err != nil {
257
-		return err
258
-	}
259
-
260
-	st.convertFrom(&oldStat)
261
-	return nil
215
+	return Fstatat(AT_FDCWD, path, st, 0)
262 216
 }
263 217
 
264 218
 func Lstat(path string, st *Stat_t) (err error) {
265
-	var oldStat stat_freebsd11_t
266
-	if supportsABI(_ino64First) {
267
-		return fstatat_freebsd12(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
268
-	}
269
-	err = lstat(path, &oldStat)
270
-	if err != nil {
271
-		return err
272
-	}
273
-
274
-	st.convertFrom(&oldStat)
275
-	return nil
276
-}
277
-
278
-func Fstat(fd int, st *Stat_t) (err error) {
279
-	var oldStat stat_freebsd11_t
280
-	if supportsABI(_ino64First) {
281
-		return fstat_freebsd12(fd, st)
282
-	}
283
-	err = fstat(fd, &oldStat)
284
-	if err != nil {
285
-		return err
286
-	}
287
-
288
-	st.convertFrom(&oldStat)
289
-	return nil
290
-}
291
-
292
-func Fstatat(fd int, path string, st *Stat_t, flags int) (err error) {
293
-	var oldStat stat_freebsd11_t
294
-	if supportsABI(_ino64First) {
295
-		return fstatat_freebsd12(fd, path, st, flags)
296
-	}
297
-	err = fstatat(fd, path, &oldStat, flags)
298
-	if err != nil {
299
-		return err
300
-	}
301
-
302
-	st.convertFrom(&oldStat)
303
-	return nil
304
-}
305
-
306
-func Statfs(path string, st *Statfs_t) (err error) {
307
-	var oldStatfs statfs_freebsd11_t
308
-	if supportsABI(_ino64First) {
309
-		return statfs_freebsd12(path, st)
310
-	}
311
-	err = statfs(path, &oldStatfs)
312
-	if err != nil {
313
-		return err
314
-	}
315
-
316
-	st.convertFrom(&oldStatfs)
317
-	return nil
318
-}
319
-
320
-func Fstatfs(fd int, st *Statfs_t) (err error) {
321
-	var oldStatfs statfs_freebsd11_t
322
-	if supportsABI(_ino64First) {
323
-		return fstatfs_freebsd12(fd, st)
324
-	}
325
-	err = fstatfs(fd, &oldStatfs)
326
-	if err != nil {
327
-		return err
328
-	}
329
-
330
-	st.convertFrom(&oldStatfs)
331
-	return nil
219
+	return Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
332 220
 }
333 221
 
334 222
 func Getdents(fd int, buf []byte) (n int, err error) {
@@ -336,162 +224,25 @@ func Getdents(fd int, buf []byte) (n int, err error) {
336 224
 }
337 225
 
338 226
 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
339
-	if supportsABI(_ino64First) {
340
-		if basep == nil || unsafe.Sizeof(*basep) == 8 {
341
-			return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
342
-		}
343
-		// The freebsd12 syscall needs a 64-bit base. On 32-bit machines
344
-		// we can't just use the basep passed in. See #32498.
345
-		var base uint64 = uint64(*basep)
346
-		n, err = getdirentries_freebsd12(fd, buf, &base)
347
-		*basep = uintptr(base)
348
-		if base>>32 != 0 {
349
-			// We can't stuff the base back into a uintptr, so any
350
-			// future calls would be suspect. Generate an error.
351
-			// EIO is allowed by getdirentries.
352
-			err = EIO
353
-		}
354
-		return
355
-	}
356
-
357
-	// The old syscall entries are smaller than the new. Use 1/4 of the original
358
-	// buffer size rounded up to DIRBLKSIZ (see /usr/src/lib/libc/sys/getdirentries.c).
359
-	oldBufLen := roundup(len(buf)/4, _dirblksiz)
360
-	oldBuf := make([]byte, oldBufLen)
361
-	n, err = getdirentries(fd, oldBuf, basep)
362
-	if err == nil && n > 0 {
363
-		n = convertFromDirents11(buf, oldBuf[:n])
227
+	if basep == nil || unsafe.Sizeof(*basep) == 8 {
228
+		return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))
229
+	}
230
+	// The syscall needs a 64-bit base. On 32-bit machines
231
+	// we can't just use the basep passed in. See #32498.
232
+	var base uint64 = uint64(*basep)
233
+	n, err = getdirentries(fd, buf, &base)
234
+	*basep = uintptr(base)
235
+	if base>>32 != 0 {
236
+		// We can't stuff the base back into a uintptr, so any
237
+		// future calls would be suspect. Generate an error.
238
+		// EIO is allowed by getdirentries.
239
+		err = EIO
364 240
 	}
365 241
 	return
366 242
 }
367 243
 
368 244
 func Mknod(path string, mode uint32, dev uint64) (err error) {
369
-	var oldDev int
370
-	if supportsABI(_ino64First) {
371
-		return mknodat_freebsd12(AT_FDCWD, path, mode, dev)
372
-	}
373
-	oldDev = int(dev)
374
-	return mknod(path, mode, oldDev)
375
-}
376
-
377
-func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
378
-	var oldDev int
379
-	if supportsABI(_ino64First) {
380
-		return mknodat_freebsd12(fd, path, mode, dev)
381
-	}
382
-	oldDev = int(dev)
383
-	return mknodat(fd, path, mode, oldDev)
384
-}
385
-
386
-// round x to the nearest multiple of y, larger or equal to x.
387
-//
388
-// from /usr/include/sys/param.h Macros for counting and rounding.
389
-// #define roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
390
-func roundup(x, y int) int {
391
-	return ((x + y - 1) / y) * y
392
-}
393
-
394
-func (s *Stat_t) convertFrom(old *stat_freebsd11_t) {
395
-	*s = Stat_t{
396
-		Dev:     uint64(old.Dev),
397
-		Ino:     uint64(old.Ino),
398
-		Nlink:   uint64(old.Nlink),
399
-		Mode:    old.Mode,
400
-		Uid:     old.Uid,
401
-		Gid:     old.Gid,
402
-		Rdev:    uint64(old.Rdev),
403
-		Atim:    old.Atim,
404
-		Mtim:    old.Mtim,
405
-		Ctim:    old.Ctim,
406
-		Btim:    old.Btim,
407
-		Size:    old.Size,
408
-		Blocks:  old.Blocks,
409
-		Blksize: old.Blksize,
410
-		Flags:   old.Flags,
411
-		Gen:     uint64(old.Gen),
412
-	}
413
-}
414
-
415
-func (s *Statfs_t) convertFrom(old *statfs_freebsd11_t) {
416
-	*s = Statfs_t{
417
-		Version:     _statfsVersion,
418
-		Type:        old.Type,
419
-		Flags:       old.Flags,
420
-		Bsize:       old.Bsize,
421
-		Iosize:      old.Iosize,
422
-		Blocks:      old.Blocks,
423
-		Bfree:       old.Bfree,
424
-		Bavail:      old.Bavail,
425
-		Files:       old.Files,
426
-		Ffree:       old.Ffree,
427
-		Syncwrites:  old.Syncwrites,
428
-		Asyncwrites: old.Asyncwrites,
429
-		Syncreads:   old.Syncreads,
430
-		Asyncreads:  old.Asyncreads,
431
-		// Spare
432
-		Namemax: old.Namemax,
433
-		Owner:   old.Owner,
434
-		Fsid:    old.Fsid,
435
-		// Charspare
436
-		// Fstypename
437
-		// Mntfromname
438
-		// Mntonname
439
-	}
440
-
441
-	sl := old.Fstypename[:]
442
-	n := clen(*(*[]byte)(unsafe.Pointer(&sl)))
443
-	copy(s.Fstypename[:], old.Fstypename[:n])
444
-
445
-	sl = old.Mntfromname[:]
446
-	n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
447
-	copy(s.Mntfromname[:], old.Mntfromname[:n])
448
-
449
-	sl = old.Mntonname[:]
450
-	n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
451
-	copy(s.Mntonname[:], old.Mntonname[:n])
452
-}
453
-
454
-func convertFromDirents11(buf []byte, old []byte) int {
455
-	const (
456
-		fixedSize    = int(unsafe.Offsetof(Dirent{}.Name))
457
-		oldFixedSize = int(unsafe.Offsetof(dirent_freebsd11{}.Name))
458
-	)
459
-
460
-	dstPos := 0
461
-	srcPos := 0
462
-	for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
463
-		var dstDirent Dirent
464
-		var srcDirent dirent_freebsd11
465
-
466
-		// If multiple direntries are written, sometimes when we reach the final one,
467
-		// we may have cap of old less than size of dirent_freebsd11.
468
-		copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
469
-
470
-		reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
471
-		if dstPos+reclen > len(buf) {
472
-			break
473
-		}
474
-
475
-		dstDirent.Fileno = uint64(srcDirent.Fileno)
476
-		dstDirent.Off = 0
477
-		dstDirent.Reclen = uint16(reclen)
478
-		dstDirent.Type = srcDirent.Type
479
-		dstDirent.Pad0 = 0
480
-		dstDirent.Namlen = uint16(srcDirent.Namlen)
481
-		dstDirent.Pad1 = 0
482
-
483
-		copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
484
-		copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
485
-		padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
486
-		for i := range padding {
487
-			padding[i] = 0
488
-		}
489
-
490
-		dstPos += int(dstDirent.Reclen)
491
-		srcPos += int(srcDirent.Reclen)
492
-	}
493
-
494
-	return dstPos
245
+	return Mknodat(AT_FDCWD, path, mode, dev)
495 246
 }
496 247
 
497 248
 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
@@ -504,31 +255,31 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
504 255
 //sys	ptrace(request int, pid int, addr uintptr, data int) (err error)
505 256
 
506 257
 func PtraceAttach(pid int) (err error) {
507
-	return ptrace(PTRACE_ATTACH, pid, 0, 0)
258
+	return ptrace(PT_ATTACH, pid, 0, 0)
508 259
 }
509 260
 
510 261
 func PtraceCont(pid int, signal int) (err error) {
511
-	return ptrace(PTRACE_CONT, pid, 1, signal)
262
+	return ptrace(PT_CONTINUE, pid, 1, signal)
512 263
 }
513 264
 
514 265
 func PtraceDetach(pid int) (err error) {
515
-	return ptrace(PTRACE_DETACH, pid, 1, 0)
266
+	return ptrace(PT_DETACH, pid, 1, 0)
516 267
 }
517 268
 
518 269
 func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
519
-	return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
270
+	return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
520 271
 }
521 272
 
522 273
 func PtraceGetRegs(pid int, regsout *Reg) (err error) {
523
-	return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
274
+	return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
524 275
 }
525 276
 
526 277
 func PtraceLwpEvents(pid int, enable int) (err error) {
527
-	return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
278
+	return ptrace(PT_LWP_EVENTS, pid, 0, enable)
528 279
 }
529 280
 
530 281
 func PtraceLwpInfo(pid int, info uintptr) (err error) {
531
-	return ptrace(PTRACE_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
282
+	return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
532 283
 }
533 284
 
534 285
 func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
@@ -548,11 +299,11 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
548 299
 }
549 300
 
550 301
 func PtraceSetRegs(pid int, regs *Reg) (err error) {
551
-	return ptrace(PTRACE_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
302
+	return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
552 303
 }
553 304
 
554 305
 func PtraceSingleStep(pid int) (err error) {
555
-	return ptrace(PTRACE_SINGLESTEP, pid, 1, 0)
306
+	return ptrace(PT_STEP, pid, 1, 0)
556 307
 }
557 308
 
558 309
 /*
@@ -594,16 +345,12 @@ func PtraceSingleStep(pid int) (err error) {
594 345
 //sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
595 346
 //sys	Flock(fd int, how int) (err error)
596 347
 //sys	Fpathconf(fd int, name int) (val int, err error)
597
-//sys	fstat(fd int, stat *stat_freebsd11_t) (err error)
598
-//sys	fstat_freebsd12(fd int, stat *Stat_t) (err error)
599
-//sys	fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
600
-//sys	fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error)
601
-//sys	fstatfs(fd int, stat *statfs_freebsd11_t) (err error)
602
-//sys	fstatfs_freebsd12(fd int, stat *Statfs_t) (err error)
348
+//sys	Fstat(fd int, stat *Stat_t) (err error)
349
+//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
350
+//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
603 351
 //sys	Fsync(fd int) (err error)
604 352
 //sys	Ftruncate(fd int, length int64) (err error)
605
-//sys	getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
606
-//sys	getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error)
353
+//sys	getdirentries(fd int, buf []byte, basep *uint64) (n int, err error)
607 354
 //sys	Getdtablesize() (size int)
608 355
 //sysnb	Getegid() (egid int)
609 356
 //sysnb	Geteuid() (uid int)
@@ -625,19 +372,16 @@ func PtraceSingleStep(pid int) (err error) {
625 372
 //sys	Link(path string, link string) (err error)
626 373
 //sys	Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
627 374
 //sys	Listen(s int, backlog int) (err error)
628
-//sys	lstat(path string, stat *stat_freebsd11_t) (err error)
629 375
 //sys	Mkdir(path string, mode uint32) (err error)
630 376
 //sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
631 377
 //sys	Mkfifo(path string, mode uint32) (err error)
632
-//sys	mknod(path string, mode uint32, dev int) (err error)
633
-//sys	mknodat(fd int, path string, mode uint32, dev int) (err error)
634
-//sys	mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
378
+//sys	Mknodat(fd int, path string, mode uint32, dev uint64) (err error)
635 379
 //sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
636 380
 //sys	Open(path string, mode int, perm uint32) (fd int, err error)
637 381
 //sys	Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
638 382
 //sys	Pathconf(path string, name int) (val int, err error)
639
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
640
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
383
+//sys	pread(fd int, p []byte, offset int64) (n int, err error)
384
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error)
641 385
 //sys	read(fd int, p []byte) (n int, err error)
642 386
 //sys	Readlink(path string, buf []byte) (n int, err error)
643 387
 //sys	Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
@@ -661,9 +405,7 @@ func PtraceSingleStep(pid int) (err error) {
661 405
 //sysnb	Setsid() (pid int, err error)
662 406
 //sysnb	Settimeofday(tp *Timeval) (err error)
663 407
 //sysnb	Setuid(uid int) (err error)
664
-//sys	stat(path string, stat *stat_freebsd11_t) (err error)
665
-//sys	statfs(path string, stat *statfs_freebsd11_t) (err error)
666
-//sys	statfs_freebsd12(path string, stat *Statfs_t) (err error)
408
+//sys	Statfs(path string, stat *Statfs_t) (err error)
667 409
 //sys	Symlink(path string, link string) (err error)
668 410
 //sys	Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
669 411
 //sys	Sync() (err error)

+ 2
- 2
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go View File

@@ -57,11 +57,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
57 57
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58 58
 
59 59
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
60
-	return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
60
+	return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
61 61
 }
62 62
 
63 63
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
64 64
 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
65
-	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
65
+	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
66 66
 	return int(ioDesc.Len), err
67 67
 }

+ 2
- 2
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go View File

@@ -57,11 +57,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
57 57
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58 58
 
59 59
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
60
-	return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
60
+	return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
61 61
 }
62 62
 
63 63
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
64 64
 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
65
-	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
65
+	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
66 66
 	return int(ioDesc.Len), err
67 67
 }

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go View File

@@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
58 58
 
59 59
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
60 60
 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
61
-	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
61
+	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
62 62
 	return int(ioDesc.Len), err
63 63
 }

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go View File

@@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
58 58
 
59 59
 func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
60 60
 	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
61
-	err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
61
+	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
62 62
 	return int(ioDesc.Len), err
63 63
 }

+ 63
- 0
vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go View File

@@ -0,0 +1,63 @@
1
+// Copyright 2022 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build riscv64 && freebsd
6
+// +build riscv64,freebsd
7
+
8
+package unix
9
+
10
+import (
11
+	"syscall"
12
+	"unsafe"
13
+)
14
+
15
+func setTimespec(sec, nsec int64) Timespec {
16
+	return Timespec{Sec: sec, Nsec: nsec}
17
+}
18
+
19
+func setTimeval(sec, usec int64) Timeval {
20
+	return Timeval{Sec: sec, Usec: usec}
21
+}
22
+
23
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
24
+	k.Ident = uint64(fd)
25
+	k.Filter = int16(mode)
26
+	k.Flags = uint16(flags)
27
+}
28
+
29
+func (iov *Iovec) SetLen(length int) {
30
+	iov.Len = uint64(length)
31
+}
32
+
33
+func (msghdr *Msghdr) SetControllen(length int) {
34
+	msghdr.Controllen = uint32(length)
35
+}
36
+
37
+func (msghdr *Msghdr) SetIovlen(length int) {
38
+	msghdr.Iovlen = int32(length)
39
+}
40
+
41
+func (cmsg *Cmsghdr) SetLen(length int) {
42
+	cmsg.Len = uint32(length)
43
+}
44
+
45
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
46
+	var writtenOut uint64 = 0
47
+	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
48
+
49
+	written = int(writtenOut)
50
+
51
+	if e1 != 0 {
52
+		err = e1
53
+	}
54
+	return
55
+}
56
+
57
+func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58
+
59
+func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
60
+	ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
61
+	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
62
+	return int(ioDesc.Len), err
63
+}

+ 10
- 3
vendor/golang.org/x/sys/unix/syscall_illumos.go View File

@@ -20,10 +20,9 @@ func bytes2iovec(bs [][]byte) []Iovec {
20 20
 	for i, b := range bs {
21 21
 		iovecs[i].SetLen(len(b))
22 22
 		if len(b) > 0 {
23
-			// somehow Iovec.Base on illumos is (*int8), not (*byte)
24
-			iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
23
+			iovecs[i].Base = &b[0]
25 24
 		} else {
26
-			iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
25
+			iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero))
27 26
 		}
28 27
 	}
29 28
 	return iovecs
@@ -162,6 +161,14 @@ func (l *Lifreq) GetLifruInt() int {
162 161
 	return *(*int)(unsafe.Pointer(&l.Lifru[0]))
163 162
 }
164 163
 
164
+func (l *Lifreq) SetLifruUint(d uint) {
165
+	*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
166
+}
167
+
168
+func (l *Lifreq) GetLifruUint() uint {
169
+	return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
170
+}
171
+
165 172
 func IoctlLifreq(fd int, req uint, l *Lifreq) error {
166 173
 	return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
167 174
 }

+ 230
- 175
vendor/golang.org/x/sys/unix/syscall_linux.go View File

@@ -13,8 +13,8 @@ package unix
13 13
 
14 14
 import (
15 15
 	"encoding/binary"
16
-	"runtime"
17 16
 	"syscall"
17
+	"time"
18 18
 	"unsafe"
19 19
 )
20 20
 
@@ -38,6 +38,13 @@ func Creat(path string, mode uint32) (fd int, err error) {
38 38
 	return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
39 39
 }
40 40
 
41
+func EpollCreate(size int) (fd int, err error) {
42
+	if size <= 0 {
43
+		return -1, EINVAL
44
+	}
45
+	return EpollCreate1(0)
46
+}
47
+
41 48
 //sys	FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
42 49
 //sys	fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
43 50
 
@@ -66,11 +73,22 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
66 73
 	return fchmodat(dirfd, path, mode)
67 74
 }
68 75
 
69
-//sys	ioctl(fd int, req uint, arg uintptr) (err error)
76
+func InotifyInit() (fd int, err error) {
77
+	return InotifyInit1(0)
78
+}
70 79
 
71
-// ioctl itself should not be exposed directly, but additional get/set
72
-// functions for specific types are permissible.
73
-// These are defined in ioctl.go and ioctl_linux.go.
80
+//sys	ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
81
+//sys	ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
82
+
83
+// ioctl itself should not be exposed directly, but additional get/set functions
84
+// for specific types are permissible. These are defined in ioctl.go and
85
+// ioctl_linux.go.
86
+//
87
+// The third argument to ioctl is often a pointer but sometimes an integer.
88
+// Callers should use ioctlPtr when the third argument is a pointer and ioctl
89
+// when the third argument is an integer.
90
+//
91
+// TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr.
74 92
 
75 93
 //sys	Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
76 94
 
@@ -102,6 +120,25 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
102 120
 	return openat2(dirfd, path, how, SizeofOpenHow)
103 121
 }
104 122
 
123
+func Pipe(p []int) error {
124
+	return Pipe2(p, 0)
125
+}
126
+
127
+//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
128
+
129
+func Pipe2(p []int, flags int) error {
130
+	if len(p) != 2 {
131
+		return EINVAL
132
+	}
133
+	var pp [2]_C_int
134
+	err := pipe2(&pp, flags)
135
+	if err == nil {
136
+		p[0] = int(pp[0])
137
+		p[1] = int(pp[1])
138
+	}
139
+	return err
140
+}
141
+
105 142
 //sys	ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
106 143
 
107 144
 func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@@ -111,6 +148,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
111 148
 	return ppoll(&fds[0], len(fds), timeout, sigmask)
112 149
 }
113 150
 
151
+func Poll(fds []PollFd, timeout int) (n int, err error) {
152
+	var ts *Timespec
153
+	if timeout >= 0 {
154
+		ts = new(Timespec)
155
+		*ts = NsecToTimespec(int64(timeout) * 1e6)
156
+	}
157
+	return Ppoll(fds, ts, nil)
158
+}
159
+
114 160
 //sys	Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
115 161
 
116 162
 func Readlink(path string, buf []byte) (n int, err error) {
@@ -161,27 +207,7 @@ func Utimes(path string, tv []Timeval) error {
161 207
 //sys	utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
162 208
 
163 209
 func UtimesNano(path string, ts []Timespec) error {
164
-	if ts == nil {
165
-		err := utimensat(AT_FDCWD, path, nil, 0)
166
-		if err != ENOSYS {
167
-			return err
168
-		}
169
-		return utimes(path, nil)
170
-	}
171
-	if len(ts) != 2 {
172
-		return EINVAL
173
-	}
174
-	err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
175
-	if err != ENOSYS {
176
-		return err
177
-	}
178
-	// If the utimensat syscall isn't available (utimensat was added to Linux
179
-	// in 2.6.22, Released, 8 July 2007) then fall back to utimes
180
-	var tv [2]Timeval
181
-	for i := 0; i < 2; i++ {
182
-		tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
183
-	}
184
-	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
210
+	return UtimesNanoAt(AT_FDCWD, path, ts, 0)
185 211
 }
186 212
 
187 213
 func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
@@ -224,6 +250,13 @@ func Getwd() (wd string, err error) {
224 250
 	if n < 1 || n > len(buf) || buf[n-1] != 0 {
225 251
 		return "", EINVAL
226 252
 	}
253
+	// In some cases, Linux can return a path that starts with the
254
+	// "(unreachable)" prefix, which can potentially be a valid relative
255
+	// path. To work around that, return ENOENT if path is not absolute.
256
+	if buf[0] != '/' {
257
+		return "", ENOENT
258
+	}
259
+
227 260
 	return string(buf[0 : n-1]), nil
228 261
 }
229 262
 
@@ -333,6 +366,8 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
333 366
 	return
334 367
 }
335 368
 
369
+//sys	Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
370
+
336 371
 func Mkfifo(path string, mode uint32) error {
337 372
 	return Mknod(path, mode|S_IFIFO, 0)
338 373
 }
@@ -349,9 +384,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
349 384
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
350 385
 	p[0] = byte(sa.Port >> 8)
351 386
 	p[1] = byte(sa.Port)
352
-	for i := 0; i < len(sa.Addr); i++ {
353
-		sa.raw.Addr[i] = sa.Addr[i]
354
-	}
387
+	sa.raw.Addr = sa.Addr
355 388
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
356 389
 }
357 390
 
@@ -364,9 +397,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
364 397
 	p[0] = byte(sa.Port >> 8)
365 398
 	p[1] = byte(sa.Port)
366 399
 	sa.raw.Scope_id = sa.ZoneId
367
-	for i := 0; i < len(sa.Addr); i++ {
368
-		sa.raw.Addr[i] = sa.Addr[i]
369
-	}
400
+	sa.raw.Addr = sa.Addr
370 401
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
371 402
 }
372 403
 
@@ -415,9 +446,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
415 446
 	sa.raw.Hatype = sa.Hatype
416 447
 	sa.raw.Pkttype = sa.Pkttype
417 448
 	sa.raw.Halen = sa.Halen
418
-	for i := 0; i < len(sa.Addr); i++ {
419
-		sa.raw.Addr[i] = sa.Addr[i]
420
-	}
449
+	sa.raw.Addr = sa.Addr
421 450
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
422 451
 }
423 452
 
@@ -483,24 +512,24 @@ func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {
483 512
 //
484 513
 // Server example:
485 514
 //
486
-//      fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
487
-//      _ = unix.Bind(fd, &unix.SockaddrRFCOMM{
488
-//      	Channel: 1,
489
-//      	Addr:    [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00
490
-//      })
491
-//      _ = Listen(fd, 1)
492
-//      nfd, sa, _ := Accept(fd)
493
-//      fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd)
494
-//      Read(nfd, buf)
515
+//	fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
516
+//	_ = unix.Bind(fd, &unix.SockaddrRFCOMM{
517
+//		Channel: 1,
518
+//		Addr:    [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00
519
+//	})
520
+//	_ = Listen(fd, 1)
521
+//	nfd, sa, _ := Accept(fd)
522
+//	fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd)
523
+//	Read(nfd, buf)
495 524
 //
496 525
 // Client example:
497 526
 //
498
-//      fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
499
-//      _ = Connect(fd, &SockaddrRFCOMM{
500
-//      	Channel: 1,
501
-//      	Addr:    [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11
502
-//      })
503
-//      Write(fd, []byte(`hello`))
527
+//	fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
528
+//	_ = Connect(fd, &SockaddrRFCOMM{
529
+//		Channel: 1,
530
+//		Addr:    [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11
531
+//	})
532
+//	Write(fd, []byte(`hello`))
504 533
 type SockaddrRFCOMM struct {
505 534
 	// Addr represents a bluetooth address, byte ordering is little-endian.
506 535
 	Addr [6]uint8
@@ -527,12 +556,12 @@ func (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) {
527 556
 // The SockaddrCAN struct must be bound to the socket file descriptor
528 557
 // using Bind before the CAN socket can be used.
529 558
 //
530
-//      // Read one raw CAN frame
531
-//      fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW)
532
-//      addr := &SockaddrCAN{Ifindex: index}
533
-//      Bind(fd, addr)
534
-//      frame := make([]byte, 16)
535
-//      Read(fd, frame)
559
+//	// Read one raw CAN frame
560
+//	fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW)
561
+//	addr := &SockaddrCAN{Ifindex: index}
562
+//	Bind(fd, addr)
563
+//	frame := make([]byte, 16)
564
+//	Read(fd, frame)
536 565
 //
537 566
 // The full SocketCAN documentation can be found in the linux kernel
538 567
 // archives at: https://www.kernel.org/doc/Documentation/networking/can.txt
@@ -603,13 +632,13 @@ func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
603 632
 // Here is an example of using an AF_ALG socket with SHA1 hashing.
604 633
 // The initial socket setup process is as follows:
605 634
 //
606
-//      // Open a socket to perform SHA1 hashing.
607
-//      fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
608
-//      addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
609
-//      unix.Bind(fd, addr)
610
-//      // Note: unix.Accept does not work at this time; must invoke accept()
611
-//      // manually using unix.Syscall.
612
-//      hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
635
+//	// Open a socket to perform SHA1 hashing.
636
+//	fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
637
+//	addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
638
+//	unix.Bind(fd, addr)
639
+//	// Note: unix.Accept does not work at this time; must invoke accept()
640
+//	// manually using unix.Syscall.
641
+//	hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
613 642
 //
614 643
 // Once a file descriptor has been returned from Accept, it may be used to
615 644
 // perform SHA1 hashing. The descriptor is not safe for concurrent use, but
@@ -618,39 +647,39 @@ func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
618 647
 // When hashing a small byte slice or string, a single Write and Read may
619 648
 // be used:
620 649
 //
621
-//      // Assume hashfd is already configured using the setup process.
622
-//      hash := os.NewFile(hashfd, "sha1")
623
-//      // Hash an input string and read the results. Each Write discards
624
-//      // previous hash state. Read always reads the current state.
625
-//      b := make([]byte, 20)
626
-//      for i := 0; i < 2; i++ {
627
-//          io.WriteString(hash, "Hello, world.")
628
-//          hash.Read(b)
629
-//          fmt.Println(hex.EncodeToString(b))
630
-//      }
631
-//      // Output:
632
-//      // 2ae01472317d1935a84797ec1983ae243fc6aa28
633
-//      // 2ae01472317d1935a84797ec1983ae243fc6aa28
650
+//	// Assume hashfd is already configured using the setup process.
651
+//	hash := os.NewFile(hashfd, "sha1")
652
+//	// Hash an input string and read the results. Each Write discards
653
+//	// previous hash state. Read always reads the current state.
654
+//	b := make([]byte, 20)
655
+//	for i := 0; i < 2; i++ {
656
+//	    io.WriteString(hash, "Hello, world.")
657
+//	    hash.Read(b)
658
+//	    fmt.Println(hex.EncodeToString(b))
659
+//	}
660
+//	// Output:
661
+//	// 2ae01472317d1935a84797ec1983ae243fc6aa28
662
+//	// 2ae01472317d1935a84797ec1983ae243fc6aa28
634 663
 //
635 664
 // For hashing larger byte slices, or byte streams such as those read from
636 665
 // a file or socket, use Sendto with MSG_MORE to instruct the kernel to update
637 666
 // the hash digest instead of creating a new one for a given chunk and finalizing it.
638 667
 //
639
-//      // Assume hashfd and addr are already configured using the setup process.
640
-//      hash := os.NewFile(hashfd, "sha1")
641
-//      // Hash the contents of a file.
642
-//      f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
643
-//      b := make([]byte, 4096)
644
-//      for {
645
-//          n, err := f.Read(b)
646
-//          if err == io.EOF {
647
-//              break
648
-//          }
649
-//          unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
650
-//      }
651
-//      hash.Read(b)
652
-//      fmt.Println(hex.EncodeToString(b))
653
-//      // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
668
+//	// Assume hashfd and addr are already configured using the setup process.
669
+//	hash := os.NewFile(hashfd, "sha1")
670
+//	// Hash the contents of a file.
671
+//	f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
672
+//	b := make([]byte, 4096)
673
+//	for {
674
+//	    n, err := f.Read(b)
675
+//	    if err == io.EOF {
676
+//	        break
677
+//	    }
678
+//	    unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
679
+//	}
680
+//	hash.Read(b)
681
+//	fmt.Println(hex.EncodeToString(b))
682
+//	// Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
654 683
 //
655 684
 // For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.
656 685
 type SockaddrALG struct {
@@ -832,12 +861,10 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
832 861
 	if sa.Addr == nil {
833 862
 		return nil, 0, EINVAL
834 863
 	}
835
-
836 864
 	sa.raw.Family = AF_TIPC
837 865
 	sa.raw.Scope = int8(sa.Scope)
838 866
 	sa.raw.Addrtype = sa.Addr.tipcAddrtype()
839 867
 	sa.raw.Addr = sa.Addr.tipcAddr()
840
-
841 868
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
842 869
 }
843 870
 
@@ -851,9 +878,7 @@ type SockaddrL2TPIP struct {
851 878
 func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
852 879
 	sa.raw.Family = AF_INET
853 880
 	sa.raw.Conn_id = sa.ConnId
854
-	for i := 0; i < len(sa.Addr); i++ {
855
-		sa.raw.Addr[i] = sa.Addr[i]
856
-	}
881
+	sa.raw.Addr = sa.Addr
857 882
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
858 883
 }
859 884
 
@@ -869,9 +894,7 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
869 894
 	sa.raw.Family = AF_INET6
870 895
 	sa.raw.Conn_id = sa.ConnId
871 896
 	sa.raw.Scope_id = sa.ZoneId
872
-	for i := 0; i < len(sa.Addr); i++ {
873
-		sa.raw.Addr[i] = sa.Addr[i]
874
-	}
897
+	sa.raw.Addr = sa.Addr
875 898
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
876 899
 }
877 900
 
@@ -967,9 +990,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
967 990
 		sa.Hatype = pp.Hatype
968 991
 		sa.Pkttype = pp.Pkttype
969 992
 		sa.Halen = pp.Halen
970
-		for i := 0; i < len(sa.Addr); i++ {
971
-			sa.Addr[i] = pp.Addr[i]
972
-		}
993
+		sa.Addr = pp.Addr
973 994
 		return sa, nil
974 995
 
975 996
 	case AF_UNIX:
@@ -1008,18 +1029,14 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
1008 1029
 			pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
1009 1030
 			sa := new(SockaddrL2TPIP)
1010 1031
 			sa.ConnId = pp.Conn_id
1011
-			for i := 0; i < len(sa.Addr); i++ {
1012
-				sa.Addr[i] = pp.Addr[i]
1013
-			}
1032
+			sa.Addr = pp.Addr
1014 1033
 			return sa, nil
1015 1034
 		default:
1016 1035
 			pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
1017 1036
 			sa := new(SockaddrInet4)
1018 1037
 			p := (*[2]byte)(unsafe.Pointer(&pp.Port))
1019 1038
 			sa.Port = int(p[0])<<8 + int(p[1])
1020
-			for i := 0; i < len(sa.Addr); i++ {
1021
-				sa.Addr[i] = pp.Addr[i]
1022
-			}
1039
+			sa.Addr = pp.Addr
1023 1040
 			return sa, nil
1024 1041
 		}
1025 1042
 
@@ -1035,9 +1052,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
1035 1052
 			sa := new(SockaddrL2TPIP6)
1036 1053
 			sa.ConnId = pp.Conn_id
1037 1054
 			sa.ZoneId = pp.Scope_id
1038
-			for i := 0; i < len(sa.Addr); i++ {
1039
-				sa.Addr[i] = pp.Addr[i]
1040
-			}
1055
+			sa.Addr = pp.Addr
1041 1056
 			return sa, nil
1042 1057
 		default:
1043 1058
 			pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
@@ -1045,9 +1060,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
1045 1060
 			p := (*[2]byte)(unsafe.Pointer(&pp.Port))
1046 1061
 			sa.Port = int(p[0])<<8 + int(p[1])
1047 1062
 			sa.ZoneId = pp.Scope_id
1048
-			for i := 0; i < len(sa.Addr); i++ {
1049
-				sa.Addr[i] = pp.Addr[i]
1050
-			}
1063
+			sa.Addr = pp.Addr
1051 1064
 			return sa, nil
1052 1065
 		}
1053 1066
 
@@ -1222,11 +1235,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
1222 1235
 func Accept(fd int) (nfd int, sa Sockaddr, err error) {
1223 1236
 	var rsa RawSockaddrAny
1224 1237
 	var len _Socklen = SizeofSockaddrAny
1225
-	// Try accept4 first for Android, then try accept for kernel older than 2.6.28
1226 1238
 	nfd, err = accept4(fd, &rsa, &len, 0)
1227
-	if err == ENOSYS {
1228
-		nfd, err = accept(fd, &rsa, &len)
1229
-	}
1230 1239
 	if err != nil {
1231 1240
 		return
1232 1241
 	}
@@ -1348,6 +1357,13 @@ func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
1348 1357
 	return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
1349 1358
 }
1350 1359
 
1360
+func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
1361
+	if len(o) == 0 {
1362
+		return EINVAL
1363
+	}
1364
+	return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
1365
+}
1366
+
1351 1367
 // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
1352 1368
 
1353 1369
 // KeyctlInt calls keyctl commands in which each argument is an int.
@@ -1483,19 +1499,13 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
1483 1499
 //sys	keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
1484 1500
 //sys	keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
1485 1501
 
1486
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
1502
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
1487 1503
 	var msg Msghdr
1488
-	var rsa RawSockaddrAny
1489
-	msg.Name = (*byte)(unsafe.Pointer(&rsa))
1504
+	msg.Name = (*byte)(unsafe.Pointer(rsa))
1490 1505
 	msg.Namelen = uint32(SizeofSockaddrAny)
1491
-	var iov Iovec
1492
-	if len(p) > 0 {
1493
-		iov.Base = &p[0]
1494
-		iov.SetLen(len(p))
1495
-	}
1496 1506
 	var dummy byte
1497 1507
 	if len(oob) > 0 {
1498
-		if len(p) == 0 {
1508
+		if emptyIovecs(iov) {
1499 1509
 			var sockType int
1500 1510
 			sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
1501 1511
 			if err != nil {
@@ -1503,53 +1513,36 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
1503 1513
 			}
1504 1514
 			// receive at least one normal byte
1505 1515
 			if sockType != SOCK_DGRAM {
1506
-				iov.Base = &dummy
1507
-				iov.SetLen(1)
1516
+				var iova [1]Iovec
1517
+				iova[0].Base = &dummy
1518
+				iova[0].SetLen(1)
1519
+				iov = iova[:]
1508 1520
 			}
1509 1521
 		}
1510 1522
 		msg.Control = &oob[0]
1511 1523
 		msg.SetControllen(len(oob))
1512 1524
 	}
1513
-	msg.Iov = &iov
1514
-	msg.Iovlen = 1
1525
+	if len(iov) > 0 {
1526
+		msg.Iov = &iov[0]
1527
+		msg.SetIovlen(len(iov))
1528
+	}
1515 1529
 	if n, err = recvmsg(fd, &msg, flags); err != nil {
1516 1530
 		return
1517 1531
 	}
1518 1532
 	oobn = int(msg.Controllen)
1519 1533
 	recvflags = int(msg.Flags)
1520
-	// source address is only specified if the socket is unconnected
1521
-	if rsa.Addr.Family != AF_UNSPEC {
1522
-		from, err = anyToSockaddr(fd, &rsa)
1523
-	}
1524
-	return
1525
-}
1526
-
1527
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
1528
-	_, err = SendmsgN(fd, p, oob, to, flags)
1529 1534
 	return
1530 1535
 }
1531 1536
 
1532
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
1533
-	var ptr unsafe.Pointer
1534
-	var salen _Socklen
1535
-	if to != nil {
1536
-		var err error
1537
-		ptr, salen, err = to.sockaddr()
1538
-		if err != nil {
1539
-			return 0, err
1540
-		}
1541
-	}
1537
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
1542 1538
 	var msg Msghdr
1543 1539
 	msg.Name = (*byte)(ptr)
1544 1540
 	msg.Namelen = uint32(salen)
1545
-	var iov Iovec
1546
-	if len(p) > 0 {
1547
-		iov.Base = &p[0]
1548
-		iov.SetLen(len(p))
1549
-	}
1550 1541
 	var dummy byte
1542
+	var empty bool
1551 1543
 	if len(oob) > 0 {
1552
-		if len(p) == 0 {
1544
+		empty := emptyIovecs(iov)
1545
+		if empty {
1553 1546
 			var sockType int
1554 1547
 			sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
1555 1548
 			if err != nil {
@@ -1557,19 +1550,22 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
1557 1550
 			}
1558 1551
 			// send at least one normal byte
1559 1552
 			if sockType != SOCK_DGRAM {
1560
-				iov.Base = &dummy
1561
-				iov.SetLen(1)
1553
+				var iova [1]Iovec
1554
+				iova[0].Base = &dummy
1555
+				iova[0].SetLen(1)
1562 1556
 			}
1563 1557
 		}
1564 1558
 		msg.Control = &oob[0]
1565 1559
 		msg.SetControllen(len(oob))
1566 1560
 	}
1567
-	msg.Iov = &iov
1568
-	msg.Iovlen = 1
1561
+	if len(iov) > 0 {
1562
+		msg.Iov = &iov[0]
1563
+		msg.SetIovlen(len(iov))
1564
+	}
1569 1565
 	if n, err = sendmsg(fd, &msg, flags); err != nil {
1570 1566
 		return 0, err
1571 1567
 	}
1572
-	if len(oob) > 0 && len(p) == 0 {
1568
+	if len(oob) > 0 && empty {
1573 1569
 		n = 0
1574 1570
 	}
1575 1571
 	return n, nil
@@ -1771,6 +1767,16 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
1771 1767
 	return mount(source, target, fstype, flags, datap)
1772 1768
 }
1773 1769
 
1770
+//sys	mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
1771
+
1772
+// MountSetattr is a wrapper for mount_setattr(2).
1773
+// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
1774
+//
1775
+// Requires kernel >= 5.12.
1776
+func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
1777
+	return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
1778
+}
1779
+
1774 1780
 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1775 1781
 	if raceenabled {
1776 1782
 		raceReleaseMerge(unsafe.Pointer(&ioSync))
@@ -1802,11 +1808,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
1802 1808
 //sys	Dup(oldfd int) (fd int, err error)
1803 1809
 
1804 1810
 func Dup2(oldfd, newfd int) error {
1805
-	// Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
1806
-	if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
1807
-		return Dup3(oldfd, newfd, 0)
1808
-	}
1809
-	return dup2(oldfd, newfd)
1811
+	return Dup3(oldfd, newfd, 0)
1810 1812
 }
1811 1813
 
1812 1814
 //sys	Dup3(oldfd int, newfd int, flags int) (err error)
@@ -1826,6 +1828,9 @@ func Dup2(oldfd, newfd int) error {
1826 1828
 //sys	Fremovexattr(fd int, attr string) (err error)
1827 1829
 //sys	Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
1828 1830
 //sys	Fsync(fd int) (err error)
1831
+//sys	Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
1832
+//sys	Fsopen(fsName string, flags int) (fd int, err error)
1833
+//sys	Fspick(dirfd int, pathName string, flags int) (fd int, err error)
1829 1834
 //sys	Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
1830 1835
 //sysnb	Getpgid(pid int) (pgid int, err error)
1831 1836
 
@@ -1856,10 +1861,12 @@ func Getpgrp() (pid int) {
1856 1861
 //sys	MemfdCreate(name string, flags int) (fd int, err error)
1857 1862
 //sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
1858 1863
 //sys	Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
1864
+//sys	MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error)
1859 1865
 //sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
1866
+//sys	OpenTree(dfd int, fileName string, flags uint) (r int, err error)
1860 1867
 //sys	PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
1861 1868
 //sys	PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
1862
-//sysnb	prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
1869
+//sysnb	Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
1863 1870
 //sys	Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
1864 1871
 //sys	Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
1865 1872
 //sys	read(fd int, p []byte) (n int, err error)
@@ -2181,7 +2188,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
2181 2188
 			gid = Getgid()
2182 2189
 		}
2183 2190
 
2184
-		if uint32(gid) == st.Gid || isGroupMember(gid) {
2191
+		if uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) {
2185 2192
 			fmode = (st.Mode >> 3) & 7
2186 2193
 		} else {
2187 2194
 			fmode = st.Mode & 7
@@ -2294,11 +2301,65 @@ type RemoteIovec struct {
2294 2301
 //sys	ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
2295 2302
 //sys	ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
2296 2303
 
2304
+//sys	PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
2305
+//sys	PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
2306
+//sys	PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL
2307
+
2308
+//sys	shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
2309
+//sys	shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
2310
+//sys	shmdt(addr uintptr) (err error)
2311
+//sys	shmget(key int, size int, flag int) (id int, err error)
2312
+
2313
+//sys	getitimer(which int, currValue *Itimerval) (err error)
2314
+//sys	setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
2315
+
2316
+// MakeItimerval creates an Itimerval from interval and value durations.
2317
+func MakeItimerval(interval, value time.Duration) Itimerval {
2318
+	return Itimerval{
2319
+		Interval: NsecToTimeval(interval.Nanoseconds()),
2320
+		Value:    NsecToTimeval(value.Nanoseconds()),
2321
+	}
2322
+}
2323
+
2324
+// A value which may be passed to the which parameter for Getitimer and
2325
+// Setitimer.
2326
+type ItimerWhich int
2327
+
2328
+// Possible which values for Getitimer and Setitimer.
2329
+const (
2330
+	ItimerReal    ItimerWhich = ITIMER_REAL
2331
+	ItimerVirtual ItimerWhich = ITIMER_VIRTUAL
2332
+	ItimerProf    ItimerWhich = ITIMER_PROF
2333
+)
2334
+
2335
+// Getitimer wraps getitimer(2) to return the current value of the timer
2336
+// specified by which.
2337
+func Getitimer(which ItimerWhich) (Itimerval, error) {
2338
+	var it Itimerval
2339
+	if err := getitimer(int(which), &it); err != nil {
2340
+		return Itimerval{}, err
2341
+	}
2342
+
2343
+	return it, nil
2344
+}
2345
+
2346
+// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.
2347
+// It returns the previous value of the timer.
2348
+//
2349
+// If the Itimerval argument is the zero value, the timer will be disarmed.
2350
+func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
2351
+	var prev Itimerval
2352
+	if err := setitimer(int(which), &it, &prev); err != nil {
2353
+		return Itimerval{}, err
2354
+	}
2355
+
2356
+	return prev, nil
2357
+}
2358
+
2297 2359
 /*
2298 2360
  * Unimplemented
2299 2361
  */
2300 2362
 // AfsSyscall
2301
-// Alarm
2302 2363
 // ArchPrctl
2303 2364
 // Brk
2304 2365
 // ClockNanosleep
@@ -2314,7 +2375,6 @@ type RemoteIovec struct {
2314 2375
 // GetMempolicy
2315 2376
 // GetRobustList
2316 2377
 // GetThreadArea
2317
-// Getitimer
2318 2378
 // Getpmsg
2319 2379
 // IoCancel
2320 2380
 // IoDestroy
@@ -2375,10 +2435,6 @@ type RemoteIovec struct {
2375 2435
 // SetRobustList
2376 2436
 // SetThreadArea
2377 2437
 // SetTidAddress
2378
-// Shmat
2379
-// Shmctl
2380
-// Shmdt
2381
-// Shmget
2382 2438
 // Sigaltstack
2383 2439
 // Swapoff
2384 2440
 // Swapon
@@ -2396,5 +2452,4 @@ type RemoteIovec struct {
2396 2452
 // Vfork
2397 2453
 // Vhangup
2398 2454
 // Vserver
2399
-// Waitid
2400 2455
 // _Sysctl

+ 4
- 50
vendor/golang.org/x/sys/unix/syscall_linux_386.go View File

@@ -19,36 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
19 19
 	return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 20
 }
21 21
 
22
-//sysnb	pipe(p *[2]_C_int) (err error)
23
-
24
-func Pipe(p []int) (err error) {
25
-	if len(p) != 2 {
26
-		return EINVAL
27
-	}
28
-	var pp [2]_C_int
29
-	err = pipe(&pp)
30
-	p[0] = int(pp[0])
31
-	p[1] = int(pp[1])
32
-	return
33
-}
34
-
35
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
36
-
37
-func Pipe2(p []int, flags int) (err error) {
38
-	if len(p) != 2 {
39
-		return EINVAL
40
-	}
41
-	var pp [2]_C_int
42
-	err = pipe2(&pp, flags)
43
-	p[0] = int(pp[0])
44
-	p[1] = int(pp[1])
45
-	return
46
-}
47
-
48 22
 // 64-bit file system and 32-bit uid calls
49 23
 // (386 default is 32-bit file system and 16-bit uid).
50
-//sys	dup2(oldfd int, newfd int) (err error)
51
-//sysnb	EpollCreate(size int) (fd int, err error)
52 24
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
53 25
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
54 26
 //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
@@ -59,13 +31,12 @@ func Pipe2(p []int, flags int) (err error) {
59 31
 //sysnb	Geteuid() (euid int) = SYS_GETEUID32
60 32
 //sysnb	Getgid() (gid int) = SYS_GETGID32
61 33
 //sysnb	Getuid() (uid int) = SYS_GETUID32
62
-//sysnb	InotifyInit() (fd int, err error)
63 34
 //sys	Ioperm(from int, num int, on int) (err error)
64 35
 //sys	Iopl(level int) (err error)
65 36
 //sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
66 37
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
67
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
68
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
38
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
39
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
69 40
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
70 41
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
71 42
 //sys	setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
@@ -105,7 +76,7 @@ const rlimInf32 = ^uint32(0)
105 76
 const rlimInf64 = ^uint64(0)
106 77
 
107 78
 func Getrlimit(resource int, rlim *Rlimit) (err error) {
108
-	err = prlimit(0, resource, nil, rlim)
79
+	err = Prlimit(0, resource, nil, rlim)
109 80
 	if err != ENOSYS {
110 81
 		return err
111 82
 	}
@@ -133,7 +104,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
133 104
 //sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
134 105
 
135 106
 func Setrlimit(resource int, rlim *Rlimit) (err error) {
136
-	err = prlimit(0, resource, rlim, nil)
107
+	err = Prlimit(0, resource, rlim, nil)
137 108
 	if err != ENOSYS {
138 109
 		return err
139 110
 	}
@@ -202,14 +173,6 @@ const (
202 173
 	_SENDMMSG    = 20
203 174
 )
204 175
 
205
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
206
-	fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
207
-	if e != 0 {
208
-		err = e
209
-	}
210
-	return
211
-}
212
-
213 176
 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
214 177
 	fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
215 178
 	if e != 0 {
@@ -381,12 +344,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
381 344
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
382 345
 	rsa.Service_name_len = uint32(length)
383 346
 }
384
-
385
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
386
-
387
-func Poll(fds []PollFd, timeout int) (n int, err error) {
388
-	if len(fds) == 0 {
389
-		return poll(nil, 0, timeout)
390
-	}
391
-	return poll(&fds[0], len(fds), timeout)
392
-}

+ 14
- 0
vendor/golang.org/x/sys/unix/syscall_linux_alarm.go View File

@@ -0,0 +1,14 @@
1
+// Copyright 2022 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
6
+// +build linux
7
+// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
8
+
9
+package unix
10
+
11
+// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
12
+// values.
13
+
14
+//sys	Alarm(seconds uint) (remaining uint, err error)

+ 3
- 51
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go View File

@@ -7,8 +7,6 @@
7 7
 
8 8
 package unix
9 9
 
10
-//sys	dup2(oldfd int, newfd int) (err error)
11
-//sysnb	EpollCreate(size int) (fd int, err error)
12 10
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
13 11
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
14 12
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -21,17 +19,6 @@ package unix
21 19
 //sysnb	Getgid() (gid int)
22 20
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
23 21
 //sysnb	Getuid() (uid int)
24
-//sysnb	inotifyInit() (fd int, err error)
25
-
26
-func InotifyInit() (fd int, err error) {
27
-	// First try inotify_init1, because Android's seccomp policy blocks the latter.
28
-	fd, err = InotifyInit1(0)
29
-	if err == ENOSYS {
30
-		fd, err = inotifyInit()
31
-	}
32
-	return
33
-}
34
-
35 22
 //sys	Ioperm(from int, num int, on int) (err error)
36 23
 //sys	Iopl(level int) (err error)
37 24
 //sys	Lchown(path string, uid int, gid int) (err error)
@@ -41,9 +28,10 @@ func Lstat(path string, stat *Stat_t) (err error) {
41 28
 	return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
42 29
 }
43 30
 
31
+//sys	MemfdSecret(flags int) (fd int, err error)
44 32
 //sys	Pause() (err error)
45
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
46
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
33
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
34
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
47 35
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
48 36
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
49 37
 
@@ -75,7 +63,6 @@ func Stat(path string, stat *Stat_t) (err error) {
75 63
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
76 64
 //sys	Truncate(path string, length int64) (err error)
77 65
 //sys	Ustat(dev int, ubuf *Ustat_t) (err error)
78
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
79 66
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
80 67
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
81 68
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -126,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
126 113
 	return Timeval{Sec: sec, Usec: usec}
127 114
 }
128 115
 
129
-//sysnb	pipe(p *[2]_C_int) (err error)
130
-
131
-func Pipe(p []int) (err error) {
132
-	if len(p) != 2 {
133
-		return EINVAL
134
-	}
135
-	var pp [2]_C_int
136
-	err = pipe(&pp)
137
-	p[0] = int(pp[0])
138
-	p[1] = int(pp[1])
139
-	return
140
-}
141
-
142
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
143
-
144
-func Pipe2(p []int, flags int) (err error) {
145
-	if len(p) != 2 {
146
-		return EINVAL
147
-	}
148
-	var pp [2]_C_int
149
-	err = pipe2(&pp, flags)
150
-	p[0] = int(pp[0])
151
-	p[1] = int(pp[1])
152
-	return
153
-}
154
-
155 116
 func (r *PtraceRegs) PC() uint64 { return r.Rip }
156 117
 
157 118
 func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
@@ -176,15 +137,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
176 137
 	rsa.Service_name_len = uint64(length)
177 138
 }
178 139
 
179
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
180
-
181
-func Poll(fds []PollFd, timeout int) (n int, err error) {
182
-	if len(fds) == 0 {
183
-		return poll(nil, 0, timeout)
184
-	}
185
-	return poll(&fds[0], len(fds), timeout)
186
-}
187
-
188 140
 //sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
189 141
 
190 142
 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {

+ 4
- 47
vendor/golang.org/x/sys/unix/syscall_linux_arm.go View File

@@ -19,36 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
19 19
 	return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 20
 }
21 21
 
22
-//sysnb	pipe(p *[2]_C_int) (err error)
23
-
24
-func Pipe(p []int) (err error) {
25
-	if len(p) != 2 {
26
-		return EINVAL
27
-	}
28
-	var pp [2]_C_int
29
-	// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
30
-	err = pipe2(&pp, 0)
31
-	if err == ENOSYS {
32
-		err = pipe(&pp)
33
-	}
34
-	p[0] = int(pp[0])
35
-	p[1] = int(pp[1])
36
-	return
37
-}
38
-
39
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
40
-
41
-func Pipe2(p []int, flags int) (err error) {
42
-	if len(p) != 2 {
43
-		return EINVAL
44
-	}
45
-	var pp [2]_C_int
46
-	err = pipe2(&pp, flags)
47
-	p[0] = int(pp[0])
48
-	p[1] = int(pp[1])
49
-	return
50
-}
51
-
52 22
 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
53 23
 	newoffset, errno := seek(fd, offset, whence)
54 24
 	if errno != 0 {
@@ -57,7 +27,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
57 27
 	return newoffset, nil
58 28
 }
59 29
 
60
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
61 30
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
62 31
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
63 32
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -76,8 +45,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
76 45
 
77 46
 // 64-bit file system and 32-bit uid calls
78 47
 // (16-bit uid calls are not always supported in newer kernels)
79
-//sys	dup2(oldfd int, newfd int) (err error)
80
-//sysnb	EpollCreate(size int) (fd int, err error)
81 48
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
82 49
 //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
83 50
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -86,7 +53,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
86 53
 //sysnb	Geteuid() (euid int) = SYS_GETEUID32
87 54
 //sysnb	Getgid() (gid int) = SYS_GETGID32
88 55
 //sysnb	Getuid() (uid int) = SYS_GETUID32
89
-//sysnb	InotifyInit() (fd int, err error)
90 56
 //sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
91 57
 //sys	Listen(s int, n int) (err error)
92 58
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
@@ -130,8 +96,8 @@ func Utime(path string, buf *Utimbuf) error {
130 96
 
131 97
 //sys	utimes(path string, times *[2]Timeval) (err error)
132 98
 
133
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
134
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
99
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
100
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
135 101
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
136 102
 //sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
137 103
 
@@ -184,7 +150,7 @@ const rlimInf32 = ^uint32(0)
184 150
 const rlimInf64 = ^uint64(0)
185 151
 
186 152
 func Getrlimit(resource int, rlim *Rlimit) (err error) {
187
-	err = prlimit(0, resource, nil, rlim)
153
+	err = Prlimit(0, resource, nil, rlim)
188 154
 	if err != ENOSYS {
189 155
 		return err
190 156
 	}
@@ -212,7 +178,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
212 178
 //sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
213 179
 
214 180
 func Setrlimit(resource int, rlim *Rlimit) (err error) {
215
-	err = prlimit(0, resource, rlim, nil)
181
+	err = Prlimit(0, resource, rlim, nil)
216 182
 	if err != ENOSYS {
217 183
 		return err
218 184
 	}
@@ -260,15 +226,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
260 226
 	rsa.Service_name_len = uint32(length)
261 227
 }
262 228
 
263
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
264
-
265
-func Poll(fds []PollFd, timeout int) (n int, err error) {
266
-	if len(fds) == 0 {
267
-		return poll(nil, 0, timeout)
268
-	}
269
-	return poll(&fds[0], len(fds), timeout)
270
-}
271
-
272 229
 //sys	armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
273 230
 
274 231
 func SyncFileRange(fd int, off int64, n int64, flags int) error {

+ 5
- 56
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go View File

@@ -9,13 +9,6 @@ package unix
9 9
 
10 10
 import "unsafe"
11 11
 
12
-func EpollCreate(size int) (fd int, err error) {
13
-	if size <= 0 {
14
-		return -1, EINVAL
15
-	}
16
-	return EpollCreate1(0)
17
-}
18
-
19 12
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
20 13
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
21 14
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -29,8 +22,9 @@ func EpollCreate(size int) (fd int, err error) {
29 22
 //sysnb	getrlimit(resource int, rlim *Rlimit) (err error)
30 23
 //sysnb	Getuid() (uid int)
31 24
 //sys	Listen(s int, n int) (err error)
32
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
33
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
25
+//sys	MemfdSecret(flags int) (fd int, err error)
26
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
27
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
34 28
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
35 29
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
36 30
 
@@ -73,7 +67,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
73 67
 	return ENOSYS
74 68
 }
75 69
 
76
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
77 70
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
78 71
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
79 72
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -145,33 +138,9 @@ func utimes(path string, tv *[2]Timeval) (err error) {
145 138
 	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
146 139
 }
147 140
 
148
-func Pipe(p []int) (err error) {
149
-	if len(p) != 2 {
150
-		return EINVAL
151
-	}
152
-	var pp [2]_C_int
153
-	err = pipe2(&pp, 0)
154
-	p[0] = int(pp[0])
155
-	p[1] = int(pp[1])
156
-	return
157
-}
158
-
159
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
160
-
161
-func Pipe2(p []int, flags int) (err error) {
162
-	if len(p) != 2 {
163
-		return EINVAL
164
-	}
165
-	var pp [2]_C_int
166
-	err = pipe2(&pp, flags)
167
-	p[0] = int(pp[0])
168
-	p[1] = int(pp[1])
169
-	return
170
-}
171
-
172 141
 // Getrlimit prefers the prlimit64 system call. See issue 38604.
173 142
 func Getrlimit(resource int, rlim *Rlimit) error {
174
-	err := prlimit(0, resource, nil, rlim)
143
+	err := Prlimit(0, resource, nil, rlim)
175 144
 	if err != ENOSYS {
176 145
 		return err
177 146
 	}
@@ -180,7 +149,7 @@ func Getrlimit(resource int, rlim *Rlimit) error {
180 149
 
181 150
 // Setrlimit prefers the prlimit64 system call. See issue 38604.
182 151
 func Setrlimit(resource int, rlim *Rlimit) error {
183
-	err := prlimit(0, resource, rlim, nil)
152
+	err := Prlimit(0, resource, rlim, nil)
184 153
 	if err != ENOSYS {
185 154
 		return err
186 155
 	}
@@ -211,31 +180,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
211 180
 	rsa.Service_name_len = uint64(length)
212 181
 }
213 182
 
214
-func InotifyInit() (fd int, err error) {
215
-	return InotifyInit1(0)
216
-}
217
-
218
-// dup2 exists because func Dup3 in syscall_linux.go references
219
-// it in an unreachable path. dup2 isn't available on arm64.
220
-func dup2(oldfd int, newfd int) error
221
-
222 183
 func Pause() error {
223 184
 	_, err := ppoll(nil, 0, nil, nil)
224 185
 	return err
225 186
 }
226 187
 
227
-func Poll(fds []PollFd, timeout int) (n int, err error) {
228
-	var ts *Timespec
229
-	if timeout >= 0 {
230
-		ts = new(Timespec)
231
-		*ts = NsecToTimespec(int64(timeout) * 1e6)
232
-	}
233
-	if len(fds) == 0 {
234
-		return ppoll(nil, 0, ts, nil)
235
-	}
236
-	return ppoll(&fds[0], len(fds), ts, nil)
237
-}
238
-
239 188
 //sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
240 189
 
241 190
 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {

+ 226
- 0
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go View File

@@ -0,0 +1,226 @@
1
+// Copyright 2022 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build loong64 && linux
6
+// +build loong64,linux
7
+
8
+package unix
9
+
10
+import "unsafe"
11
+
12
+//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
13
+//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
14
+//sys	Fchown(fd int, uid int, gid int) (err error)
15
+//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
16
+//sys	Ftruncate(fd int, length int64) (err error)
17
+//sysnb	Getegid() (egid int)
18
+//sysnb	Geteuid() (euid int)
19
+//sysnb	Getgid() (gid int)
20
+//sysnb	Getuid() (uid int)
21
+//sys	Listen(s int, n int) (err error)
22
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
23
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
24
+//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
25
+
26
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
27
+	var ts *Timespec
28
+	if timeout != nil {
29
+		ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
30
+	}
31
+	return Pselect(nfd, r, w, e, ts, nil)
32
+}
33
+
34
+//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
35
+//sys	setfsgid(gid int) (prev int, err error)
36
+//sys	setfsuid(uid int) (prev int, err error)
37
+//sysnb	Setregid(rgid int, egid int) (err error)
38
+//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
39
+//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
40
+//sysnb	Setreuid(ruid int, euid int) (err error)
41
+//sys	Shutdown(fd int, how int) (err error)
42
+//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
43
+
44
+func timespecFromStatxTimestamp(x StatxTimestamp) Timespec {
45
+	return Timespec{
46
+		Sec:  x.Sec,
47
+		Nsec: int64(x.Nsec),
48
+	}
49
+}
50
+
51
+func Fstatat(fd int, path string, stat *Stat_t, flags int) error {
52
+	var r Statx_t
53
+	// Do it the glibc way, add AT_NO_AUTOMOUNT.
54
+	if err := Statx(fd, path, AT_NO_AUTOMOUNT|flags, STATX_BASIC_STATS, &r); err != nil {
55
+		return err
56
+	}
57
+
58
+	stat.Dev = Mkdev(r.Dev_major, r.Dev_minor)
59
+	stat.Ino = r.Ino
60
+	stat.Mode = uint32(r.Mode)
61
+	stat.Nlink = r.Nlink
62
+	stat.Uid = r.Uid
63
+	stat.Gid = r.Gid
64
+	stat.Rdev = Mkdev(r.Rdev_major, r.Rdev_minor)
65
+	// hope we don't get to process files so large to overflow these size
66
+	// fields...
67
+	stat.Size = int64(r.Size)
68
+	stat.Blksize = int32(r.Blksize)
69
+	stat.Blocks = int64(r.Blocks)
70
+	stat.Atim = timespecFromStatxTimestamp(r.Atime)
71
+	stat.Mtim = timespecFromStatxTimestamp(r.Mtime)
72
+	stat.Ctim = timespecFromStatxTimestamp(r.Ctime)
73
+
74
+	return nil
75
+}
76
+
77
+func Fstat(fd int, stat *Stat_t) (err error) {
78
+	return Fstatat(fd, "", stat, AT_EMPTY_PATH)
79
+}
80
+
81
+func Stat(path string, stat *Stat_t) (err error) {
82
+	return Fstatat(AT_FDCWD, path, stat, 0)
83
+}
84
+
85
+func Lchown(path string, uid int, gid int) (err error) {
86
+	return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
87
+}
88
+
89
+func Lstat(path string, stat *Stat_t) (err error) {
90
+	return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
91
+}
92
+
93
+//sys	Statfs(path string, buf *Statfs_t) (err error)
94
+//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
95
+//sys	Truncate(path string, length int64) (err error)
96
+
97
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
98
+	return ENOSYS
99
+}
100
+
101
+//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
102
+//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
103
+//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
104
+//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
105
+//sysnb	setgroups(n int, list *_Gid_t) (err error)
106
+//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
107
+//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
108
+//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
109
+//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
110
+//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
111
+//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
112
+//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
113
+//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
114
+//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
115
+//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
116
+//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
117
+
118
+//sysnb	Gettimeofday(tv *Timeval) (err error)
119
+
120
+func setTimespec(sec, nsec int64) Timespec {
121
+	return Timespec{Sec: sec, Nsec: nsec}
122
+}
123
+
124
+func setTimeval(sec, usec int64) Timeval {
125
+	return Timeval{Sec: sec, Usec: usec}
126
+}
127
+
128
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
129
+	err = Prlimit(0, resource, nil, rlim)
130
+	return
131
+}
132
+
133
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
134
+	err = Prlimit(0, resource, rlim, nil)
135
+	return
136
+}
137
+
138
+func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
139
+	if tv == nil {
140
+		return utimensat(dirfd, path, nil, 0)
141
+	}
142
+
143
+	ts := []Timespec{
144
+		NsecToTimespec(TimevalToNsec(tv[0])),
145
+		NsecToTimespec(TimevalToNsec(tv[1])),
146
+	}
147
+	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
148
+}
149
+
150
+func Time(t *Time_t) (Time_t, error) {
151
+	var tv Timeval
152
+	err := Gettimeofday(&tv)
153
+	if err != nil {
154
+		return 0, err
155
+	}
156
+	if t != nil {
157
+		*t = Time_t(tv.Sec)
158
+	}
159
+	return Time_t(tv.Sec), nil
160
+}
161
+
162
+func Utime(path string, buf *Utimbuf) error {
163
+	tv := []Timeval{
164
+		{Sec: buf.Actime},
165
+		{Sec: buf.Modtime},
166
+	}
167
+	return Utimes(path, tv)
168
+}
169
+
170
+func utimes(path string, tv *[2]Timeval) (err error) {
171
+	if tv == nil {
172
+		return utimensat(AT_FDCWD, path, nil, 0)
173
+	}
174
+
175
+	ts := []Timespec{
176
+		NsecToTimespec(TimevalToNsec(tv[0])),
177
+		NsecToTimespec(TimevalToNsec(tv[1])),
178
+	}
179
+	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
180
+}
181
+
182
+func (r *PtraceRegs) PC() uint64 { return r.Era }
183
+
184
+func (r *PtraceRegs) SetPC(era uint64) { r.Era = era }
185
+
186
+func (iov *Iovec) SetLen(length int) {
187
+	iov.Len = uint64(length)
188
+}
189
+
190
+func (msghdr *Msghdr) SetControllen(length int) {
191
+	msghdr.Controllen = uint64(length)
192
+}
193
+
194
+func (msghdr *Msghdr) SetIovlen(length int) {
195
+	msghdr.Iovlen = uint64(length)
196
+}
197
+
198
+func (cmsg *Cmsghdr) SetLen(length int) {
199
+	cmsg.Len = uint64(length)
200
+}
201
+
202
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
203
+	rsa.Service_name_len = uint64(length)
204
+}
205
+
206
+func Pause() error {
207
+	_, err := ppoll(nil, 0, nil, nil)
208
+	return err
209
+}
210
+
211
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
212
+	return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
213
+}
214
+
215
+//sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
216
+
217
+func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
218
+	cmdlineLen := len(cmdline)
219
+	if cmdlineLen > 0 {
220
+		// Account for the additional NULL byte added by
221
+		// BytePtrFromString in kexecFileLoad. The kexec_file_load
222
+		// syscall expects a NULL-terminated string.
223
+		cmdlineLen++
224
+	}
225
+	return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
226
+}

+ 2
- 42
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go View File

@@ -8,8 +8,6 @@
8 8
 
9 9
 package unix
10 10
 
11
-//sys	dup2(oldfd int, newfd int) (err error)
12
-//sysnb	EpollCreate(size int) (fd int, err error)
13 11
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
14 12
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
15 13
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -23,8 +21,8 @@ package unix
23 21
 //sys	Lchown(path string, uid int, gid int) (err error)
24 22
 //sys	Listen(s int, n int) (err error)
25 23
 //sys	Pause() (err error)
26
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
27
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
24
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
25
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
28 26
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
29 27
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
30 28
 
@@ -50,7 +48,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
50 48
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
51 49
 //sys	Truncate(path string, length int64) (err error)
52 50
 //sys	Ustat(dev int, ubuf *Ustat_t) (err error)
53
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
54 51
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
55 52
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
56 53
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -94,30 +91,6 @@ func setTimeval(sec, usec int64) Timeval {
94 91
 	return Timeval{Sec: sec, Usec: usec}
95 92
 }
96 93
 
97
-func Pipe(p []int) (err error) {
98
-	if len(p) != 2 {
99
-		return EINVAL
100
-	}
101
-	var pp [2]_C_int
102
-	err = pipe2(&pp, 0)
103
-	p[0] = int(pp[0])
104
-	p[1] = int(pp[1])
105
-	return
106
-}
107
-
108
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
109
-
110
-func Pipe2(p []int, flags int) (err error) {
111
-	if len(p) != 2 {
112
-		return EINVAL
113
-	}
114
-	var pp [2]_C_int
115
-	err = pipe2(&pp, flags)
116
-	p[0] = int(pp[0])
117
-	p[1] = int(pp[1])
118
-	return
119
-}
120
-
121 94
 func Ioperm(from int, num int, on int) (err error) {
122 95
 	return ENOSYS
123 96
 }
@@ -220,16 +193,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
220 193
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
221 194
 	rsa.Service_name_len = uint64(length)
222 195
 }
223
-
224
-func InotifyInit() (fd int, err error) {
225
-	return InotifyInit1(0)
226
-}
227
-
228
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
229
-
230
-func Poll(fds []PollFd, timeout int) (n int, err error) {
231
-	if len(fds) == 0 {
232
-		return poll(nil, 0, timeout)
233
-	}
234
-	return poll(&fds[0], len(fds), timeout)
235
-}

+ 4
- 40
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go View File

@@ -15,8 +15,6 @@ import (
15 15
 
16 16
 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
17 17
 
18
-//sys	dup2(oldfd int, newfd int) (err error)
19
-//sysnb	EpollCreate(size int) (fd int, err error)
20 18
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
21 19
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
22 20
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -27,8 +25,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
27 25
 //sysnb	Getuid() (uid int)
28 26
 //sys	Lchown(path string, uid int, gid int) (err error)
29 27
 //sys	Listen(s int, n int) (err error)
30
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
31
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
28
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
29
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
32 30
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
33 31
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
34 32
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
@@ -43,7 +41,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
43 41
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
44 42
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
45 43
 //sys	Ustat(dev int, ubuf *Ustat_t) (err error)
46
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
47 44
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
48 45
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
49 46
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -60,7 +57,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
60 57
 //sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
61 58
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
62 59
 
63
-//sysnb	InotifyInit() (fd int, err error)
64 60
 //sys	Ioperm(from int, num int, on int) (err error)
65 61
 //sys	Iopl(level int) (err error)
66 62
 
@@ -113,29 +109,6 @@ func setTimeval(sec, usec int64) Timeval {
113 109
 	return Timeval{Sec: int32(sec), Usec: int32(usec)}
114 110
 }
115 111
 
116
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
117
-
118
-func Pipe2(p []int, flags int) (err error) {
119
-	if len(p) != 2 {
120
-		return EINVAL
121
-	}
122
-	var pp [2]_C_int
123
-	err = pipe2(&pp, flags)
124
-	p[0] = int(pp[0])
125
-	p[1] = int(pp[1])
126
-	return
127
-}
128
-
129
-//sysnb	pipe() (p1 int, p2 int, err error)
130
-
131
-func Pipe(p []int) (err error) {
132
-	if len(p) != 2 {
133
-		return EINVAL
134
-	}
135
-	p[0], p[1], err = pipe()
136
-	return
137
-}
138
-
139 112
 //sys	mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
140 113
 
141 114
 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@@ -157,7 +130,7 @@ type rlimit32 struct {
157 130
 //sysnb	getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
158 131
 
159 132
 func Getrlimit(resource int, rlim *Rlimit) (err error) {
160
-	err = prlimit(0, resource, nil, rlim)
133
+	err = Prlimit(0, resource, nil, rlim)
161 134
 	if err != ENOSYS {
162 135
 		return err
163 136
 	}
@@ -185,7 +158,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
185 158
 //sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
186 159
 
187 160
 func Setrlimit(resource int, rlim *Rlimit) (err error) {
188
-	err = prlimit(0, resource, rlim, nil)
161
+	err = Prlimit(0, resource, rlim, nil)
189 162
 	if err != ENOSYS {
190 163
 		return err
191 164
 	}
@@ -232,12 +205,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
232 205
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
233 206
 	rsa.Service_name_len = uint32(length)
234 207
 }
235
-
236
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
237
-
238
-func Poll(fds []PollFd, timeout int) (n int, err error) {
239
-	if len(fds) == 0 {
240
-		return poll(nil, 0, timeout)
241
-	}
242
-	return poll(&fds[0], len(fds), timeout)
243
-}

+ 5
- 45
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go View File

@@ -3,8 +3,7 @@
3 3
 // license that can be found in the LICENSE file.
4 4
 
5 5
 //go:build linux && ppc
6
-// +build linux
7
-// +build ppc
6
+// +build linux,ppc
8 7
 
9 8
 package unix
10 9
 
@@ -13,8 +12,6 @@ import (
13 12
 	"unsafe"
14 13
 )
15 14
 
16
-//sys	dup2(oldfd int, newfd int) (err error)
17
-//sysnb	EpollCreate(size int) (fd int, err error)
18 15
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
19 16
 //sys	Fchown(fd int, uid int, gid int) (err error)
20 17
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -24,15 +21,14 @@ import (
24 21
 //sysnb	Geteuid() (euid int)
25 22
 //sysnb	Getgid() (gid int)
26 23
 //sysnb	Getuid() (uid int)
27
-//sysnb	InotifyInit() (fd int, err error)
28 24
 //sys	Ioperm(from int, num int, on int) (err error)
29 25
 //sys	Iopl(level int) (err error)
30 26
 //sys	Lchown(path string, uid int, gid int) (err error)
31 27
 //sys	Listen(s int, n int) (err error)
32 28
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
33 29
 //sys	Pause() (err error)
34
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
35
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
30
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
31
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
36 32
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
37 33
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
38 34
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
@@ -47,7 +43,6 @@ import (
47 43
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
48 44
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
49 45
 //sys	Ustat(dev int, ubuf *Ustat_t) (err error)
50
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
51 46
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
52 47
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
53 48
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -143,7 +138,7 @@ const rlimInf32 = ^uint32(0)
143 138
 const rlimInf64 = ^uint64(0)
144 139
 
145 140
 func Getrlimit(resource int, rlim *Rlimit) (err error) {
146
-	err = prlimit(0, resource, nil, rlim)
141
+	err = Prlimit(0, resource, nil, rlim)
147 142
 	if err != ENOSYS {
148 143
 		return err
149 144
 	}
@@ -171,7 +166,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
171 166
 //sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
172 167
 
173 168
 func Setrlimit(resource int, rlim *Rlimit) (err error) {
174
-	err = prlimit(0, resource, rlim, nil)
169
+	err = Prlimit(0, resource, rlim, nil)
175 170
 	if err != ENOSYS {
176 171
 		return err
177 172
 	}
@@ -219,41 +214,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
219 214
 	rsa.Service_name_len = uint32(length)
220 215
 }
221 216
 
222
-//sysnb	pipe(p *[2]_C_int) (err error)
223
-
224
-func Pipe(p []int) (err error) {
225
-	if len(p) != 2 {
226
-		return EINVAL
227
-	}
228
-	var pp [2]_C_int
229
-	err = pipe(&pp)
230
-	p[0] = int(pp[0])
231
-	p[1] = int(pp[1])
232
-	return
233
-}
234
-
235
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
236
-
237
-func Pipe2(p []int, flags int) (err error) {
238
-	if len(p) != 2 {
239
-		return EINVAL
240
-	}
241
-	var pp [2]_C_int
242
-	err = pipe2(&pp, flags)
243
-	p[0] = int(pp[0])
244
-	p[1] = int(pp[1])
245
-	return
246
-}
247
-
248
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
249
-
250
-func Poll(fds []PollFd, timeout int) (n int, err error) {
251
-	if len(fds) == 0 {
252
-		return poll(nil, 0, timeout)
253
-	}
254
-	return poll(&fds[0], len(fds), timeout)
255
-}
256
-
257 217
 //sys	syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
258 218
 
259 219
 func SyncFileRange(fd int, off int64, n int64, flags int) error {

+ 2
- 41
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go View File

@@ -8,8 +8,6 @@
8 8
 
9 9
 package unix
10 10
 
11
-//sys	dup2(oldfd int, newfd int) (err error)
12
-//sysnb	EpollCreate(size int) (fd int, err error)
13 11
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
14 12
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
15 13
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -22,15 +20,14 @@ package unix
22 20
 //sysnb	Getgid() (gid int)
23 21
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
24 22
 //sysnb	Getuid() (uid int)
25
-//sysnb	InotifyInit() (fd int, err error)
26 23
 //sys	Ioperm(from int, num int, on int) (err error)
27 24
 //sys	Iopl(level int) (err error)
28 25
 //sys	Lchown(path string, uid int, gid int) (err error)
29 26
 //sys	Listen(s int, n int) (err error)
30 27
 //sys	Lstat(path string, stat *Stat_t) (err error)
31 28
 //sys	Pause() (err error)
32
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
33
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
29
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
30
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
34 31
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
35 32
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
36 33
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
@@ -48,7 +45,6 @@ package unix
48 45
 //sys	Statfs(path string, buf *Statfs_t) (err error)
49 46
 //sys	Truncate(path string, length int64) (err error)
50 47
 //sys	Ustat(dev int, ubuf *Ustat_t) (err error)
51
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
52 48
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
53 49
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
54 50
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -104,41 +100,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
104 100
 	rsa.Service_name_len = uint64(length)
105 101
 }
106 102
 
107
-//sysnb	pipe(p *[2]_C_int) (err error)
108
-
109
-func Pipe(p []int) (err error) {
110
-	if len(p) != 2 {
111
-		return EINVAL
112
-	}
113
-	var pp [2]_C_int
114
-	err = pipe(&pp)
115
-	p[0] = int(pp[0])
116
-	p[1] = int(pp[1])
117
-	return
118
-}
119
-
120
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
121
-
122
-func Pipe2(p []int, flags int) (err error) {
123
-	if len(p) != 2 {
124
-		return EINVAL
125
-	}
126
-	var pp [2]_C_int
127
-	err = pipe2(&pp, flags)
128
-	p[0] = int(pp[0])
129
-	p[1] = int(pp[1])
130
-	return
131
-}
132
-
133
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
134
-
135
-func Poll(fds []PollFd, timeout int) (n int, err error) {
136
-	if len(fds) == 0 {
137
-		return poll(nil, 0, timeout)
138
-	}
139
-	return poll(&fds[0], len(fds), timeout)
140
-}
141
-
142 103
 //sys	syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
143 104
 
144 105
 func SyncFileRange(fd int, off int64, n int64, flags int) error {

+ 3
- 54
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go View File

@@ -9,13 +9,6 @@ package unix
9 9
 
10 10
 import "unsafe"
11 11
 
12
-func EpollCreate(size int) (fd int, err error) {
13
-	if size <= 0 {
14
-		return -1, EINVAL
15
-	}
16
-	return EpollCreate1(0)
17
-}
18
-
19 12
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
20 13
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
21 14
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -29,8 +22,9 @@ func EpollCreate(size int) (fd int, err error) {
29 22
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
30 23
 //sysnb	Getuid() (uid int)
31 24
 //sys	Listen(s int, n int) (err error)
32
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
33
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
25
+//sys	MemfdSecret(flags int) (fd int, err error)
26
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
27
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
34 28
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
35 29
 
36 30
 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
@@ -72,7 +66,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
72 66
 	return ENOSYS
73 67
 }
74 68
 
75
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
76 69
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
77 70
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
78 71
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -144,30 +137,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
144 137
 	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
145 138
 }
146 139
 
147
-func Pipe(p []int) (err error) {
148
-	if len(p) != 2 {
149
-		return EINVAL
150
-	}
151
-	var pp [2]_C_int
152
-	err = pipe2(&pp, 0)
153
-	p[0] = int(pp[0])
154
-	p[1] = int(pp[1])
155
-	return
156
-}
157
-
158
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
159
-
160
-func Pipe2(p []int, flags int) (err error) {
161
-	if len(p) != 2 {
162
-		return EINVAL
163
-	}
164
-	var pp [2]_C_int
165
-	err = pipe2(&pp, flags)
166
-	p[0] = int(pp[0])
167
-	p[1] = int(pp[1])
168
-	return
169
-}
170
-
171 140
 func (r *PtraceRegs) PC() uint64 { return r.Pc }
172 141
 
173 142
 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@@ -192,27 +161,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
192 161
 	rsa.Service_name_len = uint64(length)
193 162
 }
194 163
 
195
-func InotifyInit() (fd int, err error) {
196
-	return InotifyInit1(0)
197
-}
198
-
199 164
 func Pause() error {
200 165
 	_, err := ppoll(nil, 0, nil, nil)
201 166
 	return err
202 167
 }
203 168
 
204
-func Poll(fds []PollFd, timeout int) (n int, err error) {
205
-	var ts *Timespec
206
-	if timeout >= 0 {
207
-		ts = new(Timespec)
208
-		*ts = NsecToTimespec(int64(timeout) * 1e6)
209
-	}
210
-	if len(fds) == 0 {
211
-		return ppoll(nil, 0, ts, nil)
212
-	}
213
-	return ppoll(&fds[0], len(fds), ts, nil)
214
-}
215
-
216 169
 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
217 170
 	return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
218 171
 }
@@ -229,7 +182,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
229 182
 	}
230 183
 	return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
231 184
 }
232
-
233
-// dup2 exists because func Dup3 in syscall_linux.go references
234
-// it in an unreachable path. dup2 isn't available on arm64.
235
-func dup2(oldfd int, newfd int) error

+ 2
- 47
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go View File

@@ -11,8 +11,6 @@ import (
11 11
 	"unsafe"
12 12
 )
13 13
 
14
-//sys	dup2(oldfd int, newfd int) (err error)
15
-//sysnb	EpollCreate(size int) (fd int, err error)
16 14
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
17 15
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
18 16
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -25,12 +23,11 @@ import (
25 23
 //sysnb	Getgid() (gid int)
26 24
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
27 25
 //sysnb	Getuid() (uid int)
28
-//sysnb	InotifyInit() (fd int, err error)
29 26
 //sys	Lchown(path string, uid int, gid int) (err error)
30 27
 //sys	Lstat(path string, stat *Stat_t) (err error)
31 28
 //sys	Pause() (err error)
32
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
33
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
29
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
30
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
34 31
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
35 32
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
36 33
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
@@ -77,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
77 74
 	return Timeval{Sec: sec, Usec: usec}
78 75
 }
79 76
 
80
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
81
-
82
-func Pipe(p []int) (err error) {
83
-	if len(p) != 2 {
84
-		return EINVAL
85
-	}
86
-	var pp [2]_C_int
87
-	err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
88
-	p[0] = int(pp[0])
89
-	p[1] = int(pp[1])
90
-	return
91
-}
92
-
93
-func Pipe2(p []int, flags int) (err error) {
94
-	if len(p) != 2 {
95
-		return EINVAL
96
-	}
97
-	var pp [2]_C_int
98
-	err = pipe2(&pp, flags)
99
-	p[0] = int(pp[0])
100
-	p[1] = int(pp[1])
101
-	return
102
-}
103
-
104 77
 func Ioperm(from int, num int, on int) (err error) {
105 78
 	return ENOSYS
106 79
 }
@@ -172,15 +145,6 @@ const (
172 145
 	netSendMMsg    = 20
173 146
 )
174 147
 
175
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
176
-	args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
177
-	fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
178
-	if err != 0 {
179
-		return 0, err
180
-	}
181
-	return int(fd), nil
182
-}
183
-
184 148
 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
185 149
 	args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
186 150
 	fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
@@ -324,15 +288,6 @@ func Shutdown(s, how int) error {
324 288
 	return nil
325 289
 }
326 290
 
327
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
328
-
329
-func Poll(fds []PollFd, timeout int) (n int, err error) {
330
-	if len(fds) == 0 {
331
-		return poll(nil, 0, timeout)
332
-	}
333
-	return poll(&fds[0], len(fds), timeout)
334
-}
335
-
336 291
 //sys	kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
337 292
 
338 293
 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {

+ 2
- 40
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go View File

@@ -9,7 +9,6 @@ package unix
9 9
 
10 10
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
11 11
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
12
-//sys	dup2(oldfd int, newfd int) (err error)
13 12
 //sys	Fchown(fd int, uid int, gid int) (err error)
14 13
 //sys	Fstat(fd int, stat *Stat_t) (err error)
15 14
 //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@@ -20,13 +19,12 @@ package unix
20 19
 //sysnb	Getgid() (gid int)
21 20
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
22 21
 //sysnb	Getuid() (uid int)
23
-//sysnb	InotifyInit() (fd int, err error)
24 22
 //sys	Lchown(path string, uid int, gid int) (err error)
25 23
 //sys	Listen(s int, n int) (err error)
26 24
 //sys	Lstat(path string, stat *Stat_t) (err error)
27 25
 //sys	Pause() (err error)
28
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
29
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
26
+//sys	pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
27
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
30 28
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
31 29
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
32 30
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
@@ -44,7 +42,6 @@ package unix
44 42
 //sys	Statfs(path string, buf *Statfs_t) (err error)
45 43
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
46 44
 //sys	Truncate(path string, length int64) (err error)
47
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
48 45
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
49 46
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
50 47
 //sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -119,38 +116,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
119 116
 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
120 117
 	rsa.Service_name_len = uint64(length)
121 118
 }
122
-
123
-//sysnb	pipe(p *[2]_C_int) (err error)
124
-
125
-func Pipe(p []int) (err error) {
126
-	if len(p) != 2 {
127
-		return EINVAL
128
-	}
129
-	var pp [2]_C_int
130
-	err = pipe(&pp)
131
-	p[0] = int(pp[0])
132
-	p[1] = int(pp[1])
133
-	return
134
-}
135
-
136
-//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
137
-
138
-func Pipe2(p []int, flags int) (err error) {
139
-	if len(p) != 2 {
140
-		return EINVAL
141
-	}
142
-	var pp [2]_C_int
143
-	err = pipe2(&pp, flags)
144
-	p[0] = int(pp[0])
145
-	p[1] = int(pp[1])
146
-	return
147
-}
148
-
149
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
150
-
151
-func Poll(fds []PollFd, timeout int) (n int, err error) {
152
-	if len(fds) == 0 {
153
-		return poll(nil, 0, timeout)
154
-	}
155
-	return poll(&fds[0], len(fds), timeout)
156
-}

+ 7
- 16
vendor/golang.org/x/sys/unix/syscall_netbsd.go View File

@@ -110,14 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
110 110
 	return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
111 111
 }
112 112
 
113
-//sysnb	pipe() (fd1 int, fd2 int, err error)
114
-
115 113
 func Pipe(p []int) (err error) {
116
-	if len(p) != 2 {
117
-		return EINVAL
118
-	}
119
-	p[0], p[1], err = pipe()
120
-	return
114
+	return Pipe2(p, 0)
121 115
 }
122 116
 
123 117
 //sysnb	pipe2(p *[2]_C_int, flags int) (err error)
@@ -128,8 +122,10 @@ func Pipe2(p []int, flags int) error {
128 122
 	}
129 123
 	var pp [2]_C_int
130 124
 	err := pipe2(&pp, flags)
131
-	p[0] = int(pp[0])
132
-	p[1] = int(pp[1])
125
+	if err == nil {
126
+		p[0] = int(pp[0])
127
+		p[1] = int(pp[1])
128
+	}
133 129
 	return err
134 130
 }
135 131
 
@@ -167,11 +163,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
167 163
 	return -1, ENOSYS
168 164
 }
169 165
 
170
-func setattrlistTimes(path string, times []Timespec, flags int) error {
171
-	// used on Darwin for UtimesNano
172
-	return ENOSYS
173
-}
174
-
175 166
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
176 167
 
177 168
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -317,8 +308,8 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
317 308
 //sys	Open(path string, mode int, perm uint32) (fd int, err error)
318 309
 //sys	Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
319 310
 //sys	Pathconf(path string, name int) (val int, err error)
320
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
321
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
311
+//sys	pread(fd int, p []byte, offset int64) (n int, err error)
312
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error)
322 313
 //sys	read(fd int, p []byte) (n int, err error)
323 314
 //sys	Readlink(path string, buf []byte) (n int, err error)
324 315
 //sys	Readlinkat(dirfd int, path string, buf []byte) (n int, err error)

+ 8
- 9
vendor/golang.org/x/sys/unix/syscall_openbsd.go View File

@@ -81,18 +81,22 @@ func Pipe(p []int) (err error) {
81 81
 }
82 82
 
83 83
 //sysnb	pipe2(p *[2]_C_int, flags int) (err error)
84
+
84 85
 func Pipe2(p []int, flags int) error {
85 86
 	if len(p) != 2 {
86 87
 		return EINVAL
87 88
 	}
88 89
 	var pp [2]_C_int
89 90
 	err := pipe2(&pp, flags)
90
-	p[0] = int(pp[0])
91
-	p[1] = int(pp[1])
91
+	if err == nil {
92
+		p[0] = int(pp[0])
93
+		p[1] = int(pp[1])
94
+	}
92 95
 	return err
93 96
 }
94 97
 
95 98
 //sys	Getdents(fd int, buf []byte) (n int, err error)
99
+
96 100
 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
97 101
 	n, err = Getdents(fd, buf)
98 102
 	if err != nil || basep == nil {
@@ -147,11 +151,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
147 151
 	return
148 152
 }
149 153
 
150
-func setattrlistTimes(path string, times []Timespec, flags int) error {
151
-	// used on Darwin for UtimesNano
152
-	return ENOSYS
153
-}
154
-
155 154
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
156 155
 
157 156
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -272,8 +271,8 @@ func Uname(uname *Utsname) error {
272 271
 //sys	Open(path string, mode int, perm uint32) (fd int, err error)
273 272
 //sys	Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
274 273
 //sys	Pathconf(path string, name int) (val int, err error)
275
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
276
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
274
+//sys	pread(fd int, p []byte, offset int64) (n int, err error)
275
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error)
277 276
 //sys	read(fd int, p []byte) (n int, err error)
278 277
 //sys	Readlink(path string, buf []byte) (n int, err error)
279 278
 //sys	Readlinkat(dirfd int, path string, buf []byte) (n int, err error)

+ 4
- 0
vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go View File

@@ -26,6 +26,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
26 26
 	msghdr.Controllen = uint32(length)
27 27
 }
28 28
 
29
+func (msghdr *Msghdr) SetIovlen(length int) {
30
+	msghdr.Iovlen = uint32(length)
31
+}
32
+
29 33
 func (cmsg *Cmsghdr) SetLen(length int) {
30 34
 	cmsg.Len = uint32(length)
31 35
 }

+ 321
- 62
vendor/golang.org/x/sys/unix/syscall_solaris.go View File

@@ -13,7 +13,10 @@
13 13
 package unix
14 14
 
15 15
 import (
16
+	"fmt"
17
+	"os"
16 18
 	"runtime"
19
+	"sync"
17 20
 	"syscall"
18 21
 	"unsafe"
19 22
 )
@@ -63,8 +66,10 @@ func Pipe(p []int) (err error) {
63 66
 	if n != 0 {
64 67
 		return err
65 68
 	}
66
-	p[0] = int(pp[0])
67
-	p[1] = int(pp[1])
69
+	if err == nil {
70
+		p[0] = int(pp[0])
71
+		p[1] = int(pp[1])
72
+	}
68 73
 	return nil
69 74
 }
70 75
 
@@ -76,8 +81,10 @@ func Pipe2(p []int, flags int) error {
76 81
 	}
77 82
 	var pp [2]_C_int
78 83
 	err := pipe2(&pp, flags)
79
-	p[0] = int(pp[0])
80
-	p[1] = int(pp[1])
84
+	if err == nil {
85
+		p[0] = int(pp[0])
86
+		p[1] = int(pp[1])
87
+	}
81 88
 	return err
82 89
 }
83 90
 
@@ -89,9 +96,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
89 96
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
90 97
 	p[0] = byte(sa.Port >> 8)
91 98
 	p[1] = byte(sa.Port)
92
-	for i := 0; i < len(sa.Addr); i++ {
93
-		sa.raw.Addr[i] = sa.Addr[i]
94
-	}
99
+	sa.raw.Addr = sa.Addr
95 100
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
96 101
 }
97 102
 
@@ -104,9 +109,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
104 109
 	p[0] = byte(sa.Port >> 8)
105 110
 	p[1] = byte(sa.Port)
106 111
 	sa.raw.Scope_id = sa.ZoneId
107
-	for i := 0; i < len(sa.Addr); i++ {
108
-		sa.raw.Addr[i] = sa.Addr[i]
109
-	}
112
+	sa.raw.Addr = sa.Addr
110 113
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
111 114
 }
112 115
 
@@ -414,9 +417,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
414 417
 		sa := new(SockaddrInet4)
415 418
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
416 419
 		sa.Port = int(p[0])<<8 + int(p[1])
417
-		for i := 0; i < len(sa.Addr); i++ {
418
-			sa.Addr[i] = pp.Addr[i]
419
-		}
420
+		sa.Addr = pp.Addr
420 421
 		return sa, nil
421 422
 
422 423
 	case AF_INET6:
@@ -425,9 +426,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
425 426
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
426 427
 		sa.Port = int(p[0])<<8 + int(p[1])
427 428
 		sa.ZoneId = pp.Scope_id
428
-		for i := 0; i < len(sa.Addr); i++ {
429
-			sa.Addr[i] = pp.Addr[i]
430
-		}
429
+		sa.Addr = pp.Addr
431 430
 		return sa, nil
432 431
 	}
433 432
 	return nil, EAFNOSUPPORT
@@ -452,77 +451,59 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
452 451
 
453 452
 //sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
454 453
 
455
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
454
+func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
456 455
 	var msg Msghdr
457
-	var rsa RawSockaddrAny
458
-	msg.Name = (*byte)(unsafe.Pointer(&rsa))
456
+	msg.Name = (*byte)(unsafe.Pointer(rsa))
459 457
 	msg.Namelen = uint32(SizeofSockaddrAny)
460
-	var iov Iovec
461
-	if len(p) > 0 {
462
-		iov.Base = (*int8)(unsafe.Pointer(&p[0]))
463
-		iov.SetLen(len(p))
464
-	}
465
-	var dummy int8
458
+	var dummy byte
466 459
 	if len(oob) > 0 {
467 460
 		// receive at least one normal byte
468
-		if len(p) == 0 {
469
-			iov.Base = &dummy
470
-			iov.SetLen(1)
461
+		if emptyIovecs(iov) {
462
+			var iova [1]Iovec
463
+			iova[0].Base = &dummy
464
+			iova[0].SetLen(1)
465
+			iov = iova[:]
471 466
 		}
472 467
 		msg.Accrightslen = int32(len(oob))
473 468
 	}
474
-	msg.Iov = &iov
475
-	msg.Iovlen = 1
469
+	if len(iov) > 0 {
470
+		msg.Iov = &iov[0]
471
+		msg.SetIovlen(len(iov))
472
+	}
476 473
 	if n, err = recvmsg(fd, &msg, flags); n == -1 {
477 474
 		return
478 475
 	}
479 476
 	oobn = int(msg.Accrightslen)
480
-	// source address is only specified if the socket is unconnected
481
-	if rsa.Addr.Family != AF_UNSPEC {
482
-		from, err = anyToSockaddr(fd, &rsa)
483
-	}
484
-	return
485
-}
486
-
487
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
488
-	_, err = SendmsgN(fd, p, oob, to, flags)
489 477
 	return
490 478
 }
491 479
 
492 480
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
493 481
 
494
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
495
-	var ptr unsafe.Pointer
496
-	var salen _Socklen
497
-	if to != nil {
498
-		ptr, salen, err = to.sockaddr()
499
-		if err != nil {
500
-			return 0, err
501
-		}
502
-	}
482
+func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
503 483
 	var msg Msghdr
504 484
 	msg.Name = (*byte)(unsafe.Pointer(ptr))
505 485
 	msg.Namelen = uint32(salen)
506
-	var iov Iovec
507
-	if len(p) > 0 {
508
-		iov.Base = (*int8)(unsafe.Pointer(&p[0]))
509
-		iov.SetLen(len(p))
510
-	}
511
-	var dummy int8
486
+	var dummy byte
487
+	var empty bool
512 488
 	if len(oob) > 0 {
513 489
 		// send at least one normal byte
514
-		if len(p) == 0 {
515
-			iov.Base = &dummy
516
-			iov.SetLen(1)
490
+		empty = emptyIovecs(iov)
491
+		if empty {
492
+			var iova [1]Iovec
493
+			iova[0].Base = &dummy
494
+			iova[0].SetLen(1)
495
+			iov = iova[:]
517 496
 		}
518 497
 		msg.Accrightslen = int32(len(oob))
519 498
 	}
520
-	msg.Iov = &iov
521
-	msg.Iovlen = 1
499
+	if len(iov) > 0 {
500
+		msg.Iov = &iov[0]
501
+		msg.SetIovlen(len(iov))
502
+	}
522 503
 	if n, err = sendmsg(fd, &msg, flags); err != nil {
523 504
 		return 0, err
524 505
 	}
525
-	if len(oob) > 0 && len(p) == 0 {
506
+	if len(oob) > 0 && empty {
526 507
 		n = 0
527 508
 	}
528 509
 	return n, nil
@@ -637,6 +618,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
637 618
 //sys	Getpriority(which int, who int) (n int, err error)
638 619
 //sysnb	Getrlimit(which int, lim *Rlimit) (err error)
639 620
 //sysnb	Getrusage(who int, rusage *Rusage) (err error)
621
+//sysnb	Getsid(pid int) (sid int, err error)
640 622
 //sysnb	Gettimeofday(tv *Timeval) (err error)
641 623
 //sysnb	Getuid() (uid int)
642 624
 //sys	Kill(pid int, signum syscall.Signal) (err error)
@@ -662,8 +644,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
662 644
 //sys	Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
663 645
 //sys	Pathconf(path string, name int) (val int, err error)
664 646
 //sys	Pause() (err error)
665
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
666
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
647
+//sys	pread(fd int, p []byte, offset int64) (n int, err error)
648
+//sys	pwrite(fd int, p []byte, offset int64) (n int, err error)
667 649
 //sys	read(fd int, p []byte) (n int, err error)
668 650
 //sys	Readlink(path string, buf []byte) (n int, err error)
669 651
 //sys	Rename(from string, to string) (err error)
@@ -744,3 +726,280 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
744 726
 func Munmap(b []byte) (err error) {
745 727
 	return mapper.Munmap(b)
746 728
 }
729
+
730
+// Event Ports
731
+
732
+type fileObjCookie struct {
733
+	fobj   *fileObj
734
+	cookie interface{}
735
+}
736
+
737
+// EventPort provides a safe abstraction on top of Solaris/illumos Event Ports.
738
+type EventPort struct {
739
+	port  int
740
+	mu    sync.Mutex
741
+	fds   map[uintptr]*fileObjCookie
742
+	paths map[string]*fileObjCookie
743
+	// The user cookie presents an interesting challenge from a memory management perspective.
744
+	// There are two paths by which we can discover that it is no longer in use:
745
+	// 1. The user calls port_dissociate before any events fire
746
+	// 2. An event fires and we return it to the user
747
+	// The tricky situation is if the event has fired in the kernel but
748
+	// the user hasn't requested/received it yet.
749
+	// If the user wants to port_dissociate before the event has been processed,
750
+	// we should handle things gracefully. To do so, we need to keep an extra
751
+	// reference to the cookie around until the event is processed
752
+	// thus the otherwise seemingly extraneous "cookies" map
753
+	// The key of this map is a pointer to the corresponding &fCookie.cookie
754
+	cookies map[*interface{}]*fileObjCookie
755
+}
756
+
757
+// PortEvent is an abstraction of the port_event C struct.
758
+// Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD
759
+// to see if Path or Fd was the event source. The other will be
760
+// uninitialized.
761
+type PortEvent struct {
762
+	Cookie interface{}
763
+	Events int32
764
+	Fd     uintptr
765
+	Path   string
766
+	Source uint16
767
+	fobj   *fileObj
768
+}
769
+
770
+// NewEventPort creates a new EventPort including the
771
+// underlying call to port_create(3c).
772
+func NewEventPort() (*EventPort, error) {
773
+	port, err := port_create()
774
+	if err != nil {
775
+		return nil, err
776
+	}
777
+	e := &EventPort{
778
+		port:    port,
779
+		fds:     make(map[uintptr]*fileObjCookie),
780
+		paths:   make(map[string]*fileObjCookie),
781
+		cookies: make(map[*interface{}]*fileObjCookie),
782
+	}
783
+	return e, nil
784
+}
785
+
786
+//sys	port_create() (n int, err error)
787
+//sys	port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error)
788
+//sys	port_dissociate(port int, source int, object uintptr) (n int, err error)
789
+//sys	port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error)
790
+//sys	port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error)
791
+
792
+// Close closes the event port.
793
+func (e *EventPort) Close() error {
794
+	e.mu.Lock()
795
+	defer e.mu.Unlock()
796
+	err := Close(e.port)
797
+	if err != nil {
798
+		return err
799
+	}
800
+	e.fds = nil
801
+	e.paths = nil
802
+	return nil
803
+}
804
+
805
+// PathIsWatched checks to see if path is associated with this EventPort.
806
+func (e *EventPort) PathIsWatched(path string) bool {
807
+	e.mu.Lock()
808
+	defer e.mu.Unlock()
809
+	_, found := e.paths[path]
810
+	return found
811
+}
812
+
813
+// FdIsWatched checks to see if fd is associated with this EventPort.
814
+func (e *EventPort) FdIsWatched(fd uintptr) bool {
815
+	e.mu.Lock()
816
+	defer e.mu.Unlock()
817
+	_, found := e.fds[fd]
818
+	return found
819
+}
820
+
821
+// AssociatePath wraps port_associate(3c) for a filesystem path including
822
+// creating the necessary file_obj from the provided stat information.
823
+func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error {
824
+	e.mu.Lock()
825
+	defer e.mu.Unlock()
826
+	if _, found := e.paths[path]; found {
827
+		return fmt.Errorf("%v is already associated with this Event Port", path)
828
+	}
829
+	fobj, err := createFileObj(path, stat)
830
+	if err != nil {
831
+		return err
832
+	}
833
+	fCookie := &fileObjCookie{fobj, cookie}
834
+	_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
835
+	if err != nil {
836
+		return err
837
+	}
838
+	e.paths[path] = fCookie
839
+	e.cookies[&fCookie.cookie] = fCookie
840
+	return nil
841
+}
842
+
843
+// DissociatePath wraps port_dissociate(3c) for a filesystem path.
844
+func (e *EventPort) DissociatePath(path string) error {
845
+	e.mu.Lock()
846
+	defer e.mu.Unlock()
847
+	f, ok := e.paths[path]
848
+	if !ok {
849
+		return fmt.Errorf("%v is not associated with this Event Port", path)
850
+	}
851
+	_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
852
+	// If the path is no longer associated with this event port (ENOENT)
853
+	// we should delete it from our map. We can still return ENOENT to the caller.
854
+	// But we need to save the cookie
855
+	if err != nil && err != ENOENT {
856
+		return err
857
+	}
858
+	if err == nil {
859
+		// dissociate was successful, safe to delete the cookie
860
+		fCookie := e.paths[path]
861
+		delete(e.cookies, &fCookie.cookie)
862
+	}
863
+	delete(e.paths, path)
864
+	return err
865
+}
866
+
867
+// AssociateFd wraps calls to port_associate(3c) on file descriptors.
868
+func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error {
869
+	e.mu.Lock()
870
+	defer e.mu.Unlock()
871
+	if _, found := e.fds[fd]; found {
872
+		return fmt.Errorf("%v is already associated with this Event Port", fd)
873
+	}
874
+	fCookie := &fileObjCookie{nil, cookie}
875
+	_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
876
+	if err != nil {
877
+		return err
878
+	}
879
+	e.fds[fd] = fCookie
880
+	e.cookies[&fCookie.cookie] = fCookie
881
+	return nil
882
+}
883
+
884
+// DissociateFd wraps calls to port_dissociate(3c) on file descriptors.
885
+func (e *EventPort) DissociateFd(fd uintptr) error {
886
+	e.mu.Lock()
887
+	defer e.mu.Unlock()
888
+	_, ok := e.fds[fd]
889
+	if !ok {
890
+		return fmt.Errorf("%v is not associated with this Event Port", fd)
891
+	}
892
+	_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
893
+	if err != nil && err != ENOENT {
894
+		return err
895
+	}
896
+	if err == nil {
897
+		// dissociate was successful, safe to delete the cookie
898
+		fCookie := e.fds[fd]
899
+		delete(e.cookies, &fCookie.cookie)
900
+	}
901
+	delete(e.fds, fd)
902
+	return err
903
+}
904
+
905
+func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
906
+	fobj := new(fileObj)
907
+	bs, err := ByteSliceFromString(name)
908
+	if err != nil {
909
+		return nil, err
910
+	}
911
+	fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
912
+	s := stat.Sys().(*syscall.Stat_t)
913
+	fobj.Atim.Sec = s.Atim.Sec
914
+	fobj.Atim.Nsec = s.Atim.Nsec
915
+	fobj.Mtim.Sec = s.Mtim.Sec
916
+	fobj.Mtim.Nsec = s.Mtim.Nsec
917
+	fobj.Ctim.Sec = s.Ctim.Sec
918
+	fobj.Ctim.Nsec = s.Ctim.Nsec
919
+	return fobj, nil
920
+}
921
+
922
+// GetOne wraps port_get(3c) and returns a single PortEvent.
923
+func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
924
+	pe := new(portEvent)
925
+	_, err := port_get(e.port, pe, t)
926
+	if err != nil {
927
+		return nil, err
928
+	}
929
+	p := new(PortEvent)
930
+	e.mu.Lock()
931
+	defer e.mu.Unlock()
932
+	e.peIntToExt(pe, p)
933
+	return p, nil
934
+}
935
+
936
+// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
937
+// NOTE: Always call this function while holding the e.mu mutex
938
+func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
939
+	peExt.Events = peInt.Events
940
+	peExt.Source = peInt.Source
941
+	cookie := (*interface{})(unsafe.Pointer(peInt.User))
942
+	peExt.Cookie = *cookie
943
+	switch peInt.Source {
944
+	case PORT_SOURCE_FD:
945
+		delete(e.cookies, cookie)
946
+		peExt.Fd = uintptr(peInt.Object)
947
+		// Only remove the fds entry if it exists and this cookie matches
948
+		if fobj, ok := e.fds[peExt.Fd]; ok {
949
+			if &fobj.cookie == cookie {
950
+				delete(e.fds, peExt.Fd)
951
+			}
952
+		}
953
+	case PORT_SOURCE_FILE:
954
+		if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
955
+			// Use our stashed reference rather than using unsafe on what we got back
956
+			// the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
957
+			peExt.fobj = fCookie.fobj
958
+		} else {
959
+			panic("mismanaged memory")
960
+		}
961
+		delete(e.cookies, cookie)
962
+		peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
963
+		// Only remove the paths entry if it exists and this cookie matches
964
+		if fobj, ok := e.paths[peExt.Path]; ok {
965
+			if &fobj.cookie == cookie {
966
+				delete(e.paths, peExt.Path)
967
+			}
968
+		}
969
+	}
970
+}
971
+
972
+// Pending wraps port_getn(3c) and returns how many events are pending.
973
+func (e *EventPort) Pending() (int, error) {
974
+	var n uint32 = 0
975
+	_, err := port_getn(e.port, nil, 0, &n, nil)
976
+	return int(n), err
977
+}
978
+
979
+// Get wraps port_getn(3c) and fills a slice of PortEvent.
980
+// It will block until either min events have been received
981
+// or the timeout has been exceeded. It will return how many
982
+// events were actually received along with any error information.
983
+func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) {
984
+	if min == 0 {
985
+		return 0, fmt.Errorf("need to request at least one event or use Pending() instead")
986
+	}
987
+	if len(s) < min {
988
+		return 0, fmt.Errorf("len(s) (%d) is less than min events requested (%d)", len(s), min)
989
+	}
990
+	got := uint32(min)
991
+	max := uint32(len(s))
992
+	var err error
993
+	ps := make([]portEvent, max, max)
994
+	_, err = port_getn(e.port, &ps[0], max, &got, timeout)
995
+	// got will be trustworthy with ETIME, but not any other error.
996
+	if err != nil && err != ETIME {
997
+		return 0, err
998
+	}
999
+	e.mu.Lock()
1000
+	defer e.mu.Unlock()
1001
+	for i := 0; i < int(got); i++ {
1002
+		e.peIntToExt(&ps[i], &s[i])
1003
+	}
1004
+	return int(got), err
1005
+}

+ 125
- 0
vendor/golang.org/x/sys/unix/syscall_unix.go View File

@@ -177,6 +177,30 @@ func Write(fd int, p []byte) (n int, err error) {
177 177
 	return
178 178
 }
179 179
 
180
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
181
+	n, err = pread(fd, p, offset)
182
+	if raceenabled {
183
+		if n > 0 {
184
+			raceWriteRange(unsafe.Pointer(&p[0]), n)
185
+		}
186
+		if err == nil {
187
+			raceAcquire(unsafe.Pointer(&ioSync))
188
+		}
189
+	}
190
+	return
191
+}
192
+
193
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
194
+	if raceenabled {
195
+		raceReleaseMerge(unsafe.Pointer(&ioSync))
196
+	}
197
+	n, err = pwrite(fd, p, offset)
198
+	if raceenabled && n > 0 {
199
+		raceReadRange(unsafe.Pointer(&p[0]), n)
200
+	}
201
+	return
202
+}
203
+
180 204
 // For testing: clients can set this flag to force
181 205
 // creation of IPv6 sockets to return EAFNOSUPPORT.
182 206
 var SocketDisableIPv6 bool
@@ -313,6 +337,97 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
313 337
 	return
314 338
 }
315 339
 
340
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
341
+	var iov [1]Iovec
342
+	if len(p) > 0 {
343
+		iov[0].Base = &p[0]
344
+		iov[0].SetLen(len(p))
345
+	}
346
+	var rsa RawSockaddrAny
347
+	n, oobn, recvflags, err = recvmsgRaw(fd, iov[:], oob, flags, &rsa)
348
+	// source address is only specified if the socket is unconnected
349
+	if rsa.Addr.Family != AF_UNSPEC {
350
+		from, err = anyToSockaddr(fd, &rsa)
351
+	}
352
+	return
353
+}
354
+
355
+// RecvmsgBuffers receives a message from a socket using the recvmsg
356
+// system call. The flags are passed to recvmsg. Any non-control data
357
+// read is scattered into the buffers slices. The results are:
358
+//   - n is the number of non-control data read into bufs
359
+//   - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage]
360
+//   - recvflags is flags returned by recvmsg
361
+//   - from is the address of the sender
362
+func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
363
+	iov := make([]Iovec, len(buffers))
364
+	for i := range buffers {
365
+		if len(buffers[i]) > 0 {
366
+			iov[i].Base = &buffers[i][0]
367
+			iov[i].SetLen(len(buffers[i]))
368
+		} else {
369
+			iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
370
+		}
371
+	}
372
+	var rsa RawSockaddrAny
373
+	n, oobn, recvflags, err = recvmsgRaw(fd, iov, oob, flags, &rsa)
374
+	if err == nil && rsa.Addr.Family != AF_UNSPEC {
375
+		from, err = anyToSockaddr(fd, &rsa)
376
+	}
377
+	return
378
+}
379
+
380
+func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
381
+	_, err = SendmsgN(fd, p, oob, to, flags)
382
+	return
383
+}
384
+
385
+func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
386
+	var iov [1]Iovec
387
+	if len(p) > 0 {
388
+		iov[0].Base = &p[0]
389
+		iov[0].SetLen(len(p))
390
+	}
391
+	var ptr unsafe.Pointer
392
+	var salen _Socklen
393
+	if to != nil {
394
+		ptr, salen, err = to.sockaddr()
395
+		if err != nil {
396
+			return 0, err
397
+		}
398
+	}
399
+	return sendmsgN(fd, iov[:], oob, ptr, salen, flags)
400
+}
401
+
402
+// SendmsgBuffers sends a message on a socket to an address using the sendmsg
403
+// system call. The flags are passed to sendmsg. Any non-control data written
404
+// is gathered from buffers. The function returns the number of bytes written
405
+// to the socket.
406
+func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {
407
+	iov := make([]Iovec, len(buffers))
408
+	for i := range buffers {
409
+		if len(buffers[i]) > 0 {
410
+			iov[i].Base = &buffers[i][0]
411
+			iov[i].SetLen(len(buffers[i]))
412
+		} else {
413
+			iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
414
+		}
415
+	}
416
+	var ptr unsafe.Pointer
417
+	var salen _Socklen
418
+	if to != nil {
419
+		ptr, salen, err = to.sockaddr()
420
+		if err != nil {
421
+			return 0, err
422
+		}
423
+	}
424
+	return sendmsgN(fd, iov, oob, ptr, salen, flags)
425
+}
426
+
427
+func Send(s int, buf []byte, flags int) (err error) {
428
+	return sendto(s, buf, flags, nil, 0)
429
+}
430
+
316 431
 func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
317 432
 	ptr, n, err := to.sockaddr()
318 433
 	if err != nil {
@@ -429,3 +544,13 @@ func Lutimes(path string, tv []Timeval) error {
429 544
 	}
430 545
 	return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
431 546
 }
547
+
548
+// emptyIovec reports whether there are no bytes in the slice of Iovec.
549
+func emptyIovecs(iov []Iovec) bool {
550
+	for i := range iov {
551
+		if iov[i].Len > 0 {
552
+			return false
553
+		}
554
+	}
555
+	return true
556
+}

+ 8
- 14
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go View File

@@ -67,9 +67,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
67 67
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
68 68
 	p[0] = byte(sa.Port >> 8)
69 69
 	p[1] = byte(sa.Port)
70
-	for i := 0; i < len(sa.Addr); i++ {
71
-		sa.raw.Addr[i] = sa.Addr[i]
72
-	}
70
+	sa.raw.Addr = sa.Addr
73 71
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
74 72
 }
75 73
 
@@ -83,9 +81,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
83 81
 	p[0] = byte(sa.Port >> 8)
84 82
 	p[1] = byte(sa.Port)
85 83
 	sa.raw.Scope_id = sa.ZoneId
86
-	for i := 0; i < len(sa.Addr); i++ {
87
-		sa.raw.Addr[i] = sa.Addr[i]
88
-	}
84
+	sa.raw.Addr = sa.Addr
89 85
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
90 86
 }
91 87
 
@@ -144,9 +140,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
144 140
 		sa := new(SockaddrInet4)
145 141
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
146 142
 		sa.Port = int(p[0])<<8 + int(p[1])
147
-		for i := 0; i < len(sa.Addr); i++ {
148
-			sa.Addr[i] = pp.Addr[i]
149
-		}
143
+		sa.Addr = pp.Addr
150 144
 		return sa, nil
151 145
 
152 146
 	case AF_INET6:
@@ -155,9 +149,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
155 149
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
156 150
 		sa.Port = int(p[0])<<8 + int(p[1])
157 151
 		sa.ZoneId = pp.Scope_id
158
-		for i := 0; i < len(sa.Addr); i++ {
159
-			sa.Addr[i] = pp.Addr[i]
160
-		}
152
+		sa.Addr = pp.Addr
161 153
 		return sa, nil
162 154
 	}
163 155
 	return nil, EAFNOSUPPORT
@@ -587,8 +579,10 @@ func Pipe(p []int) (err error) {
587 579
 	}
588 580
 	var pp [2]_C_int
589 581
 	err = pipe(&pp)
590
-	p[0] = int(pp[0])
591
-	p[1] = int(pp[1])
582
+	if err == nil {
583
+		p[0] = int(pp[0])
584
+		p[1] = int(pp[1])
585
+	}
592 586
 	return
593 587
 }
594 588
 

+ 21
- 0
vendor/golang.org/x/sys/unix/sysvshm_linux.go View File

@@ -0,0 +1,21 @@
1
+// Copyright 2021 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build linux
6
+// +build linux
7
+
8
+package unix
9
+
10
+import "runtime"
11
+
12
+// SysvShmCtl performs control operations on the shared memory segment
13
+// specified by id.
14
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
15
+	if runtime.GOARCH == "arm" ||
16
+		runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
17
+		cmd |= ipc_64
18
+	}
19
+
20
+	return shmctl(id, cmd, desc)
21
+}

+ 61
- 0
vendor/golang.org/x/sys/unix/sysvshm_unix.go View File

@@ -0,0 +1,61 @@
1
+// Copyright 2021 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build (darwin && !ios) || linux
6
+// +build darwin,!ios linux
7
+
8
+package unix
9
+
10
+import (
11
+	"unsafe"
12
+
13
+	"golang.org/x/sys/internal/unsafeheader"
14
+)
15
+
16
+// SysvShmAttach attaches the Sysv shared memory segment associated with the
17
+// shared memory identifier id.
18
+func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
19
+	addr, errno := shmat(id, addr, flag)
20
+	if errno != nil {
21
+		return nil, errno
22
+	}
23
+
24
+	// Retrieve the size of the shared memory to enable slice creation
25
+	var info SysvShmDesc
26
+
27
+	_, err := SysvShmCtl(id, IPC_STAT, &info)
28
+	if err != nil {
29
+		// release the shared memory if we can't find the size
30
+
31
+		// ignoring error from shmdt as there's nothing sensible to return here
32
+		shmdt(addr)
33
+		return nil, err
34
+	}
35
+
36
+	// Use unsafe to convert addr into a []byte.
37
+	// TODO: convert to unsafe.Slice once we can assume Go 1.17
38
+	var b []byte
39
+	hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
40
+	hdr.Data = unsafe.Pointer(addr)
41
+	hdr.Cap = int(info.Segsz)
42
+	hdr.Len = int(info.Segsz)
43
+	return b, nil
44
+}
45
+
46
+// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
47
+//
48
+// It is not safe to use the slice after calling this function.
49
+func SysvShmDetach(data []byte) error {
50
+	if len(data) == 0 {
51
+		return EINVAL
52
+	}
53
+
54
+	return shmdt(uintptr(unsafe.Pointer(&data[0])))
55
+}
56
+
57
+// SysvShmGet returns the Sysv shared memory identifier associated with key.
58
+// If the IPC_CREAT flag is specified a new segment is created.
59
+func SysvShmGet(key, size, flag int) (id int, err error) {
60
+	return shmget(key, size, flag)
61
+}

+ 14
- 0
vendor/golang.org/x/sys/unix/sysvshm_unix_other.go View File

@@ -0,0 +1,14 @@
1
+// Copyright 2021 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build darwin && !ios
6
+// +build darwin,!ios
7
+
8
+package unix
9
+
10
+// SysvShmCtl performs control operations on the shared memory segment
11
+// specified by id.
12
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
13
+	return shmctl(id, cmd, desc)
14
+}

+ 1576
- 1544
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
File diff suppressed because it is too large
View File


+ 1576
- 1544
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
File diff suppressed because it is too large
View File


+ 107
- 7
vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go View File

@@ -151,6 +151,7 @@ const (
151 151
 	BIOCSETF                       = 0x80084267
152 152
 	BIOCSETFNR                     = 0x80084282
153 153
 	BIOCSETIF                      = 0x8020426c
154
+	BIOCSETVLANPCP                 = 0x80044285
154 155
 	BIOCSETWF                      = 0x8008427b
155 156
 	BIOCSETZBUF                    = 0x800c4281
156 157
 	BIOCSHDRCMPLT                  = 0x80044275
@@ -447,7 +448,7 @@ const (
447 448
 	DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
448 449
 	DLT_INFINIBAND                 = 0xf7
449 450
 	DLT_IPFILTER                   = 0x74
450
-	DLT_IPMB                       = 0xc7
451
+	DLT_IPMB_KONTRON               = 0xc7
451 452
 	DLT_IPMB_LINUX                 = 0xd1
452 453
 	DLT_IPMI_HPM_2                 = 0x104
453 454
 	DLT_IPNET                      = 0xe2
@@ -487,10 +488,11 @@ const (
487 488
 	DLT_LINUX_LAPD                 = 0xb1
488 489
 	DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
489 490
 	DLT_LINUX_SLL                  = 0x71
491
+	DLT_LINUX_SLL2                 = 0x114
490 492
 	DLT_LOOP                       = 0x6c
491 493
 	DLT_LORATAP                    = 0x10e
492 494
 	DLT_LTALK                      = 0x72
493
-	DLT_MATCHING_MAX               = 0x113
495
+	DLT_MATCHING_MAX               = 0x114
494 496
 	DLT_MATCHING_MIN               = 0x68
495 497
 	DLT_MFR                        = 0xb6
496 498
 	DLT_MOST                       = 0xd3
@@ -734,6 +736,7 @@ const (
734 736
 	IPPROTO_CMTP                   = 0x26
735 737
 	IPPROTO_CPHB                   = 0x49
736 738
 	IPPROTO_CPNX                   = 0x48
739
+	IPPROTO_DCCP                   = 0x21
737 740
 	IPPROTO_DDP                    = 0x25
738 741
 	IPPROTO_DGP                    = 0x56
739 742
 	IPPROTO_DIVERT                 = 0x102
@@ -814,7 +817,6 @@ const (
814 817
 	IPPROTO_SCTP                   = 0x84
815 818
 	IPPROTO_SDRP                   = 0x2a
816 819
 	IPPROTO_SEND                   = 0x103
817
-	IPPROTO_SEP                    = 0x21
818 820
 	IPPROTO_SHIM6                  = 0x8c
819 821
 	IPPROTO_SKIP                   = 0x39
820 822
 	IPPROTO_SPACER                 = 0x7fff
@@ -911,6 +913,7 @@ const (
911 913
 	IPV6_V6ONLY                    = 0x1b
912 914
 	IPV6_VERSION                   = 0x60
913 915
 	IPV6_VERSION_MASK              = 0xf0
916
+	IPV6_VLAN_PCP                  = 0x4b
914 917
 	IP_ADD_MEMBERSHIP              = 0xc
915 918
 	IP_ADD_SOURCE_MEMBERSHIP       = 0x46
916 919
 	IP_BINDANY                     = 0x18
@@ -989,8 +992,12 @@ const (
989 992
 	IP_TOS                         = 0x3
990 993
 	IP_TTL                         = 0x4
991 994
 	IP_UNBLOCK_SOURCE              = 0x49
995
+	IP_VLAN_PCP                    = 0x4b
992 996
 	ISIG                           = 0x80
993 997
 	ISTRIP                         = 0x20
998
+	ITIMER_PROF                    = 0x2
999
+	ITIMER_REAL                    = 0x0
1000
+	ITIMER_VIRTUAL                 = 0x1
994 1001
 	IXANY                          = 0x800
995 1002
 	IXOFF                          = 0x400
996 1003
 	IXON                           = 0x200
@@ -1000,7 +1007,6 @@ const (
1000 1007
 	KERN_VERSION                   = 0x4
1001 1008
 	LOCAL_CONNWAIT                 = 0x4
1002 1009
 	LOCAL_CREDS                    = 0x2
1003
-	LOCAL_CREDS_PERSISTENT         = 0x3
1004 1010
 	LOCAL_PEERCRED                 = 0x1
1005 1011
 	LOCAL_VENDOR                   = 0x80000000
1006 1012
 	LOCK_EX                        = 0x2
@@ -1179,6 +1185,8 @@ const (
1179 1185
 	O_NONBLOCK                     = 0x4
1180 1186
 	O_RDONLY                       = 0x0
1181 1187
 	O_RDWR                         = 0x2
1188
+	O_RESOLVE_BENEATH              = 0x800000
1189
+	O_SEARCH                       = 0x40000
1182 1190
 	O_SHLOCK                       = 0x10
1183 1191
 	O_SYNC                         = 0x80
1184 1192
 	O_TRUNC                        = 0x400
@@ -1189,6 +1197,10 @@ const (
1189 1197
 	PARMRK                         = 0x8
1190 1198
 	PARODD                         = 0x2000
1191 1199
 	PENDIN                         = 0x20000000
1200
+	PIOD_READ_D                    = 0x1
1201
+	PIOD_READ_I                    = 0x3
1202
+	PIOD_WRITE_D                   = 0x2
1203
+	PIOD_WRITE_I                   = 0x4
1192 1204
 	PRIO_PGRP                      = 0x1
1193 1205
 	PRIO_PROCESS                   = 0x0
1194 1206
 	PRIO_USER                      = 0x2
@@ -1196,6 +1208,60 @@ const (
1196 1208
 	PROT_NONE                      = 0x0
1197 1209
 	PROT_READ                      = 0x1
1198 1210
 	PROT_WRITE                     = 0x2
1211
+	PTRACE_DEFAULT                 = 0x1
1212
+	PTRACE_EXEC                    = 0x1
1213
+	PTRACE_FORK                    = 0x8
1214
+	PTRACE_LWP                     = 0x10
1215
+	PTRACE_SCE                     = 0x2
1216
+	PTRACE_SCX                     = 0x4
1217
+	PTRACE_SYSCALL                 = 0x6
1218
+	PTRACE_VFORK                   = 0x20
1219
+	PT_ATTACH                      = 0xa
1220
+	PT_CLEARSTEP                   = 0x10
1221
+	PT_CONTINUE                    = 0x7
1222
+	PT_DETACH                      = 0xb
1223
+	PT_FIRSTMACH                   = 0x40
1224
+	PT_FOLLOW_FORK                 = 0x17
1225
+	PT_GETDBREGS                   = 0x25
1226
+	PT_GETFPREGS                   = 0x23
1227
+	PT_GETFSBASE                   = 0x47
1228
+	PT_GETGSBASE                   = 0x49
1229
+	PT_GETLWPLIST                  = 0xf
1230
+	PT_GETNUMLWPS                  = 0xe
1231
+	PT_GETREGS                     = 0x21
1232
+	PT_GETXMMREGS                  = 0x40
1233
+	PT_GETXSTATE                   = 0x45
1234
+	PT_GETXSTATE_INFO              = 0x44
1235
+	PT_GET_EVENT_MASK              = 0x19
1236
+	PT_GET_SC_ARGS                 = 0x1b
1237
+	PT_GET_SC_RET                  = 0x1c
1238
+	PT_IO                          = 0xc
1239
+	PT_KILL                        = 0x8
1240
+	PT_LWPINFO                     = 0xd
1241
+	PT_LWP_EVENTS                  = 0x18
1242
+	PT_READ_D                      = 0x2
1243
+	PT_READ_I                      = 0x1
1244
+	PT_RESUME                      = 0x13
1245
+	PT_SETDBREGS                   = 0x26
1246
+	PT_SETFPREGS                   = 0x24
1247
+	PT_SETFSBASE                   = 0x48
1248
+	PT_SETGSBASE                   = 0x4a
1249
+	PT_SETREGS                     = 0x22
1250
+	PT_SETSTEP                     = 0x11
1251
+	PT_SETXMMREGS                  = 0x41
1252
+	PT_SETXSTATE                   = 0x46
1253
+	PT_SET_EVENT_MASK              = 0x1a
1254
+	PT_STEP                        = 0x9
1255
+	PT_SUSPEND                     = 0x12
1256
+	PT_SYSCALL                     = 0x16
1257
+	PT_TO_SCE                      = 0x14
1258
+	PT_TO_SCX                      = 0x15
1259
+	PT_TRACE_ME                    = 0x0
1260
+	PT_VM_ENTRY                    = 0x29
1261
+	PT_VM_TIMESTAMP                = 0x28
1262
+	PT_WRITE_D                     = 0x5
1263
+	PT_WRITE_I                     = 0x4
1264
+	P_ZONEID                       = 0xc
1199 1265
 	RLIMIT_AS                      = 0xa
1200 1266
 	RLIMIT_CORE                    = 0x4
1201 1267
 	RLIMIT_CPU                     = 0x0
@@ -1297,6 +1363,11 @@ const (
1297 1363
 	SCM_RIGHTS                     = 0x1
1298 1364
 	SCM_TIMESTAMP                  = 0x2
1299 1365
 	SCM_TIME_INFO                  = 0x7
1366
+	SEEK_CUR                       = 0x1
1367
+	SEEK_DATA                      = 0x3
1368
+	SEEK_END                       = 0x2
1369
+	SEEK_HOLE                      = 0x4
1370
+	SEEK_SET                       = 0x0
1300 1371
 	SHUT_RD                        = 0x0
1301 1372
 	SHUT_RDWR                      = 0x2
1302 1373
 	SHUT_WR                        = 0x1
@@ -1315,10 +1386,12 @@ const (
1315 1386
 	SIOCGHWADDR                    = 0xc020693e
1316 1387
 	SIOCGI2C                       = 0xc020693d
1317 1388
 	SIOCGIFADDR                    = 0xc0206921
1389
+	SIOCGIFALIAS                   = 0xc044692d
1318 1390
 	SIOCGIFBRDADDR                 = 0xc0206923
1319 1391
 	SIOCGIFCAP                     = 0xc020691f
1320 1392
 	SIOCGIFCONF                    = 0xc0086924
1321 1393
 	SIOCGIFDESCR                   = 0xc020692a
1394
+	SIOCGIFDOWNREASON              = 0xc058699a
1322 1395
 	SIOCGIFDSTADDR                 = 0xc0206922
1323 1396
 	SIOCGIFFIB                     = 0xc020695c
1324 1397
 	SIOCGIFFLAGS                   = 0xc0206911
@@ -1409,6 +1482,7 @@ const (
1409 1482
 	SO_RCVBUF                      = 0x1002
1410 1483
 	SO_RCVLOWAT                    = 0x1004
1411 1484
 	SO_RCVTIMEO                    = 0x1006
1485
+	SO_RERROR                      = 0x20000
1412 1486
 	SO_REUSEADDR                   = 0x4
1413 1487
 	SO_REUSEPORT                   = 0x200
1414 1488
 	SO_REUSEPORT_LB                = 0x10000
@@ -1467,22 +1541,40 @@ const (
1467 1541
 	TCOFLUSH                       = 0x2
1468 1542
 	TCOOFF                         = 0x1
1469 1543
 	TCOON                          = 0x2
1544
+	TCPOPT_EOL                     = 0x0
1545
+	TCPOPT_FAST_OPEN               = 0x22
1546
+	TCPOPT_MAXSEG                  = 0x2
1547
+	TCPOPT_NOP                     = 0x1
1548
+	TCPOPT_PAD                     = 0x0
1549
+	TCPOPT_SACK                    = 0x5
1550
+	TCPOPT_SACK_PERMITTED          = 0x4
1551
+	TCPOPT_SIGNATURE               = 0x13
1552
+	TCPOPT_TIMESTAMP               = 0x8
1553
+	TCPOPT_WINDOW                  = 0x3
1470 1554
 	TCP_BBR_ACK_COMP_ALG           = 0x448
1555
+	TCP_BBR_ALGORITHM              = 0x43b
1471 1556
 	TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
1472 1557
 	TCP_BBR_DRAIN_PG               = 0x42e
1473 1558
 	TCP_BBR_EXTRA_GAIN             = 0x449
1559
+	TCP_BBR_EXTRA_STATE            = 0x453
1560
+	TCP_BBR_FLOOR_MIN_TSO          = 0x454
1561
+	TCP_BBR_HDWR_PACE              = 0x451
1562
+	TCP_BBR_HOLD_TARGET            = 0x436
1474 1563
 	TCP_BBR_IWINTSO                = 0x42b
1475 1564
 	TCP_BBR_LOWGAIN_FD             = 0x436
1476 1565
 	TCP_BBR_LOWGAIN_HALF           = 0x435
1477 1566
 	TCP_BBR_LOWGAIN_THRESH         = 0x434
1478 1567
 	TCP_BBR_MAX_RTO                = 0x439
1479 1568
 	TCP_BBR_MIN_RTO                = 0x438
1569
+	TCP_BBR_MIN_TOPACEOUT          = 0x455
1480 1570
 	TCP_BBR_ONE_RETRAN             = 0x431
1481 1571
 	TCP_BBR_PACE_CROSS             = 0x442
1482 1572
 	TCP_BBR_PACE_DEL_TAR           = 0x43f
1573
+	TCP_BBR_PACE_OH                = 0x435
1483 1574
 	TCP_BBR_PACE_PER_SEC           = 0x43e
1484 1575
 	TCP_BBR_PACE_SEG_MAX           = 0x440
1485 1576
 	TCP_BBR_PACE_SEG_MIN           = 0x441
1577
+	TCP_BBR_POLICER_DETECT         = 0x457
1486 1578
 	TCP_BBR_PROBE_RTT_GAIN         = 0x44d
1487 1579
 	TCP_BBR_PROBE_RTT_INT          = 0x430
1488 1580
 	TCP_BBR_PROBE_RTT_LEN          = 0x44e
@@ -1491,12 +1583,18 @@ const (
1491 1583
 	TCP_BBR_REC_OVER_HPTS          = 0x43a
1492 1584
 	TCP_BBR_RETRAN_WTSO            = 0x44b
1493 1585
 	TCP_BBR_RWND_IS_APP            = 0x42f
1586
+	TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
1494 1587
 	TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
1495 1588
 	TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
1496 1589
 	TCP_BBR_STARTUP_PG             = 0x42d
1590
+	TCP_BBR_TMR_PACE_OH            = 0x448
1591
+	TCP_BBR_TSLIMITS               = 0x434
1592
+	TCP_BBR_TSTMP_RAISES           = 0x456
1497 1593
 	TCP_BBR_UNLIMITED              = 0x43b
1498 1594
 	TCP_BBR_USEDEL_RATE            = 0x437
1499 1595
 	TCP_BBR_USE_LOWGAIN            = 0x433
1596
+	TCP_BBR_USE_RACK_CHEAT         = 0x450
1597
+	TCP_BBR_UTTER_MAX_TSO          = 0x452
1500 1598
 	TCP_CA_NAME_MAX                = 0x10
1501 1599
 	TCP_CCALGOOPT                  = 0x41
1502 1600
 	TCP_CONGESTION                 = 0x40
@@ -1536,6 +1634,7 @@ const (
1536 1634
 	TCP_PCAP_OUT                   = 0x800
1537 1635
 	TCP_RACK_EARLY_RECOV           = 0x423
1538 1636
 	TCP_RACK_EARLY_SEG             = 0x424
1637
+	TCP_RACK_GP_INCREASE           = 0x446
1539 1638
 	TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
1540 1639
 	TCP_RACK_MIN_PACE              = 0x445
1541 1640
 	TCP_RACK_MIN_PACE_SEG          = 0x446
@@ -1549,7 +1648,6 @@ const (
1549 1648
 	TCP_RACK_PRR_SENDALOT          = 0x421
1550 1649
 	TCP_RACK_REORD_FADE            = 0x426
1551 1650
 	TCP_RACK_REORD_THRESH          = 0x425
1552
-	TCP_RACK_SESS_CWV              = 0x42a
1553 1651
 	TCP_RACK_TLP_INC_VAR           = 0x429
1554 1652
 	TCP_RACK_TLP_REDUCE            = 0x41c
1555 1653
 	TCP_RACK_TLP_THRESH            = 0x427
@@ -1689,12 +1787,13 @@ const (
1689 1787
 	EIDRM           = syscall.Errno(0x52)
1690 1788
 	EILSEQ          = syscall.Errno(0x56)
1691 1789
 	EINPROGRESS     = syscall.Errno(0x24)
1790
+	EINTEGRITY      = syscall.Errno(0x61)
1692 1791
 	EINTR           = syscall.Errno(0x4)
1693 1792
 	EINVAL          = syscall.Errno(0x16)
1694 1793
 	EIO             = syscall.Errno(0x5)
1695 1794
 	EISCONN         = syscall.Errno(0x38)
1696 1795
 	EISDIR          = syscall.Errno(0x15)
1697
-	ELAST           = syscall.Errno(0x60)
1796
+	ELAST           = syscall.Errno(0x61)
1698 1797
 	ELOOP           = syscall.Errno(0x3e)
1699 1798
 	EMFILE          = syscall.Errno(0x18)
1700 1799
 	EMLINK          = syscall.Errno(0x1f)
@@ -1837,7 +1936,7 @@ var errorList = [...]struct {
1837 1936
 	{32, "EPIPE", "broken pipe"},
1838 1937
 	{33, "EDOM", "numerical argument out of domain"},
1839 1938
 	{34, "ERANGE", "result too large"},
1840
-	{35, "EAGAIN", "resource temporarily unavailable"},
1939
+	{35, "EWOULDBLOCK", "resource temporarily unavailable"},
1841 1940
 	{36, "EINPROGRESS", "operation now in progress"},
1842 1941
 	{37, "EALREADY", "operation already in progress"},
1843 1942
 	{38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1899,6 +1998,7 @@ var errorList = [...]struct {
1899 1998
 	{94, "ECAPMODE", "not permitted in capability mode"},
1900 1999
 	{95, "ENOTRECOVERABLE", "state not recoverable"},
1901 2000
 	{96, "EOWNERDEAD", "previous owner died"},
2001
+	{97, "EINTEGRITY", "integrity check failed"},
1902 2002
 }
1903 2003
 
1904 2004
 // Signal table

+ 105
- 7
vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go View File

@@ -151,6 +151,7 @@ const (
151 151
 	BIOCSETF                       = 0x80104267
152 152
 	BIOCSETFNR                     = 0x80104282
153 153
 	BIOCSETIF                      = 0x8020426c
154
+	BIOCSETVLANPCP                 = 0x80044285
154 155
 	BIOCSETWF                      = 0x8010427b
155 156
 	BIOCSETZBUF                    = 0x80184281
156 157
 	BIOCSHDRCMPLT                  = 0x80044275
@@ -447,7 +448,7 @@ const (
447 448
 	DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
448 449
 	DLT_INFINIBAND                 = 0xf7
449 450
 	DLT_IPFILTER                   = 0x74
450
-	DLT_IPMB                       = 0xc7
451
+	DLT_IPMB_KONTRON               = 0xc7
451 452
 	DLT_IPMB_LINUX                 = 0xd1
452 453
 	DLT_IPMI_HPM_2                 = 0x104
453 454
 	DLT_IPNET                      = 0xe2
@@ -487,10 +488,11 @@ const (
487 488
 	DLT_LINUX_LAPD                 = 0xb1
488 489
 	DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
489 490
 	DLT_LINUX_SLL                  = 0x71
491
+	DLT_LINUX_SLL2                 = 0x114
490 492
 	DLT_LOOP                       = 0x6c
491 493
 	DLT_LORATAP                    = 0x10e
492 494
 	DLT_LTALK                      = 0x72
493
-	DLT_MATCHING_MAX               = 0x113
495
+	DLT_MATCHING_MAX               = 0x114
494 496
 	DLT_MATCHING_MIN               = 0x68
495 497
 	DLT_MFR                        = 0xb6
496 498
 	DLT_MOST                       = 0xd3
@@ -734,6 +736,7 @@ const (
734 736
 	IPPROTO_CMTP                   = 0x26
735 737
 	IPPROTO_CPHB                   = 0x49
736 738
 	IPPROTO_CPNX                   = 0x48
739
+	IPPROTO_DCCP                   = 0x21
737 740
 	IPPROTO_DDP                    = 0x25
738 741
 	IPPROTO_DGP                    = 0x56
739 742
 	IPPROTO_DIVERT                 = 0x102
@@ -814,7 +817,6 @@ const (
814 817
 	IPPROTO_SCTP                   = 0x84
815 818
 	IPPROTO_SDRP                   = 0x2a
816 819
 	IPPROTO_SEND                   = 0x103
817
-	IPPROTO_SEP                    = 0x21
818 820
 	IPPROTO_SHIM6                  = 0x8c
819 821
 	IPPROTO_SKIP                   = 0x39
820 822
 	IPPROTO_SPACER                 = 0x7fff
@@ -911,6 +913,7 @@ const (
911 913
 	IPV6_V6ONLY                    = 0x1b
912 914
 	IPV6_VERSION                   = 0x60
913 915
 	IPV6_VERSION_MASK              = 0xf0
916
+	IPV6_VLAN_PCP                  = 0x4b
914 917
 	IP_ADD_MEMBERSHIP              = 0xc
915 918
 	IP_ADD_SOURCE_MEMBERSHIP       = 0x46
916 919
 	IP_BINDANY                     = 0x18
@@ -989,8 +992,12 @@ const (
989 992
 	IP_TOS                         = 0x3
990 993
 	IP_TTL                         = 0x4
991 994
 	IP_UNBLOCK_SOURCE              = 0x49
995
+	IP_VLAN_PCP                    = 0x4b
992 996
 	ISIG                           = 0x80
993 997
 	ISTRIP                         = 0x20
998
+	ITIMER_PROF                    = 0x2
999
+	ITIMER_REAL                    = 0x0
1000
+	ITIMER_VIRTUAL                 = 0x1
994 1001
 	IXANY                          = 0x800
995 1002
 	IXOFF                          = 0x400
996 1003
 	IXON                           = 0x200
@@ -1000,7 +1007,6 @@ const (
1000 1007
 	KERN_VERSION                   = 0x4
1001 1008
 	LOCAL_CONNWAIT                 = 0x4
1002 1009
 	LOCAL_CREDS                    = 0x2
1003
-	LOCAL_CREDS_PERSISTENT         = 0x3
1004 1010
 	LOCAL_PEERCRED                 = 0x1
1005 1011
 	LOCAL_VENDOR                   = 0x80000000
1006 1012
 	LOCK_EX                        = 0x2
@@ -1180,6 +1186,8 @@ const (
1180 1186
 	O_NONBLOCK                     = 0x4
1181 1187
 	O_RDONLY                       = 0x0
1182 1188
 	O_RDWR                         = 0x2
1189
+	O_RESOLVE_BENEATH              = 0x800000
1190
+	O_SEARCH                       = 0x40000
1183 1191
 	O_SHLOCK                       = 0x10
1184 1192
 	O_SYNC                         = 0x80
1185 1193
 	O_TRUNC                        = 0x400
@@ -1190,6 +1198,10 @@ const (
1190 1198
 	PARMRK                         = 0x8
1191 1199
 	PARODD                         = 0x2000
1192 1200
 	PENDIN                         = 0x20000000
1201
+	PIOD_READ_D                    = 0x1
1202
+	PIOD_READ_I                    = 0x3
1203
+	PIOD_WRITE_D                   = 0x2
1204
+	PIOD_WRITE_I                   = 0x4
1193 1205
 	PRIO_PGRP                      = 0x1
1194 1206
 	PRIO_PROCESS                   = 0x0
1195 1207
 	PRIO_USER                      = 0x2
@@ -1197,6 +1209,58 @@ const (
1197 1209
 	PROT_NONE                      = 0x0
1198 1210
 	PROT_READ                      = 0x1
1199 1211
 	PROT_WRITE                     = 0x2
1212
+	PTRACE_DEFAULT                 = 0x1
1213
+	PTRACE_EXEC                    = 0x1
1214
+	PTRACE_FORK                    = 0x8
1215
+	PTRACE_LWP                     = 0x10
1216
+	PTRACE_SCE                     = 0x2
1217
+	PTRACE_SCX                     = 0x4
1218
+	PTRACE_SYSCALL                 = 0x6
1219
+	PTRACE_VFORK                   = 0x20
1220
+	PT_ATTACH                      = 0xa
1221
+	PT_CLEARSTEP                   = 0x10
1222
+	PT_CONTINUE                    = 0x7
1223
+	PT_DETACH                      = 0xb
1224
+	PT_FIRSTMACH                   = 0x40
1225
+	PT_FOLLOW_FORK                 = 0x17
1226
+	PT_GETDBREGS                   = 0x25
1227
+	PT_GETFPREGS                   = 0x23
1228
+	PT_GETFSBASE                   = 0x47
1229
+	PT_GETGSBASE                   = 0x49
1230
+	PT_GETLWPLIST                  = 0xf
1231
+	PT_GETNUMLWPS                  = 0xe
1232
+	PT_GETREGS                     = 0x21
1233
+	PT_GETXSTATE                   = 0x45
1234
+	PT_GETXSTATE_INFO              = 0x44
1235
+	PT_GET_EVENT_MASK              = 0x19
1236
+	PT_GET_SC_ARGS                 = 0x1b
1237
+	PT_GET_SC_RET                  = 0x1c
1238
+	PT_IO                          = 0xc
1239
+	PT_KILL                        = 0x8
1240
+	PT_LWPINFO                     = 0xd
1241
+	PT_LWP_EVENTS                  = 0x18
1242
+	PT_READ_D                      = 0x2
1243
+	PT_READ_I                      = 0x1
1244
+	PT_RESUME                      = 0x13
1245
+	PT_SETDBREGS                   = 0x26
1246
+	PT_SETFPREGS                   = 0x24
1247
+	PT_SETFSBASE                   = 0x48
1248
+	PT_SETGSBASE                   = 0x4a
1249
+	PT_SETREGS                     = 0x22
1250
+	PT_SETSTEP                     = 0x11
1251
+	PT_SETXSTATE                   = 0x46
1252
+	PT_SET_EVENT_MASK              = 0x1a
1253
+	PT_STEP                        = 0x9
1254
+	PT_SUSPEND                     = 0x12
1255
+	PT_SYSCALL                     = 0x16
1256
+	PT_TO_SCE                      = 0x14
1257
+	PT_TO_SCX                      = 0x15
1258
+	PT_TRACE_ME                    = 0x0
1259
+	PT_VM_ENTRY                    = 0x29
1260
+	PT_VM_TIMESTAMP                = 0x28
1261
+	PT_WRITE_D                     = 0x5
1262
+	PT_WRITE_I                     = 0x4
1263
+	P_ZONEID                       = 0xc
1200 1264
 	RLIMIT_AS                      = 0xa
1201 1265
 	RLIMIT_CORE                    = 0x4
1202 1266
 	RLIMIT_CPU                     = 0x0
@@ -1298,6 +1362,11 @@ const (
1298 1362
 	SCM_RIGHTS                     = 0x1
1299 1363
 	SCM_TIMESTAMP                  = 0x2
1300 1364
 	SCM_TIME_INFO                  = 0x7
1365
+	SEEK_CUR                       = 0x1
1366
+	SEEK_DATA                      = 0x3
1367
+	SEEK_END                       = 0x2
1368
+	SEEK_HOLE                      = 0x4
1369
+	SEEK_SET                       = 0x0
1301 1370
 	SHUT_RD                        = 0x0
1302 1371
 	SHUT_RDWR                      = 0x2
1303 1372
 	SHUT_WR                        = 0x1
@@ -1316,10 +1385,12 @@ const (
1316 1385
 	SIOCGHWADDR                    = 0xc020693e
1317 1386
 	SIOCGI2C                       = 0xc020693d
1318 1387
 	SIOCGIFADDR                    = 0xc0206921
1388
+	SIOCGIFALIAS                   = 0xc044692d
1319 1389
 	SIOCGIFBRDADDR                 = 0xc0206923
1320 1390
 	SIOCGIFCAP                     = 0xc020691f
1321 1391
 	SIOCGIFCONF                    = 0xc0106924
1322 1392
 	SIOCGIFDESCR                   = 0xc020692a
1393
+	SIOCGIFDOWNREASON              = 0xc058699a
1323 1394
 	SIOCGIFDSTADDR                 = 0xc0206922
1324 1395
 	SIOCGIFFIB                     = 0xc020695c
1325 1396
 	SIOCGIFFLAGS                   = 0xc0206911
@@ -1410,6 +1481,7 @@ const (
1410 1481
 	SO_RCVBUF                      = 0x1002
1411 1482
 	SO_RCVLOWAT                    = 0x1004
1412 1483
 	SO_RCVTIMEO                    = 0x1006
1484
+	SO_RERROR                      = 0x20000
1413 1485
 	SO_REUSEADDR                   = 0x4
1414 1486
 	SO_REUSEPORT                   = 0x200
1415 1487
 	SO_REUSEPORT_LB                = 0x10000
@@ -1468,22 +1540,40 @@ const (
1468 1540
 	TCOFLUSH                       = 0x2
1469 1541
 	TCOOFF                         = 0x1
1470 1542
 	TCOON                          = 0x2
1543
+	TCPOPT_EOL                     = 0x0
1544
+	TCPOPT_FAST_OPEN               = 0x22
1545
+	TCPOPT_MAXSEG                  = 0x2
1546
+	TCPOPT_NOP                     = 0x1
1547
+	TCPOPT_PAD                     = 0x0
1548
+	TCPOPT_SACK                    = 0x5
1549
+	TCPOPT_SACK_PERMITTED          = 0x4
1550
+	TCPOPT_SIGNATURE               = 0x13
1551
+	TCPOPT_TIMESTAMP               = 0x8
1552
+	TCPOPT_WINDOW                  = 0x3
1471 1553
 	TCP_BBR_ACK_COMP_ALG           = 0x448
1554
+	TCP_BBR_ALGORITHM              = 0x43b
1472 1555
 	TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
1473 1556
 	TCP_BBR_DRAIN_PG               = 0x42e
1474 1557
 	TCP_BBR_EXTRA_GAIN             = 0x449
1558
+	TCP_BBR_EXTRA_STATE            = 0x453
1559
+	TCP_BBR_FLOOR_MIN_TSO          = 0x454
1560
+	TCP_BBR_HDWR_PACE              = 0x451
1561
+	TCP_BBR_HOLD_TARGET            = 0x436
1475 1562
 	TCP_BBR_IWINTSO                = 0x42b
1476 1563
 	TCP_BBR_LOWGAIN_FD             = 0x436
1477 1564
 	TCP_BBR_LOWGAIN_HALF           = 0x435
1478 1565
 	TCP_BBR_LOWGAIN_THRESH         = 0x434
1479 1566
 	TCP_BBR_MAX_RTO                = 0x439
1480 1567
 	TCP_BBR_MIN_RTO                = 0x438
1568
+	TCP_BBR_MIN_TOPACEOUT          = 0x455
1481 1569
 	TCP_BBR_ONE_RETRAN             = 0x431
1482 1570
 	TCP_BBR_PACE_CROSS             = 0x442
1483 1571
 	TCP_BBR_PACE_DEL_TAR           = 0x43f
1572
+	TCP_BBR_PACE_OH                = 0x435
1484 1573
 	TCP_BBR_PACE_PER_SEC           = 0x43e
1485 1574
 	TCP_BBR_PACE_SEG_MAX           = 0x440
1486 1575
 	TCP_BBR_PACE_SEG_MIN           = 0x441
1576
+	TCP_BBR_POLICER_DETECT         = 0x457
1487 1577
 	TCP_BBR_PROBE_RTT_GAIN         = 0x44d
1488 1578
 	TCP_BBR_PROBE_RTT_INT          = 0x430
1489 1579
 	TCP_BBR_PROBE_RTT_LEN          = 0x44e
@@ -1492,12 +1582,18 @@ const (
1492 1582
 	TCP_BBR_REC_OVER_HPTS          = 0x43a
1493 1583
 	TCP_BBR_RETRAN_WTSO            = 0x44b
1494 1584
 	TCP_BBR_RWND_IS_APP            = 0x42f
1585
+	TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
1495 1586
 	TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
1496 1587
 	TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
1497 1588
 	TCP_BBR_STARTUP_PG             = 0x42d
1589
+	TCP_BBR_TMR_PACE_OH            = 0x448
1590
+	TCP_BBR_TSLIMITS               = 0x434
1591
+	TCP_BBR_TSTMP_RAISES           = 0x456
1498 1592
 	TCP_BBR_UNLIMITED              = 0x43b
1499 1593
 	TCP_BBR_USEDEL_RATE            = 0x437
1500 1594
 	TCP_BBR_USE_LOWGAIN            = 0x433
1595
+	TCP_BBR_USE_RACK_CHEAT         = 0x450
1596
+	TCP_BBR_UTTER_MAX_TSO          = 0x452
1501 1597
 	TCP_CA_NAME_MAX                = 0x10
1502 1598
 	TCP_CCALGOOPT                  = 0x41
1503 1599
 	TCP_CONGESTION                 = 0x40
@@ -1537,6 +1633,7 @@ const (
1537 1633
 	TCP_PCAP_OUT                   = 0x800
1538 1634
 	TCP_RACK_EARLY_RECOV           = 0x423
1539 1635
 	TCP_RACK_EARLY_SEG             = 0x424
1636
+	TCP_RACK_GP_INCREASE           = 0x446
1540 1637
 	TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
1541 1638
 	TCP_RACK_MIN_PACE              = 0x445
1542 1639
 	TCP_RACK_MIN_PACE_SEG          = 0x446
@@ -1550,7 +1647,6 @@ const (
1550 1647
 	TCP_RACK_PRR_SENDALOT          = 0x421
1551 1648
 	TCP_RACK_REORD_FADE            = 0x426
1552 1649
 	TCP_RACK_REORD_THRESH          = 0x425
1553
-	TCP_RACK_SESS_CWV              = 0x42a
1554 1650
 	TCP_RACK_TLP_INC_VAR           = 0x429
1555 1651
 	TCP_RACK_TLP_REDUCE            = 0x41c
1556 1652
 	TCP_RACK_TLP_THRESH            = 0x427
@@ -1688,12 +1784,13 @@ const (
1688 1784
 	EIDRM           = syscall.Errno(0x52)
1689 1785
 	EILSEQ          = syscall.Errno(0x56)
1690 1786
 	EINPROGRESS     = syscall.Errno(0x24)
1787
+	EINTEGRITY      = syscall.Errno(0x61)
1691 1788
 	EINTR           = syscall.Errno(0x4)
1692 1789
 	EINVAL          = syscall.Errno(0x16)
1693 1790
 	EIO             = syscall.Errno(0x5)
1694 1791
 	EISCONN         = syscall.Errno(0x38)
1695 1792
 	EISDIR          = syscall.Errno(0x15)
1696
-	ELAST           = syscall.Errno(0x60)
1793
+	ELAST           = syscall.Errno(0x61)
1697 1794
 	ELOOP           = syscall.Errno(0x3e)
1698 1795
 	EMFILE          = syscall.Errno(0x18)
1699 1796
 	EMLINK          = syscall.Errno(0x1f)
@@ -1836,7 +1933,7 @@ var errorList = [...]struct {
1836 1933
 	{32, "EPIPE", "broken pipe"},
1837 1934
 	{33, "EDOM", "numerical argument out of domain"},
1838 1935
 	{34, "ERANGE", "result too large"},
1839
-	{35, "EAGAIN", "resource temporarily unavailable"},
1936
+	{35, "EWOULDBLOCK", "resource temporarily unavailable"},
1840 1937
 	{36, "EINPROGRESS", "operation now in progress"},
1841 1938
 	{37, "EALREADY", "operation already in progress"},
1842 1939
 	{38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1898,6 +1995,7 @@ var errorList = [...]struct {
1898 1995
 	{94, "ECAPMODE", "not permitted in capability mode"},
1899 1996
 	{95, "ENOTRECOVERABLE", "state not recoverable"},
1900 1997
 	{96, "EOWNERDEAD", "previous owner died"},
1998
+	{97, "EINTEGRITY", "integrity check failed"},
1901 1999
 }
1902 2000
 
1903 2001
 // Signal table

+ 209
- 16
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go View File

@@ -151,6 +151,7 @@ const (
151 151
 	BIOCSETF                       = 0x80084267
152 152
 	BIOCSETFNR                     = 0x80084282
153 153
 	BIOCSETIF                      = 0x8020426c
154
+	BIOCSETVLANPCP                 = 0x80044285
154 155
 	BIOCSETWF                      = 0x8008427b
155 156
 	BIOCSETZBUF                    = 0x800c4281
156 157
 	BIOCSHDRCMPLT                  = 0x80044275
@@ -362,7 +363,7 @@ const (
362 363
 	CTL_KERN                       = 0x1
363 364
 	CTL_MAXNAME                    = 0x18
364 365
 	CTL_NET                        = 0x4
365
-	DIOCGATTR                      = 0xc144648e
366
+	DIOCGATTR                      = 0xc148648e
366 367
 	DIOCGDELETE                    = 0x80106488
367 368
 	DIOCGFLUSH                     = 0x20006487
368 369
 	DIOCGFRONTSTUFF                = 0x40086486
@@ -377,7 +378,7 @@ const (
377 378
 	DIOCGSTRIPESIZE                = 0x4008648b
378 379
 	DIOCSKERNELDUMP                = 0x804c6490
379 380
 	DIOCSKERNELDUMP_FREEBSD11      = 0x80046485
380
-	DIOCZONECMD                    = 0xc06c648f
381
+	DIOCZONECMD                    = 0xc078648f
381 382
 	DLT_A429                       = 0xb8
382 383
 	DLT_A653_ICM                   = 0xb9
383 384
 	DLT_AIRONET_HEADER             = 0x78
@@ -407,7 +408,9 @@ const (
407 408
 	DLT_C_HDLC_WITH_DIR            = 0xcd
408 409
 	DLT_DBUS                       = 0xe7
409 410
 	DLT_DECT                       = 0xdd
411
+	DLT_DISPLAYPORT_AUX            = 0x113
410 412
 	DLT_DOCSIS                     = 0x8f
413
+	DLT_DOCSIS31_XRA31             = 0x111
411 414
 	DLT_DVB_CI                     = 0xeb
412 415
 	DLT_ECONET                     = 0x73
413 416
 	DLT_EN10MB                     = 0x1
@@ -417,6 +420,7 @@ const (
417 420
 	DLT_ERF                        = 0xc5
418 421
 	DLT_ERF_ETH                    = 0xaf
419 422
 	DLT_ERF_POS                    = 0xb0
423
+	DLT_ETHERNET_MPACKET           = 0x112
420 424
 	DLT_FC_2                       = 0xe0
421 425
 	DLT_FC_2_WITH_FRAME_DELIMS     = 0xe1
422 426
 	DLT_FDDI                       = 0xa
@@ -444,7 +448,7 @@ const (
444 448
 	DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
445 449
 	DLT_INFINIBAND                 = 0xf7
446 450
 	DLT_IPFILTER                   = 0x74
447
-	DLT_IPMB                       = 0xc7
451
+	DLT_IPMB_KONTRON               = 0xc7
448 452
 	DLT_IPMB_LINUX                 = 0xd1
449 453
 	DLT_IPMI_HPM_2                 = 0x104
450 454
 	DLT_IPNET                      = 0xe2
@@ -484,9 +488,11 @@ const (
484 488
 	DLT_LINUX_LAPD                 = 0xb1
485 489
 	DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
486 490
 	DLT_LINUX_SLL                  = 0x71
491
+	DLT_LINUX_SLL2                 = 0x114
487 492
 	DLT_LOOP                       = 0x6c
493
+	DLT_LORATAP                    = 0x10e
488 494
 	DLT_LTALK                      = 0x72
489
-	DLT_MATCHING_MAX               = 0x109
495
+	DLT_MATCHING_MAX               = 0x114
490 496
 	DLT_MATCHING_MIN               = 0x68
491 497
 	DLT_MFR                        = 0xb6
492 498
 	DLT_MOST                       = 0xd3
@@ -502,7 +508,9 @@ const (
502 508
 	DLT_NFC_LLCP                   = 0xf5
503 509
 	DLT_NFLOG                      = 0xef
504 510
 	DLT_NG40                       = 0xf4
511
+	DLT_NORDIC_BLE                 = 0x110
505 512
 	DLT_NULL                       = 0x0
513
+	DLT_OPENFLOW                   = 0x10b
506 514
 	DLT_PCI_EXP                    = 0x7d
507 515
 	DLT_PFLOG                      = 0x75
508 516
 	DLT_PFSYNC                     = 0x79
@@ -526,15 +534,18 @@ const (
526 534
 	DLT_RTAC_SERIAL                = 0xfa
527 535
 	DLT_SCCP                       = 0x8e
528 536
 	DLT_SCTP                       = 0xf8
537
+	DLT_SDLC                       = 0x10c
529 538
 	DLT_SITA                       = 0xc4
530 539
 	DLT_SLIP                       = 0x8
531 540
 	DLT_SLIP_BSDOS                 = 0xd
532 541
 	DLT_STANAG_5066_D_PDU          = 0xed
533 542
 	DLT_SUNATM                     = 0x7b
534 543
 	DLT_SYMANTEC_FIREWALL          = 0x63
544
+	DLT_TI_LLN_SNIFFER             = 0x10d
535 545
 	DLT_TZSP                       = 0x80
536 546
 	DLT_USB                        = 0xba
537 547
 	DLT_USBPCAP                    = 0xf9
548
+	DLT_USB_DARWIN                 = 0x10a
538 549
 	DLT_USB_FREEBSD                = 0xba
539 550
 	DLT_USB_LINUX                  = 0xbd
540 551
 	DLT_USB_LINUX_MMAPPED          = 0xdc
@@ -554,6 +565,7 @@ const (
554 565
 	DLT_USER7                      = 0x9a
555 566
 	DLT_USER8                      = 0x9b
556 567
 	DLT_USER9                      = 0x9c
568
+	DLT_VSOCK                      = 0x10f
557 569
 	DLT_WATTSTOPPER_DLM            = 0x107
558 570
 	DLT_WIHART                     = 0xdf
559 571
 	DLT_WIRESHARK_UPPER_PDU        = 0xfc
@@ -578,6 +590,7 @@ const (
578 590
 	ECHONL                         = 0x10
579 591
 	ECHOPRT                        = 0x20
580 592
 	EVFILT_AIO                     = -0x3
593
+	EVFILT_EMPTY                   = -0xd
581 594
 	EVFILT_FS                      = -0x9
582 595
 	EVFILT_LIO                     = -0xa
583 596
 	EVFILT_PROC                    = -0x5
@@ -585,11 +598,12 @@ const (
585 598
 	EVFILT_READ                    = -0x1
586 599
 	EVFILT_SENDFILE                = -0xc
587 600
 	EVFILT_SIGNAL                  = -0x6
588
-	EVFILT_SYSCOUNT                = 0xc
601
+	EVFILT_SYSCOUNT                = 0xd
589 602
 	EVFILT_TIMER                   = -0x7
590 603
 	EVFILT_USER                    = -0xb
591 604
 	EVFILT_VNODE                   = -0x4
592 605
 	EVFILT_WRITE                   = -0x2
606
+	EVNAMEMAP_NAME_SIZE            = 0x40
593 607
 	EV_ADD                         = 0x1
594 608
 	EV_CLEAR                       = 0x20
595 609
 	EV_DELETE                      = 0x2
@@ -606,6 +620,7 @@ const (
606 620
 	EV_RECEIPT                     = 0x40
607 621
 	EV_SYSFLAGS                    = 0xf000
608 622
 	EXTA                           = 0x4b00
623
+	EXTATTR_MAXNAMELEN             = 0xff
609 624
 	EXTATTR_NAMESPACE_EMPTY        = 0x0
610 625
 	EXTATTR_NAMESPACE_SYSTEM       = 0x2
611 626
 	EXTATTR_NAMESPACE_USER         = 0x1
@@ -647,6 +662,7 @@ const (
647 662
 	IEXTEN                         = 0x400
648 663
 	IFAN_ARRIVAL                   = 0x0
649 664
 	IFAN_DEPARTURE                 = 0x1
665
+	IFCAP_WOL_MAGIC                = 0x2000
650 666
 	IFF_ALLMULTI                   = 0x200
651 667
 	IFF_ALTPHYS                    = 0x4000
652 668
 	IFF_BROADCAST                  = 0x2
@@ -663,6 +679,7 @@ const (
663 679
 	IFF_MONITOR                    = 0x40000
664 680
 	IFF_MULTICAST                  = 0x8000
665 681
 	IFF_NOARP                      = 0x80
682
+	IFF_NOGROUP                    = 0x800000
666 683
 	IFF_OACTIVE                    = 0x400
667 684
 	IFF_POINTOPOINT                = 0x10
668 685
 	IFF_PPROMISC                   = 0x20000
@@ -719,6 +736,7 @@ const (
719 736
 	IPPROTO_CMTP                   = 0x26
720 737
 	IPPROTO_CPHB                   = 0x49
721 738
 	IPPROTO_CPNX                   = 0x48
739
+	IPPROTO_DCCP                   = 0x21
722 740
 	IPPROTO_DDP                    = 0x25
723 741
 	IPPROTO_DGP                    = 0x56
724 742
 	IPPROTO_DIVERT                 = 0x102
@@ -799,7 +817,6 @@ const (
799 817
 	IPPROTO_SCTP                   = 0x84
800 818
 	IPPROTO_SDRP                   = 0x2a
801 819
 	IPPROTO_SEND                   = 0x103
802
-	IPPROTO_SEP                    = 0x21
803 820
 	IPPROTO_SHIM6                  = 0x8c
804 821
 	IPPROTO_SKIP                   = 0x39
805 822
 	IPPROTO_SPACER                 = 0x7fff
@@ -837,6 +854,7 @@ const (
837 854
 	IPV6_DSTOPTS                   = 0x32
838 855
 	IPV6_FLOWID                    = 0x43
839 856
 	IPV6_FLOWINFO_MASK             = 0xffffff0f
857
+	IPV6_FLOWLABEL_LEN             = 0x14
840 858
 	IPV6_FLOWLABEL_MASK            = 0xffff0f00
841 859
 	IPV6_FLOWTYPE                  = 0x44
842 860
 	IPV6_FRAGTTL                   = 0x78
@@ -857,13 +875,13 @@ const (
857 875
 	IPV6_MAX_GROUP_SRC_FILTER      = 0x200
858 876
 	IPV6_MAX_MEMBERSHIPS           = 0xfff
859 877
 	IPV6_MAX_SOCK_SRC_FILTER       = 0x80
860
-	IPV6_MIN_MEMBERSHIPS           = 0x1f
861 878
 	IPV6_MMTU                      = 0x500
862 879
 	IPV6_MSFILTER                  = 0x4a
863 880
 	IPV6_MULTICAST_HOPS            = 0xa
864 881
 	IPV6_MULTICAST_IF              = 0x9
865 882
 	IPV6_MULTICAST_LOOP            = 0xb
866 883
 	IPV6_NEXTHOP                   = 0x30
884
+	IPV6_ORIGDSTADDR               = 0x48
867 885
 	IPV6_PATHMTU                   = 0x2c
868 886
 	IPV6_PKTINFO                   = 0x2e
869 887
 	IPV6_PORTRANGE                 = 0xe
@@ -875,6 +893,7 @@ const (
875 893
 	IPV6_RECVFLOWID                = 0x46
876 894
 	IPV6_RECVHOPLIMIT              = 0x25
877 895
 	IPV6_RECVHOPOPTS               = 0x27
896
+	IPV6_RECVORIGDSTADDR           = 0x48
878 897
 	IPV6_RECVPATHMTU               = 0x2b
879 898
 	IPV6_RECVPKTINFO               = 0x24
880 899
 	IPV6_RECVRSSBUCKETID           = 0x47
@@ -894,6 +913,7 @@ const (
894 913
 	IPV6_V6ONLY                    = 0x1b
895 914
 	IPV6_VERSION                   = 0x60
896 915
 	IPV6_VERSION_MASK              = 0xf0
916
+	IPV6_VLAN_PCP                  = 0x4b
897 917
 	IP_ADD_MEMBERSHIP              = 0xc
898 918
 	IP_ADD_SOURCE_MEMBERSHIP       = 0x46
899 919
 	IP_BINDANY                     = 0x18
@@ -935,10 +955,8 @@ const (
935 955
 	IP_MAX_MEMBERSHIPS             = 0xfff
936 956
 	IP_MAX_SOCK_MUTE_FILTER        = 0x80
937 957
 	IP_MAX_SOCK_SRC_FILTER         = 0x80
938
-	IP_MAX_SOURCE_FILTER           = 0x400
939 958
 	IP_MF                          = 0x2000
940 959
 	IP_MINTTL                      = 0x42
941
-	IP_MIN_MEMBERSHIPS             = 0x1f
942 960
 	IP_MSFILTER                    = 0x4a
943 961
 	IP_MSS                         = 0x240
944 962
 	IP_MULTICAST_IF                = 0x9
@@ -948,6 +966,7 @@ const (
948 966
 	IP_OFFMASK                     = 0x1fff
949 967
 	IP_ONESBCAST                   = 0x17
950 968
 	IP_OPTIONS                     = 0x1
969
+	IP_ORIGDSTADDR                 = 0x1b
951 970
 	IP_PORTRANGE                   = 0x13
952 971
 	IP_PORTRANGE_DEFAULT           = 0x0
953 972
 	IP_PORTRANGE_HIGH              = 0x1
@@ -956,6 +975,7 @@ const (
956 975
 	IP_RECVFLOWID                  = 0x5d
957 976
 	IP_RECVIF                      = 0x14
958 977
 	IP_RECVOPTS                    = 0x5
978
+	IP_RECVORIGDSTADDR             = 0x1b
959 979
 	IP_RECVRETOPTS                 = 0x6
960 980
 	IP_RECVRSSBUCKETID             = 0x5e
961 981
 	IP_RECVTOS                     = 0x44
@@ -972,8 +992,12 @@ const (
972 992
 	IP_TOS                         = 0x3
973 993
 	IP_TTL                         = 0x4
974 994
 	IP_UNBLOCK_SOURCE              = 0x49
995
+	IP_VLAN_PCP                    = 0x4b
975 996
 	ISIG                           = 0x80
976 997
 	ISTRIP                         = 0x20
998
+	ITIMER_PROF                    = 0x2
999
+	ITIMER_REAL                    = 0x0
1000
+	ITIMER_VIRTUAL                 = 0x1
977 1001
 	IXANY                          = 0x800
978 1002
 	IXOFF                          = 0x400
979 1003
 	IXON                           = 0x200
@@ -983,7 +1007,6 @@ const (
983 1007
 	KERN_VERSION                   = 0x4
984 1008
 	LOCAL_CONNWAIT                 = 0x4
985 1009
 	LOCAL_CREDS                    = 0x2
986
-	LOCAL_CREDS_PERSISTENT         = 0x3
987 1010
 	LOCAL_PEERCRED                 = 0x1
988 1011
 	LOCAL_VENDOR                   = 0x80000000
989 1012
 	LOCK_EX                        = 0x2
@@ -1071,10 +1094,12 @@ const (
1071 1094
 	MNT_SUSPEND                    = 0x4
1072 1095
 	MNT_SYNCHRONOUS                = 0x2
1073 1096
 	MNT_UNION                      = 0x20
1097
+	MNT_UNTRUSTED                  = 0x800000000
1074 1098
 	MNT_UPDATE                     = 0x10000
1075
-	MNT_UPDATEMASK                 = 0x2d8d0807e
1099
+	MNT_UPDATEMASK                 = 0xad8d0807e
1076 1100
 	MNT_USER                       = 0x8000
1077
-	MNT_VISFLAGMASK                = 0x3fef0ffff
1101
+	MNT_VERIFIED                   = 0x400000000
1102
+	MNT_VISFLAGMASK                = 0xffef0ffff
1078 1103
 	MNT_WAIT                       = 0x1
1079 1104
 	MSG_CMSG_CLOEXEC               = 0x40000
1080 1105
 	MSG_COMPAT                     = 0x8000
@@ -1103,6 +1128,7 @@ const (
1103 1128
 	NFDBITS                        = 0x20
1104 1129
 	NOFLSH                         = 0x80000000
1105 1130
 	NOKERNINFO                     = 0x2000000
1131
+	NOTE_ABSTIME                   = 0x10
1106 1132
 	NOTE_ATTRIB                    = 0x8
1107 1133
 	NOTE_CHILD                     = 0x4
1108 1134
 	NOTE_CLOSE                     = 0x100
@@ -1159,6 +1185,8 @@ const (
1159 1185
 	O_NONBLOCK                     = 0x4
1160 1186
 	O_RDONLY                       = 0x0
1161 1187
 	O_RDWR                         = 0x2
1188
+	O_RESOLVE_BENEATH              = 0x800000
1189
+	O_SEARCH                       = 0x40000
1162 1190
 	O_SHLOCK                       = 0x10
1163 1191
 	O_SYNC                         = 0x80
1164 1192
 	O_TRUNC                        = 0x400
@@ -1169,6 +1197,10 @@ const (
1169 1197
 	PARMRK                         = 0x8
1170 1198
 	PARODD                         = 0x2000
1171 1199
 	PENDIN                         = 0x20000000
1200
+	PIOD_READ_D                    = 0x1
1201
+	PIOD_READ_I                    = 0x3
1202
+	PIOD_WRITE_D                   = 0x2
1203
+	PIOD_WRITE_I                   = 0x4
1172 1204
 	PRIO_PGRP                      = 0x1
1173 1205
 	PRIO_PROCESS                   = 0x0
1174 1206
 	PRIO_USER                      = 0x2
@@ -1176,6 +1208,53 @@ const (
1176 1208
 	PROT_NONE                      = 0x0
1177 1209
 	PROT_READ                      = 0x1
1178 1210
 	PROT_WRITE                     = 0x2
1211
+	PTRACE_DEFAULT                 = 0x1
1212
+	PTRACE_EXEC                    = 0x1
1213
+	PTRACE_FORK                    = 0x8
1214
+	PTRACE_LWP                     = 0x10
1215
+	PTRACE_SCE                     = 0x2
1216
+	PTRACE_SCX                     = 0x4
1217
+	PTRACE_SYSCALL                 = 0x6
1218
+	PTRACE_VFORK                   = 0x20
1219
+	PT_ATTACH                      = 0xa
1220
+	PT_CLEARSTEP                   = 0x10
1221
+	PT_CONTINUE                    = 0x7
1222
+	PT_DETACH                      = 0xb
1223
+	PT_FIRSTMACH                   = 0x40
1224
+	PT_FOLLOW_FORK                 = 0x17
1225
+	PT_GETDBREGS                   = 0x25
1226
+	PT_GETFPREGS                   = 0x23
1227
+	PT_GETLWPLIST                  = 0xf
1228
+	PT_GETNUMLWPS                  = 0xe
1229
+	PT_GETREGS                     = 0x21
1230
+	PT_GETVFPREGS                  = 0x40
1231
+	PT_GET_EVENT_MASK              = 0x19
1232
+	PT_GET_SC_ARGS                 = 0x1b
1233
+	PT_GET_SC_RET                  = 0x1c
1234
+	PT_IO                          = 0xc
1235
+	PT_KILL                        = 0x8
1236
+	PT_LWPINFO                     = 0xd
1237
+	PT_LWP_EVENTS                  = 0x18
1238
+	PT_READ_D                      = 0x2
1239
+	PT_READ_I                      = 0x1
1240
+	PT_RESUME                      = 0x13
1241
+	PT_SETDBREGS                   = 0x26
1242
+	PT_SETFPREGS                   = 0x24
1243
+	PT_SETREGS                     = 0x22
1244
+	PT_SETSTEP                     = 0x11
1245
+	PT_SETVFPREGS                  = 0x41
1246
+	PT_SET_EVENT_MASK              = 0x1a
1247
+	PT_STEP                        = 0x9
1248
+	PT_SUSPEND                     = 0x12
1249
+	PT_SYSCALL                     = 0x16
1250
+	PT_TO_SCE                      = 0x14
1251
+	PT_TO_SCX                      = 0x15
1252
+	PT_TRACE_ME                    = 0x0
1253
+	PT_VM_ENTRY                    = 0x29
1254
+	PT_VM_TIMESTAMP                = 0x28
1255
+	PT_WRITE_D                     = 0x5
1256
+	PT_WRITE_I                     = 0x4
1257
+	P_ZONEID                       = 0xc
1179 1258
 	RLIMIT_AS                      = 0xa
1180 1259
 	RLIMIT_CORE                    = 0x4
1181 1260
 	RLIMIT_CPU                     = 0x0
@@ -1257,7 +1336,6 @@ const (
1257 1336
 	RTV_WEIGHT                     = 0x100
1258 1337
 	RT_ALL_FIBS                    = -0x1
1259 1338
 	RT_BLACKHOLE                   = 0x40
1260
-	RT_CACHING_CONTEXT             = 0x1
1261 1339
 	RT_DEFAULT_FIB                 = 0x0
1262 1340
 	RT_HAS_GW                      = 0x80
1263 1341
 	RT_HAS_HEADER                  = 0x10
@@ -1267,15 +1345,22 @@ const (
1267 1345
 	RT_LLE_CACHE                   = 0x100
1268 1346
 	RT_MAY_LOOP                    = 0x8
1269 1347
 	RT_MAY_LOOP_BIT                = 0x3
1270
-	RT_NORTREF                     = 0x2
1271 1348
 	RT_REJECT                      = 0x20
1272 1349
 	RUSAGE_CHILDREN                = -0x1
1273 1350
 	RUSAGE_SELF                    = 0x0
1274 1351
 	RUSAGE_THREAD                  = 0x1
1275 1352
 	SCM_BINTIME                    = 0x4
1276 1353
 	SCM_CREDS                      = 0x3
1354
+	SCM_MONOTONIC                  = 0x6
1355
+	SCM_REALTIME                   = 0x5
1277 1356
 	SCM_RIGHTS                     = 0x1
1278 1357
 	SCM_TIMESTAMP                  = 0x2
1358
+	SCM_TIME_INFO                  = 0x7
1359
+	SEEK_CUR                       = 0x1
1360
+	SEEK_DATA                      = 0x3
1361
+	SEEK_END                       = 0x2
1362
+	SEEK_HOLE                      = 0x4
1363
+	SEEK_SET                       = 0x0
1279 1364
 	SHUT_RD                        = 0x0
1280 1365
 	SHUT_RDWR                      = 0x2
1281 1366
 	SHUT_WR                        = 0x1
@@ -1294,10 +1379,12 @@ const (
1294 1379
 	SIOCGHWADDR                    = 0xc020693e
1295 1380
 	SIOCGI2C                       = 0xc020693d
1296 1381
 	SIOCGIFADDR                    = 0xc0206921
1382
+	SIOCGIFALIAS                   = 0xc044692d
1297 1383
 	SIOCGIFBRDADDR                 = 0xc0206923
1298 1384
 	SIOCGIFCAP                     = 0xc020691f
1299 1385
 	SIOCGIFCONF                    = 0xc0086924
1300 1386
 	SIOCGIFDESCR                   = 0xc020692a
1387
+	SIOCGIFDOWNREASON              = 0xc058699a
1301 1388
 	SIOCGIFDSTADDR                 = 0xc0206922
1302 1389
 	SIOCGIFFIB                     = 0xc020695c
1303 1390
 	SIOCGIFFLAGS                   = 0xc0206911
@@ -1313,8 +1400,11 @@ const (
1313 1400
 	SIOCGIFPDSTADDR                = 0xc0206948
1314 1401
 	SIOCGIFPHYS                    = 0xc0206935
1315 1402
 	SIOCGIFPSRCADDR                = 0xc0206947
1403
+	SIOCGIFRSSHASH                 = 0xc0186997
1404
+	SIOCGIFRSSKEY                  = 0xc0946996
1316 1405
 	SIOCGIFSTATUS                  = 0xc331693b
1317 1406
 	SIOCGIFXMEDIA                  = 0xc028698b
1407
+	SIOCGLANPCP                    = 0xc0206998
1318 1408
 	SIOCGLOWAT                     = 0x40047303
1319 1409
 	SIOCGPGRP                      = 0x40047309
1320 1410
 	SIOCGPRIVATE_0                 = 0xc0206950
@@ -1345,6 +1435,7 @@ const (
1345 1435
 	SIOCSIFPHYS                    = 0x80206936
1346 1436
 	SIOCSIFRVNET                   = 0xc020695b
1347 1437
 	SIOCSIFVNET                    = 0xc020695a
1438
+	SIOCSLANPCP                    = 0x80206999
1348 1439
 	SIOCSLOWAT                     = 0x80047302
1349 1440
 	SIOCSPGRP                      = 0x80047308
1350 1441
 	SIOCSTUNFIB                    = 0x8020695f
@@ -1364,6 +1455,7 @@ const (
1364 1455
 	SO_BINTIME                     = 0x2000
1365 1456
 	SO_BROADCAST                   = 0x20
1366 1457
 	SO_DEBUG                       = 0x1
1458
+	SO_DOMAIN                      = 0x1019
1367 1459
 	SO_DONTROUTE                   = 0x10
1368 1460
 	SO_ERROR                       = 0x1007
1369 1461
 	SO_KEEPALIVE                   = 0x8
@@ -1372,6 +1464,7 @@ const (
1372 1464
 	SO_LISTENINCQLEN               = 0x1013
1373 1465
 	SO_LISTENQLEN                  = 0x1012
1374 1466
 	SO_LISTENQLIMIT                = 0x1011
1467
+	SO_MAX_PACING_RATE             = 0x1018
1375 1468
 	SO_NOSIGPIPE                   = 0x800
1376 1469
 	SO_NO_DDP                      = 0x8000
1377 1470
 	SO_NO_OFFLOAD                  = 0x4000
@@ -1382,13 +1475,22 @@ const (
1382 1475
 	SO_RCVBUF                      = 0x1002
1383 1476
 	SO_RCVLOWAT                    = 0x1004
1384 1477
 	SO_RCVTIMEO                    = 0x1006
1478
+	SO_RERROR                      = 0x20000
1385 1479
 	SO_REUSEADDR                   = 0x4
1386 1480
 	SO_REUSEPORT                   = 0x200
1481
+	SO_REUSEPORT_LB                = 0x10000
1387 1482
 	SO_SETFIB                      = 0x1014
1388 1483
 	SO_SNDBUF                      = 0x1001
1389 1484
 	SO_SNDLOWAT                    = 0x1003
1390 1485
 	SO_SNDTIMEO                    = 0x1005
1391 1486
 	SO_TIMESTAMP                   = 0x400
1487
+	SO_TS_BINTIME                  = 0x1
1488
+	SO_TS_CLOCK                    = 0x1017
1489
+	SO_TS_CLOCK_MAX                = 0x3
1490
+	SO_TS_DEFAULT                  = 0x0
1491
+	SO_TS_MONOTONIC                = 0x3
1492
+	SO_TS_REALTIME                 = 0x2
1493
+	SO_TS_REALTIME_MICRO           = 0x0
1392 1494
 	SO_TYPE                        = 0x1008
1393 1495
 	SO_USELOOPBACK                 = 0x40
1394 1496
 	SO_USER_COOKIE                 = 0x1015
@@ -1432,10 +1534,69 @@ const (
1432 1534
 	TCOFLUSH                       = 0x2
1433 1535
 	TCOOFF                         = 0x1
1434 1536
 	TCOON                          = 0x2
1537
+	TCPOPT_EOL                     = 0x0
1538
+	TCPOPT_FAST_OPEN               = 0x22
1539
+	TCPOPT_MAXSEG                  = 0x2
1540
+	TCPOPT_NOP                     = 0x1
1541
+	TCPOPT_PAD                     = 0x0
1542
+	TCPOPT_SACK                    = 0x5
1543
+	TCPOPT_SACK_PERMITTED          = 0x4
1544
+	TCPOPT_SIGNATURE               = 0x13
1545
+	TCPOPT_TIMESTAMP               = 0x8
1546
+	TCPOPT_WINDOW                  = 0x3
1547
+	TCP_BBR_ACK_COMP_ALG           = 0x448
1548
+	TCP_BBR_ALGORITHM              = 0x43b
1549
+	TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
1550
+	TCP_BBR_DRAIN_PG               = 0x42e
1551
+	TCP_BBR_EXTRA_GAIN             = 0x449
1552
+	TCP_BBR_EXTRA_STATE            = 0x453
1553
+	TCP_BBR_FLOOR_MIN_TSO          = 0x454
1554
+	TCP_BBR_HDWR_PACE              = 0x451
1555
+	TCP_BBR_HOLD_TARGET            = 0x436
1556
+	TCP_BBR_IWINTSO                = 0x42b
1557
+	TCP_BBR_LOWGAIN_FD             = 0x436
1558
+	TCP_BBR_LOWGAIN_HALF           = 0x435
1559
+	TCP_BBR_LOWGAIN_THRESH         = 0x434
1560
+	TCP_BBR_MAX_RTO                = 0x439
1561
+	TCP_BBR_MIN_RTO                = 0x438
1562
+	TCP_BBR_MIN_TOPACEOUT          = 0x455
1563
+	TCP_BBR_ONE_RETRAN             = 0x431
1564
+	TCP_BBR_PACE_CROSS             = 0x442
1565
+	TCP_BBR_PACE_DEL_TAR           = 0x43f
1566
+	TCP_BBR_PACE_OH                = 0x435
1567
+	TCP_BBR_PACE_PER_SEC           = 0x43e
1568
+	TCP_BBR_PACE_SEG_MAX           = 0x440
1569
+	TCP_BBR_PACE_SEG_MIN           = 0x441
1570
+	TCP_BBR_POLICER_DETECT         = 0x457
1571
+	TCP_BBR_PROBE_RTT_GAIN         = 0x44d
1572
+	TCP_BBR_PROBE_RTT_INT          = 0x430
1573
+	TCP_BBR_PROBE_RTT_LEN          = 0x44e
1574
+	TCP_BBR_RACK_RTT_USE           = 0x44a
1575
+	TCP_BBR_RECFORCE               = 0x42c
1576
+	TCP_BBR_REC_OVER_HPTS          = 0x43a
1577
+	TCP_BBR_RETRAN_WTSO            = 0x44b
1578
+	TCP_BBR_RWND_IS_APP            = 0x42f
1579
+	TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
1580
+	TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
1581
+	TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
1582
+	TCP_BBR_STARTUP_PG             = 0x42d
1583
+	TCP_BBR_TMR_PACE_OH            = 0x448
1584
+	TCP_BBR_TSLIMITS               = 0x434
1585
+	TCP_BBR_TSTMP_RAISES           = 0x456
1586
+	TCP_BBR_UNLIMITED              = 0x43b
1587
+	TCP_BBR_USEDEL_RATE            = 0x437
1588
+	TCP_BBR_USE_LOWGAIN            = 0x433
1589
+	TCP_BBR_USE_RACK_CHEAT         = 0x450
1590
+	TCP_BBR_UTTER_MAX_TSO          = 0x452
1435 1591
 	TCP_CA_NAME_MAX                = 0x10
1436 1592
 	TCP_CCALGOOPT                  = 0x41
1437 1593
 	TCP_CONGESTION                 = 0x40
1594
+	TCP_DATA_AFTER_CLOSE           = 0x44c
1595
+	TCP_DELACK                     = 0x48
1438 1596
 	TCP_FASTOPEN                   = 0x401
1597
+	TCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10
1598
+	TCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4
1599
+	TCP_FASTOPEN_PSK_LEN           = 0x10
1439 1600
 	TCP_FUNCTION_BLK               = 0x2000
1440 1601
 	TCP_FUNCTION_NAME_LEN_MAX      = 0x20
1441 1602
 	TCP_INFO                       = 0x20
@@ -1443,6 +1604,12 @@ const (
1443 1604
 	TCP_KEEPIDLE                   = 0x100
1444 1605
 	TCP_KEEPINIT                   = 0x80
1445 1606
 	TCP_KEEPINTVL                  = 0x200
1607
+	TCP_LOG                        = 0x22
1608
+	TCP_LOGBUF                     = 0x23
1609
+	TCP_LOGDUMP                    = 0x25
1610
+	TCP_LOGDUMPID                  = 0x26
1611
+	TCP_LOGID                      = 0x24
1612
+	TCP_LOG_ID_LEN                 = 0x40
1446 1613
 	TCP_MAXBURST                   = 0x4
1447 1614
 	TCP_MAXHLEN                    = 0x3c
1448 1615
 	TCP_MAXOLEN                    = 0x28
@@ -1458,8 +1625,30 @@ const (
1458 1625
 	TCP_NOPUSH                     = 0x4
1459 1626
 	TCP_PCAP_IN                    = 0x1000
1460 1627
 	TCP_PCAP_OUT                   = 0x800
1628
+	TCP_RACK_EARLY_RECOV           = 0x423
1629
+	TCP_RACK_EARLY_SEG             = 0x424
1630
+	TCP_RACK_GP_INCREASE           = 0x446
1631
+	TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
1632
+	TCP_RACK_MIN_PACE              = 0x445
1633
+	TCP_RACK_MIN_PACE_SEG          = 0x446
1634
+	TCP_RACK_MIN_TO                = 0x422
1635
+	TCP_RACK_PACE_ALWAYS           = 0x41f
1636
+	TCP_RACK_PACE_MAX_SEG          = 0x41e
1637
+	TCP_RACK_PACE_REDUCE           = 0x41d
1638
+	TCP_RACK_PKT_DELAY             = 0x428
1639
+	TCP_RACK_PROP                  = 0x41b
1640
+	TCP_RACK_PROP_RATE             = 0x420
1641
+	TCP_RACK_PRR_SENDALOT          = 0x421
1642
+	TCP_RACK_REORD_FADE            = 0x426
1643
+	TCP_RACK_REORD_THRESH          = 0x425
1644
+	TCP_RACK_TLP_INC_VAR           = 0x429
1645
+	TCP_RACK_TLP_REDUCE            = 0x41c
1646
+	TCP_RACK_TLP_THRESH            = 0x427
1647
+	TCP_RACK_TLP_USE               = 0x447
1461 1648
 	TCP_VENDOR                     = 0x80000000
1462 1649
 	TCSAFLUSH                      = 0x2
1650
+	TIMER_ABSTIME                  = 0x1
1651
+	TIMER_RELTIME                  = 0x0
1463 1652
 	TIOCCBRK                       = 0x2000747a
1464 1653
 	TIOCCDTR                       = 0x20007478
1465 1654
 	TIOCCONS                       = 0x80047462
@@ -1523,6 +1712,8 @@ const (
1523 1712
 	TIOCTIMESTAMP                  = 0x40107459
1524 1713
 	TIOCUCNTL                      = 0x80047466
1525 1714
 	TOSTOP                         = 0x400000
1715
+	UTIME_NOW                      = -0x1
1716
+	UTIME_OMIT                     = -0x2
1526 1717
 	VDISCARD                       = 0xf
1527 1718
 	VDSUSP                         = 0xb
1528 1719
 	VEOF                           = 0x0
@@ -1587,12 +1778,13 @@ const (
1587 1778
 	EIDRM           = syscall.Errno(0x52)
1588 1779
 	EILSEQ          = syscall.Errno(0x56)
1589 1780
 	EINPROGRESS     = syscall.Errno(0x24)
1781
+	EINTEGRITY      = syscall.Errno(0x61)
1590 1782
 	EINTR           = syscall.Errno(0x4)
1591 1783
 	EINVAL          = syscall.Errno(0x16)
1592 1784
 	EIO             = syscall.Errno(0x5)
1593 1785
 	EISCONN         = syscall.Errno(0x38)
1594 1786
 	EISDIR          = syscall.Errno(0x15)
1595
-	ELAST           = syscall.Errno(0x60)
1787
+	ELAST           = syscall.Errno(0x61)
1596 1788
 	ELOOP           = syscall.Errno(0x3e)
1597 1789
 	EMFILE          = syscall.Errno(0x18)
1598 1790
 	EMLINK          = syscall.Errno(0x1f)
@@ -1735,7 +1927,7 @@ var errorList = [...]struct {
1735 1927
 	{32, "EPIPE", "broken pipe"},
1736 1928
 	{33, "EDOM", "numerical argument out of domain"},
1737 1929
 	{34, "ERANGE", "result too large"},
1738
-	{35, "EAGAIN", "resource temporarily unavailable"},
1930
+	{35, "EWOULDBLOCK", "resource temporarily unavailable"},
1739 1931
 	{36, "EINPROGRESS", "operation now in progress"},
1740 1932
 	{37, "EALREADY", "operation already in progress"},
1741 1933
 	{38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1797,6 +1989,7 @@ var errorList = [...]struct {
1797 1989
 	{94, "ECAPMODE", "not permitted in capability mode"},
1798 1990
 	{95, "ENOTRECOVERABLE", "state not recoverable"},
1799 1991
 	{96, "EOWNERDEAD", "previous owner died"},
1992
+	{97, "EINTEGRITY", "integrity check failed"},
1800 1993
 }
1801 1994
 
1802 1995
 // Signal table

+ 98
- 7
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go View File

@@ -151,6 +151,7 @@ const (
151 151
 	BIOCSETF                       = 0x80104267
152 152
 	BIOCSETFNR                     = 0x80104282
153 153
 	BIOCSETIF                      = 0x8020426c
154
+	BIOCSETVLANPCP                 = 0x80044285
154 155
 	BIOCSETWF                      = 0x8010427b
155 156
 	BIOCSETZBUF                    = 0x80184281
156 157
 	BIOCSHDRCMPLT                  = 0x80044275
@@ -447,7 +448,7 @@ const (
447 448
 	DLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1
448 449
 	DLT_INFINIBAND                 = 0xf7
449 450
 	DLT_IPFILTER                   = 0x74
450
-	DLT_IPMB                       = 0xc7
451
+	DLT_IPMB_KONTRON               = 0xc7
451 452
 	DLT_IPMB_LINUX                 = 0xd1
452 453
 	DLT_IPMI_HPM_2                 = 0x104
453 454
 	DLT_IPNET                      = 0xe2
@@ -487,10 +488,11 @@ const (
487 488
 	DLT_LINUX_LAPD                 = 0xb1
488 489
 	DLT_LINUX_PPP_WITHDIRECTION    = 0xa6
489 490
 	DLT_LINUX_SLL                  = 0x71
491
+	DLT_LINUX_SLL2                 = 0x114
490 492
 	DLT_LOOP                       = 0x6c
491 493
 	DLT_LORATAP                    = 0x10e
492 494
 	DLT_LTALK                      = 0x72
493
-	DLT_MATCHING_MAX               = 0x113
495
+	DLT_MATCHING_MAX               = 0x114
494 496
 	DLT_MATCHING_MIN               = 0x68
495 497
 	DLT_MFR                        = 0xb6
496 498
 	DLT_MOST                       = 0xd3
@@ -734,6 +736,7 @@ const (
734 736
 	IPPROTO_CMTP                   = 0x26
735 737
 	IPPROTO_CPHB                   = 0x49
736 738
 	IPPROTO_CPNX                   = 0x48
739
+	IPPROTO_DCCP                   = 0x21
737 740
 	IPPROTO_DDP                    = 0x25
738 741
 	IPPROTO_DGP                    = 0x56
739 742
 	IPPROTO_DIVERT                 = 0x102
@@ -814,7 +817,6 @@ const (
814 817
 	IPPROTO_SCTP                   = 0x84
815 818
 	IPPROTO_SDRP                   = 0x2a
816 819
 	IPPROTO_SEND                   = 0x103
817
-	IPPROTO_SEP                    = 0x21
818 820
 	IPPROTO_SHIM6                  = 0x8c
819 821
 	IPPROTO_SKIP                   = 0x39
820 822
 	IPPROTO_SPACER                 = 0x7fff
@@ -911,6 +913,7 @@ const (
911 913
 	IPV6_V6ONLY                    = 0x1b
912 914
 	IPV6_VERSION                   = 0x60
913 915
 	IPV6_VERSION_MASK              = 0xf0
916
+	IPV6_VLAN_PCP                  = 0x4b
914 917
 	IP_ADD_MEMBERSHIP              = 0xc
915 918
 	IP_ADD_SOURCE_MEMBERSHIP       = 0x46
916 919
 	IP_BINDANY                     = 0x18
@@ -989,8 +992,12 @@ const (
989 992
 	IP_TOS                         = 0x3
990 993
 	IP_TTL                         = 0x4
991 994
 	IP_UNBLOCK_SOURCE              = 0x49
995
+	IP_VLAN_PCP                    = 0x4b
992 996
 	ISIG                           = 0x80
993 997
 	ISTRIP                         = 0x20
998
+	ITIMER_PROF                    = 0x2
999
+	ITIMER_REAL                    = 0x0
1000
+	ITIMER_VIRTUAL                 = 0x1
994 1001
 	IXANY                          = 0x800
995 1002
 	IXOFF                          = 0x400
996 1003
 	IXON                           = 0x200
@@ -1000,7 +1007,6 @@ const (
1000 1007
 	KERN_VERSION                   = 0x4
1001 1008
 	LOCAL_CONNWAIT                 = 0x4
1002 1009
 	LOCAL_CREDS                    = 0x2
1003
-	LOCAL_CREDS_PERSISTENT         = 0x3
1004 1010
 	LOCAL_PEERCRED                 = 0x1
1005 1011
 	LOCAL_VENDOR                   = 0x80000000
1006 1012
 	LOCK_EX                        = 0x2
@@ -1180,6 +1186,8 @@ const (
1180 1186
 	O_NONBLOCK                     = 0x4
1181 1187
 	O_RDONLY                       = 0x0
1182 1188
 	O_RDWR                         = 0x2
1189
+	O_RESOLVE_BENEATH              = 0x800000
1190
+	O_SEARCH                       = 0x40000
1183 1191
 	O_SHLOCK                       = 0x10
1184 1192
 	O_SYNC                         = 0x80
1185 1193
 	O_TRUNC                        = 0x400
@@ -1190,6 +1198,10 @@ const (
1190 1198
 	PARMRK                         = 0x8
1191 1199
 	PARODD                         = 0x2000
1192 1200
 	PENDIN                         = 0x20000000
1201
+	PIOD_READ_D                    = 0x1
1202
+	PIOD_READ_I                    = 0x3
1203
+	PIOD_WRITE_D                   = 0x2
1204
+	PIOD_WRITE_I                   = 0x4
1193 1205
 	PRIO_PGRP                      = 0x1
1194 1206
 	PRIO_PROCESS                   = 0x0
1195 1207
 	PRIO_USER                      = 0x2
@@ -1197,6 +1209,51 @@ const (
1197 1209
 	PROT_NONE                      = 0x0
1198 1210
 	PROT_READ                      = 0x1
1199 1211
 	PROT_WRITE                     = 0x2
1212
+	PTRACE_DEFAULT                 = 0x1
1213
+	PTRACE_EXEC                    = 0x1
1214
+	PTRACE_FORK                    = 0x8
1215
+	PTRACE_LWP                     = 0x10
1216
+	PTRACE_SCE                     = 0x2
1217
+	PTRACE_SCX                     = 0x4
1218
+	PTRACE_SYSCALL                 = 0x6
1219
+	PTRACE_VFORK                   = 0x20
1220
+	PT_ATTACH                      = 0xa
1221
+	PT_CLEARSTEP                   = 0x10
1222
+	PT_CONTINUE                    = 0x7
1223
+	PT_DETACH                      = 0xb
1224
+	PT_FIRSTMACH                   = 0x40
1225
+	PT_FOLLOW_FORK                 = 0x17
1226
+	PT_GETDBREGS                   = 0x25
1227
+	PT_GETFPREGS                   = 0x23
1228
+	PT_GETLWPLIST                  = 0xf
1229
+	PT_GETNUMLWPS                  = 0xe
1230
+	PT_GETREGS                     = 0x21
1231
+	PT_GET_EVENT_MASK              = 0x19
1232
+	PT_GET_SC_ARGS                 = 0x1b
1233
+	PT_GET_SC_RET                  = 0x1c
1234
+	PT_IO                          = 0xc
1235
+	PT_KILL                        = 0x8
1236
+	PT_LWPINFO                     = 0xd
1237
+	PT_LWP_EVENTS                  = 0x18
1238
+	PT_READ_D                      = 0x2
1239
+	PT_READ_I                      = 0x1
1240
+	PT_RESUME                      = 0x13
1241
+	PT_SETDBREGS                   = 0x26
1242
+	PT_SETFPREGS                   = 0x24
1243
+	PT_SETREGS                     = 0x22
1244
+	PT_SETSTEP                     = 0x11
1245
+	PT_SET_EVENT_MASK              = 0x1a
1246
+	PT_STEP                        = 0x9
1247
+	PT_SUSPEND                     = 0x12
1248
+	PT_SYSCALL                     = 0x16
1249
+	PT_TO_SCE                      = 0x14
1250
+	PT_TO_SCX                      = 0x15
1251
+	PT_TRACE_ME                    = 0x0
1252
+	PT_VM_ENTRY                    = 0x29
1253
+	PT_VM_TIMESTAMP                = 0x28
1254
+	PT_WRITE_D                     = 0x5
1255
+	PT_WRITE_I                     = 0x4
1256
+	P_ZONEID                       = 0xc
1200 1257
 	RLIMIT_AS                      = 0xa
1201 1258
 	RLIMIT_CORE                    = 0x4
1202 1259
 	RLIMIT_CPU                     = 0x0
@@ -1298,6 +1355,11 @@ const (
1298 1355
 	SCM_RIGHTS                     = 0x1
1299 1356
 	SCM_TIMESTAMP                  = 0x2
1300 1357
 	SCM_TIME_INFO                  = 0x7
1358
+	SEEK_CUR                       = 0x1
1359
+	SEEK_DATA                      = 0x3
1360
+	SEEK_END                       = 0x2
1361
+	SEEK_HOLE                      = 0x4
1362
+	SEEK_SET                       = 0x0
1301 1363
 	SHUT_RD                        = 0x0
1302 1364
 	SHUT_RDWR                      = 0x2
1303 1365
 	SHUT_WR                        = 0x1
@@ -1316,10 +1378,12 @@ const (
1316 1378
 	SIOCGHWADDR                    = 0xc020693e
1317 1379
 	SIOCGI2C                       = 0xc020693d
1318 1380
 	SIOCGIFADDR                    = 0xc0206921
1381
+	SIOCGIFALIAS                   = 0xc044692d
1319 1382
 	SIOCGIFBRDADDR                 = 0xc0206923
1320 1383
 	SIOCGIFCAP                     = 0xc020691f
1321 1384
 	SIOCGIFCONF                    = 0xc0106924
1322 1385
 	SIOCGIFDESCR                   = 0xc020692a
1386
+	SIOCGIFDOWNREASON              = 0xc058699a
1323 1387
 	SIOCGIFDSTADDR                 = 0xc0206922
1324 1388
 	SIOCGIFFIB                     = 0xc020695c
1325 1389
 	SIOCGIFFLAGS                   = 0xc0206911
@@ -1410,6 +1474,7 @@ const (
1410 1474
 	SO_RCVBUF                      = 0x1002
1411 1475
 	SO_RCVLOWAT                    = 0x1004
1412 1476
 	SO_RCVTIMEO                    = 0x1006
1477
+	SO_RERROR                      = 0x20000
1413 1478
 	SO_REUSEADDR                   = 0x4
1414 1479
 	SO_REUSEPORT                   = 0x200
1415 1480
 	SO_REUSEPORT_LB                = 0x10000
@@ -1468,22 +1533,40 @@ const (
1468 1533
 	TCOFLUSH                       = 0x2
1469 1534
 	TCOOFF                         = 0x1
1470 1535
 	TCOON                          = 0x2
1536
+	TCPOPT_EOL                     = 0x0
1537
+	TCPOPT_FAST_OPEN               = 0x22
1538
+	TCPOPT_MAXSEG                  = 0x2
1539
+	TCPOPT_NOP                     = 0x1
1540
+	TCPOPT_PAD                     = 0x0
1541
+	TCPOPT_SACK                    = 0x5
1542
+	TCPOPT_SACK_PERMITTED          = 0x4
1543
+	TCPOPT_SIGNATURE               = 0x13
1544
+	TCPOPT_TIMESTAMP               = 0x8
1545
+	TCPOPT_WINDOW                  = 0x3
1471 1546
 	TCP_BBR_ACK_COMP_ALG           = 0x448
1547
+	TCP_BBR_ALGORITHM              = 0x43b
1472 1548
 	TCP_BBR_DRAIN_INC_EXTRA        = 0x43c
1473 1549
 	TCP_BBR_DRAIN_PG               = 0x42e
1474 1550
 	TCP_BBR_EXTRA_GAIN             = 0x449
1551
+	TCP_BBR_EXTRA_STATE            = 0x453
1552
+	TCP_BBR_FLOOR_MIN_TSO          = 0x454
1553
+	TCP_BBR_HDWR_PACE              = 0x451
1554
+	TCP_BBR_HOLD_TARGET            = 0x436
1475 1555
 	TCP_BBR_IWINTSO                = 0x42b
1476 1556
 	TCP_BBR_LOWGAIN_FD             = 0x436
1477 1557
 	TCP_BBR_LOWGAIN_HALF           = 0x435
1478 1558
 	TCP_BBR_LOWGAIN_THRESH         = 0x434
1479 1559
 	TCP_BBR_MAX_RTO                = 0x439
1480 1560
 	TCP_BBR_MIN_RTO                = 0x438
1561
+	TCP_BBR_MIN_TOPACEOUT          = 0x455
1481 1562
 	TCP_BBR_ONE_RETRAN             = 0x431
1482 1563
 	TCP_BBR_PACE_CROSS             = 0x442
1483 1564
 	TCP_BBR_PACE_DEL_TAR           = 0x43f
1565
+	TCP_BBR_PACE_OH                = 0x435
1484 1566
 	TCP_BBR_PACE_PER_SEC           = 0x43e
1485 1567
 	TCP_BBR_PACE_SEG_MAX           = 0x440
1486 1568
 	TCP_BBR_PACE_SEG_MIN           = 0x441
1569
+	TCP_BBR_POLICER_DETECT         = 0x457
1487 1570
 	TCP_BBR_PROBE_RTT_GAIN         = 0x44d
1488 1571
 	TCP_BBR_PROBE_RTT_INT          = 0x430
1489 1572
 	TCP_BBR_PROBE_RTT_LEN          = 0x44e
@@ -1492,12 +1575,18 @@ const (
1492 1575
 	TCP_BBR_REC_OVER_HPTS          = 0x43a
1493 1576
 	TCP_BBR_RETRAN_WTSO            = 0x44b
1494 1577
 	TCP_BBR_RWND_IS_APP            = 0x42f
1578
+	TCP_BBR_SEND_IWND_IN_TSO       = 0x44f
1495 1579
 	TCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d
1496 1580
 	TCP_BBR_STARTUP_LOSS_EXIT      = 0x432
1497 1581
 	TCP_BBR_STARTUP_PG             = 0x42d
1582
+	TCP_BBR_TMR_PACE_OH            = 0x448
1583
+	TCP_BBR_TSLIMITS               = 0x434
1584
+	TCP_BBR_TSTMP_RAISES           = 0x456
1498 1585
 	TCP_BBR_UNLIMITED              = 0x43b
1499 1586
 	TCP_BBR_USEDEL_RATE            = 0x437
1500 1587
 	TCP_BBR_USE_LOWGAIN            = 0x433
1588
+	TCP_BBR_USE_RACK_CHEAT         = 0x450
1589
+	TCP_BBR_UTTER_MAX_TSO          = 0x452
1501 1590
 	TCP_CA_NAME_MAX                = 0x10
1502 1591
 	TCP_CCALGOOPT                  = 0x41
1503 1592
 	TCP_CONGESTION                 = 0x40
@@ -1537,6 +1626,7 @@ const (
1537 1626
 	TCP_PCAP_OUT                   = 0x800
1538 1627
 	TCP_RACK_EARLY_RECOV           = 0x423
1539 1628
 	TCP_RACK_EARLY_SEG             = 0x424
1629
+	TCP_RACK_GP_INCREASE           = 0x446
1540 1630
 	TCP_RACK_IDLE_REDUCE_HIGH      = 0x444
1541 1631
 	TCP_RACK_MIN_PACE              = 0x445
1542 1632
 	TCP_RACK_MIN_PACE_SEG          = 0x446
@@ -1550,7 +1640,6 @@ const (
1550 1640
 	TCP_RACK_PRR_SENDALOT          = 0x421
1551 1641
 	TCP_RACK_REORD_FADE            = 0x426
1552 1642
 	TCP_RACK_REORD_THRESH          = 0x425
1553
-	TCP_RACK_SESS_CWV              = 0x42a
1554 1643
 	TCP_RACK_TLP_INC_VAR           = 0x429
1555 1644
 	TCP_RACK_TLP_REDUCE            = 0x41c
1556 1645
 	TCP_RACK_TLP_THRESH            = 0x427
@@ -1689,12 +1778,13 @@ const (
1689 1778
 	EIDRM           = syscall.Errno(0x52)
1690 1779
 	EILSEQ          = syscall.Errno(0x56)
1691 1780
 	EINPROGRESS     = syscall.Errno(0x24)
1781
+	EINTEGRITY      = syscall.Errno(0x61)
1692 1782
 	EINTR           = syscall.Errno(0x4)
1693 1783
 	EINVAL          = syscall.Errno(0x16)
1694 1784
 	EIO             = syscall.Errno(0x5)
1695 1785
 	EISCONN         = syscall.Errno(0x38)
1696 1786
 	EISDIR          = syscall.Errno(0x15)
1697
-	ELAST           = syscall.Errno(0x60)
1787
+	ELAST           = syscall.Errno(0x61)
1698 1788
 	ELOOP           = syscall.Errno(0x3e)
1699 1789
 	EMFILE          = syscall.Errno(0x18)
1700 1790
 	EMLINK          = syscall.Errno(0x1f)
@@ -1837,7 +1927,7 @@ var errorList = [...]struct {
1837 1927
 	{32, "EPIPE", "broken pipe"},
1838 1928
 	{33, "EDOM", "numerical argument out of domain"},
1839 1929
 	{34, "ERANGE", "result too large"},
1840
-	{35, "EAGAIN", "resource temporarily unavailable"},
1930
+	{35, "EWOULDBLOCK", "resource temporarily unavailable"},
1841 1931
 	{36, "EINPROGRESS", "operation now in progress"},
1842 1932
 	{37, "EALREADY", "operation already in progress"},
1843 1933
 	{38, "ENOTSOCK", "socket operation on non-socket"},
@@ -1899,6 +1989,7 @@ var errorList = [...]struct {
1899 1989
 	{94, "ECAPMODE", "not permitted in capability mode"},
1900 1990
 	{95, "ENOTRECOVERABLE", "state not recoverable"},
1901 1991
 	{96, "EOWNERDEAD", "previous owner died"},
1992
+	{97, "EINTEGRITY", "integrity check failed"},
1902 1993
 }
1903 1994
 
1904 1995
 // Signal table

+ 2148
- 0
vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
File diff suppressed because it is too large
View File


+ 557
- 17
vendor/golang.org/x/sys/unix/zerrors_linux.go
File diff suppressed because it is too large
View File


+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_386.go View File

@@ -5,7 +5,7 @@
5 5
 // +build 386,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -147,6 +147,7 @@ const (
147 147
 	NS_GET_USERNS                    = 0xb701
148 148
 	OLCUC                            = 0x2
149 149
 	ONLCR                            = 0x4
150
+	OTPERASE                         = 0x400c4d19
150 151
 	OTPGETREGIONCOUNT                = 0x40044d0e
151 152
 	OTPGETREGIONINFO                 = 0x400c4d0f
152 153
 	OTPLOCK                          = 0x800c4d10
@@ -249,6 +250,8 @@ const (
249 250
 	RTC_EPOCH_SET                    = 0x4004700e
250 251
 	RTC_IRQP_READ                    = 0x8004700b
251 252
 	RTC_IRQP_SET                     = 0x4004700c
253
+	RTC_PARAM_GET                    = 0x40187013
254
+	RTC_PARAM_SET                    = 0x40187014
252 255
 	RTC_PIE_OFF                      = 0x7006
253 256
 	RTC_PIE_ON                       = 0x7005
254 257
 	RTC_PLL_GET                      = 0x801c7011
@@ -292,6 +295,7 @@ const (
292 295
 	SO_BPF_EXTENSIONS                = 0x30
293 296
 	SO_BROADCAST                     = 0x6
294 297
 	SO_BSDCOMPAT                     = 0xe
298
+	SO_BUF_LOCK                      = 0x48
295 299
 	SO_BUSY_POLL                     = 0x2e
296 300
 	SO_BUSY_POLL_BUDGET              = 0x46
297 301
 	SO_CNX_ADVICE                    = 0x35
@@ -308,6 +312,7 @@ const (
308 312
 	SO_MARK                          = 0x24
309 313
 	SO_MAX_PACING_RATE               = 0x2f
310 314
 	SO_MEMINFO                       = 0x37
315
+	SO_NETNS_COOKIE                  = 0x47
311 316
 	SO_NOFCS                         = 0x2b
312 317
 	SO_OOBINLINE                     = 0xa
313 318
 	SO_PASSCRED                      = 0x10
@@ -321,9 +326,11 @@ const (
321 326
 	SO_RCVBUF                        = 0x8
322 327
 	SO_RCVBUFFORCE                   = 0x21
323 328
 	SO_RCVLOWAT                      = 0x12
329
+	SO_RCVMARK                       = 0x4b
324 330
 	SO_RCVTIMEO                      = 0x14
325 331
 	SO_RCVTIMEO_NEW                  = 0x42
326 332
 	SO_RCVTIMEO_OLD                  = 0x14
333
+	SO_RESERVE_MEM                   = 0x49
327 334
 	SO_REUSEADDR                     = 0x2
328 335
 	SO_REUSEPORT                     = 0xf
329 336
 	SO_RXQ_OVFL                      = 0x28
@@ -344,6 +351,7 @@ const (
344 351
 	SO_TIMESTAMPNS_NEW               = 0x40
345 352
 	SO_TIMESTAMPNS_OLD               = 0x23
346 353
 	SO_TIMESTAMP_NEW                 = 0x3f
354
+	SO_TXREHASH                      = 0x4a
347 355
 	SO_TXTIME                        = 0x3d
348 356
 	SO_TYPE                          = 0x3
349 357
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go View File

@@ -5,7 +5,7 @@
5 5
 // +build amd64,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -147,6 +147,7 @@ const (
147 147
 	NS_GET_USERNS                    = 0xb701
148 148
 	OLCUC                            = 0x2
149 149
 	ONLCR                            = 0x4
150
+	OTPERASE                         = 0x400c4d19
150 151
 	OTPGETREGIONCOUNT                = 0x40044d0e
151 152
 	OTPGETREGIONINFO                 = 0x400c4d0f
152 153
 	OTPLOCK                          = 0x800c4d10
@@ -250,6 +251,8 @@ const (
250 251
 	RTC_EPOCH_SET                    = 0x4008700e
251 252
 	RTC_IRQP_READ                    = 0x8008700b
252 253
 	RTC_IRQP_SET                     = 0x4008700c
254
+	RTC_PARAM_GET                    = 0x40187013
255
+	RTC_PARAM_SET                    = 0x40187014
253 256
 	RTC_PIE_OFF                      = 0x7006
254 257
 	RTC_PIE_ON                       = 0x7005
255 258
 	RTC_PLL_GET                      = 0x80207011
@@ -293,6 +296,7 @@ const (
293 296
 	SO_BPF_EXTENSIONS                = 0x30
294 297
 	SO_BROADCAST                     = 0x6
295 298
 	SO_BSDCOMPAT                     = 0xe
299
+	SO_BUF_LOCK                      = 0x48
296 300
 	SO_BUSY_POLL                     = 0x2e
297 301
 	SO_BUSY_POLL_BUDGET              = 0x46
298 302
 	SO_CNX_ADVICE                    = 0x35
@@ -309,6 +313,7 @@ const (
309 313
 	SO_MARK                          = 0x24
310 314
 	SO_MAX_PACING_RATE               = 0x2f
311 315
 	SO_MEMINFO                       = 0x37
316
+	SO_NETNS_COOKIE                  = 0x47
312 317
 	SO_NOFCS                         = 0x2b
313 318
 	SO_OOBINLINE                     = 0xa
314 319
 	SO_PASSCRED                      = 0x10
@@ -322,9 +327,11 @@ const (
322 327
 	SO_RCVBUF                        = 0x8
323 328
 	SO_RCVBUFFORCE                   = 0x21
324 329
 	SO_RCVLOWAT                      = 0x12
330
+	SO_RCVMARK                       = 0x4b
325 331
 	SO_RCVTIMEO                      = 0x14
326 332
 	SO_RCVTIMEO_NEW                  = 0x42
327 333
 	SO_RCVTIMEO_OLD                  = 0x14
334
+	SO_RESERVE_MEM                   = 0x49
328 335
 	SO_REUSEADDR                     = 0x2
329 336
 	SO_REUSEPORT                     = 0xf
330 337
 	SO_RXQ_OVFL                      = 0x28
@@ -345,6 +352,7 @@ const (
345 352
 	SO_TIMESTAMPNS_NEW               = 0x40
346 353
 	SO_TIMESTAMPNS_OLD               = 0x23
347 354
 	SO_TIMESTAMP_NEW                 = 0x3f
355
+	SO_TXREHASH                      = 0x4a
348 356
 	SO_TXTIME                        = 0x3d
349 357
 	SO_TYPE                          = 0x3
350 358
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go View File

@@ -5,7 +5,7 @@
5 5
 // +build arm,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0xb701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x400c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x40044d0e
149 150
 	OTPGETREGIONINFO                 = 0x400c4d0f
150 151
 	OTPLOCK                          = 0x800c4d10
@@ -256,6 +257,8 @@ const (
256 257
 	RTC_EPOCH_SET                    = 0x4004700e
257 258
 	RTC_IRQP_READ                    = 0x8004700b
258 259
 	RTC_IRQP_SET                     = 0x4004700c
260
+	RTC_PARAM_GET                    = 0x40187013
261
+	RTC_PARAM_SET                    = 0x40187014
259 262
 	RTC_PIE_OFF                      = 0x7006
260 263
 	RTC_PIE_ON                       = 0x7005
261 264
 	RTC_PLL_GET                      = 0x801c7011
@@ -299,6 +302,7 @@ const (
299 302
 	SO_BPF_EXTENSIONS                = 0x30
300 303
 	SO_BROADCAST                     = 0x6
301 304
 	SO_BSDCOMPAT                     = 0xe
305
+	SO_BUF_LOCK                      = 0x48
302 306
 	SO_BUSY_POLL                     = 0x2e
303 307
 	SO_BUSY_POLL_BUDGET              = 0x46
304 308
 	SO_CNX_ADVICE                    = 0x35
@@ -315,6 +319,7 @@ const (
315 319
 	SO_MARK                          = 0x24
316 320
 	SO_MAX_PACING_RATE               = 0x2f
317 321
 	SO_MEMINFO                       = 0x37
322
+	SO_NETNS_COOKIE                  = 0x47
318 323
 	SO_NOFCS                         = 0x2b
319 324
 	SO_OOBINLINE                     = 0xa
320 325
 	SO_PASSCRED                      = 0x10
@@ -328,9 +333,11 @@ const (
328 333
 	SO_RCVBUF                        = 0x8
329 334
 	SO_RCVBUFFORCE                   = 0x21
330 335
 	SO_RCVLOWAT                      = 0x12
336
+	SO_RCVMARK                       = 0x4b
331 337
 	SO_RCVTIMEO                      = 0x14
332 338
 	SO_RCVTIMEO_NEW                  = 0x42
333 339
 	SO_RCVTIMEO_OLD                  = 0x14
340
+	SO_RESERVE_MEM                   = 0x49
334 341
 	SO_REUSEADDR                     = 0x2
335 342
 	SO_REUSEPORT                     = 0xf
336 343
 	SO_RXQ_OVFL                      = 0x28
@@ -351,6 +358,7 @@ const (
351 358
 	SO_TIMESTAMPNS_NEW               = 0x40
352 359
 	SO_TIMESTAMPNS_OLD               = 0x23
353 360
 	SO_TIMESTAMP_NEW                 = 0x3f
361
+	SO_TXREHASH                      = 0x4a
354 362
 	SO_TXTIME                        = 0x3d
355 363
 	SO_TYPE                          = 0x3
356 364
 	SO_WIFI_STATUS                   = 0x29

+ 10
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go View File

@@ -5,7 +5,7 @@
5 5
 // +build arm64,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -148,6 +148,7 @@ const (
148 148
 	NS_GET_USERNS                    = 0xb701
149 149
 	OLCUC                            = 0x2
150 150
 	ONLCR                            = 0x4
151
+	OTPERASE                         = 0x400c4d19
151 152
 	OTPGETREGIONCOUNT                = 0x40044d0e
152 153
 	OTPGETREGIONINFO                 = 0x400c4d0f
153 154
 	OTPLOCK                          = 0x800c4d10
@@ -246,6 +247,8 @@ const (
246 247
 	RTC_EPOCH_SET                    = 0x4008700e
247 248
 	RTC_IRQP_READ                    = 0x8008700b
248 249
 	RTC_IRQP_SET                     = 0x4008700c
250
+	RTC_PARAM_GET                    = 0x40187013
251
+	RTC_PARAM_SET                    = 0x40187014
249 252
 	RTC_PIE_OFF                      = 0x7006
250 253
 	RTC_PIE_ON                       = 0x7005
251 254
 	RTC_PLL_GET                      = 0x80207011
@@ -289,6 +292,7 @@ const (
289 292
 	SO_BPF_EXTENSIONS                = 0x30
290 293
 	SO_BROADCAST                     = 0x6
291 294
 	SO_BSDCOMPAT                     = 0xe
295
+	SO_BUF_LOCK                      = 0x48
292 296
 	SO_BUSY_POLL                     = 0x2e
293 297
 	SO_BUSY_POLL_BUDGET              = 0x46
294 298
 	SO_CNX_ADVICE                    = 0x35
@@ -305,6 +309,7 @@ const (
305 309
 	SO_MARK                          = 0x24
306 310
 	SO_MAX_PACING_RATE               = 0x2f
307 311
 	SO_MEMINFO                       = 0x37
312
+	SO_NETNS_COOKIE                  = 0x47
308 313
 	SO_NOFCS                         = 0x2b
309 314
 	SO_OOBINLINE                     = 0xa
310 315
 	SO_PASSCRED                      = 0x10
@@ -318,9 +323,11 @@ const (
318 323
 	SO_RCVBUF                        = 0x8
319 324
 	SO_RCVBUFFORCE                   = 0x21
320 325
 	SO_RCVLOWAT                      = 0x12
326
+	SO_RCVMARK                       = 0x4b
321 327
 	SO_RCVTIMEO                      = 0x14
322 328
 	SO_RCVTIMEO_NEW                  = 0x42
323 329
 	SO_RCVTIMEO_OLD                  = 0x14
330
+	SO_RESERVE_MEM                   = 0x49
324 331
 	SO_REUSEADDR                     = 0x2
325 332
 	SO_REUSEPORT                     = 0xf
326 333
 	SO_RXQ_OVFL                      = 0x28
@@ -341,6 +348,7 @@ const (
341 348
 	SO_TIMESTAMPNS_NEW               = 0x40
342 349
 	SO_TIMESTAMPNS_OLD               = 0x23
343 350
 	SO_TIMESTAMP_NEW                 = 0x3f
351
+	SO_TXREHASH                      = 0x4a
344 352
 	SO_TXTIME                        = 0x3d
345 353
 	SO_TYPE                          = 0x3
346 354
 	SO_WIFI_STATUS                   = 0x29
@@ -505,6 +513,7 @@ const (
505 513
 	WORDSIZE                         = 0x40
506 514
 	XCASE                            = 0x4
507 515
 	XTABS                            = 0x1800
516
+	ZA_MAGIC                         = 0x54366345
508 517
 	_HIDIOCGRAWNAME                  = 0x80804804
509 518
 	_HIDIOCGRAWPHYS                  = 0x80404805
510 519
 	_HIDIOCGRAWUNIQ                  = 0x80404808

+ 818
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go View File

@@ -0,0 +1,818 @@
1
+// mkerrors.sh -Wall -Werror -static -I/tmp/include
2
+// Code generated by the command above; see README.md. DO NOT EDIT.
3
+
4
+//go:build loong64 && linux
5
+// +build loong64,linux
6
+
7
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9
+
10
+package unix
11
+
12
+import "syscall"
13
+
14
+const (
15
+	B1000000                         = 0x1008
16
+	B115200                          = 0x1002
17
+	B1152000                         = 0x1009
18
+	B1500000                         = 0x100a
19
+	B2000000                         = 0x100b
20
+	B230400                          = 0x1003
21
+	B2500000                         = 0x100c
22
+	B3000000                         = 0x100d
23
+	B3500000                         = 0x100e
24
+	B4000000                         = 0x100f
25
+	B460800                          = 0x1004
26
+	B500000                          = 0x1005
27
+	B57600                           = 0x1001
28
+	B576000                          = 0x1006
29
+	B921600                          = 0x1007
30
+	BLKBSZGET                        = 0x80081270
31
+	BLKBSZSET                        = 0x40081271
32
+	BLKFLSBUF                        = 0x1261
33
+	BLKFRAGET                        = 0x1265
34
+	BLKFRASET                        = 0x1264
35
+	BLKGETSIZE                       = 0x1260
36
+	BLKGETSIZE64                     = 0x80081272
37
+	BLKPBSZGET                       = 0x127b
38
+	BLKRAGET                         = 0x1263
39
+	BLKRASET                         = 0x1262
40
+	BLKROGET                         = 0x125e
41
+	BLKROSET                         = 0x125d
42
+	BLKRRPART                        = 0x125f
43
+	BLKSECTGET                       = 0x1267
44
+	BLKSECTSET                       = 0x1266
45
+	BLKSSZGET                        = 0x1268
46
+	BOTHER                           = 0x1000
47
+	BS1                              = 0x2000
48
+	BSDLY                            = 0x2000
49
+	CBAUD                            = 0x100f
50
+	CBAUDEX                          = 0x1000
51
+	CIBAUD                           = 0x100f0000
52
+	CLOCAL                           = 0x800
53
+	CR1                              = 0x200
54
+	CR2                              = 0x400
55
+	CR3                              = 0x600
56
+	CRDLY                            = 0x600
57
+	CREAD                            = 0x80
58
+	CS6                              = 0x10
59
+	CS7                              = 0x20
60
+	CS8                              = 0x30
61
+	CSIZE                            = 0x30
62
+	CSTOPB                           = 0x40
63
+	ECCGETLAYOUT                     = 0x81484d11
64
+	ECCGETSTATS                      = 0x80104d12
65
+	ECHOCTL                          = 0x200
66
+	ECHOE                            = 0x10
67
+	ECHOK                            = 0x20
68
+	ECHOKE                           = 0x800
69
+	ECHONL                           = 0x40
70
+	ECHOPRT                          = 0x400
71
+	EFD_CLOEXEC                      = 0x80000
72
+	EFD_NONBLOCK                     = 0x800
73
+	EPOLL_CLOEXEC                    = 0x80000
74
+	EXTPROC                          = 0x10000
75
+	FF1                              = 0x8000
76
+	FFDLY                            = 0x8000
77
+	FICLONE                          = 0x40049409
78
+	FICLONERANGE                     = 0x4020940d
79
+	FLUSHO                           = 0x1000
80
+	FPU_CTX_MAGIC                    = 0x46505501
81
+	FS_IOC_ENABLE_VERITY             = 0x40806685
82
+	FS_IOC_GETFLAGS                  = 0x80086601
83
+	FS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b
84
+	FS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615
85
+	FS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614
86
+	FS_IOC_SETFLAGS                  = 0x40086602
87
+	FS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613
88
+	F_GETLK                          = 0x5
89
+	F_GETLK64                        = 0x5
90
+	F_GETOWN                         = 0x9
91
+	F_RDLCK                          = 0x0
92
+	F_SETLK                          = 0x6
93
+	F_SETLK64                        = 0x6
94
+	F_SETLKW                         = 0x7
95
+	F_SETLKW64                       = 0x7
96
+	F_SETOWN                         = 0x8
97
+	F_UNLCK                          = 0x2
98
+	F_WRLCK                          = 0x1
99
+	HIDIOCGRAWINFO                   = 0x80084803
100
+	HIDIOCGRDESC                     = 0x90044802
101
+	HIDIOCGRDESCSIZE                 = 0x80044801
102
+	HUPCL                            = 0x400
103
+	ICANON                           = 0x2
104
+	IEXTEN                           = 0x8000
105
+	IN_CLOEXEC                       = 0x80000
106
+	IN_NONBLOCK                      = 0x800
107
+	IOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9
108
+	ISIG                             = 0x1
109
+	IUCLC                            = 0x200
110
+	IXOFF                            = 0x1000
111
+	IXON                             = 0x400
112
+	MAP_ANON                         = 0x20
113
+	MAP_ANONYMOUS                    = 0x20
114
+	MAP_DENYWRITE                    = 0x800
115
+	MAP_EXECUTABLE                   = 0x1000
116
+	MAP_GROWSDOWN                    = 0x100
117
+	MAP_HUGETLB                      = 0x40000
118
+	MAP_LOCKED                       = 0x2000
119
+	MAP_NONBLOCK                     = 0x10000
120
+	MAP_NORESERVE                    = 0x4000
121
+	MAP_POPULATE                     = 0x8000
122
+	MAP_STACK                        = 0x20000
123
+	MAP_SYNC                         = 0x80000
124
+	MCL_CURRENT                      = 0x1
125
+	MCL_FUTURE                       = 0x2
126
+	MCL_ONFAULT                      = 0x4
127
+	MEMERASE                         = 0x40084d02
128
+	MEMERASE64                       = 0x40104d14
129
+	MEMGETBADBLOCK                   = 0x40084d0b
130
+	MEMGETINFO                       = 0x80204d01
131
+	MEMGETOOBSEL                     = 0x80c84d0a
132
+	MEMGETREGIONCOUNT                = 0x80044d07
133
+	MEMISLOCKED                      = 0x80084d17
134
+	MEMLOCK                          = 0x40084d05
135
+	MEMREADOOB                       = 0xc0104d04
136
+	MEMSETBADBLOCK                   = 0x40084d0c
137
+	MEMUNLOCK                        = 0x40084d06
138
+	MEMWRITEOOB                      = 0xc0104d03
139
+	MTDFILEMODE                      = 0x4d13
140
+	NFDBITS                          = 0x40
141
+	NLDLY                            = 0x100
142
+	NOFLSH                           = 0x80
143
+	NS_GET_NSTYPE                    = 0xb703
144
+	NS_GET_OWNER_UID                 = 0xb704
145
+	NS_GET_PARENT                    = 0xb702
146
+	NS_GET_USERNS                    = 0xb701
147
+	OLCUC                            = 0x2
148
+	ONLCR                            = 0x4
149
+	OTPERASE                         = 0x400c4d19
150
+	OTPGETREGIONCOUNT                = 0x40044d0e
151
+	OTPGETREGIONINFO                 = 0x400c4d0f
152
+	OTPLOCK                          = 0x800c4d10
153
+	OTPSELECT                        = 0x80044d0d
154
+	O_APPEND                         = 0x400
155
+	O_ASYNC                          = 0x2000
156
+	O_CLOEXEC                        = 0x80000
157
+	O_CREAT                          = 0x40
158
+	O_DIRECT                         = 0x4000
159
+	O_DIRECTORY                      = 0x10000
160
+	O_DSYNC                          = 0x1000
161
+	O_EXCL                           = 0x80
162
+	O_FSYNC                          = 0x101000
163
+	O_LARGEFILE                      = 0x0
164
+	O_NDELAY                         = 0x800
165
+	O_NOATIME                        = 0x40000
166
+	O_NOCTTY                         = 0x100
167
+	O_NOFOLLOW                       = 0x20000
168
+	O_NONBLOCK                       = 0x800
169
+	O_PATH                           = 0x200000
170
+	O_RSYNC                          = 0x101000
171
+	O_SYNC                           = 0x101000
172
+	O_TMPFILE                        = 0x410000
173
+	O_TRUNC                          = 0x200
174
+	PARENB                           = 0x100
175
+	PARODD                           = 0x200
176
+	PENDIN                           = 0x4000
177
+	PERF_EVENT_IOC_DISABLE           = 0x2401
178
+	PERF_EVENT_IOC_ENABLE            = 0x2400
179
+	PERF_EVENT_IOC_ID                = 0x80082407
180
+	PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
181
+	PERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409
182
+	PERF_EVENT_IOC_PERIOD            = 0x40082404
183
+	PERF_EVENT_IOC_QUERY_BPF         = 0xc008240a
184
+	PERF_EVENT_IOC_REFRESH           = 0x2402
185
+	PERF_EVENT_IOC_RESET             = 0x2403
186
+	PERF_EVENT_IOC_SET_BPF           = 0x40042408
187
+	PERF_EVENT_IOC_SET_FILTER        = 0x40082406
188
+	PERF_EVENT_IOC_SET_OUTPUT        = 0x2405
189
+	PPPIOCATTACH                     = 0x4004743d
190
+	PPPIOCATTCHAN                    = 0x40047438
191
+	PPPIOCBRIDGECHAN                 = 0x40047435
192
+	PPPIOCCONNECT                    = 0x4004743a
193
+	PPPIOCDETACH                     = 0x4004743c
194
+	PPPIOCDISCONN                    = 0x7439
195
+	PPPIOCGASYNCMAP                  = 0x80047458
196
+	PPPIOCGCHAN                      = 0x80047437
197
+	PPPIOCGDEBUG                     = 0x80047441
198
+	PPPIOCGFLAGS                     = 0x8004745a
199
+	PPPIOCGIDLE                      = 0x8010743f
200
+	PPPIOCGIDLE32                    = 0x8008743f
201
+	PPPIOCGIDLE64                    = 0x8010743f
202
+	PPPIOCGL2TPSTATS                 = 0x80487436
203
+	PPPIOCGMRU                       = 0x80047453
204
+	PPPIOCGRASYNCMAP                 = 0x80047455
205
+	PPPIOCGUNIT                      = 0x80047456
206
+	PPPIOCGXASYNCMAP                 = 0x80207450
207
+	PPPIOCSACTIVE                    = 0x40107446
208
+	PPPIOCSASYNCMAP                  = 0x40047457
209
+	PPPIOCSCOMPRESS                  = 0x4010744d
210
+	PPPIOCSDEBUG                     = 0x40047440
211
+	PPPIOCSFLAGS                     = 0x40047459
212
+	PPPIOCSMAXCID                    = 0x40047451
213
+	PPPIOCSMRRU                      = 0x4004743b
214
+	PPPIOCSMRU                       = 0x40047452
215
+	PPPIOCSNPMODE                    = 0x4008744b
216
+	PPPIOCSPASS                      = 0x40107447
217
+	PPPIOCSRASYNCMAP                 = 0x40047454
218
+	PPPIOCSXASYNCMAP                 = 0x4020744f
219
+	PPPIOCUNBRIDGECHAN               = 0x7434
220
+	PPPIOCXFERUNIT                   = 0x744e
221
+	PR_SET_PTRACER_ANY               = 0xffffffffffffffff
222
+	PTRACE_SYSEMU                    = 0x1f
223
+	PTRACE_SYSEMU_SINGLESTEP         = 0x20
224
+	RLIMIT_AS                        = 0x9
225
+	RLIMIT_MEMLOCK                   = 0x8
226
+	RLIMIT_NOFILE                    = 0x7
227
+	RLIMIT_NPROC                     = 0x6
228
+	RLIMIT_RSS                       = 0x5
229
+	RNDADDENTROPY                    = 0x40085203
230
+	RNDADDTOENTCNT                   = 0x40045201
231
+	RNDCLEARPOOL                     = 0x5206
232
+	RNDGETENTCNT                     = 0x80045200
233
+	RNDGETPOOL                       = 0x80085202
234
+	RNDRESEEDCRNG                    = 0x5207
235
+	RNDZAPENTCNT                     = 0x5204
236
+	RTC_AIE_OFF                      = 0x7002
237
+	RTC_AIE_ON                       = 0x7001
238
+	RTC_ALM_READ                     = 0x80247008
239
+	RTC_ALM_SET                      = 0x40247007
240
+	RTC_EPOCH_READ                   = 0x8008700d
241
+	RTC_EPOCH_SET                    = 0x4008700e
242
+	RTC_IRQP_READ                    = 0x8008700b
243
+	RTC_IRQP_SET                     = 0x4008700c
244
+	RTC_PARAM_GET                    = 0x40187013
245
+	RTC_PARAM_SET                    = 0x40187014
246
+	RTC_PIE_OFF                      = 0x7006
247
+	RTC_PIE_ON                       = 0x7005
248
+	RTC_PLL_GET                      = 0x80207011
249
+	RTC_PLL_SET                      = 0x40207012
250
+	RTC_RD_TIME                      = 0x80247009
251
+	RTC_SET_TIME                     = 0x4024700a
252
+	RTC_UIE_OFF                      = 0x7004
253
+	RTC_UIE_ON                       = 0x7003
254
+	RTC_VL_CLR                       = 0x7014
255
+	RTC_VL_READ                      = 0x80047013
256
+	RTC_WIE_OFF                      = 0x7010
257
+	RTC_WIE_ON                       = 0x700f
258
+	RTC_WKALM_RD                     = 0x80287010
259
+	RTC_WKALM_SET                    = 0x4028700f
260
+	SCM_TIMESTAMPING                 = 0x25
261
+	SCM_TIMESTAMPING_OPT_STATS       = 0x36
262
+	SCM_TIMESTAMPING_PKTINFO         = 0x3a
263
+	SCM_TIMESTAMPNS                  = 0x23
264
+	SCM_TXTIME                       = 0x3d
265
+	SCM_WIFI_STATUS                  = 0x29
266
+	SFD_CLOEXEC                      = 0x80000
267
+	SFD_NONBLOCK                     = 0x800
268
+	SIOCATMARK                       = 0x8905
269
+	SIOCGPGRP                        = 0x8904
270
+	SIOCGSTAMPNS_NEW                 = 0x80108907
271
+	SIOCGSTAMP_NEW                   = 0x80108906
272
+	SIOCINQ                          = 0x541b
273
+	SIOCOUTQ                         = 0x5411
274
+	SIOCSPGRP                        = 0x8902
275
+	SOCK_CLOEXEC                     = 0x80000
276
+	SOCK_DGRAM                       = 0x2
277
+	SOCK_NONBLOCK                    = 0x800
278
+	SOCK_STREAM                      = 0x1
279
+	SOL_SOCKET                       = 0x1
280
+	SO_ACCEPTCONN                    = 0x1e
281
+	SO_ATTACH_BPF                    = 0x32
282
+	SO_ATTACH_REUSEPORT_CBPF         = 0x33
283
+	SO_ATTACH_REUSEPORT_EBPF         = 0x34
284
+	SO_BINDTODEVICE                  = 0x19
285
+	SO_BINDTOIFINDEX                 = 0x3e
286
+	SO_BPF_EXTENSIONS                = 0x30
287
+	SO_BROADCAST                     = 0x6
288
+	SO_BSDCOMPAT                     = 0xe
289
+	SO_BUF_LOCK                      = 0x48
290
+	SO_BUSY_POLL                     = 0x2e
291
+	SO_BUSY_POLL_BUDGET              = 0x46
292
+	SO_CNX_ADVICE                    = 0x35
293
+	SO_COOKIE                        = 0x39
294
+	SO_DETACH_REUSEPORT_BPF          = 0x44
295
+	SO_DOMAIN                        = 0x27
296
+	SO_DONTROUTE                     = 0x5
297
+	SO_ERROR                         = 0x4
298
+	SO_INCOMING_CPU                  = 0x31
299
+	SO_INCOMING_NAPI_ID              = 0x38
300
+	SO_KEEPALIVE                     = 0x9
301
+	SO_LINGER                        = 0xd
302
+	SO_LOCK_FILTER                   = 0x2c
303
+	SO_MARK                          = 0x24
304
+	SO_MAX_PACING_RATE               = 0x2f
305
+	SO_MEMINFO                       = 0x37
306
+	SO_NETNS_COOKIE                  = 0x47
307
+	SO_NOFCS                         = 0x2b
308
+	SO_OOBINLINE                     = 0xa
309
+	SO_PASSCRED                      = 0x10
310
+	SO_PASSSEC                       = 0x22
311
+	SO_PEEK_OFF                      = 0x2a
312
+	SO_PEERCRED                      = 0x11
313
+	SO_PEERGROUPS                    = 0x3b
314
+	SO_PEERSEC                       = 0x1f
315
+	SO_PREFER_BUSY_POLL              = 0x45
316
+	SO_PROTOCOL                      = 0x26
317
+	SO_RCVBUF                        = 0x8
318
+	SO_RCVBUFFORCE                   = 0x21
319
+	SO_RCVLOWAT                      = 0x12
320
+	SO_RCVMARK                       = 0x4b
321
+	SO_RCVTIMEO                      = 0x14
322
+	SO_RCVTIMEO_NEW                  = 0x42
323
+	SO_RCVTIMEO_OLD                  = 0x14
324
+	SO_RESERVE_MEM                   = 0x49
325
+	SO_REUSEADDR                     = 0x2
326
+	SO_REUSEPORT                     = 0xf
327
+	SO_RXQ_OVFL                      = 0x28
328
+	SO_SECURITY_AUTHENTICATION       = 0x16
329
+	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
330
+	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
331
+	SO_SELECT_ERR_QUEUE              = 0x2d
332
+	SO_SNDBUF                        = 0x7
333
+	SO_SNDBUFFORCE                   = 0x20
334
+	SO_SNDLOWAT                      = 0x13
335
+	SO_SNDTIMEO                      = 0x15
336
+	SO_SNDTIMEO_NEW                  = 0x43
337
+	SO_SNDTIMEO_OLD                  = 0x15
338
+	SO_TIMESTAMPING                  = 0x25
339
+	SO_TIMESTAMPING_NEW              = 0x41
340
+	SO_TIMESTAMPING_OLD              = 0x25
341
+	SO_TIMESTAMPNS                   = 0x23
342
+	SO_TIMESTAMPNS_NEW               = 0x40
343
+	SO_TIMESTAMPNS_OLD               = 0x23
344
+	SO_TIMESTAMP_NEW                 = 0x3f
345
+	SO_TXREHASH                      = 0x4a
346
+	SO_TXTIME                        = 0x3d
347
+	SO_TYPE                          = 0x3
348
+	SO_WIFI_STATUS                   = 0x29
349
+	SO_ZEROCOPY                      = 0x3c
350
+	TAB1                             = 0x800
351
+	TAB2                             = 0x1000
352
+	TAB3                             = 0x1800
353
+	TABDLY                           = 0x1800
354
+	TCFLSH                           = 0x540b
355
+	TCGETA                           = 0x5405
356
+	TCGETS                           = 0x5401
357
+	TCGETS2                          = 0x802c542a
358
+	TCGETX                           = 0x5432
359
+	TCSAFLUSH                        = 0x2
360
+	TCSBRK                           = 0x5409
361
+	TCSBRKP                          = 0x5425
362
+	TCSETA                           = 0x5406
363
+	TCSETAF                          = 0x5408
364
+	TCSETAW                          = 0x5407
365
+	TCSETS                           = 0x5402
366
+	TCSETS2                          = 0x402c542b
367
+	TCSETSF                          = 0x5404
368
+	TCSETSF2                         = 0x402c542d
369
+	TCSETSW                          = 0x5403
370
+	TCSETSW2                         = 0x402c542c
371
+	TCSETX                           = 0x5433
372
+	TCSETXF                          = 0x5434
373
+	TCSETXW                          = 0x5435
374
+	TCXONC                           = 0x540a
375
+	TFD_CLOEXEC                      = 0x80000
376
+	TFD_NONBLOCK                     = 0x800
377
+	TIOCCBRK                         = 0x5428
378
+	TIOCCONS                         = 0x541d
379
+	TIOCEXCL                         = 0x540c
380
+	TIOCGDEV                         = 0x80045432
381
+	TIOCGETD                         = 0x5424
382
+	TIOCGEXCL                        = 0x80045440
383
+	TIOCGICOUNT                      = 0x545d
384
+	TIOCGISO7816                     = 0x80285442
385
+	TIOCGLCKTRMIOS                   = 0x5456
386
+	TIOCGPGRP                        = 0x540f
387
+	TIOCGPKT                         = 0x80045438
388
+	TIOCGPTLCK                       = 0x80045439
389
+	TIOCGPTN                         = 0x80045430
390
+	TIOCGPTPEER                      = 0x5441
391
+	TIOCGRS485                       = 0x542e
392
+	TIOCGSERIAL                      = 0x541e
393
+	TIOCGSID                         = 0x5429
394
+	TIOCGSOFTCAR                     = 0x5419
395
+	TIOCGWINSZ                       = 0x5413
396
+	TIOCINQ                          = 0x541b
397
+	TIOCLINUX                        = 0x541c
398
+	TIOCMBIC                         = 0x5417
399
+	TIOCMBIS                         = 0x5416
400
+	TIOCMGET                         = 0x5415
401
+	TIOCMIWAIT                       = 0x545c
402
+	TIOCMSET                         = 0x5418
403
+	TIOCM_CAR                        = 0x40
404
+	TIOCM_CD                         = 0x40
405
+	TIOCM_CTS                        = 0x20
406
+	TIOCM_DSR                        = 0x100
407
+	TIOCM_RI                         = 0x80
408
+	TIOCM_RNG                        = 0x80
409
+	TIOCM_SR                         = 0x10
410
+	TIOCM_ST                         = 0x8
411
+	TIOCNOTTY                        = 0x5422
412
+	TIOCNXCL                         = 0x540d
413
+	TIOCOUTQ                         = 0x5411
414
+	TIOCPKT                          = 0x5420
415
+	TIOCSBRK                         = 0x5427
416
+	TIOCSCTTY                        = 0x540e
417
+	TIOCSERCONFIG                    = 0x5453
418
+	TIOCSERGETLSR                    = 0x5459
419
+	TIOCSERGETMULTI                  = 0x545a
420
+	TIOCSERGSTRUCT                   = 0x5458
421
+	TIOCSERGWILD                     = 0x5454
422
+	TIOCSERSETMULTI                  = 0x545b
423
+	TIOCSERSWILD                     = 0x5455
424
+	TIOCSER_TEMT                     = 0x1
425
+	TIOCSETD                         = 0x5423
426
+	TIOCSIG                          = 0x40045436
427
+	TIOCSISO7816                     = 0xc0285443
428
+	TIOCSLCKTRMIOS                   = 0x5457
429
+	TIOCSPGRP                        = 0x5410
430
+	TIOCSPTLCK                       = 0x40045431
431
+	TIOCSRS485                       = 0x542f
432
+	TIOCSSERIAL                      = 0x541f
433
+	TIOCSSOFTCAR                     = 0x541a
434
+	TIOCSTI                          = 0x5412
435
+	TIOCSWINSZ                       = 0x5414
436
+	TIOCVHANGUP                      = 0x5437
437
+	TOSTOP                           = 0x100
438
+	TUNATTACHFILTER                  = 0x401054d5
439
+	TUNDETACHFILTER                  = 0x401054d6
440
+	TUNGETDEVNETNS                   = 0x54e3
441
+	TUNGETFEATURES                   = 0x800454cf
442
+	TUNGETFILTER                     = 0x801054db
443
+	TUNGETIFF                        = 0x800454d2
444
+	TUNGETSNDBUF                     = 0x800454d3
445
+	TUNGETVNETBE                     = 0x800454df
446
+	TUNGETVNETHDRSZ                  = 0x800454d7
447
+	TUNGETVNETLE                     = 0x800454dd
448
+	TUNSETCARRIER                    = 0x400454e2
449
+	TUNSETDEBUG                      = 0x400454c9
450
+	TUNSETFILTEREBPF                 = 0x800454e1
451
+	TUNSETGROUP                      = 0x400454ce
452
+	TUNSETIFF                        = 0x400454ca
453
+	TUNSETIFINDEX                    = 0x400454da
454
+	TUNSETLINK                       = 0x400454cd
455
+	TUNSETNOCSUM                     = 0x400454c8
456
+	TUNSETOFFLOAD                    = 0x400454d0
457
+	TUNSETOWNER                      = 0x400454cc
458
+	TUNSETPERSIST                    = 0x400454cb
459
+	TUNSETQUEUE                      = 0x400454d9
460
+	TUNSETSNDBUF                     = 0x400454d4
461
+	TUNSETSTEERINGEBPF               = 0x800454e0
462
+	TUNSETTXFILTER                   = 0x400454d1
463
+	TUNSETVNETBE                     = 0x400454de
464
+	TUNSETVNETHDRSZ                  = 0x400454d8
465
+	TUNSETVNETLE                     = 0x400454dc
466
+	UBI_IOCATT                       = 0x40186f40
467
+	UBI_IOCDET                       = 0x40046f41
468
+	UBI_IOCEBCH                      = 0x40044f02
469
+	UBI_IOCEBER                      = 0x40044f01
470
+	UBI_IOCEBISMAP                   = 0x80044f05
471
+	UBI_IOCEBMAP                     = 0x40084f03
472
+	UBI_IOCEBUNMAP                   = 0x40044f04
473
+	UBI_IOCMKVOL                     = 0x40986f00
474
+	UBI_IOCRMVOL                     = 0x40046f01
475
+	UBI_IOCRNVOL                     = 0x51106f03
476
+	UBI_IOCRPEB                      = 0x40046f04
477
+	UBI_IOCRSVOL                     = 0x400c6f02
478
+	UBI_IOCSETVOLPROP                = 0x40104f06
479
+	UBI_IOCSPEB                      = 0x40046f05
480
+	UBI_IOCVOLCRBLK                  = 0x40804f07
481
+	UBI_IOCVOLRMBLK                  = 0x4f08
482
+	UBI_IOCVOLUP                     = 0x40084f00
483
+	VDISCARD                         = 0xd
484
+	VEOF                             = 0x4
485
+	VEOL                             = 0xb
486
+	VEOL2                            = 0x10
487
+	VMIN                             = 0x6
488
+	VREPRINT                         = 0xc
489
+	VSTART                           = 0x8
490
+	VSTOP                            = 0x9
491
+	VSUSP                            = 0xa
492
+	VSWTC                            = 0x7
493
+	VT1                              = 0x4000
494
+	VTDLY                            = 0x4000
495
+	VTIME                            = 0x5
496
+	VWERASE                          = 0xe
497
+	WDIOC_GETBOOTSTATUS              = 0x80045702
498
+	WDIOC_GETPRETIMEOUT              = 0x80045709
499
+	WDIOC_GETSTATUS                  = 0x80045701
500
+	WDIOC_GETSUPPORT                 = 0x80285700
501
+	WDIOC_GETTEMP                    = 0x80045703
502
+	WDIOC_GETTIMELEFT                = 0x8004570a
503
+	WDIOC_GETTIMEOUT                 = 0x80045707
504
+	WDIOC_KEEPALIVE                  = 0x80045705
505
+	WDIOC_SETOPTIONS                 = 0x80045704
506
+	WORDSIZE                         = 0x40
507
+	XCASE                            = 0x4
508
+	XTABS                            = 0x1800
509
+	_HIDIOCGRAWNAME                  = 0x80804804
510
+	_HIDIOCGRAWPHYS                  = 0x80404805
511
+	_HIDIOCGRAWUNIQ                  = 0x80404808
512
+)
513
+
514
+// Errors
515
+const (
516
+	EADDRINUSE      = syscall.Errno(0x62)
517
+	EADDRNOTAVAIL   = syscall.Errno(0x63)
518
+	EADV            = syscall.Errno(0x44)
519
+	EAFNOSUPPORT    = syscall.Errno(0x61)
520
+	EALREADY        = syscall.Errno(0x72)
521
+	EBADE           = syscall.Errno(0x34)
522
+	EBADFD          = syscall.Errno(0x4d)
523
+	EBADMSG         = syscall.Errno(0x4a)
524
+	EBADR           = syscall.Errno(0x35)
525
+	EBADRQC         = syscall.Errno(0x38)
526
+	EBADSLT         = syscall.Errno(0x39)
527
+	EBFONT          = syscall.Errno(0x3b)
528
+	ECANCELED       = syscall.Errno(0x7d)
529
+	ECHRNG          = syscall.Errno(0x2c)
530
+	ECOMM           = syscall.Errno(0x46)
531
+	ECONNABORTED    = syscall.Errno(0x67)
532
+	ECONNREFUSED    = syscall.Errno(0x6f)
533
+	ECONNRESET      = syscall.Errno(0x68)
534
+	EDEADLK         = syscall.Errno(0x23)
535
+	EDEADLOCK       = syscall.Errno(0x23)
536
+	EDESTADDRREQ    = syscall.Errno(0x59)
537
+	EDOTDOT         = syscall.Errno(0x49)
538
+	EDQUOT          = syscall.Errno(0x7a)
539
+	EHOSTDOWN       = syscall.Errno(0x70)
540
+	EHOSTUNREACH    = syscall.Errno(0x71)
541
+	EHWPOISON       = syscall.Errno(0x85)
542
+	EIDRM           = syscall.Errno(0x2b)
543
+	EILSEQ          = syscall.Errno(0x54)
544
+	EINPROGRESS     = syscall.Errno(0x73)
545
+	EISCONN         = syscall.Errno(0x6a)
546
+	EISNAM          = syscall.Errno(0x78)
547
+	EKEYEXPIRED     = syscall.Errno(0x7f)
548
+	EKEYREJECTED    = syscall.Errno(0x81)
549
+	EKEYREVOKED     = syscall.Errno(0x80)
550
+	EL2HLT          = syscall.Errno(0x33)
551
+	EL2NSYNC        = syscall.Errno(0x2d)
552
+	EL3HLT          = syscall.Errno(0x2e)
553
+	EL3RST          = syscall.Errno(0x2f)
554
+	ELIBACC         = syscall.Errno(0x4f)
555
+	ELIBBAD         = syscall.Errno(0x50)
556
+	ELIBEXEC        = syscall.Errno(0x53)
557
+	ELIBMAX         = syscall.Errno(0x52)
558
+	ELIBSCN         = syscall.Errno(0x51)
559
+	ELNRNG          = syscall.Errno(0x30)
560
+	ELOOP           = syscall.Errno(0x28)
561
+	EMEDIUMTYPE     = syscall.Errno(0x7c)
562
+	EMSGSIZE        = syscall.Errno(0x5a)
563
+	EMULTIHOP       = syscall.Errno(0x48)
564
+	ENAMETOOLONG    = syscall.Errno(0x24)
565
+	ENAVAIL         = syscall.Errno(0x77)
566
+	ENETDOWN        = syscall.Errno(0x64)
567
+	ENETRESET       = syscall.Errno(0x66)
568
+	ENETUNREACH     = syscall.Errno(0x65)
569
+	ENOANO          = syscall.Errno(0x37)
570
+	ENOBUFS         = syscall.Errno(0x69)
571
+	ENOCSI          = syscall.Errno(0x32)
572
+	ENODATA         = syscall.Errno(0x3d)
573
+	ENOKEY          = syscall.Errno(0x7e)
574
+	ENOLCK          = syscall.Errno(0x25)
575
+	ENOLINK         = syscall.Errno(0x43)
576
+	ENOMEDIUM       = syscall.Errno(0x7b)
577
+	ENOMSG          = syscall.Errno(0x2a)
578
+	ENONET          = syscall.Errno(0x40)
579
+	ENOPKG          = syscall.Errno(0x41)
580
+	ENOPROTOOPT     = syscall.Errno(0x5c)
581
+	ENOSR           = syscall.Errno(0x3f)
582
+	ENOSTR          = syscall.Errno(0x3c)
583
+	ENOSYS          = syscall.Errno(0x26)
584
+	ENOTCONN        = syscall.Errno(0x6b)
585
+	ENOTEMPTY       = syscall.Errno(0x27)
586
+	ENOTNAM         = syscall.Errno(0x76)
587
+	ENOTRECOVERABLE = syscall.Errno(0x83)
588
+	ENOTSOCK        = syscall.Errno(0x58)
589
+	ENOTSUP         = syscall.Errno(0x5f)
590
+	ENOTUNIQ        = syscall.Errno(0x4c)
591
+	EOPNOTSUPP      = syscall.Errno(0x5f)
592
+	EOVERFLOW       = syscall.Errno(0x4b)
593
+	EOWNERDEAD      = syscall.Errno(0x82)
594
+	EPFNOSUPPORT    = syscall.Errno(0x60)
595
+	EPROTO          = syscall.Errno(0x47)
596
+	EPROTONOSUPPORT = syscall.Errno(0x5d)
597
+	EPROTOTYPE      = syscall.Errno(0x5b)
598
+	EREMCHG         = syscall.Errno(0x4e)
599
+	EREMOTE         = syscall.Errno(0x42)
600
+	EREMOTEIO       = syscall.Errno(0x79)
601
+	ERESTART        = syscall.Errno(0x55)
602
+	ERFKILL         = syscall.Errno(0x84)
603
+	ESHUTDOWN       = syscall.Errno(0x6c)
604
+	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
605
+	ESRMNT          = syscall.Errno(0x45)
606
+	ESTALE          = syscall.Errno(0x74)
607
+	ESTRPIPE        = syscall.Errno(0x56)
608
+	ETIME           = syscall.Errno(0x3e)
609
+	ETIMEDOUT       = syscall.Errno(0x6e)
610
+	ETOOMANYREFS    = syscall.Errno(0x6d)
611
+	EUCLEAN         = syscall.Errno(0x75)
612
+	EUNATCH         = syscall.Errno(0x31)
613
+	EUSERS          = syscall.Errno(0x57)
614
+	EXFULL          = syscall.Errno(0x36)
615
+)
616
+
617
+// Signals
618
+const (
619
+	SIGBUS    = syscall.Signal(0x7)
620
+	SIGCHLD   = syscall.Signal(0x11)
621
+	SIGCLD    = syscall.Signal(0x11)
622
+	SIGCONT   = syscall.Signal(0x12)
623
+	SIGIO     = syscall.Signal(0x1d)
624
+	SIGPOLL   = syscall.Signal(0x1d)
625
+	SIGPROF   = syscall.Signal(0x1b)
626
+	SIGPWR    = syscall.Signal(0x1e)
627
+	SIGSTKFLT = syscall.Signal(0x10)
628
+	SIGSTOP   = syscall.Signal(0x13)
629
+	SIGSYS    = syscall.Signal(0x1f)
630
+	SIGTSTP   = syscall.Signal(0x14)
631
+	SIGTTIN   = syscall.Signal(0x15)
632
+	SIGTTOU   = syscall.Signal(0x16)
633
+	SIGURG    = syscall.Signal(0x17)
634
+	SIGUSR1   = syscall.Signal(0xa)
635
+	SIGUSR2   = syscall.Signal(0xc)
636
+	SIGVTALRM = syscall.Signal(0x1a)
637
+	SIGWINCH  = syscall.Signal(0x1c)
638
+	SIGXCPU   = syscall.Signal(0x18)
639
+	SIGXFSZ   = syscall.Signal(0x19)
640
+)
641
+
642
+// Error table
643
+var errorList = [...]struct {
644
+	num  syscall.Errno
645
+	name string
646
+	desc string
647
+}{
648
+	{1, "EPERM", "operation not permitted"},
649
+	{2, "ENOENT", "no such file or directory"},
650
+	{3, "ESRCH", "no such process"},
651
+	{4, "EINTR", "interrupted system call"},
652
+	{5, "EIO", "input/output error"},
653
+	{6, "ENXIO", "no such device or address"},
654
+	{7, "E2BIG", "argument list too long"},
655
+	{8, "ENOEXEC", "exec format error"},
656
+	{9, "EBADF", "bad file descriptor"},
657
+	{10, "ECHILD", "no child processes"},
658
+	{11, "EAGAIN", "resource temporarily unavailable"},
659
+	{12, "ENOMEM", "cannot allocate memory"},
660
+	{13, "EACCES", "permission denied"},
661
+	{14, "EFAULT", "bad address"},
662
+	{15, "ENOTBLK", "block device required"},
663
+	{16, "EBUSY", "device or resource busy"},
664
+	{17, "EEXIST", "file exists"},
665
+	{18, "EXDEV", "invalid cross-device link"},
666
+	{19, "ENODEV", "no such device"},
667
+	{20, "ENOTDIR", "not a directory"},
668
+	{21, "EISDIR", "is a directory"},
669
+	{22, "EINVAL", "invalid argument"},
670
+	{23, "ENFILE", "too many open files in system"},
671
+	{24, "EMFILE", "too many open files"},
672
+	{25, "ENOTTY", "inappropriate ioctl for device"},
673
+	{26, "ETXTBSY", "text file busy"},
674
+	{27, "EFBIG", "file too large"},
675
+	{28, "ENOSPC", "no space left on device"},
676
+	{29, "ESPIPE", "illegal seek"},
677
+	{30, "EROFS", "read-only file system"},
678
+	{31, "EMLINK", "too many links"},
679
+	{32, "EPIPE", "broken pipe"},
680
+	{33, "EDOM", "numerical argument out of domain"},
681
+	{34, "ERANGE", "numerical result out of range"},
682
+	{35, "EDEADLK", "resource deadlock avoided"},
683
+	{36, "ENAMETOOLONG", "file name too long"},
684
+	{37, "ENOLCK", "no locks available"},
685
+	{38, "ENOSYS", "function not implemented"},
686
+	{39, "ENOTEMPTY", "directory not empty"},
687
+	{40, "ELOOP", "too many levels of symbolic links"},
688
+	{42, "ENOMSG", "no message of desired type"},
689
+	{43, "EIDRM", "identifier removed"},
690
+	{44, "ECHRNG", "channel number out of range"},
691
+	{45, "EL2NSYNC", "level 2 not synchronized"},
692
+	{46, "EL3HLT", "level 3 halted"},
693
+	{47, "EL3RST", "level 3 reset"},
694
+	{48, "ELNRNG", "link number out of range"},
695
+	{49, "EUNATCH", "protocol driver not attached"},
696
+	{50, "ENOCSI", "no CSI structure available"},
697
+	{51, "EL2HLT", "level 2 halted"},
698
+	{52, "EBADE", "invalid exchange"},
699
+	{53, "EBADR", "invalid request descriptor"},
700
+	{54, "EXFULL", "exchange full"},
701
+	{55, "ENOANO", "no anode"},
702
+	{56, "EBADRQC", "invalid request code"},
703
+	{57, "EBADSLT", "invalid slot"},
704
+	{59, "EBFONT", "bad font file format"},
705
+	{60, "ENOSTR", "device not a stream"},
706
+	{61, "ENODATA", "no data available"},
707
+	{62, "ETIME", "timer expired"},
708
+	{63, "ENOSR", "out of streams resources"},
709
+	{64, "ENONET", "machine is not on the network"},
710
+	{65, "ENOPKG", "package not installed"},
711
+	{66, "EREMOTE", "object is remote"},
712
+	{67, "ENOLINK", "link has been severed"},
713
+	{68, "EADV", "advertise error"},
714
+	{69, "ESRMNT", "srmount error"},
715
+	{70, "ECOMM", "communication error on send"},
716
+	{71, "EPROTO", "protocol error"},
717
+	{72, "EMULTIHOP", "multihop attempted"},
718
+	{73, "EDOTDOT", "RFS specific error"},
719
+	{74, "EBADMSG", "bad message"},
720
+	{75, "EOVERFLOW", "value too large for defined data type"},
721
+	{76, "ENOTUNIQ", "name not unique on network"},
722
+	{77, "EBADFD", "file descriptor in bad state"},
723
+	{78, "EREMCHG", "remote address changed"},
724
+	{79, "ELIBACC", "can not access a needed shared library"},
725
+	{80, "ELIBBAD", "accessing a corrupted shared library"},
726
+	{81, "ELIBSCN", ".lib section in a.out corrupted"},
727
+	{82, "ELIBMAX", "attempting to link in too many shared libraries"},
728
+	{83, "ELIBEXEC", "cannot exec a shared library directly"},
729
+	{84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
730
+	{85, "ERESTART", "interrupted system call should be restarted"},
731
+	{86, "ESTRPIPE", "streams pipe error"},
732
+	{87, "EUSERS", "too many users"},
733
+	{88, "ENOTSOCK", "socket operation on non-socket"},
734
+	{89, "EDESTADDRREQ", "destination address required"},
735
+	{90, "EMSGSIZE", "message too long"},
736
+	{91, "EPROTOTYPE", "protocol wrong type for socket"},
737
+	{92, "ENOPROTOOPT", "protocol not available"},
738
+	{93, "EPROTONOSUPPORT", "protocol not supported"},
739
+	{94, "ESOCKTNOSUPPORT", "socket type not supported"},
740
+	{95, "ENOTSUP", "operation not supported"},
741
+	{96, "EPFNOSUPPORT", "protocol family not supported"},
742
+	{97, "EAFNOSUPPORT", "address family not supported by protocol"},
743
+	{98, "EADDRINUSE", "address already in use"},
744
+	{99, "EADDRNOTAVAIL", "cannot assign requested address"},
745
+	{100, "ENETDOWN", "network is down"},
746
+	{101, "ENETUNREACH", "network is unreachable"},
747
+	{102, "ENETRESET", "network dropped connection on reset"},
748
+	{103, "ECONNABORTED", "software caused connection abort"},
749
+	{104, "ECONNRESET", "connection reset by peer"},
750
+	{105, "ENOBUFS", "no buffer space available"},
751
+	{106, "EISCONN", "transport endpoint is already connected"},
752
+	{107, "ENOTCONN", "transport endpoint is not connected"},
753
+	{108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
754
+	{109, "ETOOMANYREFS", "too many references: cannot splice"},
755
+	{110, "ETIMEDOUT", "connection timed out"},
756
+	{111, "ECONNREFUSED", "connection refused"},
757
+	{112, "EHOSTDOWN", "host is down"},
758
+	{113, "EHOSTUNREACH", "no route to host"},
759
+	{114, "EALREADY", "operation already in progress"},
760
+	{115, "EINPROGRESS", "operation now in progress"},
761
+	{116, "ESTALE", "stale file handle"},
762
+	{117, "EUCLEAN", "structure needs cleaning"},
763
+	{118, "ENOTNAM", "not a XENIX named type file"},
764
+	{119, "ENAVAIL", "no XENIX semaphores available"},
765
+	{120, "EISNAM", "is a named type file"},
766
+	{121, "EREMOTEIO", "remote I/O error"},
767
+	{122, "EDQUOT", "disk quota exceeded"},
768
+	{123, "ENOMEDIUM", "no medium found"},
769
+	{124, "EMEDIUMTYPE", "wrong medium type"},
770
+	{125, "ECANCELED", "operation canceled"},
771
+	{126, "ENOKEY", "required key not available"},
772
+	{127, "EKEYEXPIRED", "key has expired"},
773
+	{128, "EKEYREVOKED", "key has been revoked"},
774
+	{129, "EKEYREJECTED", "key was rejected by service"},
775
+	{130, "EOWNERDEAD", "owner died"},
776
+	{131, "ENOTRECOVERABLE", "state not recoverable"},
777
+	{132, "ERFKILL", "operation not possible due to RF-kill"},
778
+	{133, "EHWPOISON", "memory page has hardware error"},
779
+}
780
+
781
+// Signal table
782
+var signalList = [...]struct {
783
+	num  syscall.Signal
784
+	name string
785
+	desc string
786
+}{
787
+	{1, "SIGHUP", "hangup"},
788
+	{2, "SIGINT", "interrupt"},
789
+	{3, "SIGQUIT", "quit"},
790
+	{4, "SIGILL", "illegal instruction"},
791
+	{5, "SIGTRAP", "trace/breakpoint trap"},
792
+	{6, "SIGABRT", "aborted"},
793
+	{7, "SIGBUS", "bus error"},
794
+	{8, "SIGFPE", "floating point exception"},
795
+	{9, "SIGKILL", "killed"},
796
+	{10, "SIGUSR1", "user defined signal 1"},
797
+	{11, "SIGSEGV", "segmentation fault"},
798
+	{12, "SIGUSR2", "user defined signal 2"},
799
+	{13, "SIGPIPE", "broken pipe"},
800
+	{14, "SIGALRM", "alarm clock"},
801
+	{15, "SIGTERM", "terminated"},
802
+	{16, "SIGSTKFLT", "stack fault"},
803
+	{17, "SIGCHLD", "child exited"},
804
+	{18, "SIGCONT", "continued"},
805
+	{19, "SIGSTOP", "stopped (signal)"},
806
+	{20, "SIGTSTP", "stopped"},
807
+	{21, "SIGTTIN", "stopped (tty input)"},
808
+	{22, "SIGTTOU", "stopped (tty output)"},
809
+	{23, "SIGURG", "urgent I/O condition"},
810
+	{24, "SIGXCPU", "CPU time limit exceeded"},
811
+	{25, "SIGXFSZ", "file size limit exceeded"},
812
+	{26, "SIGVTALRM", "virtual timer expired"},
813
+	{27, "SIGPROF", "profiling timer expired"},
814
+	{28, "SIGWINCH", "window changed"},
815
+	{29, "SIGIO", "I/O possible"},
816
+	{30, "SIGPWR", "power failure"},
817
+	{31, "SIGSYS", "bad system call"},
818
+}

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go View File

@@ -5,7 +5,7 @@
5 5
 // +build mips,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0x2000b701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x800c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x80044d0e
149 150
 	OTPGETREGIONINFO                 = 0x800c4d0f
150 151
 	OTPLOCK                          = 0x400c4d10
@@ -249,6 +250,8 @@ const (
249 250
 	RTC_EPOCH_SET                    = 0x8004700e
250 251
 	RTC_IRQP_READ                    = 0x4004700b
251 252
 	RTC_IRQP_SET                     = 0x8004700c
253
+	RTC_PARAM_GET                    = 0x80187013
254
+	RTC_PARAM_SET                    = 0x80187014
252 255
 	RTC_PIE_OFF                      = 0x20007006
253 256
 	RTC_PIE_ON                       = 0x20007005
254 257
 	RTC_PLL_GET                      = 0x401c7011
@@ -292,6 +295,7 @@ const (
292 295
 	SO_BPF_EXTENSIONS                = 0x30
293 296
 	SO_BROADCAST                     = 0x20
294 297
 	SO_BSDCOMPAT                     = 0xe
298
+	SO_BUF_LOCK                      = 0x48
295 299
 	SO_BUSY_POLL                     = 0x2e
296 300
 	SO_BUSY_POLL_BUDGET              = 0x46
297 301
 	SO_CNX_ADVICE                    = 0x35
@@ -308,6 +312,7 @@ const (
308 312
 	SO_MARK                          = 0x24
309 313
 	SO_MAX_PACING_RATE               = 0x2f
310 314
 	SO_MEMINFO                       = 0x37
315
+	SO_NETNS_COOKIE                  = 0x47
311 316
 	SO_NOFCS                         = 0x2b
312 317
 	SO_OOBINLINE                     = 0x100
313 318
 	SO_PASSCRED                      = 0x11
@@ -321,9 +326,11 @@ const (
321 326
 	SO_RCVBUF                        = 0x1002
322 327
 	SO_RCVBUFFORCE                   = 0x21
323 328
 	SO_RCVLOWAT                      = 0x1004
329
+	SO_RCVMARK                       = 0x4b
324 330
 	SO_RCVTIMEO                      = 0x1006
325 331
 	SO_RCVTIMEO_NEW                  = 0x42
326 332
 	SO_RCVTIMEO_OLD                  = 0x1006
333
+	SO_RESERVE_MEM                   = 0x49
327 334
 	SO_REUSEADDR                     = 0x4
328 335
 	SO_REUSEPORT                     = 0x200
329 336
 	SO_RXQ_OVFL                      = 0x28
@@ -345,6 +352,7 @@ const (
345 352
 	SO_TIMESTAMPNS_NEW               = 0x40
346 353
 	SO_TIMESTAMPNS_OLD               = 0x23
347 354
 	SO_TIMESTAMP_NEW                 = 0x3f
355
+	SO_TXREHASH                      = 0x4a
348 356
 	SO_TXTIME                        = 0x3d
349 357
 	SO_TYPE                          = 0x1008
350 358
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go View File

@@ -5,7 +5,7 @@
5 5
 // +build mips64,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0x2000b701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x800c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x80044d0e
149 150
 	OTPGETREGIONINFO                 = 0x800c4d0f
150 151
 	OTPLOCK                          = 0x400c4d10
@@ -249,6 +250,8 @@ const (
249 250
 	RTC_EPOCH_SET                    = 0x8008700e
250 251
 	RTC_IRQP_READ                    = 0x4008700b
251 252
 	RTC_IRQP_SET                     = 0x8008700c
253
+	RTC_PARAM_GET                    = 0x80187013
254
+	RTC_PARAM_SET                    = 0x80187014
252 255
 	RTC_PIE_OFF                      = 0x20007006
253 256
 	RTC_PIE_ON                       = 0x20007005
254 257
 	RTC_PLL_GET                      = 0x40207011
@@ -292,6 +295,7 @@ const (
292 295
 	SO_BPF_EXTENSIONS                = 0x30
293 296
 	SO_BROADCAST                     = 0x20
294 297
 	SO_BSDCOMPAT                     = 0xe
298
+	SO_BUF_LOCK                      = 0x48
295 299
 	SO_BUSY_POLL                     = 0x2e
296 300
 	SO_BUSY_POLL_BUDGET              = 0x46
297 301
 	SO_CNX_ADVICE                    = 0x35
@@ -308,6 +312,7 @@ const (
308 312
 	SO_MARK                          = 0x24
309 313
 	SO_MAX_PACING_RATE               = 0x2f
310 314
 	SO_MEMINFO                       = 0x37
315
+	SO_NETNS_COOKIE                  = 0x47
311 316
 	SO_NOFCS                         = 0x2b
312 317
 	SO_OOBINLINE                     = 0x100
313 318
 	SO_PASSCRED                      = 0x11
@@ -321,9 +326,11 @@ const (
321 326
 	SO_RCVBUF                        = 0x1002
322 327
 	SO_RCVBUFFORCE                   = 0x21
323 328
 	SO_RCVLOWAT                      = 0x1004
329
+	SO_RCVMARK                       = 0x4b
324 330
 	SO_RCVTIMEO                      = 0x1006
325 331
 	SO_RCVTIMEO_NEW                  = 0x42
326 332
 	SO_RCVTIMEO_OLD                  = 0x1006
333
+	SO_RESERVE_MEM                   = 0x49
327 334
 	SO_REUSEADDR                     = 0x4
328 335
 	SO_REUSEPORT                     = 0x200
329 336
 	SO_RXQ_OVFL                      = 0x28
@@ -345,6 +352,7 @@ const (
345 352
 	SO_TIMESTAMPNS_NEW               = 0x40
346 353
 	SO_TIMESTAMPNS_OLD               = 0x23
347 354
 	SO_TIMESTAMP_NEW                 = 0x3f
355
+	SO_TXREHASH                      = 0x4a
348 356
 	SO_TXTIME                        = 0x3d
349 357
 	SO_TYPE                          = 0x1008
350 358
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go View File

@@ -5,7 +5,7 @@
5 5
 // +build mips64le,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0x2000b701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x800c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x80044d0e
149 150
 	OTPGETREGIONINFO                 = 0x800c4d0f
150 151
 	OTPLOCK                          = 0x400c4d10
@@ -249,6 +250,8 @@ const (
249 250
 	RTC_EPOCH_SET                    = 0x8008700e
250 251
 	RTC_IRQP_READ                    = 0x4008700b
251 252
 	RTC_IRQP_SET                     = 0x8008700c
253
+	RTC_PARAM_GET                    = 0x80187013
254
+	RTC_PARAM_SET                    = 0x80187014
252 255
 	RTC_PIE_OFF                      = 0x20007006
253 256
 	RTC_PIE_ON                       = 0x20007005
254 257
 	RTC_PLL_GET                      = 0x40207011
@@ -292,6 +295,7 @@ const (
292 295
 	SO_BPF_EXTENSIONS                = 0x30
293 296
 	SO_BROADCAST                     = 0x20
294 297
 	SO_BSDCOMPAT                     = 0xe
298
+	SO_BUF_LOCK                      = 0x48
295 299
 	SO_BUSY_POLL                     = 0x2e
296 300
 	SO_BUSY_POLL_BUDGET              = 0x46
297 301
 	SO_CNX_ADVICE                    = 0x35
@@ -308,6 +312,7 @@ const (
308 312
 	SO_MARK                          = 0x24
309 313
 	SO_MAX_PACING_RATE               = 0x2f
310 314
 	SO_MEMINFO                       = 0x37
315
+	SO_NETNS_COOKIE                  = 0x47
311 316
 	SO_NOFCS                         = 0x2b
312 317
 	SO_OOBINLINE                     = 0x100
313 318
 	SO_PASSCRED                      = 0x11
@@ -321,9 +326,11 @@ const (
321 326
 	SO_RCVBUF                        = 0x1002
322 327
 	SO_RCVBUFFORCE                   = 0x21
323 328
 	SO_RCVLOWAT                      = 0x1004
329
+	SO_RCVMARK                       = 0x4b
324 330
 	SO_RCVTIMEO                      = 0x1006
325 331
 	SO_RCVTIMEO_NEW                  = 0x42
326 332
 	SO_RCVTIMEO_OLD                  = 0x1006
333
+	SO_RESERVE_MEM                   = 0x49
327 334
 	SO_REUSEADDR                     = 0x4
328 335
 	SO_REUSEPORT                     = 0x200
329 336
 	SO_RXQ_OVFL                      = 0x28
@@ -345,6 +352,7 @@ const (
345 352
 	SO_TIMESTAMPNS_NEW               = 0x40
346 353
 	SO_TIMESTAMPNS_OLD               = 0x23
347 354
 	SO_TIMESTAMP_NEW                 = 0x3f
355
+	SO_TXREHASH                      = 0x4a
348 356
 	SO_TXTIME                        = 0x3d
349 357
 	SO_TYPE                          = 0x1008
350 358
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go View File

@@ -5,7 +5,7 @@
5 5
 // +build mipsle,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0x2000b701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x800c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x80044d0e
149 150
 	OTPGETREGIONINFO                 = 0x800c4d0f
150 151
 	OTPLOCK                          = 0x400c4d10
@@ -249,6 +250,8 @@ const (
249 250
 	RTC_EPOCH_SET                    = 0x8004700e
250 251
 	RTC_IRQP_READ                    = 0x4004700b
251 252
 	RTC_IRQP_SET                     = 0x8004700c
253
+	RTC_PARAM_GET                    = 0x80187013
254
+	RTC_PARAM_SET                    = 0x80187014
252 255
 	RTC_PIE_OFF                      = 0x20007006
253 256
 	RTC_PIE_ON                       = 0x20007005
254 257
 	RTC_PLL_GET                      = 0x401c7011
@@ -292,6 +295,7 @@ const (
292 295
 	SO_BPF_EXTENSIONS                = 0x30
293 296
 	SO_BROADCAST                     = 0x20
294 297
 	SO_BSDCOMPAT                     = 0xe
298
+	SO_BUF_LOCK                      = 0x48
295 299
 	SO_BUSY_POLL                     = 0x2e
296 300
 	SO_BUSY_POLL_BUDGET              = 0x46
297 301
 	SO_CNX_ADVICE                    = 0x35
@@ -308,6 +312,7 @@ const (
308 312
 	SO_MARK                          = 0x24
309 313
 	SO_MAX_PACING_RATE               = 0x2f
310 314
 	SO_MEMINFO                       = 0x37
315
+	SO_NETNS_COOKIE                  = 0x47
311 316
 	SO_NOFCS                         = 0x2b
312 317
 	SO_OOBINLINE                     = 0x100
313 318
 	SO_PASSCRED                      = 0x11
@@ -321,9 +326,11 @@ const (
321 326
 	SO_RCVBUF                        = 0x1002
322 327
 	SO_RCVBUFFORCE                   = 0x21
323 328
 	SO_RCVLOWAT                      = 0x1004
329
+	SO_RCVMARK                       = 0x4b
324 330
 	SO_RCVTIMEO                      = 0x1006
325 331
 	SO_RCVTIMEO_NEW                  = 0x42
326 332
 	SO_RCVTIMEO_OLD                  = 0x1006
333
+	SO_RESERVE_MEM                   = 0x49
327 334
 	SO_REUSEADDR                     = 0x4
328 335
 	SO_REUSEPORT                     = 0x200
329 336
 	SO_RXQ_OVFL                      = 0x28
@@ -345,6 +352,7 @@ const (
345 352
 	SO_TIMESTAMPNS_NEW               = 0x40
346 353
 	SO_TIMESTAMPNS_OLD               = 0x23
347 354
 	SO_TIMESTAMP_NEW                 = 0x3f
355
+	SO_TXREHASH                      = 0x4a
348 356
 	SO_TXTIME                        = 0x3d
349 357
 	SO_TYPE                          = 0x1008
350 358
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go View File

@@ -5,7 +5,7 @@
5 5
 // +build ppc,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -147,6 +147,7 @@ const (
147 147
 	NS_GET_USERNS                    = 0x2000b701
148 148
 	OLCUC                            = 0x4
149 149
 	ONLCR                            = 0x2
150
+	OTPERASE                         = 0x800c4d19
150 151
 	OTPGETREGIONCOUNT                = 0x80044d0e
151 152
 	OTPGETREGIONINFO                 = 0x800c4d0f
152 153
 	OTPLOCK                          = 0x400c4d10
@@ -304,6 +305,8 @@ const (
304 305
 	RTC_EPOCH_SET                    = 0x8004700e
305 306
 	RTC_IRQP_READ                    = 0x4004700b
306 307
 	RTC_IRQP_SET                     = 0x8004700c
308
+	RTC_PARAM_GET                    = 0x80187013
309
+	RTC_PARAM_SET                    = 0x80187014
307 310
 	RTC_PIE_OFF                      = 0x20007006
308 311
 	RTC_PIE_ON                       = 0x20007005
309 312
 	RTC_PLL_GET                      = 0x401c7011
@@ -347,6 +350,7 @@ const (
347 350
 	SO_BPF_EXTENSIONS                = 0x30
348 351
 	SO_BROADCAST                     = 0x6
349 352
 	SO_BSDCOMPAT                     = 0xe
353
+	SO_BUF_LOCK                      = 0x48
350 354
 	SO_BUSY_POLL                     = 0x2e
351 355
 	SO_BUSY_POLL_BUDGET              = 0x46
352 356
 	SO_CNX_ADVICE                    = 0x35
@@ -363,6 +367,7 @@ const (
363 367
 	SO_MARK                          = 0x24
364 368
 	SO_MAX_PACING_RATE               = 0x2f
365 369
 	SO_MEMINFO                       = 0x37
370
+	SO_NETNS_COOKIE                  = 0x47
366 371
 	SO_NOFCS                         = 0x2b
367 372
 	SO_OOBINLINE                     = 0xa
368 373
 	SO_PASSCRED                      = 0x14
@@ -376,9 +381,11 @@ const (
376 381
 	SO_RCVBUF                        = 0x8
377 382
 	SO_RCVBUFFORCE                   = 0x21
378 383
 	SO_RCVLOWAT                      = 0x10
384
+	SO_RCVMARK                       = 0x4b
379 385
 	SO_RCVTIMEO                      = 0x12
380 386
 	SO_RCVTIMEO_NEW                  = 0x42
381 387
 	SO_RCVTIMEO_OLD                  = 0x12
388
+	SO_RESERVE_MEM                   = 0x49
382 389
 	SO_REUSEADDR                     = 0x2
383 390
 	SO_REUSEPORT                     = 0xf
384 391
 	SO_RXQ_OVFL                      = 0x28
@@ -399,6 +406,7 @@ const (
399 406
 	SO_TIMESTAMPNS_NEW               = 0x40
400 407
 	SO_TIMESTAMPNS_OLD               = 0x23
401 408
 	SO_TIMESTAMP_NEW                 = 0x3f
409
+	SO_TXREHASH                      = 0x4a
402 410
 	SO_TXTIME                        = 0x3d
403 411
 	SO_TYPE                          = 0x3
404 412
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go View File

@@ -5,7 +5,7 @@
5 5
 // +build ppc64,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -147,6 +147,7 @@ const (
147 147
 	NS_GET_USERNS                    = 0x2000b701
148 148
 	OLCUC                            = 0x4
149 149
 	ONLCR                            = 0x2
150
+	OTPERASE                         = 0x800c4d19
150 151
 	OTPGETREGIONCOUNT                = 0x80044d0e
151 152
 	OTPGETREGIONINFO                 = 0x800c4d0f
152 153
 	OTPLOCK                          = 0x400c4d10
@@ -308,6 +309,8 @@ const (
308 309
 	RTC_EPOCH_SET                    = 0x8008700e
309 310
 	RTC_IRQP_READ                    = 0x4008700b
310 311
 	RTC_IRQP_SET                     = 0x8008700c
312
+	RTC_PARAM_GET                    = 0x80187013
313
+	RTC_PARAM_SET                    = 0x80187014
311 314
 	RTC_PIE_OFF                      = 0x20007006
312 315
 	RTC_PIE_ON                       = 0x20007005
313 316
 	RTC_PLL_GET                      = 0x40207011
@@ -351,6 +354,7 @@ const (
351 354
 	SO_BPF_EXTENSIONS                = 0x30
352 355
 	SO_BROADCAST                     = 0x6
353 356
 	SO_BSDCOMPAT                     = 0xe
357
+	SO_BUF_LOCK                      = 0x48
354 358
 	SO_BUSY_POLL                     = 0x2e
355 359
 	SO_BUSY_POLL_BUDGET              = 0x46
356 360
 	SO_CNX_ADVICE                    = 0x35
@@ -367,6 +371,7 @@ const (
367 371
 	SO_MARK                          = 0x24
368 372
 	SO_MAX_PACING_RATE               = 0x2f
369 373
 	SO_MEMINFO                       = 0x37
374
+	SO_NETNS_COOKIE                  = 0x47
370 375
 	SO_NOFCS                         = 0x2b
371 376
 	SO_OOBINLINE                     = 0xa
372 377
 	SO_PASSCRED                      = 0x14
@@ -380,9 +385,11 @@ const (
380 385
 	SO_RCVBUF                        = 0x8
381 386
 	SO_RCVBUFFORCE                   = 0x21
382 387
 	SO_RCVLOWAT                      = 0x10
388
+	SO_RCVMARK                       = 0x4b
383 389
 	SO_RCVTIMEO                      = 0x12
384 390
 	SO_RCVTIMEO_NEW                  = 0x42
385 391
 	SO_RCVTIMEO_OLD                  = 0x12
392
+	SO_RESERVE_MEM                   = 0x49
386 393
 	SO_REUSEADDR                     = 0x2
387 394
 	SO_REUSEPORT                     = 0xf
388 395
 	SO_RXQ_OVFL                      = 0x28
@@ -403,6 +410,7 @@ const (
403 410
 	SO_TIMESTAMPNS_NEW               = 0x40
404 411
 	SO_TIMESTAMPNS_OLD               = 0x23
405 412
 	SO_TIMESTAMP_NEW                 = 0x3f
413
+	SO_TXREHASH                      = 0x4a
406 414
 	SO_TXTIME                        = 0x3d
407 415
 	SO_TYPE                          = 0x3
408 416
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go View File

@@ -5,7 +5,7 @@
5 5
 // +build ppc64le,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -147,6 +147,7 @@ const (
147 147
 	NS_GET_USERNS                    = 0x2000b701
148 148
 	OLCUC                            = 0x4
149 149
 	ONLCR                            = 0x2
150
+	OTPERASE                         = 0x800c4d19
150 151
 	OTPGETREGIONCOUNT                = 0x80044d0e
151 152
 	OTPGETREGIONINFO                 = 0x800c4d0f
152 153
 	OTPLOCK                          = 0x400c4d10
@@ -308,6 +309,8 @@ const (
308 309
 	RTC_EPOCH_SET                    = 0x8008700e
309 310
 	RTC_IRQP_READ                    = 0x4008700b
310 311
 	RTC_IRQP_SET                     = 0x8008700c
312
+	RTC_PARAM_GET                    = 0x80187013
313
+	RTC_PARAM_SET                    = 0x80187014
311 314
 	RTC_PIE_OFF                      = 0x20007006
312 315
 	RTC_PIE_ON                       = 0x20007005
313 316
 	RTC_PLL_GET                      = 0x40207011
@@ -351,6 +354,7 @@ const (
351 354
 	SO_BPF_EXTENSIONS                = 0x30
352 355
 	SO_BROADCAST                     = 0x6
353 356
 	SO_BSDCOMPAT                     = 0xe
357
+	SO_BUF_LOCK                      = 0x48
354 358
 	SO_BUSY_POLL                     = 0x2e
355 359
 	SO_BUSY_POLL_BUDGET              = 0x46
356 360
 	SO_CNX_ADVICE                    = 0x35
@@ -367,6 +371,7 @@ const (
367 371
 	SO_MARK                          = 0x24
368 372
 	SO_MAX_PACING_RATE               = 0x2f
369 373
 	SO_MEMINFO                       = 0x37
374
+	SO_NETNS_COOKIE                  = 0x47
370 375
 	SO_NOFCS                         = 0x2b
371 376
 	SO_OOBINLINE                     = 0xa
372 377
 	SO_PASSCRED                      = 0x14
@@ -380,9 +385,11 @@ const (
380 385
 	SO_RCVBUF                        = 0x8
381 386
 	SO_RCVBUFFORCE                   = 0x21
382 387
 	SO_RCVLOWAT                      = 0x10
388
+	SO_RCVMARK                       = 0x4b
383 389
 	SO_RCVTIMEO                      = 0x12
384 390
 	SO_RCVTIMEO_NEW                  = 0x42
385 391
 	SO_RCVTIMEO_OLD                  = 0x12
392
+	SO_RESERVE_MEM                   = 0x49
386 393
 	SO_REUSEADDR                     = 0x2
387 394
 	SO_REUSEPORT                     = 0xf
388 395
 	SO_RXQ_OVFL                      = 0x28
@@ -403,6 +410,7 @@ const (
403 410
 	SO_TIMESTAMPNS_NEW               = 0x40
404 411
 	SO_TIMESTAMPNS_OLD               = 0x23
405 412
 	SO_TIMESTAMP_NEW                 = 0x3f
413
+	SO_TXREHASH                      = 0x4a
406 414
 	SO_TXTIME                        = 0x3d
407 415
 	SO_TYPE                          = 0x3
408 416
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go View File

@@ -5,7 +5,7 @@
5 5
 // +build riscv64,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0xb701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x400c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x40044d0e
149 150
 	OTPGETREGIONINFO                 = 0x400c4d0f
150 151
 	OTPLOCK                          = 0x800c4d10
@@ -237,6 +238,8 @@ const (
237 238
 	RTC_EPOCH_SET                    = 0x4008700e
238 239
 	RTC_IRQP_READ                    = 0x8008700b
239 240
 	RTC_IRQP_SET                     = 0x4008700c
241
+	RTC_PARAM_GET                    = 0x40187013
242
+	RTC_PARAM_SET                    = 0x40187014
240 243
 	RTC_PIE_OFF                      = 0x7006
241 244
 	RTC_PIE_ON                       = 0x7005
242 245
 	RTC_PLL_GET                      = 0x80207011
@@ -280,6 +283,7 @@ const (
280 283
 	SO_BPF_EXTENSIONS                = 0x30
281 284
 	SO_BROADCAST                     = 0x6
282 285
 	SO_BSDCOMPAT                     = 0xe
286
+	SO_BUF_LOCK                      = 0x48
283 287
 	SO_BUSY_POLL                     = 0x2e
284 288
 	SO_BUSY_POLL_BUDGET              = 0x46
285 289
 	SO_CNX_ADVICE                    = 0x35
@@ -296,6 +300,7 @@ const (
296 300
 	SO_MARK                          = 0x24
297 301
 	SO_MAX_PACING_RATE               = 0x2f
298 302
 	SO_MEMINFO                       = 0x37
303
+	SO_NETNS_COOKIE                  = 0x47
299 304
 	SO_NOFCS                         = 0x2b
300 305
 	SO_OOBINLINE                     = 0xa
301 306
 	SO_PASSCRED                      = 0x10
@@ -309,9 +314,11 @@ const (
309 314
 	SO_RCVBUF                        = 0x8
310 315
 	SO_RCVBUFFORCE                   = 0x21
311 316
 	SO_RCVLOWAT                      = 0x12
317
+	SO_RCVMARK                       = 0x4b
312 318
 	SO_RCVTIMEO                      = 0x14
313 319
 	SO_RCVTIMEO_NEW                  = 0x42
314 320
 	SO_RCVTIMEO_OLD                  = 0x14
321
+	SO_RESERVE_MEM                   = 0x49
315 322
 	SO_REUSEADDR                     = 0x2
316 323
 	SO_REUSEPORT                     = 0xf
317 324
 	SO_RXQ_OVFL                      = 0x28
@@ -332,6 +339,7 @@ const (
332 339
 	SO_TIMESTAMPNS_NEW               = 0x40
333 340
 	SO_TIMESTAMPNS_OLD               = 0x23
334 341
 	SO_TIMESTAMP_NEW                 = 0x3f
342
+	SO_TXREHASH                      = 0x4a
335 343
 	SO_TXTIME                        = 0x3d
336 344
 	SO_TYPE                          = 0x3
337 345
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go View File

@@ -5,7 +5,7 @@
5 5
 // +build s390x,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -145,6 +145,7 @@ const (
145 145
 	NS_GET_USERNS                    = 0xb701
146 146
 	OLCUC                            = 0x2
147 147
 	ONLCR                            = 0x4
148
+	OTPERASE                         = 0x400c4d19
148 149
 	OTPGETREGIONCOUNT                = 0x40044d0e
149 150
 	OTPGETREGIONINFO                 = 0x400c4d0f
150 151
 	OTPLOCK                          = 0x800c4d10
@@ -312,6 +313,8 @@ const (
312 313
 	RTC_EPOCH_SET                    = 0x4008700e
313 314
 	RTC_IRQP_READ                    = 0x8008700b
314 315
 	RTC_IRQP_SET                     = 0x4008700c
316
+	RTC_PARAM_GET                    = 0x40187013
317
+	RTC_PARAM_SET                    = 0x40187014
315 318
 	RTC_PIE_OFF                      = 0x7006
316 319
 	RTC_PIE_ON                       = 0x7005
317 320
 	RTC_PLL_GET                      = 0x80207011
@@ -355,6 +358,7 @@ const (
355 358
 	SO_BPF_EXTENSIONS                = 0x30
356 359
 	SO_BROADCAST                     = 0x6
357 360
 	SO_BSDCOMPAT                     = 0xe
361
+	SO_BUF_LOCK                      = 0x48
358 362
 	SO_BUSY_POLL                     = 0x2e
359 363
 	SO_BUSY_POLL_BUDGET              = 0x46
360 364
 	SO_CNX_ADVICE                    = 0x35
@@ -371,6 +375,7 @@ const (
371 375
 	SO_MARK                          = 0x24
372 376
 	SO_MAX_PACING_RATE               = 0x2f
373 377
 	SO_MEMINFO                       = 0x37
378
+	SO_NETNS_COOKIE                  = 0x47
374 379
 	SO_NOFCS                         = 0x2b
375 380
 	SO_OOBINLINE                     = 0xa
376 381
 	SO_PASSCRED                      = 0x10
@@ -384,9 +389,11 @@ const (
384 389
 	SO_RCVBUF                        = 0x8
385 390
 	SO_RCVBUFFORCE                   = 0x21
386 391
 	SO_RCVLOWAT                      = 0x12
392
+	SO_RCVMARK                       = 0x4b
387 393
 	SO_RCVTIMEO                      = 0x14
388 394
 	SO_RCVTIMEO_NEW                  = 0x42
389 395
 	SO_RCVTIMEO_OLD                  = 0x14
396
+	SO_RESERVE_MEM                   = 0x49
390 397
 	SO_REUSEADDR                     = 0x2
391 398
 	SO_REUSEPORT                     = 0xf
392 399
 	SO_RXQ_OVFL                      = 0x28
@@ -407,6 +414,7 @@ const (
407 414
 	SO_TIMESTAMPNS_NEW               = 0x40
408 415
 	SO_TIMESTAMPNS_OLD               = 0x23
409 416
 	SO_TIMESTAMP_NEW                 = 0x3f
417
+	SO_TXREHASH                      = 0x4a
410 418
 	SO_TXTIME                        = 0x3d
411 419
 	SO_TYPE                          = 0x3
412 420
 	SO_WIFI_STATUS                   = 0x29

+ 9
- 1
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go View File

@@ -5,7 +5,7 @@
5 5
 // +build sparc64,linux
6 6
 
7 7
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
8
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
8
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
9 9
 
10 10
 package unix
11 11
 
@@ -150,6 +150,7 @@ const (
150 150
 	NS_GET_USERNS                    = 0x2000b701
151 151
 	OLCUC                            = 0x2
152 152
 	ONLCR                            = 0x4
153
+	OTPERASE                         = 0x800c4d19
153 154
 	OTPGETREGIONCOUNT                = 0x80044d0e
154 155
 	OTPGETREGIONINFO                 = 0x800c4d0f
155 156
 	OTPLOCK                          = 0x400c4d10
@@ -303,6 +304,8 @@ const (
303 304
 	RTC_EPOCH_SET                    = 0x8008700e
304 305
 	RTC_IRQP_READ                    = 0x4008700b
305 306
 	RTC_IRQP_SET                     = 0x8008700c
307
+	RTC_PARAM_GET                    = 0x80187013
308
+	RTC_PARAM_SET                    = 0x80187014
306 309
 	RTC_PIE_OFF                      = 0x20007006
307 310
 	RTC_PIE_ON                       = 0x20007005
308 311
 	RTC_PLL_GET                      = 0x40207011
@@ -346,6 +349,7 @@ const (
346 349
 	SO_BPF_EXTENSIONS                = 0x32
347 350
 	SO_BROADCAST                     = 0x20
348 351
 	SO_BSDCOMPAT                     = 0x400
352
+	SO_BUF_LOCK                      = 0x51
349 353
 	SO_BUSY_POLL                     = 0x30
350 354
 	SO_BUSY_POLL_BUDGET              = 0x49
351 355
 	SO_CNX_ADVICE                    = 0x37
@@ -362,6 +366,7 @@ const (
362 366
 	SO_MARK                          = 0x22
363 367
 	SO_MAX_PACING_RATE               = 0x31
364 368
 	SO_MEMINFO                       = 0x39
369
+	SO_NETNS_COOKIE                  = 0x50
365 370
 	SO_NOFCS                         = 0x27
366 371
 	SO_OOBINLINE                     = 0x100
367 372
 	SO_PASSCRED                      = 0x2
@@ -375,9 +380,11 @@ const (
375 380
 	SO_RCVBUF                        = 0x1002
376 381
 	SO_RCVBUFFORCE                   = 0x100b
377 382
 	SO_RCVLOWAT                      = 0x800
383
+	SO_RCVMARK                       = 0x54
378 384
 	SO_RCVTIMEO                      = 0x2000
379 385
 	SO_RCVTIMEO_NEW                  = 0x44
380 386
 	SO_RCVTIMEO_OLD                  = 0x2000
387
+	SO_RESERVE_MEM                   = 0x52
381 388
 	SO_REUSEADDR                     = 0x4
382 389
 	SO_REUSEPORT                     = 0x200
383 390
 	SO_RXQ_OVFL                      = 0x24
@@ -398,6 +405,7 @@ const (
398 405
 	SO_TIMESTAMPNS_NEW               = 0x42
399 406
 	SO_TIMESTAMPNS_OLD               = 0x21
400 407
 	SO_TIMESTAMP_NEW                 = 0x46
408
+	SO_TXREHASH                      = 0x53
401 409
 	SO_TXTIME                        = 0x3f
402 410
 	SO_TYPE                          = 0x1008
403 411
 	SO_WIFI_STATUS                   = 0x25

+ 3
- 0
vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go View File

@@ -1020,7 +1020,10 @@ const (
1020 1020
 	RLIMIT_CPU                        = 0x0
1021 1021
 	RLIMIT_DATA                       = 0x2
1022 1022
 	RLIMIT_FSIZE                      = 0x1
1023
+	RLIMIT_MEMLOCK                    = 0x6
1023 1024
 	RLIMIT_NOFILE                     = 0x8
1025
+	RLIMIT_NPROC                      = 0x7
1026
+	RLIMIT_RSS                        = 0x5
1024 1027
 	RLIMIT_STACK                      = 0x3
1025 1028
 	RLIM_INFINITY                     = 0x7fffffffffffffff
1026 1029
 	RTAX_AUTHOR                       = 0x6

+ 3
- 0
vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go View File

@@ -1020,7 +1020,10 @@ const (
1020 1020
 	RLIMIT_CPU                        = 0x0
1021 1021
 	RLIMIT_DATA                       = 0x2
1022 1022
 	RLIMIT_FSIZE                      = 0x1
1023
+	RLIMIT_MEMLOCK                    = 0x6
1023 1024
 	RLIMIT_NOFILE                     = 0x8
1025
+	RLIMIT_NPROC                      = 0x7
1026
+	RLIMIT_RSS                        = 0x5
1024 1027
 	RLIMIT_STACK                      = 0x3
1025 1028
 	RLIM_INFINITY                     = 0x7fffffffffffffff
1026 1029
 	RTAX_AUTHOR                       = 0x6

+ 13
- 13
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go View File

@@ -17,6 +17,7 @@ int getdirent(int, uintptr_t, size_t);
17 17
 int wait4(int, uintptr_t, int, uintptr_t);
18 18
 int ioctl(int, int, uintptr_t);
19 19
 int fcntl(uintptr_t, int, uintptr_t);
20
+int fsync_range(int, int, long long, long long);
20 21
 int acct(uintptr_t);
21 22
 int chdir(uintptr_t);
22 23
 int chroot(uintptr_t);
@@ -29,7 +30,6 @@ int fchmod(int, unsigned int);
29 30
 int fchmodat(int, uintptr_t, unsigned int, int);
30 31
 int fchownat(int, uintptr_t, int, int, int);
31 32
 int fdatasync(int);
32
-int fsync(int);
33 33
 int getpgid(int);
34 34
 int getpgrp();
35 35
 int getpid();
@@ -255,6 +255,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
255 255
 
256 256
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
257 257
 
258
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
259
+	r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
260
+	if r0 == -1 && er != nil {
261
+		err = er
262
+	}
263
+	return
264
+}
265
+
266
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
+
258 268
 func Acct(path string) (err error) {
259 269
 	_p0 := uintptr(unsafe.Pointer(C.CString(path)))
260 270
 	r0, er := C.acct(C.uintptr_t(_p0))
@@ -379,16 +389,6 @@ func Fdatasync(fd int) (err error) {
379 389
 
380 390
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
381 391
 
382
-func Fsync(fd int) (err error) {
383
-	r0, er := C.fsync(C.int(fd))
384
-	if r0 == -1 && er != nil {
385
-		err = er
386
-	}
387
-	return
388
-}
389
-
390
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
391
-
392 392
 func Getpgid(pid int) (pgid int, err error) {
393 393
 	r0, er := C.getpgid(C.int(pid))
394 394
 	pgid = int(r0)
@@ -975,7 +975,7 @@ func Pause() (err error) {
975 975
 
976 976
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
977 977
 
978
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
978
+func pread(fd int, p []byte, offset int64) (n int, err error) {
979 979
 	var _p0 *byte
980 980
 	if len(p) > 0 {
981 981
 		_p0 = &p[0]
@@ -992,7 +992,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
992 992
 
993 993
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
994 994
 
995
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
995
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
996 996
 	var _p0 *byte
997 997
 	if len(p) > 0 {
998 998
 		_p0 = &p[0]

+ 12
- 12
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go View File

@@ -135,6 +135,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
135 135
 
136 136
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
137 137
 
138
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
139
+	_, e1 := callfsync_range(fd, how, start, length)
140
+	if e1 != 0 {
141
+		err = errnoErr(e1)
142
+	}
143
+	return
144
+}
145
+
146
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
147
+
138 148
 func Acct(path string) (err error) {
139 149
 	var _p0 *byte
140 150
 	_p0, err = BytePtrFromString(path)
@@ -283,16 +293,6 @@ func Fdatasync(fd int) (err error) {
283 293
 
284 294
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
285 295
 
286
-func Fsync(fd int) (err error) {
287
-	_, e1 := callfsync(fd)
288
-	if e1 != 0 {
289
-		err = errnoErr(e1)
290
-	}
291
-	return
292
-}
293
-
294
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
295
-
296 296
 func Getpgid(pid int) (pgid int, err error) {
297 297
 	r0, e1 := callgetpgid(pid)
298 298
 	pgid = int(r0)
@@ -931,7 +931,7 @@ func Pause() (err error) {
931 931
 
932 932
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
933 933
 
934
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
934
+func pread(fd int, p []byte, offset int64) (n int, err error) {
935 935
 	var _p0 *byte
936 936
 	if len(p) > 0 {
937 937
 		_p0 = &p[0]
@@ -946,7 +946,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
946 946
 
947 947
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
948 948
 
949
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
949
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
950 950
 	var _p0 *byte
951 951
 	if len(p) > 0 {
952 952
 		_p0 = &p[0]

+ 10
- 10
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go View File

@@ -18,6 +18,7 @@ import (
18 18
 //go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
19 19
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
20 20
 //go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
21
+//go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
21 22
 //go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
22 23
 //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
23 24
 //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
@@ -30,7 +31,6 @@ import (
30 31
 //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
31 32
 //go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
32 33
 //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
33
-//go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
34 34
 //go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
35 35
 //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
36 36
 //go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
@@ -136,6 +136,7 @@ import (
136 136
 //go:linkname libc_wait4 libc_wait4
137 137
 //go:linkname libc_ioctl libc_ioctl
138 138
 //go:linkname libc_fcntl libc_fcntl
139
+//go:linkname libc_fsync_range libc_fsync_range
139 140
 //go:linkname libc_acct libc_acct
140 141
 //go:linkname libc_chdir libc_chdir
141 142
 //go:linkname libc_chroot libc_chroot
@@ -148,7 +149,6 @@ import (
148 149
 //go:linkname libc_fchmodat libc_fchmodat
149 150
 //go:linkname libc_fchownat libc_fchownat
150 151
 //go:linkname libc_fdatasync libc_fdatasync
151
-//go:linkname libc_fsync libc_fsync
152 152
 //go:linkname libc_getpgid libc_getpgid
153 153
 //go:linkname libc_getpgrp libc_getpgrp
154 154
 //go:linkname libc_getpid libc_getpid
@@ -257,6 +257,7 @@ var (
257 257
 	libc_wait4,
258 258
 	libc_ioctl,
259 259
 	libc_fcntl,
260
+	libc_fsync_range,
260 261
 	libc_acct,
261 262
 	libc_chdir,
262 263
 	libc_chroot,
@@ -269,7 +270,6 @@ var (
269 270
 	libc_fchmodat,
270 271
 	libc_fchownat,
271 272
 	libc_fdatasync,
272
-	libc_fsync,
273 273
 	libc_getpgid,
274 274
 	libc_getpgrp,
275 275
 	libc_getpid,
@@ -430,6 +430,13 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
430 430
 
431 431
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
432 432
 
433
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
434
+	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
435
+	return
436
+}
437
+
438
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
439
+
433 440
 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
434 441
 	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
435 442
 	return
@@ -514,13 +521,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
514 521
 
515 522
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
516 523
 
517
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
518
-	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
519
-	return
520
-}
521
-
522
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
523
-
524 524
 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
525 525
 	r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
526 526
 	return

+ 9
- 9
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go View File

@@ -16,6 +16,7 @@ int getdirent(int, uintptr_t, size_t);
16 16
 int wait4(int, uintptr_t, int, uintptr_t);
17 17
 int ioctl(int, int, uintptr_t);
18 18
 int fcntl(uintptr_t, int, uintptr_t);
19
+int fsync_range(int, int, long long, long long);
19 20
 int acct(uintptr_t);
20 21
 int chdir(uintptr_t);
21 22
 int chroot(uintptr_t);
@@ -28,7 +29,6 @@ int fchmod(int, unsigned int);
28 29
 int fchmodat(int, uintptr_t, unsigned int, int);
29 30
 int fchownat(int, uintptr_t, int, int, int);
30 31
 int fdatasync(int);
31
-int fsync(int);
32 32
 int getpgid(int);
33 33
 int getpgrp();
34 34
 int getpid();
@@ -199,6 +199,14 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
199 199
 
200 200
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
201 201
 
202
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
203
+	r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
204
+	e1 = syscall.GetErrno()
205
+	return
206
+}
207
+
208
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
209
+
202 210
 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
203 211
 	r1 = uintptr(C.acct(C.uintptr_t(_p0)))
204 212
 	e1 = syscall.GetErrno()
@@ -295,14 +303,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
295 303
 
296 304
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
297 305
 
298
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
299
-	r1 = uintptr(C.fsync(C.int(fd)))
300
-	e1 = syscall.GetErrno()
301
-	return
302
-}
303
-
304
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
305
-
306 306
 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
307 307
 	r1 = uintptr(C.getpgid(C.int(pid)))
308 308
 	e1 = syscall.GetErrno()

+ 0
- 0
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go View File


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

Loading…
Cancel
Save