Browse code

Update containerd to v1.7.17

Signed-off-by: Derek McGowan <derek@mcg.dev>

Derek McGowan authored on 2024/05/17 07:24:38
Showing 28 changed files
... ...
@@ -15,7 +15,7 @@ require (
15 15
 	github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1
16 16
 	github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0
17 17
 	github.com/Microsoft/go-winio v0.6.2
18
-	github.com/Microsoft/hcsshim v0.11.4
18
+	github.com/Microsoft/hcsshim v0.11.5
19 19
 	github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91
20 20
 	github.com/aws/aws-sdk-go-v2 v1.24.1
21 21
 	github.com/aws/aws-sdk-go-v2/config v1.26.6
... ...
@@ -25,7 +25,7 @@ require (
25 25
 	github.com/aws/smithy-go v1.19.0
26 26
 	github.com/cloudflare/cfssl v1.6.4
27 27
 	github.com/containerd/cgroups/v3 v3.0.3
28
-	github.com/containerd/containerd v1.7.16
28
+	github.com/containerd/containerd v1.7.17
29 29
 	github.com/containerd/continuity v0.4.3
30 30
 	github.com/containerd/fifo v1.1.0
31 31
 	github.com/containerd/log v0.1.0
... ...
@@ -76,7 +76,7 @@ require (
76 76
 	github.com/moby/term v0.5.0
77 77
 	github.com/morikuni/aec v1.0.0
78 78
 	github.com/opencontainers/go-digest v1.0.0
79
-	github.com/opencontainers/image-spec v1.1.0-rc5
79
+	github.com/opencontainers/image-spec v1.1.0
80 80
 	github.com/opencontainers/runc v1.1.12
81 81
 	github.com/opencontainers/runtime-spec v1.2.0
82 82
 	github.com/opencontainers/selinux v1.11.0
... ...
@@ -144,7 +144,7 @@ require (
144 144
 	github.com/containerd/go-runc v1.1.0 // indirect
145 145
 	github.com/containerd/nydus-snapshotter v0.13.7 // indirect
146 146
 	github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
147
-	github.com/containerd/ttrpc v1.2.3 // indirect
147
+	github.com/containerd/ttrpc v1.2.4 // indirect
148 148
 	github.com/containernetworking/cni v1.1.2 // indirect
149 149
 	github.com/containernetworking/plugins v1.4.0 // indirect
150 150
 	github.com/cyphar/filepath-securejoin v0.2.4 // indirect
... ...
@@ -40,8 +40,8 @@ github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0 h1:cOjLyhBhe91glg
40 40
 github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0/go.mod h1:fBaQWrftOD5CrVCUfoYGHs4X4VViTuGOXA8WloCjTY0=
41 41
 github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
42 42
 github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
43
-github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
44
-github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=
43
+github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38=
44
+github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU=
45 45
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
46 46
 github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91 h1:vX+gnvBc56EbWYrmlhYbFYRaeikAke1GL84N4BEYOFE=
47 47
 github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91/go.mod h1:cDLGBht23g0XQdLjzn6xOGXDkLK182YfINAaZEQLCHQ=
... ...
@@ -156,8 +156,8 @@ github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGD
156 156
 github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0=
157 157
 github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro=
158 158
 github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk=
159
-github.com/containerd/containerd v1.7.16 h1:7Zsfe8Fkj4Wi2My6DXGQ87hiqIrmOXolm72ZEkFU5Mg=
160
-github.com/containerd/containerd v1.7.16/go.mod h1:NL49g7A/Fui7ccmxV6zkBWwqMgmMxFWzujYCc+JLt7k=
159
+github.com/containerd/containerd v1.7.17 h1:KjNnn0+tAVQHAoaWRjmdak9WlvnFR/8rU1CHHy8Rm2A=
160
+github.com/containerd/containerd v1.7.17/go.mod h1:vK+hhT4TIv2uejlcDlbVIc8+h/BqtKLIyNrtCZol8lI=
161 161
 github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
162 162
 github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
163 163
 github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=
... ...
@@ -172,8 +172,8 @@ github.com/containerd/nydus-snapshotter v0.13.7 h1:x7DHvGnzJOu1ZPwPYkeOPk5MjZZYb
172 172
 github.com/containerd/nydus-snapshotter v0.13.7/go.mod h1:VPVKQ3jmHFIcUIV2yiQ1kImZuBFS3GXDohKs9mRABVE=
173 173
 github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
174 174
 github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk=
175
-github.com/containerd/ttrpc v1.2.3 h1:4jlhbXIGvijRtNC8F/5CpuJZ7yKOBFGFOOXg1bkISz0=
176
-github.com/containerd/ttrpc v1.2.3/go.mod h1:ieWsXucbb8Mj9PH0rXCw1i8IunRbbAiDkpXkbfflWBM=
175
+github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05Oo=
176
+github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc=
177 177
 github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
178 178
 github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0=
179 179
 github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ=
... ...
@@ -537,8 +537,8 @@ github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8P
537 537
 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
538 538
 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
539 539
 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
540
-github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
541
-github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
540
+github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
541
+github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
542 542
 github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss=
543 543
 github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8=
544 544
 github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -73,7 +70,7 @@ func _hcsAttachLayerStorageFilter(layerPath *uint16, layerData *uint16) (hr erro
73 73
 	if hr != nil {
74 74
 		return
75 75
 	}
76
-	r0, _, _ := syscall.Syscall(procHcsAttachLayerStorageFilter.Addr(), 2, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(layerData)), 0)
76
+	r0, _, _ := syscall.SyscallN(procHcsAttachLayerStorageFilter.Addr(), uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(layerData)))
77 77
 	if int32(r0) < 0 {
78 78
 		if r0&0x1fff0000 == 0x00070000 {
79 79
 			r0 &= 0xffff
... ...
@@ -97,7 +94,7 @@ func _hcsDestroyLayer(layerPath *uint16) (hr error) {
97 97
 	if hr != nil {
98 98
 		return
99 99
 	}
100
-	r0, _, _ := syscall.Syscall(procHcsDestoryLayer.Addr(), 1, uintptr(unsafe.Pointer(layerPath)), 0, 0)
100
+	r0, _, _ := syscall.SyscallN(procHcsDestoryLayer.Addr(), uintptr(unsafe.Pointer(layerPath)))
101 101
 	if int32(r0) < 0 {
102 102
 		if r0&0x1fff0000 == 0x00070000 {
103 103
 			r0 &= 0xffff
... ...
@@ -121,7 +118,7 @@ func _hcsDetachLayerStorageFilter(layerPath *uint16) (hr error) {
121 121
 	if hr != nil {
122 122
 		return
123 123
 	}
124
-	r0, _, _ := syscall.Syscall(procHcsDetachLayerStorageFilter.Addr(), 1, uintptr(unsafe.Pointer(layerPath)), 0, 0)
124
+	r0, _, _ := syscall.SyscallN(procHcsDetachLayerStorageFilter.Addr(), uintptr(unsafe.Pointer(layerPath)))
125 125
 	if int32(r0) < 0 {
126 126
 		if r0&0x1fff0000 == 0x00070000 {
127 127
 			r0 &= 0xffff
... ...
@@ -160,7 +157,7 @@ func _hcsExportLayer(layerPath *uint16, exportFolderPath *uint16, layerData *uin
160 160
 	if hr != nil {
161 161
 		return
162 162
 	}
163
-	r0, _, _ := syscall.Syscall6(procHcsExportLayer.Addr(), 4, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(exportFolderPath)), uintptr(unsafe.Pointer(layerData)), uintptr(unsafe.Pointer(options)), 0, 0)
163
+	r0, _, _ := syscall.SyscallN(procHcsExportLayer.Addr(), uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(exportFolderPath)), uintptr(unsafe.Pointer(layerData)), uintptr(unsafe.Pointer(options)))
164 164
 	if int32(r0) < 0 {
165 165
 		if r0&0x1fff0000 == 0x00070000 {
166 166
 			r0 &= 0xffff
... ...
@@ -175,7 +172,7 @@ func hcsFormatWritableLayerVhd(handle windows.Handle) (hr error) {
175 175
 	if hr != nil {
176 176
 		return
177 177
 	}
178
-	r0, _, _ := syscall.Syscall(procHcsFormatWritableLayerVhd.Addr(), 1, uintptr(handle), 0, 0)
178
+	r0, _, _ := syscall.SyscallN(procHcsFormatWritableLayerVhd.Addr(), uintptr(handle))
179 179
 	if int32(r0) < 0 {
180 180
 		if r0&0x1fff0000 == 0x00070000 {
181 181
 			r0 &= 0xffff
... ...
@@ -190,7 +187,7 @@ func hcsGetLayerVhdMountPath(vhdHandle windows.Handle, mountPath **uint16) (hr e
190 190
 	if hr != nil {
191 191
 		return
192 192
 	}
193
-	r0, _, _ := syscall.Syscall(procHcsGetLayerVhdMountPath.Addr(), 2, uintptr(vhdHandle), uintptr(unsafe.Pointer(mountPath)), 0)
193
+	r0, _, _ := syscall.SyscallN(procHcsGetLayerVhdMountPath.Addr(), uintptr(vhdHandle), uintptr(unsafe.Pointer(mountPath)))
194 194
 	if int32(r0) < 0 {
195 195
 		if r0&0x1fff0000 == 0x00070000 {
196 196
 			r0 &= 0xffff
... ...
@@ -224,7 +221,7 @@ func _hcsImportLayer(layerPath *uint16, sourceFolderPath *uint16, layerData *uin
224 224
 	if hr != nil {
225 225
 		return
226 226
 	}
227
-	r0, _, _ := syscall.Syscall(procHcsImportLayer.Addr(), 3, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(sourceFolderPath)), uintptr(unsafe.Pointer(layerData)))
227
+	r0, _, _ := syscall.SyscallN(procHcsImportLayer.Addr(), uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(sourceFolderPath)), uintptr(unsafe.Pointer(layerData)))
228 228
 	if int32(r0) < 0 {
229 229
 		if r0&0x1fff0000 == 0x00070000 {
230 230
 			r0 &= 0xffff
... ...
@@ -258,7 +255,7 @@ func _hcsInitializeWritableLayer(writableLayerPath *uint16, layerData *uint16, o
258 258
 	if hr != nil {
259 259
 		return
260 260
 	}
261
-	r0, _, _ := syscall.Syscall(procHcsInitializeWritableLayer.Addr(), 3, uintptr(unsafe.Pointer(writableLayerPath)), uintptr(unsafe.Pointer(layerData)), uintptr(unsafe.Pointer(options)))
261
+	r0, _, _ := syscall.SyscallN(procHcsInitializeWritableLayer.Addr(), uintptr(unsafe.Pointer(writableLayerPath)), uintptr(unsafe.Pointer(layerData)), uintptr(unsafe.Pointer(options)))
262 262
 	if int32(r0) < 0 {
263 263
 		if r0&0x1fff0000 == 0x00070000 {
264 264
 			r0 &= 0xffff
... ...
@@ -287,7 +284,7 @@ func _hcsSetupBaseOSLayer(layerPath *uint16, handle windows.Handle, options *uin
287 287
 	if hr != nil {
288 288
 		return
289 289
 	}
290
-	r0, _, _ := syscall.Syscall(procHcsSetupBaseOSLayer.Addr(), 3, uintptr(unsafe.Pointer(layerPath)), uintptr(handle), uintptr(unsafe.Pointer(options)))
290
+	r0, _, _ := syscall.SyscallN(procHcsSetupBaseOSLayer.Addr(), uintptr(unsafe.Pointer(layerPath)), uintptr(handle), uintptr(unsafe.Pointer(options)))
291 291
 	if int32(r0) < 0 {
292 292
 		if r0&0x1fff0000 == 0x00070000 {
293 293
 			r0 &= 0xffff
... ...
@@ -321,7 +318,7 @@ func _hcsSetupBaseOSVolume(layerPath *uint16, volumePath *uint16, options *uint1
321 321
 	if hr != nil {
322 322
 		return
323 323
 	}
324
-	r0, _, _ := syscall.Syscall(procHcsSetupBaseOSVolume.Addr(), 3, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(volumePath)), uintptr(unsafe.Pointer(options)))
324
+	r0, _, _ := syscall.SyscallN(procHcsSetupBaseOSVolume.Addr(), uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(volumePath)), uintptr(unsafe.Pointer(options)))
325 325
 	if int32(r0) < 0 {
326 326
 		if r0&0x1fff0000 == 0x00070000 {
327 327
 			r0 &= 0xffff
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -88,7 +85,7 @@ func hcnCloseEndpoint(endpoint hcnEndpoint) (hr error) {
88 88
 	if hr != nil {
89 89
 		return
90 90
 	}
91
-	r0, _, _ := syscall.Syscall(procHcnCloseEndpoint.Addr(), 1, uintptr(endpoint), 0, 0)
91
+	r0, _, _ := syscall.SyscallN(procHcnCloseEndpoint.Addr(), uintptr(endpoint))
92 92
 	if int32(r0) < 0 {
93 93
 		if r0&0x1fff0000 == 0x00070000 {
94 94
 			r0 &= 0xffff
... ...
@@ -103,7 +100,7 @@ func hcnCloseLoadBalancer(loadBalancer hcnLoadBalancer) (hr error) {
103 103
 	if hr != nil {
104 104
 		return
105 105
 	}
106
-	r0, _, _ := syscall.Syscall(procHcnCloseLoadBalancer.Addr(), 1, uintptr(loadBalancer), 0, 0)
106
+	r0, _, _ := syscall.SyscallN(procHcnCloseLoadBalancer.Addr(), uintptr(loadBalancer))
107 107
 	if int32(r0) < 0 {
108 108
 		if r0&0x1fff0000 == 0x00070000 {
109 109
 			r0 &= 0xffff
... ...
@@ -118,7 +115,7 @@ func hcnCloseNamespace(namespace hcnNamespace) (hr error) {
118 118
 	if hr != nil {
119 119
 		return
120 120
 	}
121
-	r0, _, _ := syscall.Syscall(procHcnCloseNamespace.Addr(), 1, uintptr(namespace), 0, 0)
121
+	r0, _, _ := syscall.SyscallN(procHcnCloseNamespace.Addr(), uintptr(namespace))
122 122
 	if int32(r0) < 0 {
123 123
 		if r0&0x1fff0000 == 0x00070000 {
124 124
 			r0 &= 0xffff
... ...
@@ -133,7 +130,7 @@ func hcnCloseNetwork(network hcnNetwork) (hr error) {
133 133
 	if hr != nil {
134 134
 		return
135 135
 	}
136
-	r0, _, _ := syscall.Syscall(procHcnCloseNetwork.Addr(), 1, uintptr(network), 0, 0)
136
+	r0, _, _ := syscall.SyscallN(procHcnCloseNetwork.Addr(), uintptr(network))
137 137
 	if int32(r0) < 0 {
138 138
 		if r0&0x1fff0000 == 0x00070000 {
139 139
 			r0 &= 0xffff
... ...
@@ -148,7 +145,7 @@ func hcnCloseRoute(route hcnRoute) (hr error) {
148 148
 	if hr != nil {
149 149
 		return
150 150
 	}
151
-	r0, _, _ := syscall.Syscall(procHcnCloseSdnRoute.Addr(), 1, uintptr(route), 0, 0)
151
+	r0, _, _ := syscall.SyscallN(procHcnCloseSdnRoute.Addr(), uintptr(route))
152 152
 	if int32(r0) < 0 {
153 153
 		if r0&0x1fff0000 == 0x00070000 {
154 154
 			r0 &= 0xffff
... ...
@@ -172,7 +169,7 @@ func _hcnCreateEndpoint(network hcnNetwork, id *_guid, settings *uint16, endpoin
172 172
 	if hr != nil {
173 173
 		return
174 174
 	}
175
-	r0, _, _ := syscall.Syscall6(procHcnCreateEndpoint.Addr(), 5, uintptr(network), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(endpoint)), uintptr(unsafe.Pointer(result)), 0)
175
+	r0, _, _ := syscall.SyscallN(procHcnCreateEndpoint.Addr(), uintptr(network), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(endpoint)), uintptr(unsafe.Pointer(result)))
176 176
 	if int32(r0) < 0 {
177 177
 		if r0&0x1fff0000 == 0x00070000 {
178 178
 			r0 &= 0xffff
... ...
@@ -196,7 +193,7 @@ func _hcnCreateLoadBalancer(id *_guid, settings *uint16, loadBalancer *hcnLoadBa
196 196
 	if hr != nil {
197 197
 		return
198 198
 	}
199
-	r0, _, _ := syscall.Syscall6(procHcnCreateLoadBalancer.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(loadBalancer)), uintptr(unsafe.Pointer(result)), 0, 0)
199
+	r0, _, _ := syscall.SyscallN(procHcnCreateLoadBalancer.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(loadBalancer)), uintptr(unsafe.Pointer(result)))
200 200
 	if int32(r0) < 0 {
201 201
 		if r0&0x1fff0000 == 0x00070000 {
202 202
 			r0 &= 0xffff
... ...
@@ -220,7 +217,7 @@ func _hcnCreateNamespace(id *_guid, settings *uint16, namespace *hcnNamespace, r
220 220
 	if hr != nil {
221 221
 		return
222 222
 	}
223
-	r0, _, _ := syscall.Syscall6(procHcnCreateNamespace.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(namespace)), uintptr(unsafe.Pointer(result)), 0, 0)
223
+	r0, _, _ := syscall.SyscallN(procHcnCreateNamespace.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(namespace)), uintptr(unsafe.Pointer(result)))
224 224
 	if int32(r0) < 0 {
225 225
 		if r0&0x1fff0000 == 0x00070000 {
226 226
 			r0 &= 0xffff
... ...
@@ -244,7 +241,7 @@ func _hcnCreateNetwork(id *_guid, settings *uint16, network *hcnNetwork, result
244 244
 	if hr != nil {
245 245
 		return
246 246
 	}
247
-	r0, _, _ := syscall.Syscall6(procHcnCreateNetwork.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(network)), uintptr(unsafe.Pointer(result)), 0, 0)
247
+	r0, _, _ := syscall.SyscallN(procHcnCreateNetwork.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(network)), uintptr(unsafe.Pointer(result)))
248 248
 	if int32(r0) < 0 {
249 249
 		if r0&0x1fff0000 == 0x00070000 {
250 250
 			r0 &= 0xffff
... ...
@@ -268,7 +265,7 @@ func _hcnCreateRoute(id *_guid, settings *uint16, route *hcnRoute, result **uint
268 268
 	if hr != nil {
269 269
 		return
270 270
 	}
271
-	r0, _, _ := syscall.Syscall6(procHcnCreateSdnRoute.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)), 0, 0)
271
+	r0, _, _ := syscall.SyscallN(procHcnCreateSdnRoute.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)))
272 272
 	if int32(r0) < 0 {
273 273
 		if r0&0x1fff0000 == 0x00070000 {
274 274
 			r0 &= 0xffff
... ...
@@ -283,7 +280,7 @@ func hcnDeleteEndpoint(id *_guid, result **uint16) (hr error) {
283 283
 	if hr != nil {
284 284
 		return
285 285
 	}
286
-	r0, _, _ := syscall.Syscall(procHcnDeleteEndpoint.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
286
+	r0, _, _ := syscall.SyscallN(procHcnDeleteEndpoint.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)))
287 287
 	if int32(r0) < 0 {
288 288
 		if r0&0x1fff0000 == 0x00070000 {
289 289
 			r0 &= 0xffff
... ...
@@ -298,7 +295,7 @@ func hcnDeleteLoadBalancer(id *_guid, result **uint16) (hr error) {
298 298
 	if hr != nil {
299 299
 		return
300 300
 	}
301
-	r0, _, _ := syscall.Syscall(procHcnDeleteLoadBalancer.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
301
+	r0, _, _ := syscall.SyscallN(procHcnDeleteLoadBalancer.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)))
302 302
 	if int32(r0) < 0 {
303 303
 		if r0&0x1fff0000 == 0x00070000 {
304 304
 			r0 &= 0xffff
... ...
@@ -313,7 +310,7 @@ func hcnDeleteNamespace(id *_guid, result **uint16) (hr error) {
313 313
 	if hr != nil {
314 314
 		return
315 315
 	}
316
-	r0, _, _ := syscall.Syscall(procHcnDeleteNamespace.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
316
+	r0, _, _ := syscall.SyscallN(procHcnDeleteNamespace.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)))
317 317
 	if int32(r0) < 0 {
318 318
 		if r0&0x1fff0000 == 0x00070000 {
319 319
 			r0 &= 0xffff
... ...
@@ -328,7 +325,7 @@ func hcnDeleteNetwork(id *_guid, result **uint16) (hr error) {
328 328
 	if hr != nil {
329 329
 		return
330 330
 	}
331
-	r0, _, _ := syscall.Syscall(procHcnDeleteNetwork.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
331
+	r0, _, _ := syscall.SyscallN(procHcnDeleteNetwork.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)))
332 332
 	if int32(r0) < 0 {
333 333
 		if r0&0x1fff0000 == 0x00070000 {
334 334
 			r0 &= 0xffff
... ...
@@ -343,7 +340,7 @@ func hcnDeleteRoute(id *_guid, result **uint16) (hr error) {
343 343
 	if hr != nil {
344 344
 		return
345 345
 	}
346
-	r0, _, _ := syscall.Syscall(procHcnDeleteSdnRoute.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
346
+	r0, _, _ := syscall.SyscallN(procHcnDeleteSdnRoute.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)))
347 347
 	if int32(r0) < 0 {
348 348
 		if r0&0x1fff0000 == 0x00070000 {
349 349
 			r0 &= 0xffff
... ...
@@ -367,7 +364,7 @@ func _hcnEnumerateEndpoints(query *uint16, endpoints **uint16, result **uint16)
367 367
 	if hr != nil {
368 368
 		return
369 369
 	}
370
-	r0, _, _ := syscall.Syscall(procHcnEnumerateEndpoints.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(endpoints)), uintptr(unsafe.Pointer(result)))
370
+	r0, _, _ := syscall.SyscallN(procHcnEnumerateEndpoints.Addr(), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(endpoints)), uintptr(unsafe.Pointer(result)))
371 371
 	if int32(r0) < 0 {
372 372
 		if r0&0x1fff0000 == 0x00070000 {
373 373
 			r0 &= 0xffff
... ...
@@ -391,7 +388,7 @@ func _hcnEnumerateLoadBalancers(query *uint16, loadBalancers **uint16, result **
391 391
 	if hr != nil {
392 392
 		return
393 393
 	}
394
-	r0, _, _ := syscall.Syscall(procHcnEnumerateLoadBalancers.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(loadBalancers)), uintptr(unsafe.Pointer(result)))
394
+	r0, _, _ := syscall.SyscallN(procHcnEnumerateLoadBalancers.Addr(), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(loadBalancers)), uintptr(unsafe.Pointer(result)))
395 395
 	if int32(r0) < 0 {
396 396
 		if r0&0x1fff0000 == 0x00070000 {
397 397
 			r0 &= 0xffff
... ...
@@ -415,7 +412,7 @@ func _hcnEnumerateNamespaces(query *uint16, namespaces **uint16, result **uint16
415 415
 	if hr != nil {
416 416
 		return
417 417
 	}
418
-	r0, _, _ := syscall.Syscall(procHcnEnumerateNamespaces.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(namespaces)), uintptr(unsafe.Pointer(result)))
418
+	r0, _, _ := syscall.SyscallN(procHcnEnumerateNamespaces.Addr(), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(namespaces)), uintptr(unsafe.Pointer(result)))
419 419
 	if int32(r0) < 0 {
420 420
 		if r0&0x1fff0000 == 0x00070000 {
421 421
 			r0 &= 0xffff
... ...
@@ -439,7 +436,7 @@ func _hcnEnumerateNetworks(query *uint16, networks **uint16, result **uint16) (h
439 439
 	if hr != nil {
440 440
 		return
441 441
 	}
442
-	r0, _, _ := syscall.Syscall(procHcnEnumerateNetworks.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(networks)), uintptr(unsafe.Pointer(result)))
442
+	r0, _, _ := syscall.SyscallN(procHcnEnumerateNetworks.Addr(), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(networks)), uintptr(unsafe.Pointer(result)))
443 443
 	if int32(r0) < 0 {
444 444
 		if r0&0x1fff0000 == 0x00070000 {
445 445
 			r0 &= 0xffff
... ...
@@ -463,7 +460,7 @@ func _hcnEnumerateRoutes(query *uint16, routes **uint16, result **uint16) (hr er
463 463
 	if hr != nil {
464 464
 		return
465 465
 	}
466
-	r0, _, _ := syscall.Syscall(procHcnEnumerateSdnRoutes.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(routes)), uintptr(unsafe.Pointer(result)))
466
+	r0, _, _ := syscall.SyscallN(procHcnEnumerateSdnRoutes.Addr(), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(routes)), uintptr(unsafe.Pointer(result)))
467 467
 	if int32(r0) < 0 {
468 468
 		if r0&0x1fff0000 == 0x00070000 {
469 469
 			r0 &= 0xffff
... ...
@@ -487,7 +484,7 @@ func _hcnModifyEndpoint(endpoint hcnEndpoint, settings *uint16, result **uint16)
487 487
 	if hr != nil {
488 488
 		return
489 489
 	}
490
-	r0, _, _ := syscall.Syscall(procHcnModifyEndpoint.Addr(), 3, uintptr(endpoint), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
490
+	r0, _, _ := syscall.SyscallN(procHcnModifyEndpoint.Addr(), uintptr(endpoint), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
491 491
 	if int32(r0) < 0 {
492 492
 		if r0&0x1fff0000 == 0x00070000 {
493 493
 			r0 &= 0xffff
... ...
@@ -511,7 +508,7 @@ func _hcnModifyLoadBalancer(loadBalancer hcnLoadBalancer, settings *uint16, resu
511 511
 	if hr != nil {
512 512
 		return
513 513
 	}
514
-	r0, _, _ := syscall.Syscall(procHcnModifyLoadBalancer.Addr(), 3, uintptr(loadBalancer), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
514
+	r0, _, _ := syscall.SyscallN(procHcnModifyLoadBalancer.Addr(), uintptr(loadBalancer), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
515 515
 	if int32(r0) < 0 {
516 516
 		if r0&0x1fff0000 == 0x00070000 {
517 517
 			r0 &= 0xffff
... ...
@@ -535,7 +532,7 @@ func _hcnModifyNamespace(namespace hcnNamespace, settings *uint16, result **uint
535 535
 	if hr != nil {
536 536
 		return
537 537
 	}
538
-	r0, _, _ := syscall.Syscall(procHcnModifyNamespace.Addr(), 3, uintptr(namespace), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
538
+	r0, _, _ := syscall.SyscallN(procHcnModifyNamespace.Addr(), uintptr(namespace), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
539 539
 	if int32(r0) < 0 {
540 540
 		if r0&0x1fff0000 == 0x00070000 {
541 541
 			r0 &= 0xffff
... ...
@@ -559,7 +556,7 @@ func _hcnModifyNetwork(network hcnNetwork, settings *uint16, result **uint16) (h
559 559
 	if hr != nil {
560 560
 		return
561 561
 	}
562
-	r0, _, _ := syscall.Syscall(procHcnModifyNetwork.Addr(), 3, uintptr(network), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
562
+	r0, _, _ := syscall.SyscallN(procHcnModifyNetwork.Addr(), uintptr(network), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
563 563
 	if int32(r0) < 0 {
564 564
 		if r0&0x1fff0000 == 0x00070000 {
565 565
 			r0 &= 0xffff
... ...
@@ -583,7 +580,7 @@ func _hcnModifyRoute(route hcnRoute, settings *uint16, result **uint16) (hr erro
583 583
 	if hr != nil {
584 584
 		return
585 585
 	}
586
-	r0, _, _ := syscall.Syscall(procHcnModifySdnRoute.Addr(), 3, uintptr(route), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
586
+	r0, _, _ := syscall.SyscallN(procHcnModifySdnRoute.Addr(), uintptr(route), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
587 587
 	if int32(r0) < 0 {
588 588
 		if r0&0x1fff0000 == 0x00070000 {
589 589
 			r0 &= 0xffff
... ...
@@ -598,7 +595,7 @@ func hcnOpenEndpoint(id *_guid, endpoint *hcnEndpoint, result **uint16) (hr erro
598 598
 	if hr != nil {
599 599
 		return
600 600
 	}
601
-	r0, _, _ := syscall.Syscall(procHcnOpenEndpoint.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(endpoint)), uintptr(unsafe.Pointer(result)))
601
+	r0, _, _ := syscall.SyscallN(procHcnOpenEndpoint.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(endpoint)), uintptr(unsafe.Pointer(result)))
602 602
 	if int32(r0) < 0 {
603 603
 		if r0&0x1fff0000 == 0x00070000 {
604 604
 			r0 &= 0xffff
... ...
@@ -613,7 +610,7 @@ func hcnOpenLoadBalancer(id *_guid, loadBalancer *hcnLoadBalancer, result **uint
613 613
 	if hr != nil {
614 614
 		return
615 615
 	}
616
-	r0, _, _ := syscall.Syscall(procHcnOpenLoadBalancer.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(loadBalancer)), uintptr(unsafe.Pointer(result)))
616
+	r0, _, _ := syscall.SyscallN(procHcnOpenLoadBalancer.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(loadBalancer)), uintptr(unsafe.Pointer(result)))
617 617
 	if int32(r0) < 0 {
618 618
 		if r0&0x1fff0000 == 0x00070000 {
619 619
 			r0 &= 0xffff
... ...
@@ -628,7 +625,7 @@ func hcnOpenNamespace(id *_guid, namespace *hcnNamespace, result **uint16) (hr e
628 628
 	if hr != nil {
629 629
 		return
630 630
 	}
631
-	r0, _, _ := syscall.Syscall(procHcnOpenNamespace.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(namespace)), uintptr(unsafe.Pointer(result)))
631
+	r0, _, _ := syscall.SyscallN(procHcnOpenNamespace.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(namespace)), uintptr(unsafe.Pointer(result)))
632 632
 	if int32(r0) < 0 {
633 633
 		if r0&0x1fff0000 == 0x00070000 {
634 634
 			r0 &= 0xffff
... ...
@@ -643,7 +640,7 @@ func hcnOpenNetwork(id *_guid, network *hcnNetwork, result **uint16) (hr error)
643 643
 	if hr != nil {
644 644
 		return
645 645
 	}
646
-	r0, _, _ := syscall.Syscall(procHcnOpenNetwork.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(network)), uintptr(unsafe.Pointer(result)))
646
+	r0, _, _ := syscall.SyscallN(procHcnOpenNetwork.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(network)), uintptr(unsafe.Pointer(result)))
647 647
 	if int32(r0) < 0 {
648 648
 		if r0&0x1fff0000 == 0x00070000 {
649 649
 			r0 &= 0xffff
... ...
@@ -658,7 +655,7 @@ func hcnOpenRoute(id *_guid, route *hcnRoute, result **uint16) (hr error) {
658 658
 	if hr != nil {
659 659
 		return
660 660
 	}
661
-	r0, _, _ := syscall.Syscall(procHcnOpenSdnRoute.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)))
661
+	r0, _, _ := syscall.SyscallN(procHcnOpenSdnRoute.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)))
662 662
 	if int32(r0) < 0 {
663 663
 		if r0&0x1fff0000 == 0x00070000 {
664 664
 			r0 &= 0xffff
... ...
@@ -682,7 +679,7 @@ func _hcnQueryEndpointProperties(endpoint hcnEndpoint, query *uint16, properties
682 682
 	if hr != nil {
683 683
 		return
684 684
 	}
685
-	r0, _, _ := syscall.Syscall6(procHcnQueryEndpointProperties.Addr(), 4, uintptr(endpoint), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
685
+	r0, _, _ := syscall.SyscallN(procHcnQueryEndpointProperties.Addr(), uintptr(endpoint), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
686 686
 	if int32(r0) < 0 {
687 687
 		if r0&0x1fff0000 == 0x00070000 {
688 688
 			r0 &= 0xffff
... ...
@@ -706,7 +703,7 @@ func _hcnQueryLoadBalancerProperties(loadBalancer hcnLoadBalancer, query *uint16
706 706
 	if hr != nil {
707 707
 		return
708 708
 	}
709
-	r0, _, _ := syscall.Syscall6(procHcnQueryLoadBalancerProperties.Addr(), 4, uintptr(loadBalancer), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
709
+	r0, _, _ := syscall.SyscallN(procHcnQueryLoadBalancerProperties.Addr(), uintptr(loadBalancer), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
710 710
 	if int32(r0) < 0 {
711 711
 		if r0&0x1fff0000 == 0x00070000 {
712 712
 			r0 &= 0xffff
... ...
@@ -730,7 +727,7 @@ func _hcnQueryNamespaceProperties(namespace hcnNamespace, query *uint16, propert
730 730
 	if hr != nil {
731 731
 		return
732 732
 	}
733
-	r0, _, _ := syscall.Syscall6(procHcnQueryNamespaceProperties.Addr(), 4, uintptr(namespace), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
733
+	r0, _, _ := syscall.SyscallN(procHcnQueryNamespaceProperties.Addr(), uintptr(namespace), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
734 734
 	if int32(r0) < 0 {
735 735
 		if r0&0x1fff0000 == 0x00070000 {
736 736
 			r0 &= 0xffff
... ...
@@ -754,7 +751,7 @@ func _hcnQueryNetworkProperties(network hcnNetwork, query *uint16, properties **
754 754
 	if hr != nil {
755 755
 		return
756 756
 	}
757
-	r0, _, _ := syscall.Syscall6(procHcnQueryNetworkProperties.Addr(), 4, uintptr(network), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
757
+	r0, _, _ := syscall.SyscallN(procHcnQueryNetworkProperties.Addr(), uintptr(network), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
758 758
 	if int32(r0) < 0 {
759 759
 		if r0&0x1fff0000 == 0x00070000 {
760 760
 			r0 &= 0xffff
... ...
@@ -778,7 +775,7 @@ func _hcnQueryRouteProperties(route hcnRoute, query *uint16, properties **uint16
778 778
 	if hr != nil {
779 779
 		return
780 780
 	}
781
-	r0, _, _ := syscall.Syscall6(procHcnQuerySdnRouteProperties.Addr(), 4, uintptr(route), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
781
+	r0, _, _ := syscall.SyscallN(procHcnQuerySdnRouteProperties.Addr(), uintptr(route), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
782 782
 	if int32(r0) < 0 {
783 783
 		if r0&0x1fff0000 == 0x00070000 {
784 784
 			r0 &= 0xffff
... ...
@@ -789,7 +786,7 @@ func _hcnQueryRouteProperties(route hcnRoute, query *uint16, properties **uint16
789 789
 }
790 790
 
791 791
 func SetCurrentThreadCompartmentId(compartmentId uint32) (hr error) {
792
-	r0, _, _ := syscall.Syscall(procSetCurrentThreadCompartmentId.Addr(), 1, uintptr(compartmentId), 0, 0)
792
+	r0, _, _ := syscall.SyscallN(procSetCurrentThreadCompartmentId.Addr(), uintptr(compartmentId))
793 793
 	if int32(r0) < 0 {
794 794
 		if r0&0x1fff0000 == 0x00070000 {
795 795
 			r0 &= 0xffff
... ...
@@ -823,7 +820,7 @@ func __hnsCall(method *uint16, path *uint16, object *uint16, response **uint16)
823 823
 	if hr != nil {
824 824
 		return
825 825
 	}
826
-	r0, _, _ := syscall.Syscall6(procHNSCall.Addr(), 4, uintptr(unsafe.Pointer(method)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(object)), uintptr(unsafe.Pointer(response)), 0, 0)
826
+	r0, _, _ := syscall.SyscallN(procHNSCall.Addr(), uintptr(unsafe.Pointer(method)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(object)), uintptr(unsafe.Pointer(response)))
827 827
 	if int32(r0) < 0 {
828 828
 		if r0&0x1fff0000 == 0x00070000 {
829 829
 			r0 &= 0xffff
... ...
@@ -14,14 +14,14 @@ import (
14 14
 	"golang.org/x/sys/windows"
15 15
 )
16 16
 
17
-// makeOpenFiles calls winio.MakeOpenFile for each handle in a slice but closes all the handles
17
+// makeOpenFiles calls winio.NewOpenFile for each handle in a slice but closes all the handles
18 18
 // if there is an error.
19 19
 func makeOpenFiles(hs []syscall.Handle) (_ []io.ReadWriteCloser, err error) {
20 20
 	fs := make([]io.ReadWriteCloser, len(hs))
21 21
 	for i, h := range hs {
22 22
 		if h != syscall.Handle(0) {
23 23
 			if err == nil {
24
-				fs[i], err = winio.MakeOpenFile(h)
24
+				fs[i], err = winio.NewOpenFile(windows.Handle(h))
25 25
 			}
26 26
 			if err != nil {
27 27
 				syscall.Close(h)
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -69,7 +66,7 @@ func __hnsCall(method *uint16, path *uint16, object *uint16, response **uint16)
69 69
 	if hr != nil {
70 70
 		return
71 71
 	}
72
-	r0, _, _ := syscall.Syscall6(procHNSCall.Addr(), 4, uintptr(unsafe.Pointer(method)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(object)), uintptr(unsafe.Pointer(response)), 0, 0)
72
+	r0, _, _ := syscall.SyscallN(procHNSCall.Addr(), uintptr(unsafe.Pointer(method)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(object)), uintptr(unsafe.Pointer(response)))
73 73
 	if int32(r0) < 0 {
74 74
 		if r0&0x1fff0000 == 0x00070000 {
75 75
 			r0 &= 0xffff
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -46,6 +43,6 @@ var (
46 46
 )
47 47
 
48 48
 func coTaskMemFree(buffer unsafe.Pointer) {
49
-	syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(buffer), 0, 0)
49
+	syscall.SyscallN(procCoTaskMemFree.Addr(), uintptr(buffer))
50 50
 	return
51 51
 }
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -46,7 +43,7 @@ var (
46 46
 )
47 47
 
48 48
 func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) {
49
-	r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
49
+	r0, _, _ := syscall.SyscallN(procRegCreateKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
50 50
 	if r0 != 0 {
51 51
 		regerrno = syscall.Errno(r0)
52 52
 	}
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -48,7 +45,7 @@ var (
48 48
 )
49 49
 
50 50
 func getSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, ppsidOwner **uintptr, ppsidGroup **uintptr, ppDacl *uintptr, ppSacl *uintptr, ppSecurityDescriptor *uintptr) (win32err error) {
51
-	r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(si), uintptr(unsafe.Pointer(ppsidOwner)), uintptr(unsafe.Pointer(ppsidGroup)), uintptr(unsafe.Pointer(ppDacl)), uintptr(unsafe.Pointer(ppSacl)), uintptr(unsafe.Pointer(ppSecurityDescriptor)), 0)
51
+	r0, _, _ := syscall.SyscallN(procGetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(si), uintptr(unsafe.Pointer(ppsidOwner)), uintptr(unsafe.Pointer(ppsidGroup)), uintptr(unsafe.Pointer(ppDacl)), uintptr(unsafe.Pointer(ppSacl)), uintptr(unsafe.Pointer(ppSecurityDescriptor)))
52 52
 	if r0 != 0 {
53 53
 		win32err = syscall.Errno(r0)
54 54
 	}
... ...
@@ -56,7 +53,7 @@ func getSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, ppsidO
56 56
 }
57 57
 
58 58
 func setEntriesInAcl(count uintptr, pListOfEEs uintptr, oldAcl uintptr, newAcl *uintptr) (win32err error) {
59
-	r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(count), uintptr(pListOfEEs), uintptr(oldAcl), uintptr(unsafe.Pointer(newAcl)), 0, 0)
59
+	r0, _, _ := syscall.SyscallN(procSetEntriesInAclW.Addr(), uintptr(count), uintptr(pListOfEEs), uintptr(oldAcl), uintptr(unsafe.Pointer(newAcl)))
60 60
 	if r0 != 0 {
61 61
 		win32err = syscall.Errno(r0)
62 62
 	}
... ...
@@ -64,7 +61,7 @@ func setEntriesInAcl(count uintptr, pListOfEEs uintptr, oldAcl uintptr, newAcl *
64 64
 }
65 65
 
66 66
 func setSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, psidOwner uintptr, psidGroup uintptr, pDacl uintptr, pSacl uintptr) (win32err error) {
67
-	r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(si), uintptr(psidOwner), uintptr(psidGroup), uintptr(pDacl), uintptr(pSacl), 0, 0)
67
+	r0, _, _ := syscall.SyscallN(procSetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(si), uintptr(psidOwner), uintptr(psidGroup), uintptr(pDacl), uintptr(pSacl))
68 68
 	if r0 != 0 {
69 69
 		win32err = syscall.Errno(r0)
70 70
 	}
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -75,7 +72,7 @@ func hcsCloseComputeSystem(computeSystem HcsSystem) (hr error) {
75 75
 	if hr != nil {
76 76
 		return
77 77
 	}
78
-	r0, _, _ := syscall.Syscall(procHcsCloseComputeSystem.Addr(), 1, uintptr(computeSystem), 0, 0)
78
+	r0, _, _ := syscall.SyscallN(procHcsCloseComputeSystem.Addr(), uintptr(computeSystem))
79 79
 	if int32(r0) < 0 {
80 80
 		if r0&0x1fff0000 == 0x00070000 {
81 81
 			r0 &= 0xffff
... ...
@@ -90,7 +87,7 @@ func hcsCloseProcess(process HcsProcess) (hr error) {
90 90
 	if hr != nil {
91 91
 		return
92 92
 	}
93
-	r0, _, _ := syscall.Syscall(procHcsCloseProcess.Addr(), 1, uintptr(process), 0, 0)
93
+	r0, _, _ := syscall.SyscallN(procHcsCloseProcess.Addr(), uintptr(process))
94 94
 	if int32(r0) < 0 {
95 95
 		if r0&0x1fff0000 == 0x00070000 {
96 96
 			r0 &= 0xffff
... ...
@@ -119,7 +116,7 @@ func _hcsCreateComputeSystem(id *uint16, configuration *uint16, identity syscall
119 119
 	if hr != nil {
120 120
 		return
121 121
 	}
122
-	r0, _, _ := syscall.Syscall6(procHcsCreateComputeSystem.Addr(), 5, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(configuration)), uintptr(identity), uintptr(unsafe.Pointer(computeSystem)), uintptr(unsafe.Pointer(result)), 0)
122
+	r0, _, _ := syscall.SyscallN(procHcsCreateComputeSystem.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(configuration)), uintptr(identity), uintptr(unsafe.Pointer(computeSystem)), uintptr(unsafe.Pointer(result)))
123 123
 	if int32(r0) < 0 {
124 124
 		if r0&0x1fff0000 == 0x00070000 {
125 125
 			r0 &= 0xffff
... ...
@@ -143,7 +140,7 @@ func _hcsCreateProcess(computeSystem HcsSystem, processParameters *uint16, proce
143 143
 	if hr != nil {
144 144
 		return
145 145
 	}
146
-	r0, _, _ := syscall.Syscall6(procHcsCreateProcess.Addr(), 5, uintptr(computeSystem), uintptr(unsafe.Pointer(processParameters)), uintptr(unsafe.Pointer(processInformation)), uintptr(unsafe.Pointer(process)), uintptr(unsafe.Pointer(result)), 0)
146
+	r0, _, _ := syscall.SyscallN(procHcsCreateProcess.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(processParameters)), uintptr(unsafe.Pointer(processInformation)), uintptr(unsafe.Pointer(process)), uintptr(unsafe.Pointer(result)))
147 147
 	if int32(r0) < 0 {
148 148
 		if r0&0x1fff0000 == 0x00070000 {
149 149
 			r0 &= 0xffff
... ...
@@ -167,7 +164,7 @@ func _hcsEnumerateComputeSystems(query *uint16, computeSystems **uint16, result
167 167
 	if hr != nil {
168 168
 		return
169 169
 	}
170
-	r0, _, _ := syscall.Syscall(procHcsEnumerateComputeSystems.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(computeSystems)), uintptr(unsafe.Pointer(result)))
170
+	r0, _, _ := syscall.SyscallN(procHcsEnumerateComputeSystems.Addr(), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(computeSystems)), uintptr(unsafe.Pointer(result)))
171 171
 	if int32(r0) < 0 {
172 172
 		if r0&0x1fff0000 == 0x00070000 {
173 173
 			r0 &= 0xffff
... ...
@@ -191,7 +188,7 @@ func _hcsGetComputeSystemProperties(computeSystem HcsSystem, propertyQuery *uint
191 191
 	if hr != nil {
192 192
 		return
193 193
 	}
194
-	r0, _, _ := syscall.Syscall6(procHcsGetComputeSystemProperties.Addr(), 4, uintptr(computeSystem), uintptr(unsafe.Pointer(propertyQuery)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
194
+	r0, _, _ := syscall.SyscallN(procHcsGetComputeSystemProperties.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(propertyQuery)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
195 195
 	if int32(r0) < 0 {
196 196
 		if r0&0x1fff0000 == 0x00070000 {
197 197
 			r0 &= 0xffff
... ...
@@ -206,7 +203,7 @@ func hcsGetProcessInfo(process HcsProcess, processInformation *HcsProcessInforma
206 206
 	if hr != nil {
207 207
 		return
208 208
 	}
209
-	r0, _, _ := syscall.Syscall(procHcsGetProcessInfo.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(processInformation)), uintptr(unsafe.Pointer(result)))
209
+	r0, _, _ := syscall.SyscallN(procHcsGetProcessInfo.Addr(), uintptr(process), uintptr(unsafe.Pointer(processInformation)), uintptr(unsafe.Pointer(result)))
210 210
 	if int32(r0) < 0 {
211 211
 		if r0&0x1fff0000 == 0x00070000 {
212 212
 			r0 &= 0xffff
... ...
@@ -221,7 +218,7 @@ func hcsGetProcessProperties(process HcsProcess, processProperties **uint16, res
221 221
 	if hr != nil {
222 222
 		return
223 223
 	}
224
-	r0, _, _ := syscall.Syscall(procHcsGetProcessProperties.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(processProperties)), uintptr(unsafe.Pointer(result)))
224
+	r0, _, _ := syscall.SyscallN(procHcsGetProcessProperties.Addr(), uintptr(process), uintptr(unsafe.Pointer(processProperties)), uintptr(unsafe.Pointer(result)))
225 225
 	if int32(r0) < 0 {
226 226
 		if r0&0x1fff0000 == 0x00070000 {
227 227
 			r0 &= 0xffff
... ...
@@ -245,7 +242,7 @@ func _hcsGetServiceProperties(propertyQuery *uint16, properties **uint16, result
245 245
 	if hr != nil {
246 246
 		return
247 247
 	}
248
-	r0, _, _ := syscall.Syscall(procHcsGetServiceProperties.Addr(), 3, uintptr(unsafe.Pointer(propertyQuery)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
248
+	r0, _, _ := syscall.SyscallN(procHcsGetServiceProperties.Addr(), uintptr(unsafe.Pointer(propertyQuery)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
249 249
 	if int32(r0) < 0 {
250 250
 		if r0&0x1fff0000 == 0x00070000 {
251 251
 			r0 &= 0xffff
... ...
@@ -269,7 +266,7 @@ func _hcsModifyComputeSystem(computeSystem HcsSystem, configuration *uint16, res
269 269
 	if hr != nil {
270 270
 		return
271 271
 	}
272
-	r0, _, _ := syscall.Syscall(procHcsModifyComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(configuration)), uintptr(unsafe.Pointer(result)))
272
+	r0, _, _ := syscall.SyscallN(procHcsModifyComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(configuration)), uintptr(unsafe.Pointer(result)))
273 273
 	if int32(r0) < 0 {
274 274
 		if r0&0x1fff0000 == 0x00070000 {
275 275
 			r0 &= 0xffff
... ...
@@ -293,7 +290,7 @@ func _hcsModifyProcess(process HcsProcess, settings *uint16, result **uint16) (h
293 293
 	if hr != nil {
294 294
 		return
295 295
 	}
296
-	r0, _, _ := syscall.Syscall(procHcsModifyProcess.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
296
+	r0, _, _ := syscall.SyscallN(procHcsModifyProcess.Addr(), uintptr(process), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
297 297
 	if int32(r0) < 0 {
298 298
 		if r0&0x1fff0000 == 0x00070000 {
299 299
 			r0 &= 0xffff
... ...
@@ -317,7 +314,7 @@ func _hcsModifyServiceSettings(settings *uint16, result **uint16) (hr error) {
317 317
 	if hr != nil {
318 318
 		return
319 319
 	}
320
-	r0, _, _ := syscall.Syscall(procHcsModifyServiceSettings.Addr(), 2, uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)), 0)
320
+	r0, _, _ := syscall.SyscallN(procHcsModifyServiceSettings.Addr(), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
321 321
 	if int32(r0) < 0 {
322 322
 		if r0&0x1fff0000 == 0x00070000 {
323 323
 			r0 &= 0xffff
... ...
@@ -341,7 +338,7 @@ func _hcsOpenComputeSystem(id *uint16, computeSystem *HcsSystem, result **uint16
341 341
 	if hr != nil {
342 342
 		return
343 343
 	}
344
-	r0, _, _ := syscall.Syscall(procHcsOpenComputeSystem.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(computeSystem)), uintptr(unsafe.Pointer(result)))
344
+	r0, _, _ := syscall.SyscallN(procHcsOpenComputeSystem.Addr(), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(computeSystem)), uintptr(unsafe.Pointer(result)))
345 345
 	if int32(r0) < 0 {
346 346
 		if r0&0x1fff0000 == 0x00070000 {
347 347
 			r0 &= 0xffff
... ...
@@ -356,7 +353,7 @@ func hcsOpenProcess(computeSystem HcsSystem, pid uint32, process *HcsProcess, re
356 356
 	if hr != nil {
357 357
 		return
358 358
 	}
359
-	r0, _, _ := syscall.Syscall6(procHcsOpenProcess.Addr(), 4, uintptr(computeSystem), uintptr(pid), uintptr(unsafe.Pointer(process)), uintptr(unsafe.Pointer(result)), 0, 0)
359
+	r0, _, _ := syscall.SyscallN(procHcsOpenProcess.Addr(), uintptr(computeSystem), uintptr(pid), uintptr(unsafe.Pointer(process)), uintptr(unsafe.Pointer(result)))
360 360
 	if int32(r0) < 0 {
361 361
 		if r0&0x1fff0000 == 0x00070000 {
362 362
 			r0 &= 0xffff
... ...
@@ -380,7 +377,7 @@ func _hcsPauseComputeSystem(computeSystem HcsSystem, options *uint16, result **u
380 380
 	if hr != nil {
381 381
 		return
382 382
 	}
383
-	r0, _, _ := syscall.Syscall(procHcsPauseComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
383
+	r0, _, _ := syscall.SyscallN(procHcsPauseComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
384 384
 	if int32(r0) < 0 {
385 385
 		if r0&0x1fff0000 == 0x00070000 {
386 386
 			r0 &= 0xffff
... ...
@@ -395,7 +392,7 @@ func hcsRegisterComputeSystemCallback(computeSystem HcsSystem, callback uintptr,
395 395
 	if hr != nil {
396 396
 		return
397 397
 	}
398
-	r0, _, _ := syscall.Syscall6(procHcsRegisterComputeSystemCallback.Addr(), 4, uintptr(computeSystem), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)), 0, 0)
398
+	r0, _, _ := syscall.SyscallN(procHcsRegisterComputeSystemCallback.Addr(), uintptr(computeSystem), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)))
399 399
 	if int32(r0) < 0 {
400 400
 		if r0&0x1fff0000 == 0x00070000 {
401 401
 			r0 &= 0xffff
... ...
@@ -410,7 +407,7 @@ func hcsRegisterProcessCallback(process HcsProcess, callback uintptr, context ui
410 410
 	if hr != nil {
411 411
 		return
412 412
 	}
413
-	r0, _, _ := syscall.Syscall6(procHcsRegisterProcessCallback.Addr(), 4, uintptr(process), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)), 0, 0)
413
+	r0, _, _ := syscall.SyscallN(procHcsRegisterProcessCallback.Addr(), uintptr(process), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)))
414 414
 	if int32(r0) < 0 {
415 415
 		if r0&0x1fff0000 == 0x00070000 {
416 416
 			r0 &= 0xffff
... ...
@@ -434,7 +431,7 @@ func _hcsResumeComputeSystem(computeSystem HcsSystem, options *uint16, result **
434 434
 	if hr != nil {
435 435
 		return
436 436
 	}
437
-	r0, _, _ := syscall.Syscall(procHcsResumeComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
437
+	r0, _, _ := syscall.SyscallN(procHcsResumeComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
438 438
 	if int32(r0) < 0 {
439 439
 		if r0&0x1fff0000 == 0x00070000 {
440 440
 			r0 &= 0xffff
... ...
@@ -458,7 +455,7 @@ func _hcsSaveComputeSystem(computeSystem HcsSystem, options *uint16, result **ui
458 458
 	if hr != nil {
459 459
 		return
460 460
 	}
461
-	r0, _, _ := syscall.Syscall(procHcsSaveComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
461
+	r0, _, _ := syscall.SyscallN(procHcsSaveComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
462 462
 	if int32(r0) < 0 {
463 463
 		if r0&0x1fff0000 == 0x00070000 {
464 464
 			r0 &= 0xffff
... ...
@@ -482,7 +479,7 @@ func _hcsShutdownComputeSystem(computeSystem HcsSystem, options *uint16, result
482 482
 	if hr != nil {
483 483
 		return
484 484
 	}
485
-	r0, _, _ := syscall.Syscall(procHcsShutdownComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
485
+	r0, _, _ := syscall.SyscallN(procHcsShutdownComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
486 486
 	if int32(r0) < 0 {
487 487
 		if r0&0x1fff0000 == 0x00070000 {
488 488
 			r0 &= 0xffff
... ...
@@ -506,7 +503,7 @@ func _hcsSignalProcess(process HcsProcess, options *uint16, result **uint16) (hr
506 506
 	if hr != nil {
507 507
 		return
508 508
 	}
509
-	r0, _, _ := syscall.Syscall(procHcsSignalProcess.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
509
+	r0, _, _ := syscall.SyscallN(procHcsSignalProcess.Addr(), uintptr(process), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
510 510
 	if int32(r0) < 0 {
511 511
 		if r0&0x1fff0000 == 0x00070000 {
512 512
 			r0 &= 0xffff
... ...
@@ -530,7 +527,7 @@ func _hcsStartComputeSystem(computeSystem HcsSystem, options *uint16, result **u
530 530
 	if hr != nil {
531 531
 		return
532 532
 	}
533
-	r0, _, _ := syscall.Syscall(procHcsStartComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
533
+	r0, _, _ := syscall.SyscallN(procHcsStartComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
534 534
 	if int32(r0) < 0 {
535 535
 		if r0&0x1fff0000 == 0x00070000 {
536 536
 			r0 &= 0xffff
... ...
@@ -554,7 +551,7 @@ func _hcsTerminateComputeSystem(computeSystem HcsSystem, options *uint16, result
554 554
 	if hr != nil {
555 555
 		return
556 556
 	}
557
-	r0, _, _ := syscall.Syscall(procHcsTerminateComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
557
+	r0, _, _ := syscall.SyscallN(procHcsTerminateComputeSystem.Addr(), uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
558 558
 	if int32(r0) < 0 {
559 559
 		if r0&0x1fff0000 == 0x00070000 {
560 560
 			r0 &= 0xffff
... ...
@@ -569,7 +566,7 @@ func hcsTerminateProcess(process HcsProcess, result **uint16) (hr error) {
569 569
 	if hr != nil {
570 570
 		return
571 571
 	}
572
-	r0, _, _ := syscall.Syscall(procHcsTerminateProcess.Addr(), 2, uintptr(process), uintptr(unsafe.Pointer(result)), 0)
572
+	r0, _, _ := syscall.SyscallN(procHcsTerminateProcess.Addr(), uintptr(process), uintptr(unsafe.Pointer(result)))
573 573
 	if int32(r0) < 0 {
574 574
 		if r0&0x1fff0000 == 0x00070000 {
575 575
 			r0 &= 0xffff
... ...
@@ -584,7 +581,7 @@ func hcsUnregisterComputeSystemCallback(callbackHandle HcsCallback) (hr error) {
584 584
 	if hr != nil {
585 585
 		return
586 586
 	}
587
-	r0, _, _ := syscall.Syscall(procHcsUnregisterComputeSystemCallback.Addr(), 1, uintptr(callbackHandle), 0, 0)
587
+	r0, _, _ := syscall.SyscallN(procHcsUnregisterComputeSystemCallback.Addr(), uintptr(callbackHandle))
588 588
 	if int32(r0) < 0 {
589 589
 		if r0&0x1fff0000 == 0x00070000 {
590 590
 			r0 &= 0xffff
... ...
@@ -599,7 +596,7 @@ func hcsUnregisterProcessCallback(callbackHandle HcsCallback) (hr error) {
599 599
 	if hr != nil {
600 600
 		return
601 601
 	}
602
-	r0, _, _ := syscall.Syscall(procHcsUnregisterProcessCallback.Addr(), 1, uintptr(callbackHandle), 0, 0)
602
+	r0, _, _ := syscall.SyscallN(procHcsUnregisterProcessCallback.Addr(), uintptr(callbackHandle))
603 603
 	if int32(r0) < 0 {
604 604
 		if r0&0x1fff0000 == 0x00070000 {
605 605
 			r0 &= 0xffff
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -77,7 +74,7 @@ func getDiskFreeSpaceEx(directoryName string, freeBytesAvailableToCaller *int64,
77 77
 }
78 78
 
79 79
 func _getDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *int64, totalNumberOfBytes *int64, totalNumberOfFreeBytes *int64) (err error) {
80
-	r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
80
+	r1, _, e1 := syscall.SyscallN(procGetDiskFreeSpaceExW.Addr(), uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)))
81 81
 	if r1 == 0 {
82 82
 		err = errnoErr(e1)
83 83
 	}
... ...
@@ -85,7 +82,7 @@ func _getDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *int6
85 85
 }
86 86
 
87 87
 func attachVirtualDisk(handle syscall.Handle, sd uintptr, flags uint32, providerFlags uint32, params uintptr, overlapped uintptr) (err error) {
88
-	r1, _, e1 := syscall.Syscall6(procAttachVirtualDisk.Addr(), 6, uintptr(handle), uintptr(sd), uintptr(flags), uintptr(providerFlags), uintptr(params), uintptr(overlapped))
88
+	r1, _, e1 := syscall.SyscallN(procAttachVirtualDisk.Addr(), uintptr(handle), uintptr(sd), uintptr(flags), uintptr(providerFlags), uintptr(params), uintptr(overlapped))
89 89
 	if r1 != 0 {
90 90
 		err = errnoErr(e1)
91 91
 	}
... ...
@@ -102,7 +99,7 @@ func openVirtualDisk(virtualStorageType *virtualStorageType, path string, virtua
102 102
 }
103 103
 
104 104
 func _openVirtualDisk(virtualStorageType *virtualStorageType, path *uint16, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) {
105
-	r1, _, e1 := syscall.Syscall6(procOpenVirtualDisk.Addr(), 6, uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(flags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(handle)))
105
+	r1, _, e1 := syscall.SyscallN(procOpenVirtualDisk.Addr(), uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(flags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(handle)))
106 106
 	if r1 != 0 {
107 107
 		err = errnoErr(e1)
108 108
 	}
... ...
@@ -123,7 +120,7 @@ func _activateLayer(info *driverInfo, id *uint16) (hr error) {
123 123
 	if hr != nil {
124 124
 		return
125 125
 	}
126
-	r0, _, _ := syscall.Syscall(procActivateLayer.Addr(), 2, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), 0)
126
+	r0, _, _ := syscall.SyscallN(procActivateLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)))
127 127
 	if int32(r0) < 0 {
128 128
 		if r0&0x1fff0000 == 0x00070000 {
129 129
 			r0 &= 0xffff
... ...
@@ -156,7 +153,7 @@ func _copyLayer(info *driverInfo, srcId *uint16, dstId *uint16, descriptors []WC
156 156
 	if len(descriptors) > 0 {
157 157
 		_p2 = &descriptors[0]
158 158
 	}
159
-	r0, _, _ := syscall.Syscall6(procCopyLayer.Addr(), 5, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(srcId)), uintptr(unsafe.Pointer(dstId)), uintptr(unsafe.Pointer(_p2)), uintptr(len(descriptors)), 0)
159
+	r0, _, _ := syscall.SyscallN(procCopyLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(srcId)), uintptr(unsafe.Pointer(dstId)), uintptr(unsafe.Pointer(_p2)), uintptr(len(descriptors)))
160 160
 	if int32(r0) < 0 {
161 161
 		if r0&0x1fff0000 == 0x00070000 {
162 162
 			r0 &= 0xffff
... ...
@@ -185,7 +182,7 @@ func _createLayer(info *driverInfo, id *uint16, parent *uint16) (hr error) {
185 185
 	if hr != nil {
186 186
 		return
187 187
 	}
188
-	r0, _, _ := syscall.Syscall(procCreateLayer.Addr(), 3, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(parent)))
188
+	r0, _, _ := syscall.SyscallN(procCreateLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(parent)))
189 189
 	if int32(r0) < 0 {
190 190
 		if r0&0x1fff0000 == 0x00070000 {
191 191
 			r0 &= 0xffff
... ...
@@ -213,7 +210,7 @@ func _createSandboxLayer(info *driverInfo, id *uint16, parent uintptr, descripto
213 213
 	if len(descriptors) > 0 {
214 214
 		_p1 = &descriptors[0]
215 215
 	}
216
-	r0, _, _ := syscall.Syscall6(procCreateSandboxLayer.Addr(), 5, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(parent), uintptr(unsafe.Pointer(_p1)), uintptr(len(descriptors)), 0)
216
+	r0, _, _ := syscall.SyscallN(procCreateSandboxLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(parent), uintptr(unsafe.Pointer(_p1)), uintptr(len(descriptors)))
217 217
 	if int32(r0) < 0 {
218 218
 		if r0&0x1fff0000 == 0x00070000 {
219 219
 			r0 &= 0xffff
... ...
@@ -237,7 +234,7 @@ func _deactivateLayer(info *driverInfo, id *uint16) (hr error) {
237 237
 	if hr != nil {
238 238
 		return
239 239
 	}
240
-	r0, _, _ := syscall.Syscall(procDeactivateLayer.Addr(), 2, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), 0)
240
+	r0, _, _ := syscall.SyscallN(procDeactivateLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)))
241 241
 	if int32(r0) < 0 {
242 242
 		if r0&0x1fff0000 == 0x00070000 {
243 243
 			r0 &= 0xffff
... ...
@@ -261,7 +258,7 @@ func _destroyLayer(info *driverInfo, id *uint16) (hr error) {
261 261
 	if hr != nil {
262 262
 		return
263 263
 	}
264
-	r0, _, _ := syscall.Syscall(procDestroyLayer.Addr(), 2, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), 0)
264
+	r0, _, _ := syscall.SyscallN(procDestroyLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)))
265 265
 	if int32(r0) < 0 {
266 266
 		if r0&0x1fff0000 == 0x00070000 {
267 267
 			r0 &= 0xffff
... ...
@@ -285,7 +282,7 @@ func _expandSandboxSize(info *driverInfo, id *uint16, size uint64) (hr error) {
285 285
 	if hr != nil {
286 286
 		return
287 287
 	}
288
-	r0, _, _ := syscall.Syscall(procExpandSandboxSize.Addr(), 3, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(size))
288
+	r0, _, _ := syscall.SyscallN(procExpandSandboxSize.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(size))
289 289
 	if int32(r0) < 0 {
290 290
 		if r0&0x1fff0000 == 0x00070000 {
291 291
 			r0 &= 0xffff
... ...
@@ -318,7 +315,7 @@ func _exportLayer(info *driverInfo, id *uint16, path *uint16, descriptors []WC_L
318 318
 	if len(descriptors) > 0 {
319 319
 		_p2 = &descriptors[0]
320 320
 	}
321
-	r0, _, _ := syscall.Syscall6(procExportLayer.Addr(), 5, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(_p2)), uintptr(len(descriptors)), 0)
321
+	r0, _, _ := syscall.SyscallN(procExportLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(_p2)), uintptr(len(descriptors)))
322 322
 	if int32(r0) < 0 {
323 323
 		if r0&0x1fff0000 == 0x00070000 {
324 324
 			r0 &= 0xffff
... ...
@@ -333,7 +330,7 @@ func getBaseImages(buffer **uint16) (hr error) {
333 333
 	if hr != nil {
334 334
 		return
335 335
 	}
336
-	r0, _, _ := syscall.Syscall(procGetBaseImages.Addr(), 1, uintptr(unsafe.Pointer(buffer)), 0, 0)
336
+	r0, _, _ := syscall.SyscallN(procGetBaseImages.Addr(), uintptr(unsafe.Pointer(buffer)))
337 337
 	if int32(r0) < 0 {
338 338
 		if r0&0x1fff0000 == 0x00070000 {
339 339
 			r0 &= 0xffff
... ...
@@ -357,7 +354,7 @@ func _getLayerMountPath(info *driverInfo, id *uint16, length *uintptr, buffer *u
357 357
 	if hr != nil {
358 358
 		return
359 359
 	}
360
-	r0, _, _ := syscall.Syscall6(procGetLayerMountPath.Addr(), 4, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(length)), uintptr(unsafe.Pointer(buffer)), 0, 0)
360
+	r0, _, _ := syscall.SyscallN(procGetLayerMountPath.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(length)), uintptr(unsafe.Pointer(buffer)))
361 361
 	if int32(r0) < 0 {
362 362
 		if r0&0x1fff0000 == 0x00070000 {
363 363
 			r0 &= 0xffff
... ...
@@ -386,7 +383,7 @@ func _grantVmAccess(vmid *uint16, filepath *uint16) (hr error) {
386 386
 	if hr != nil {
387 387
 		return
388 388
 	}
389
-	r0, _, _ := syscall.Syscall(procGrantVmAccess.Addr(), 2, uintptr(unsafe.Pointer(vmid)), uintptr(unsafe.Pointer(filepath)), 0)
389
+	r0, _, _ := syscall.SyscallN(procGrantVmAccess.Addr(), uintptr(unsafe.Pointer(vmid)), uintptr(unsafe.Pointer(filepath)))
390 390
 	if int32(r0) < 0 {
391 391
 		if r0&0x1fff0000 == 0x00070000 {
392 392
 			r0 &= 0xffff
... ...
@@ -419,7 +416,7 @@ func _importLayer(info *driverInfo, id *uint16, path *uint16, descriptors []WC_L
419 419
 	if len(descriptors) > 0 {
420 420
 		_p2 = &descriptors[0]
421 421
 	}
422
-	r0, _, _ := syscall.Syscall6(procImportLayer.Addr(), 5, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(_p2)), uintptr(len(descriptors)), 0)
422
+	r0, _, _ := syscall.SyscallN(procImportLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(_p2)), uintptr(len(descriptors)))
423 423
 	if int32(r0) < 0 {
424 424
 		if r0&0x1fff0000 == 0x00070000 {
425 425
 			r0 &= 0xffff
... ...
@@ -443,7 +440,7 @@ func _layerExists(info *driverInfo, id *uint16, exists *uint32) (hr error) {
443 443
 	if hr != nil {
444 444
 		return
445 445
 	}
446
-	r0, _, _ := syscall.Syscall(procLayerExists.Addr(), 3, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(exists)))
446
+	r0, _, _ := syscall.SyscallN(procLayerExists.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(exists)))
447 447
 	if int32(r0) < 0 {
448 448
 		if r0&0x1fff0000 == 0x00070000 {
449 449
 			r0 &= 0xffff
... ...
@@ -467,7 +464,7 @@ func _nameToGuid(name *uint16, guid *_guid) (hr error) {
467 467
 	if hr != nil {
468 468
 		return
469 469
 	}
470
-	r0, _, _ := syscall.Syscall(procNameToGuid.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(guid)), 0)
470
+	r0, _, _ := syscall.SyscallN(procNameToGuid.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(guid)))
471 471
 	if int32(r0) < 0 {
472 472
 		if r0&0x1fff0000 == 0x00070000 {
473 473
 			r0 &= 0xffff
... ...
@@ -495,7 +492,7 @@ func _prepareLayer(info *driverInfo, id *uint16, descriptors []WC_LAYER_DESCRIPT
495 495
 	if len(descriptors) > 0 {
496 496
 		_p1 = &descriptors[0]
497 497
 	}
498
-	r0, _, _ := syscall.Syscall6(procPrepareLayer.Addr(), 4, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(_p1)), uintptr(len(descriptors)), 0, 0)
498
+	r0, _, _ := syscall.SyscallN(procPrepareLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(_p1)), uintptr(len(descriptors)))
499 499
 	if int32(r0) < 0 {
500 500
 		if r0&0x1fff0000 == 0x00070000 {
501 501
 			r0 &= 0xffff
... ...
@@ -519,7 +516,7 @@ func _processBaseImage(path *uint16) (hr error) {
519 519
 	if hr != nil {
520 520
 		return
521 521
 	}
522
-	r0, _, _ := syscall.Syscall(procProcessBaseImage.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
522
+	r0, _, _ := syscall.SyscallN(procProcessBaseImage.Addr(), uintptr(unsafe.Pointer(path)))
523 523
 	if int32(r0) < 0 {
524 524
 		if r0&0x1fff0000 == 0x00070000 {
525 525
 			r0 &= 0xffff
... ...
@@ -543,7 +540,7 @@ func _processUtilityImage(path *uint16) (hr error) {
543 543
 	if hr != nil {
544 544
 		return
545 545
 	}
546
-	r0, _, _ := syscall.Syscall(procProcessUtilityImage.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
546
+	r0, _, _ := syscall.SyscallN(procProcessUtilityImage.Addr(), uintptr(unsafe.Pointer(path)))
547 547
 	if int32(r0) < 0 {
548 548
 		if r0&0x1fff0000 == 0x00070000 {
549 549
 			r0 &= 0xffff
... ...
@@ -567,7 +564,7 @@ func _unprepareLayer(info *driverInfo, id *uint16) (hr error) {
567 567
 	if hr != nil {
568 568
 		return
569 569
 	}
570
-	r0, _, _ := syscall.Syscall(procUnprepareLayer.Addr(), 2, uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)), 0)
570
+	r0, _, _ := syscall.SyscallN(procUnprepareLayer.Addr(), uintptr(unsafe.Pointer(info)), uintptr(unsafe.Pointer(id)))
571 571
 	if int32(r0) < 0 {
572 572
 		if r0&0x1fff0000 == 0x00070000 {
573 573
 			r0 &= 0xffff
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -89,7 +86,7 @@ var (
89 89
 )
90 90
 
91 91
 func LogonUser(username *uint16, domain *uint16, password *uint16, logonType uint32, logonProvider uint32, token *windows.Token) (err error) {
92
-	r1, _, e1 := syscall.Syscall6(procLogonUserW.Addr(), 6, uintptr(unsafe.Pointer(username)), uintptr(unsafe.Pointer(domain)), uintptr(unsafe.Pointer(password)), uintptr(logonType), uintptr(logonProvider), uintptr(unsafe.Pointer(token)))
92
+	r1, _, e1 := syscall.SyscallN(procLogonUserW.Addr(), uintptr(unsafe.Pointer(username)), uintptr(unsafe.Pointer(domain)), uintptr(unsafe.Pointer(password)), uintptr(logonType), uintptr(logonProvider), uintptr(unsafe.Pointer(token)))
93 93
 	if r1 == 0 {
94 94
 		err = errnoErr(e1)
95 95
 	}
... ...
@@ -101,7 +98,7 @@ func BfSetupFilter(jobHandle windows.Handle, flags uint32, virtRootPath *uint16,
101 101
 	if hr != nil {
102 102
 		return
103 103
 	}
104
-	r0, _, _ := syscall.Syscall6(procBfSetupFilter.Addr(), 6, uintptr(jobHandle), uintptr(flags), uintptr(unsafe.Pointer(virtRootPath)), uintptr(unsafe.Pointer(virtTargetPath)), uintptr(unsafe.Pointer(virtExceptions)), uintptr(virtExceptionPathCount))
104
+	r0, _, _ := syscall.SyscallN(procBfSetupFilter.Addr(), uintptr(jobHandle), uintptr(flags), uintptr(unsafe.Pointer(virtRootPath)), uintptr(unsafe.Pointer(virtTargetPath)), uintptr(unsafe.Pointer(virtExceptions)), uintptr(virtExceptionPathCount))
105 105
 	if int32(r0) < 0 {
106 106
 		if r0&0x1fff0000 == 0x00070000 {
107 107
 			r0 &= 0xffff
... ...
@@ -112,7 +109,7 @@ func BfSetupFilter(jobHandle windows.Handle, flags uint32, virtRootPath *uint16,
112 112
 }
113 113
 
114 114
 func CMGetDevNodeProperty(dnDevInst uint32, propertyKey *DevPropKey, propertyType *uint32, propertyBuffer *uint16, propertyBufferSize *uint32, uFlags uint32) (hr error) {
115
-	r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_PropertyW.Addr(), 6, uintptr(dnDevInst), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(unsafe.Pointer(propertyBufferSize)), uintptr(uFlags))
115
+	r0, _, _ := syscall.SyscallN(procCM_Get_DevNode_PropertyW.Addr(), uintptr(dnDevInst), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(unsafe.Pointer(propertyBufferSize)), uintptr(uFlags))
116 116
 	if int32(r0) < 0 {
117 117
 		if r0&0x1fff0000 == 0x00070000 {
118 118
 			r0 &= 0xffff
... ...
@@ -123,7 +120,7 @@ func CMGetDevNodeProperty(dnDevInst uint32, propertyKey *DevPropKey, propertyTyp
123 123
 }
124 124
 
125 125
 func CMGetDeviceIDList(pszFilter *byte, buffer *byte, bufferLen uint32, uFlags uint32) (hr error) {
126
-	r0, _, _ := syscall.Syscall6(procCM_Get_Device_ID_ListA.Addr(), 4, uintptr(unsafe.Pointer(pszFilter)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(uFlags), 0, 0)
126
+	r0, _, _ := syscall.SyscallN(procCM_Get_Device_ID_ListA.Addr(), uintptr(unsafe.Pointer(pszFilter)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(uFlags))
127 127
 	if int32(r0) < 0 {
128 128
 		if r0&0x1fff0000 == 0x00070000 {
129 129
 			r0 &= 0xffff
... ...
@@ -134,7 +131,7 @@ func CMGetDeviceIDList(pszFilter *byte, buffer *byte, bufferLen uint32, uFlags u
134 134
 }
135 135
 
136 136
 func CMGetDeviceIDListSize(pulLen *uint32, pszFilter *byte, uFlags uint32) (hr error) {
137
-	r0, _, _ := syscall.Syscall(procCM_Get_Device_ID_List_SizeA.Addr(), 3, uintptr(unsafe.Pointer(pulLen)), uintptr(unsafe.Pointer(pszFilter)), uintptr(uFlags))
137
+	r0, _, _ := syscall.SyscallN(procCM_Get_Device_ID_List_SizeA.Addr(), uintptr(unsafe.Pointer(pulLen)), uintptr(unsafe.Pointer(pszFilter)), uintptr(uFlags))
138 138
 	if int32(r0) < 0 {
139 139
 		if r0&0x1fff0000 == 0x00070000 {
140 140
 			r0 &= 0xffff
... ...
@@ -154,7 +151,7 @@ func CMLocateDevNode(pdnDevInst *uint32, pDeviceID string, uFlags uint32) (hr er
154 154
 }
155 155
 
156 156
 func _CMLocateDevNode(pdnDevInst *uint32, pDeviceID *uint16, uFlags uint32) (hr error) {
157
-	r0, _, _ := syscall.Syscall(procCM_Locate_DevNodeW.Addr(), 3, uintptr(unsafe.Pointer(pdnDevInst)), uintptr(unsafe.Pointer(pDeviceID)), uintptr(uFlags))
157
+	r0, _, _ := syscall.SyscallN(procCM_Locate_DevNodeW.Addr(), uintptr(unsafe.Pointer(pdnDevInst)), uintptr(unsafe.Pointer(pDeviceID)), uintptr(uFlags))
158 158
 	if int32(r0) < 0 {
159 159
 		if r0&0x1fff0000 == 0x00070000 {
160 160
 			r0 &= 0xffff
... ...
@@ -165,7 +162,7 @@ func _CMLocateDevNode(pdnDevInst *uint32, pDeviceID *uint16, uFlags uint32) (hr
165 165
 }
166 166
 
167 167
 func SetJobCompartmentId(handle windows.Handle, compartmentId uint32) (win32Err error) {
168
-	r0, _, _ := syscall.Syscall(procSetJobCompartmentId.Addr(), 2, uintptr(handle), uintptr(compartmentId), 0)
168
+	r0, _, _ := syscall.SyscallN(procSetJobCompartmentId.Addr(), uintptr(handle), uintptr(compartmentId))
169 169
 	if r0 != 0 {
170 170
 		win32Err = syscall.Errno(r0)
171 171
 	}
... ...
@@ -173,12 +170,12 @@ func SetJobCompartmentId(handle windows.Handle, compartmentId uint32) (win32Err
173 173
 }
174 174
 
175 175
 func ClosePseudoConsole(hpc windows.Handle) {
176
-	syscall.Syscall(procClosePseudoConsole.Addr(), 1, uintptr(hpc), 0, 0)
176
+	syscall.SyscallN(procClosePseudoConsole.Addr(), uintptr(hpc))
177 177
 	return
178 178
 }
179 179
 
180 180
 func CopyFileW(existingFileName *uint16, newFileName *uint16, failIfExists int32) (err error) {
181
-	r1, _, e1 := syscall.Syscall(procCopyFileW.Addr(), 3, uintptr(unsafe.Pointer(existingFileName)), uintptr(unsafe.Pointer(newFileName)), uintptr(failIfExists))
181
+	r1, _, e1 := syscall.SyscallN(procCopyFileW.Addr(), uintptr(unsafe.Pointer(existingFileName)), uintptr(unsafe.Pointer(newFileName)), uintptr(failIfExists))
182 182
 	if r1 == 0 {
183 183
 		err = errnoErr(e1)
184 184
 	}
... ...
@@ -186,7 +183,7 @@ func CopyFileW(existingFileName *uint16, newFileName *uint16, failIfExists int32
186 186
 }
187 187
 
188 188
 func createPseudoConsole(size uint32, hInput windows.Handle, hOutput windows.Handle, dwFlags uint32, hpcon *windows.Handle) (hr error) {
189
-	r0, _, _ := syscall.Syscall6(procCreatePseudoConsole.Addr(), 5, uintptr(size), uintptr(hInput), uintptr(hOutput), uintptr(dwFlags), uintptr(unsafe.Pointer(hpcon)), 0)
189
+	r0, _, _ := syscall.SyscallN(procCreatePseudoConsole.Addr(), uintptr(size), uintptr(hInput), uintptr(hOutput), uintptr(dwFlags), uintptr(unsafe.Pointer(hpcon)))
190 190
 	if int32(r0) < 0 {
191 191
 		if r0&0x1fff0000 == 0x00070000 {
192 192
 			r0 &= 0xffff
... ...
@@ -197,7 +194,7 @@ func createPseudoConsole(size uint32, hInput windows.Handle, hOutput windows.Han
197 197
 }
198 198
 
199 199
 func CreateRemoteThread(process windows.Handle, sa *windows.SecurityAttributes, stackSize uint32, startAddr uintptr, parameter uintptr, creationFlags uint32, threadID *uint32) (handle windows.Handle, err error) {
200
-	r0, _, e1 := syscall.Syscall9(procCreateRemoteThread.Addr(), 7, uintptr(process), uintptr(unsafe.Pointer(sa)), uintptr(stackSize), uintptr(startAddr), uintptr(parameter), uintptr(creationFlags), uintptr(unsafe.Pointer(threadID)), 0, 0)
200
+	r0, _, e1 := syscall.SyscallN(procCreateRemoteThread.Addr(), uintptr(process), uintptr(unsafe.Pointer(sa)), uintptr(stackSize), uintptr(startAddr), uintptr(parameter), uintptr(creationFlags), uintptr(unsafe.Pointer(threadID)))
201 201
 	handle = windows.Handle(r0)
202 202
 	if handle == 0 {
203 203
 		err = errnoErr(e1)
... ...
@@ -206,13 +203,13 @@ func CreateRemoteThread(process windows.Handle, sa *windows.SecurityAttributes,
206 206
 }
207 207
 
208 208
 func GetActiveProcessorCount(groupNumber uint16) (amount uint32) {
209
-	r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
209
+	r0, _, _ := syscall.SyscallN(procGetActiveProcessorCount.Addr(), uintptr(groupNumber))
210 210
 	amount = uint32(r0)
211 211
 	return
212 212
 }
213 213
 
214 214
 func IsProcessInJob(procHandle windows.Handle, jobHandle windows.Handle, result *int32) (err error) {
215
-	r1, _, e1 := syscall.Syscall(procIsProcessInJob.Addr(), 3, uintptr(procHandle), uintptr(jobHandle), uintptr(unsafe.Pointer(result)))
215
+	r1, _, e1 := syscall.SyscallN(procIsProcessInJob.Addr(), uintptr(procHandle), uintptr(jobHandle), uintptr(unsafe.Pointer(result)))
216 216
 	if r1 == 0 {
217 217
 		err = errnoErr(e1)
218 218
 	}
... ...
@@ -220,18 +217,18 @@ func IsProcessInJob(procHandle windows.Handle, jobHandle windows.Handle, result
220 220
 }
221 221
 
222 222
 func LocalAlloc(flags uint32, size int) (ptr uintptr) {
223
-	r0, _, _ := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(size), 0)
223
+	r0, _, _ := syscall.SyscallN(procLocalAlloc.Addr(), uintptr(flags), uintptr(size))
224 224
 	ptr = uintptr(r0)
225 225
 	return
226 226
 }
227 227
 
228 228
 func LocalFree(ptr uintptr) {
229
-	syscall.Syscall(procLocalFree.Addr(), 1, uintptr(ptr), 0, 0)
229
+	syscall.SyscallN(procLocalFree.Addr(), uintptr(ptr))
230 230
 	return
231 231
 }
232 232
 
233 233
 func OpenJobObject(desiredAccess uint32, inheritHandle int32, lpName *uint16) (handle windows.Handle, err error) {
234
-	r0, _, e1 := syscall.Syscall(procOpenJobObjectW.Addr(), 3, uintptr(desiredAccess), uintptr(inheritHandle), uintptr(unsafe.Pointer(lpName)))
234
+	r0, _, e1 := syscall.SyscallN(procOpenJobObjectW.Addr(), uintptr(desiredAccess), uintptr(inheritHandle), uintptr(unsafe.Pointer(lpName)))
235 235
 	handle = windows.Handle(r0)
236 236
 	if handle == 0 {
237 237
 		err = errnoErr(e1)
... ...
@@ -240,7 +237,7 @@ func OpenJobObject(desiredAccess uint32, inheritHandle int32, lpName *uint16) (h
240 240
 }
241 241
 
242 242
 func QueryInformationJobObject(jobHandle windows.Handle, infoClass uint32, jobObjectInfo unsafe.Pointer, jobObjectInformationLength uint32, lpReturnLength *uint32) (err error) {
243
-	r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(jobHandle), uintptr(infoClass), uintptr(jobObjectInfo), uintptr(jobObjectInformationLength), uintptr(unsafe.Pointer(lpReturnLength)), 0)
243
+	r1, _, e1 := syscall.SyscallN(procQueryInformationJobObject.Addr(), uintptr(jobHandle), uintptr(infoClass), uintptr(jobObjectInfo), uintptr(jobObjectInformationLength), uintptr(unsafe.Pointer(lpReturnLength)))
244 244
 	if r1 == 0 {
245 245
 		err = errnoErr(e1)
246 246
 	}
... ...
@@ -248,7 +245,7 @@ func QueryInformationJobObject(jobHandle windows.Handle, infoClass uint32, jobOb
248 248
 }
249 249
 
250 250
 func QueryIoRateControlInformationJobObject(jobHandle windows.Handle, volumeName *uint16, ioRateControlInfo **JOBOBJECT_IO_RATE_CONTROL_INFORMATION, infoBlockCount *uint32) (ret uint32, err error) {
251
-	r0, _, e1 := syscall.Syscall6(procQueryIoRateControlInformationJobObject.Addr(), 4, uintptr(jobHandle), uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(ioRateControlInfo)), uintptr(unsafe.Pointer(infoBlockCount)), 0, 0)
251
+	r0, _, e1 := syscall.SyscallN(procQueryIoRateControlInformationJobObject.Addr(), uintptr(jobHandle), uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(ioRateControlInfo)), uintptr(unsafe.Pointer(infoBlockCount)))
252 252
 	ret = uint32(r0)
253 253
 	if ret == 0 {
254 254
 		err = errnoErr(e1)
... ...
@@ -257,7 +254,7 @@ func QueryIoRateControlInformationJobObject(jobHandle windows.Handle, volumeName
257 257
 }
258 258
 
259 259
 func resizePseudoConsole(hPc windows.Handle, size uint32) (hr error) {
260
-	r0, _, _ := syscall.Syscall(procResizePseudoConsole.Addr(), 2, uintptr(hPc), uintptr(size), 0)
260
+	r0, _, _ := syscall.SyscallN(procResizePseudoConsole.Addr(), uintptr(hPc), uintptr(size))
261 261
 	if int32(r0) < 0 {
262 262
 		if r0&0x1fff0000 == 0x00070000 {
263 263
 			r0 &= 0xffff
... ...
@@ -268,7 +265,7 @@ func resizePseudoConsole(hPc windows.Handle, size uint32) (hr error) {
268 268
 }
269 269
 
270 270
 func SearchPath(lpPath *uint16, lpFileName *uint16, lpExtension *uint16, nBufferLength uint32, lpBuffer *uint16, lpFilePath *uint16) (size uint32, err error) {
271
-	r0, _, e1 := syscall.Syscall6(procSearchPathW.Addr(), 6, uintptr(unsafe.Pointer(lpPath)), uintptr(unsafe.Pointer(lpFileName)), uintptr(unsafe.Pointer(lpExtension)), uintptr(nBufferLength), uintptr(unsafe.Pointer(lpBuffer)), uintptr(unsafe.Pointer(lpFilePath)))
271
+	r0, _, e1 := syscall.SyscallN(procSearchPathW.Addr(), uintptr(unsafe.Pointer(lpPath)), uintptr(unsafe.Pointer(lpFileName)), uintptr(unsafe.Pointer(lpExtension)), uintptr(nBufferLength), uintptr(unsafe.Pointer(lpBuffer)), uintptr(unsafe.Pointer(lpFilePath)))
272 272
 	size = uint32(r0)
273 273
 	if size == 0 {
274 274
 		err = errnoErr(e1)
... ...
@@ -277,7 +274,7 @@ func SearchPath(lpPath *uint16, lpFileName *uint16, lpExtension *uint16, nBuffer
277 277
 }
278 278
 
279 279
 func SetIoRateControlInformationJobObject(jobHandle windows.Handle, ioRateControlInfo *JOBOBJECT_IO_RATE_CONTROL_INFORMATION) (ret uint32, err error) {
280
-	r0, _, e1 := syscall.Syscall(procSetIoRateControlInformationJobObject.Addr(), 2, uintptr(jobHandle), uintptr(unsafe.Pointer(ioRateControlInfo)), 0)
280
+	r0, _, e1 := syscall.SyscallN(procSetIoRateControlInformationJobObject.Addr(), uintptr(jobHandle), uintptr(unsafe.Pointer(ioRateControlInfo)))
281 281
 	ret = uint32(r0)
282 282
 	if ret == 0 {
283 283
 		err = errnoErr(e1)
... ...
@@ -286,7 +283,7 @@ func SetIoRateControlInformationJobObject(jobHandle windows.Handle, ioRateContro
286 286
 }
287 287
 
288 288
 func netLocalGroupAddMembers(serverName *uint16, groupName *uint16, level uint32, buf *byte, totalEntries uint32) (status error) {
289
-	r0, _, _ := syscall.Syscall6(procNetLocalGroupAddMembers.Addr(), 5, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(groupName)), uintptr(level), uintptr(unsafe.Pointer(buf)), uintptr(totalEntries), 0)
289
+	r0, _, _ := syscall.SyscallN(procNetLocalGroupAddMembers.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(groupName)), uintptr(level), uintptr(unsafe.Pointer(buf)), uintptr(totalEntries))
290 290
 	if r0 != 0 {
291 291
 		status = syscall.Errno(r0)
292 292
 	}
... ...
@@ -294,7 +291,7 @@ func netLocalGroupAddMembers(serverName *uint16, groupName *uint16, level uint32
294 294
 }
295 295
 
296 296
 func netLocalGroupGetInfo(serverName *uint16, groupName *uint16, level uint32, bufptr **byte) (status error) {
297
-	r0, _, _ := syscall.Syscall6(procNetLocalGroupGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(groupName)), uintptr(level), uintptr(unsafe.Pointer(bufptr)), 0, 0)
297
+	r0, _, _ := syscall.SyscallN(procNetLocalGroupGetInfo.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(groupName)), uintptr(level), uintptr(unsafe.Pointer(bufptr)))
298 298
 	if r0 != 0 {
299 299
 		status = syscall.Errno(r0)
300 300
 	}
... ...
@@ -302,7 +299,7 @@ func netLocalGroupGetInfo(serverName *uint16, groupName *uint16, level uint32, b
302 302
 }
303 303
 
304 304
 func netUserAdd(serverName *uint16, level uint32, buf *byte, parm_err *uint32) (status error) {
305
-	r0, _, _ := syscall.Syscall6(procNetUserAdd.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(parm_err)), 0, 0)
305
+	r0, _, _ := syscall.SyscallN(procNetUserAdd.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(parm_err)))
306 306
 	if r0 != 0 {
307 307
 		status = syscall.Errno(r0)
308 308
 	}
... ...
@@ -310,7 +307,7 @@ func netUserAdd(serverName *uint16, level uint32, buf *byte, parm_err *uint32) (
310 310
 }
311 311
 
312 312
 func netUserDel(serverName *uint16, username *uint16) (status error) {
313
-	r0, _, _ := syscall.Syscall(procNetUserDel.Addr(), 2, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(username)), 0)
313
+	r0, _, _ := syscall.SyscallN(procNetUserDel.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(username)))
314 314
 	if r0 != 0 {
315 315
 		status = syscall.Errno(r0)
316 316
 	}
... ...
@@ -318,25 +315,25 @@ func netUserDel(serverName *uint16, username *uint16) (status error) {
318 318
 }
319 319
 
320 320
 func NtCreateFile(handle *uintptr, accessMask uint32, oa *ObjectAttributes, iosb *IOStatusBlock, allocationSize *uint64, fileAttributes uint32, shareAccess uint32, createDisposition uint32, createOptions uint32, eaBuffer *byte, eaLength uint32) (status uint32) {
321
-	r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(fileAttributes), uintptr(shareAccess), uintptr(createDisposition), uintptr(createOptions), uintptr(unsafe.Pointer(eaBuffer)), uintptr(eaLength), 0)
321
+	r0, _, _ := syscall.SyscallN(procNtCreateFile.Addr(), uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(fileAttributes), uintptr(shareAccess), uintptr(createDisposition), uintptr(createOptions), uintptr(unsafe.Pointer(eaBuffer)), uintptr(eaLength))
322 322
 	status = uint32(r0)
323 323
 	return
324 324
 }
325 325
 
326 326
 func NtCreateJobObject(jobHandle *windows.Handle, desiredAccess uint32, objAttributes *ObjectAttributes) (status uint32) {
327
-	r0, _, _ := syscall.Syscall(procNtCreateJobObject.Addr(), 3, uintptr(unsafe.Pointer(jobHandle)), uintptr(desiredAccess), uintptr(unsafe.Pointer(objAttributes)))
327
+	r0, _, _ := syscall.SyscallN(procNtCreateJobObject.Addr(), uintptr(unsafe.Pointer(jobHandle)), uintptr(desiredAccess), uintptr(unsafe.Pointer(objAttributes)))
328 328
 	status = uint32(r0)
329 329
 	return
330 330
 }
331 331
 
332 332
 func NtOpenDirectoryObject(handle *uintptr, accessMask uint32, oa *ObjectAttributes) (status uint32) {
333
-	r0, _, _ := syscall.Syscall(procNtOpenDirectoryObject.Addr(), 3, uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)))
333
+	r0, _, _ := syscall.SyscallN(procNtOpenDirectoryObject.Addr(), uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)))
334 334
 	status = uint32(r0)
335 335
 	return
336 336
 }
337 337
 
338 338
 func NtOpenJobObject(jobHandle *windows.Handle, desiredAccess uint32, objAttributes *ObjectAttributes) (status uint32) {
339
-	r0, _, _ := syscall.Syscall(procNtOpenJobObject.Addr(), 3, uintptr(unsafe.Pointer(jobHandle)), uintptr(desiredAccess), uintptr(unsafe.Pointer(objAttributes)))
339
+	r0, _, _ := syscall.SyscallN(procNtOpenJobObject.Addr(), uintptr(unsafe.Pointer(jobHandle)), uintptr(desiredAccess), uintptr(unsafe.Pointer(objAttributes)))
340 340
 	status = uint32(r0)
341 341
 	return
342 342
 }
... ...
@@ -350,31 +347,31 @@ func NtQueryDirectoryObject(handle uintptr, buffer *byte, length uint32, singleE
350 350
 	if restartScan {
351 351
 		_p1 = 1
352 352
 	}
353
-	r0, _, _ := syscall.Syscall9(procNtQueryDirectoryObject.Addr(), 7, uintptr(handle), uintptr(unsafe.Pointer(buffer)), uintptr(length), uintptr(_p0), uintptr(_p1), uintptr(unsafe.Pointer(context)), uintptr(unsafe.Pointer(returnLength)), 0, 0)
353
+	r0, _, _ := syscall.SyscallN(procNtQueryDirectoryObject.Addr(), uintptr(handle), uintptr(unsafe.Pointer(buffer)), uintptr(length), uintptr(_p0), uintptr(_p1), uintptr(unsafe.Pointer(context)), uintptr(unsafe.Pointer(returnLength)))
354 354
 	status = uint32(r0)
355 355
 	return
356 356
 }
357 357
 
358 358
 func NtQueryInformationProcess(processHandle windows.Handle, processInfoClass uint32, processInfo unsafe.Pointer, processInfoLength uint32, returnLength *uint32) (status uint32) {
359
-	r0, _, _ := syscall.Syscall6(procNtQueryInformationProcess.Addr(), 5, uintptr(processHandle), uintptr(processInfoClass), uintptr(processInfo), uintptr(processInfoLength), uintptr(unsafe.Pointer(returnLength)), 0)
359
+	r0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(processHandle), uintptr(processInfoClass), uintptr(processInfo), uintptr(processInfoLength), uintptr(unsafe.Pointer(returnLength)))
360 360
 	status = uint32(r0)
361 361
 	return
362 362
 }
363 363
 
364 364
 func NtQuerySystemInformation(systemInfoClass int, systemInformation unsafe.Pointer, systemInfoLength uint32, returnLength *uint32) (status uint32) {
365
-	r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(systemInfoClass), uintptr(systemInformation), uintptr(systemInfoLength), uintptr(unsafe.Pointer(returnLength)), 0, 0)
365
+	r0, _, _ := syscall.SyscallN(procNtQuerySystemInformation.Addr(), uintptr(systemInfoClass), uintptr(systemInformation), uintptr(systemInfoLength), uintptr(unsafe.Pointer(returnLength)))
366 366
 	status = uint32(r0)
367 367
 	return
368 368
 }
369 369
 
370 370
 func NtSetInformationFile(handle uintptr, iosb *IOStatusBlock, information uintptr, length uint32, class uint32) (status uint32) {
371
-	r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(information), uintptr(length), uintptr(class), 0)
371
+	r0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(information), uintptr(length), uintptr(class))
372 372
 	status = uint32(r0)
373 373
 	return
374 374
 }
375 375
 
376 376
 func RtlNtStatusToDosError(status uint32) (winerr error) {
377
-	r0, _, _ := syscall.Syscall(procRtlNtStatusToDosError.Addr(), 1, uintptr(status), 0, 0)
377
+	r0, _, _ := syscall.SyscallN(procRtlNtStatusToDosError.Addr(), uintptr(status))
378 378
 	if r0 != 0 {
379 379
 		winerr = syscall.Errno(r0)
380 380
 	}
... ...
@@ -382,7 +379,7 @@ func RtlNtStatusToDosError(status uint32) (winerr error) {
382 382
 }
383 383
 
384 384
 func ORCloseHive(key syscall.Handle) (regerrno error) {
385
-	r0, _, _ := syscall.Syscall(procORCloseHive.Addr(), 1, uintptr(key), 0, 0)
385
+	r0, _, _ := syscall.SyscallN(procORCloseHive.Addr(), uintptr(key))
386 386
 	if r0 != 0 {
387 387
 		regerrno = syscall.Errno(r0)
388 388
 	}
... ...
@@ -390,7 +387,7 @@ func ORCloseHive(key syscall.Handle) (regerrno error) {
390 390
 }
391 391
 
392 392
 func ORCreateHive(key *syscall.Handle) (regerrno error) {
393
-	r0, _, _ := syscall.Syscall(procORCreateHive.Addr(), 1, uintptr(unsafe.Pointer(key)), 0, 0)
393
+	r0, _, _ := syscall.SyscallN(procORCreateHive.Addr(), uintptr(unsafe.Pointer(key)))
394 394
 	if r0 != 0 {
395 395
 		regerrno = syscall.Errno(r0)
396 396
 	}
... ...
@@ -407,7 +404,7 @@ func ORSaveHive(key syscall.Handle, file string, OsMajorVersion uint32, OsMinorV
407 407
 }
408 408
 
409 409
 func _ORSaveHive(key syscall.Handle, file *uint16, OsMajorVersion uint32, OsMinorVersion uint32) (regerrno error) {
410
-	r0, _, _ := syscall.Syscall6(procORSaveHive.Addr(), 4, uintptr(key), uintptr(unsafe.Pointer(file)), uintptr(OsMajorVersion), uintptr(OsMinorVersion), 0, 0)
410
+	r0, _, _ := syscall.SyscallN(procORSaveHive.Addr(), uintptr(key), uintptr(unsafe.Pointer(file)), uintptr(OsMajorVersion), uintptr(OsMinorVersion))
411 411
 	if r0 != 0 {
412 412
 		regerrno = syscall.Errno(r0)
413 413
 	}
... ...
@@ -33,9 +33,6 @@ func errnoErr(e syscall.Errno) error {
33 33
 	case errnoERROR_IO_PENDING:
34 34
 		return errERROR_IO_PENDING
35 35
 	}
36
-	// TODO: add more here, after collecting data on the common
37
-	// error values see on Windows. (perhaps when running
38
-	// all.bat?)
39 36
 	return e
40 37
 }
41 38
 
... ...
@@ -46,7 +43,7 @@ var (
46 46
 )
47 47
 
48 48
 func SetCurrentThreadCompartmentId(compartmentId uint32) (hr error) {
49
-	r0, _, _ := syscall.Syscall(procSetCurrentThreadCompartmentId.Addr(), 1, uintptr(compartmentId), 0, 0)
49
+	r0, _, _ := syscall.SyscallN(procSetCurrentThreadCompartmentId.Addr(), uintptr(compartmentId))
50 50
 	if int32(r0) < 0 {
51 51
 		if r0&0x1fff0000 == 0x00070000 {
52 52
 			r0 &= 0xffff
... ...
@@ -102,7 +102,7 @@ EOF
102 102
   config.vm.provision "install-golang", type: "shell", run: "once" do |sh|
103 103
     sh.upload_path = "/tmp/vagrant-install-golang"
104 104
     sh.env = {
105
-        'GO_VERSION': ENV['GO_VERSION'] || "1.21.9",
105
+        'GO_VERSION': ENV['GO_VERSION'] || "1.21.10",
106 106
     }
107 107
     sh.inline = <<~SHELL
108 108
         #!/usr/bin/env bash
... ...
@@ -432,11 +432,11 @@ func ConvertDockerMediaTypeToOCI(mt string) string {
432 432
 	case images.MediaTypeDockerSchema2LayerGzip:
433 433
 		return ocispec.MediaTypeImageLayerGzip
434 434
 	case images.MediaTypeDockerSchema2LayerForeignGzip:
435
-		return ocispec.MediaTypeImageLayerNonDistributableGzip
435
+		return ocispec.MediaTypeImageLayerNonDistributableGzip //nolint:staticcheck // deprecated
436 436
 	case images.MediaTypeDockerSchema2Layer:
437 437
 		return ocispec.MediaTypeImageLayer
438 438
 	case images.MediaTypeDockerSchema2LayerForeign:
439
-		return ocispec.MediaTypeImageLayerNonDistributable
439
+		return ocispec.MediaTypeImageLayerNonDistributable //nolint:staticcheck // deprecated
440 440
 	case images.MediaTypeDockerSchema2Config:
441 441
 		return ocispec.MediaTypeImageConfig
442 442
 	default:
... ...
@@ -36,7 +36,7 @@ func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (
36 36
 		MediaTypeDockerSchema2Layer,
37 37
 		ocispec.MediaTypeImageLayer,
38 38
 		MediaTypeDockerSchema2LayerForeign,
39
-		ocispec.MediaTypeImageLayerNonDistributable:
39
+		ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated
40 40
 		return desc.Digest, nil
41 41
 	}
42 42
 	info, err := cs.Info(ctx, desc.Digest)
... ...
@@ -81,7 +81,7 @@ func DiffCompression(ctx context.Context, mediaType string) (string, error) {
81 81
 			return "", nil
82 82
 		}
83 83
 		return "gzip", nil
84
-	case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable:
84
+	case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // Non-distributable layers are deprecated
85 85
 		if len(ext) > 0 {
86 86
 			switch ext[len(ext)-1] {
87 87
 			case "gzip":
... ...
@@ -323,6 +323,7 @@ func (s *snapshotter) createSnapshot(ctx context.Context, key, parent string, re
323 323
 		bopts   = []snapshots.Opt{
324 324
 			snapshots.WithLabels(snapshots.FilterInheritedLabels(base.Labels)),
325 325
 		}
326
+		rerr error
326 327
 	)
327 328
 
328 329
 	if err := update(ctx, s.db, func(tx *bolt.Tx) error {
... ...
@@ -334,12 +335,20 @@ func (s *snapshotter) createSnapshot(ctx context.Context, key, parent string, re
334 334
 		// Check if target exists, if so, return already exists
335 335
 		if target != "" {
336 336
 			if tbkt := bkt.Bucket([]byte(target)); tbkt != nil {
337
-				return fmt.Errorf("target snapshot %q: %w", target, errdefs.ErrAlreadyExists)
337
+				rerr = fmt.Errorf("target snapshot %q: %w", target, errdefs.ErrAlreadyExists)
338
+				if err := addSnapshotLease(ctx, tx, s.name, target); err != nil {
339
+					return err
340
+				}
341
+				return nil
338 342
 			}
339 343
 		}
340 344
 
341 345
 		if bbkt := bkt.Bucket([]byte(key)); bbkt != nil {
342
-			return fmt.Errorf("snapshot %q: %w", key, errdefs.ErrAlreadyExists)
346
+			rerr = fmt.Errorf("snapshot %q: %w", key, errdefs.ErrAlreadyExists)
347
+			if err := addSnapshotLease(ctx, tx, s.name, key); err != nil {
348
+				return err
349
+			}
350
+			return nil
343 351
 		}
344 352
 
345 353
 		if parent != "" {
... ...
@@ -360,11 +369,14 @@ func (s *snapshotter) createSnapshot(ctx context.Context, key, parent string, re
360 360
 	}); err != nil {
361 361
 		return nil, err
362 362
 	}
363
+	// Already exists and lease successfully added in transaction
364
+	if rerr != nil {
365
+		return nil, rerr
366
+	}
363 367
 
364 368
 	var (
365 369
 		m       []mount.Mount
366 370
 		created string
367
-		rerr    error
368 371
 	)
369 372
 	if readonly {
370 373
 		m, err = s.Snapshotter.View(ctx, bkey, bparent, bopts...)
... ...
@@ -527,7 +539,10 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap
527 527
 		return err
528 528
 	}
529 529
 
530
-	var bname string
530
+	var (
531
+		bname string
532
+		rerr  error
533
+	)
531 534
 	if err := update(ctx, s.db, func(tx *bolt.Tx) error {
532 535
 		bkt := getSnapshotterBucket(tx, ns, s.name)
533 536
 		if bkt == nil {
... ...
@@ -535,16 +550,17 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap
535 535
 				s.name, errdefs.ErrNotFound)
536 536
 		}
537 537
 
538
+		if err := addSnapshotLease(ctx, tx, s.name, name); err != nil {
539
+			return err
540
+		}
538 541
 		bbkt, err := bkt.CreateBucket([]byte(name))
539 542
 		if err != nil {
540 543
 			if err == bolt.ErrBucketExists {
541
-				err = fmt.Errorf("snapshot %q: %w", name, errdefs.ErrAlreadyExists)
544
+				rerr = fmt.Errorf("snapshot %q: %w", name, errdefs.ErrAlreadyExists)
545
+				return nil
542 546
 			}
543 547
 			return err
544 548
 		}
545
-		if err := addSnapshotLease(ctx, tx, s.name, name); err != nil {
546
-			return err
547
-		}
548 549
 
549 550
 		obkt := bkt.Bucket([]byte(key))
550 551
 		if obkt == nil {
... ...
@@ -634,7 +650,7 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap
634 634
 		return err
635 635
 	}
636 636
 
637
-	if s.db.dbopts.publisher != nil {
637
+	if rerr == nil && s.db.dbopts.publisher != nil {
638 638
 		if err := s.db.dbopts.publisher.Publish(ctx, "/snapshot/commit", &eventstypes.SnapshotCommit{
639 639
 			Key:         key,
640 640
 			Name:        name,
... ...
@@ -644,7 +660,7 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap
644 644
 		}
645 645
 	}
646 646
 
647
-	return nil
647
+	return rerr
648 648
 
649 649
 }
650 650
 
... ...
@@ -23,6 +23,7 @@ import (
23 23
 	"strings"
24 24
 	"time"
25 25
 
26
+	kernel "github.com/containerd/containerd/contrib/seccomp/kernelversion"
26 27
 	"github.com/containerd/containerd/pkg/randutil"
27 28
 	"golang.org/x/sys/unix"
28 29
 )
... ...
@@ -84,6 +85,32 @@ func setupLoopDev(backingFile, loopDev string, param LoopParams) (_ *os.File, re
84 84
 		}
85 85
 	}()
86 86
 
87
+	fiveDotEight := kernel.KernelVersion{Kernel: 5, Major: 8}
88
+	if ok, err := kernel.GreaterEqualThan(fiveDotEight); err == nil && ok {
89
+		config := unix.LoopConfig{
90
+			Fd: uint32(back.Fd()),
91
+		}
92
+
93
+		copy(config.Info.File_name[:], backingFile)
94
+		if param.Readonly {
95
+			config.Info.Flags |= unix.LO_FLAGS_READ_ONLY
96
+		}
97
+
98
+		if param.Autoclear {
99
+			config.Info.Flags |= unix.LO_FLAGS_AUTOCLEAR
100
+		}
101
+
102
+		if param.Direct {
103
+			config.Info.Flags |= unix.LO_FLAGS_DIRECT_IO
104
+		}
105
+
106
+		if err := unix.IoctlLoopConfigure(int(loop.Fd()), &config); err != nil {
107
+			return nil, fmt.Errorf("failed to configure loop device: %s: %w", loopDev, err)
108
+		}
109
+
110
+		return loop, nil
111
+	}
112
+
87 113
 	// 2. Set FD
88 114
 	if err := unix.IoctlSetInt(int(loop.Fd()), unix.LOOP_SET_FD, int(back.Fd())); err != nil {
89 115
 		return nil, fmt.Errorf("could not set loop fd for device: %s: %w", loopDev, err)
... ...
@@ -26,6 +26,7 @@ import (
26 26
 	"strings"
27 27
 	"time"
28 28
 
29
+	"github.com/containerd/containerd/pkg/userns"
29 30
 	"golang.org/x/sys/unix"
30 31
 )
31 32
 
... ...
@@ -114,12 +115,56 @@ func (m *Mount) mount(target string) (err error) {
114 114
 
115 115
 	const broflags = unix.MS_BIND | unix.MS_RDONLY
116 116
 	if oflags&broflags == broflags {
117
+		// Preserve CL_UNPRIVILEGED "locked" flags of the
118
+		// bind mount target when we remount to make the bind readonly.
119
+		// This is necessary to ensure that
120
+		// bind-mounting "with options" will not fail with user namespaces, due to
121
+		// kernel restrictions that require user namespace mounts to preserve
122
+		// CL_UNPRIVILEGED locked flags.
123
+		var unprivFlags int
124
+		if userns.RunningInUserNS() {
125
+			unprivFlags, err = getUnprivilegedMountFlags(target)
126
+			if err != nil {
127
+				return err
128
+			}
129
+		}
117 130
 		// Remount the bind to apply read only.
118
-		return unix.Mount("", target, "", uintptr(oflags|unix.MS_REMOUNT), "")
131
+		return unix.Mount("", target, "", uintptr(oflags|unprivFlags|unix.MS_REMOUNT), "")
119 132
 	}
120 133
 	return nil
121 134
 }
122 135
 
136
+// Get the set of mount flags that are set on the mount that contains the given
137
+// path and are locked by CL_UNPRIVILEGED.
138
+//
139
+// From https://github.com/moby/moby/blob/v23.0.1/daemon/oci_linux.go#L430-L460
140
+func getUnprivilegedMountFlags(path string) (int, error) {
141
+	var statfs unix.Statfs_t
142
+	if err := unix.Statfs(path, &statfs); err != nil {
143
+		return 0, err
144
+	}
145
+
146
+	// The set of keys come from https://github.com/torvalds/linux/blob/v4.13/fs/namespace.c#L1034-L1048.
147
+	unprivilegedFlags := []int{
148
+		unix.MS_RDONLY,
149
+		unix.MS_NODEV,
150
+		unix.MS_NOEXEC,
151
+		unix.MS_NOSUID,
152
+		unix.MS_NOATIME,
153
+		unix.MS_RELATIME,
154
+		unix.MS_NODIRATIME,
155
+	}
156
+
157
+	var flags int
158
+	for flag := range unprivilegedFlags {
159
+		if int(statfs.Flags)&flag == flag {
160
+			flags |= flag
161
+		}
162
+	}
163
+
164
+	return flags, nil
165
+}
166
+
123 167
 // Unmount the provided mount path with the flags
124 168
 func Unmount(target string, flags int) error {
125 169
 	if err := unmount(target, flags); err != nil && err != unix.EINVAL {
... ...
@@ -457,6 +457,7 @@ func WithImageConfigArgs(image Image, args []string) SpecOpts {
457 457
 				return errors.New("no arguments specified")
458 458
 			}
459 459
 
460
+			//nolint:staticcheck // ArgsEscaped is deprecated
460 461
 			if config.ArgsEscaped && (len(config.Entrypoint) > 0 || cmdFromImage) {
461 462
 				s.Process.Args = nil
462 463
 				s.Process.CommandLine = cmd[0]
... ...
@@ -263,7 +263,8 @@ func (u *Unpacker) unpack(
263 263
 	}
264 264
 
265 265
 	if unpack == nil {
266
-		return fmt.Errorf("unpacker does not support platform %s for image %s", imgPlatform, config.Digest)
266
+		log.G(ctx).WithField("image", config.Digest).WithField("platform", platforms.Format(imgPlatform)).Debugf("unpacker does not support platform, only fetching layers")
267
+		return u.fetch(ctx, h, layers, nil)
267 268
 	}
268 269
 
269 270
 	atomic.AddInt32(&u.unpacks, 1)
... ...
@@ -461,12 +462,18 @@ func (u *Unpacker) fetch(ctx context.Context, h images.Handler, layers []ocispec
461 461
 			tracing.Attribute("layer.media.digest", desc.Digest.String()),
462 462
 		)
463 463
 		desc := desc
464
-		i := i
464
+		var ch chan struct{}
465
+		if done != nil {
466
+			ch = done[i]
467
+		}
468
+
465 469
 		if err := u.acquire(ctx); err != nil {
466 470
 			return err
467 471
 		}
468 472
 
469 473
 		eg.Go(func() error {
474
+			defer layerSpan.End()
475
+
470 476
 			unlock, err := u.lockBlobDescriptor(ctx2, desc)
471 477
 			if err != nil {
472 478
 				u.release()
... ...
@@ -481,11 +488,12 @@ func (u *Unpacker) fetch(ctx context.Context, h images.Handler, layers []ocispec
481 481
 			if err != nil && !errors.Is(err, images.ErrSkipDesc) {
482 482
 				return err
483 483
 			}
484
-			close(done[i])
484
+			if ch != nil {
485
+				close(ch)
486
+			}
485 487
 
486 488
 			return nil
487 489
 		})
488
-		layerSpan.End()
489 490
 	}
490 491
 
491 492
 	return eg.Wait()
... ...
@@ -99,10 +99,16 @@ func (c *Config) GetVersion() int {
99 99
 func (c *Config) ValidateV2() error {
100 100
 	version := c.GetVersion()
101 101
 	if version < 2 {
102
-		logrus.Warnf("containerd config version `%d` has been deprecated and will be removed in containerd v2.0, please switch to version `2`, "+
103
-			"see https://github.com/containerd/containerd/blob/main/docs/PLUGINS.md#version-header", version)
102
+		logrus.Warnf("containerd config version `%d` has been deprecated and will be converted on each startup in containerd v2.0, "+
103
+			"use `containerd config migrate` after upgrading to containerd 2.0 to avoid conversion on startup", version)
104 104
 		return nil
105 105
 	}
106
+	if version > 2 {
107
+		logrus.Errorf("containerd config version `%d` is not supported, the max version is `2`, "+
108
+			"use `containerd config default` to generate a new config or manually revert to version `2`", version)
109
+		return fmt.Errorf("unsupported config version `%d`", version)
110
+
111
+	}
106 112
 	for _, p := range c.DisabledPlugins {
107 113
 		if !strings.HasPrefix(p, "io.containerd.") || len(strings.SplitN(p, ".", 4)) < 4 {
108 114
 			return fmt.Errorf("invalid disabled plugin URI %q expect io.containerd.x.vx", p)
... ...
@@ -23,7 +23,7 @@ var (
23 23
 	Package = "github.com/containerd/containerd"
24 24
 
25 25
 	// Version holds the complete version number. Filled in at linking time.
26
-	Version = "1.7.16+unknown"
26
+	Version = "1.7.17+unknown"
27 27
 
28 28
 	// Revision is filled with the VCS (e.g. git) revision being used to build
29 29
 	// the program at linking time.
... ...
@@ -386,25 +386,44 @@ func (c *Client) receiveLoop() error {
386 386
 // createStream creates a new stream and registers it with the client
387 387
 // Introduce stream types for multiple or single response
388 388
 func (c *Client) createStream(flags uint8, b []byte) (*stream, error) {
389
-	c.streamLock.Lock()
389
+	// sendLock must be held across both allocation of the stream ID and sending it across the wire.
390
+	// This ensures that new stream IDs sent on the wire are always increasing, which is a
391
+	// requirement of the TTRPC protocol.
392
+	// This use of sendLock could be split into another mutex that covers stream creation + first send,
393
+	// and just use sendLock to guard writing to the wire, but for now it seems simpler to have fewer mutexes.
394
+	c.sendLock.Lock()
395
+	defer c.sendLock.Unlock()
390 396
 
391 397
 	// Check if closed since lock acquired to prevent adding
392 398
 	// anything after cleanup completes
393 399
 	select {
394 400
 	case <-c.ctx.Done():
395
-		c.streamLock.Unlock()
396 401
 		return nil, ErrClosed
397 402
 	default:
398 403
 	}
399 404
 
400
-	// Stream ID should be allocated at same time
401
-	s := newStream(c.nextStreamID, c)
402
-	c.streams[s.id] = s
403
-	c.nextStreamID = c.nextStreamID + 2
405
+	var s *stream
406
+	if err := func() error {
407
+		// In the future this could be replaced with a sync.Map instead of streamLock+map.
408
+		c.streamLock.Lock()
409
+		defer c.streamLock.Unlock()
404 410
 
405
-	c.sendLock.Lock()
406
-	defer c.sendLock.Unlock()
407
-	c.streamLock.Unlock()
411
+		// Check if closed since lock acquired to prevent adding
412
+		// anything after cleanup completes
413
+		select {
414
+		case <-c.ctx.Done():
415
+			return ErrClosed
416
+		default:
417
+		}
418
+
419
+		s = newStream(c.nextStreamID, c)
420
+		c.streams[s.id] = s
421
+		c.nextStreamID = c.nextStreamID + 2
422
+
423
+		return nil
424
+	}(); err != nil {
425
+		return nil, err
426
+	}
408 427
 
409 428
 	if err := c.channel.send(uint32(s.id), messageTypeRequest, flags, b); err != nil {
410 429
 		return s, filterCloseErr(err)
... ...
@@ -21,12 +21,20 @@ const (
21 21
 	// MediaTypeLayoutHeader specifies the media type for the oci-layout.
22 22
 	MediaTypeLayoutHeader = "application/vnd.oci.layout.header.v1+json"
23 23
 
24
+	// MediaTypeImageIndex specifies the media type for an image index.
25
+	MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json"
26
+
24 27
 	// MediaTypeImageManifest specifies the media type for an image manifest.
25 28
 	MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json"
26 29
 
27
-	// MediaTypeImageIndex specifies the media type for an image index.
28
-	MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json"
30
+	// MediaTypeImageConfig specifies the media type for the image configuration.
31
+	MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json"
32
+
33
+	// MediaTypeEmptyJSON specifies the media type for an unused blob containing the value "{}".
34
+	MediaTypeEmptyJSON = "application/vnd.oci.empty.v1+json"
35
+)
29 36
 
37
+const (
30 38
 	// MediaTypeImageLayer is the media type used for layers referenced by the manifest.
31 39
 	MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar"
32 40
 
... ...
@@ -37,7 +45,15 @@ const (
37 37
 	// MediaTypeImageLayerZstd is the media type used for zstd compressed
38 38
 	// layers referenced by the manifest.
39 39
 	MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd"
40
+)
40 41
 
42
+// Non-distributable layer media-types.
43
+//
44
+// Deprecated: Non-distributable layers are deprecated, and not recommended
45
+// for future use. Implementations SHOULD NOT produce new non-distributable
46
+// layers.
47
+// https://github.com/opencontainers/image-spec/pull/965
48
+const (
41 49
 	// MediaTypeImageLayerNonDistributable is the media type for layers referenced by
42 50
 	// the manifest but with distribution restrictions.
43 51
 	//
... ...
@@ -66,10 +82,4 @@ const (
66 66
 	// layers.
67 67
 	// https://github.com/opencontainers/image-spec/pull/965
68 68
 	MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd"
69
-
70
-	// MediaTypeImageConfig specifies the media type for the image configuration.
71
-	MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json"
72
-
73
-	// MediaTypeEmptyJSON specifies the media type for an unused blob containing the value `{}`
74
-	MediaTypeEmptyJSON = "application/vnd.oci.empty.v1+json"
75 69
 )
... ...
@@ -25,7 +25,7 @@ const (
25 25
 	VersionPatch = 0
26 26
 
27 27
 	// VersionDev indicates development branch. Releases will be empty string.
28
-	VersionDev = "-rc.5"
28
+	VersionDev = ""
29 29
 )
30 30
 
31 31
 // Version is the specification version that the package types support.
... ...
@@ -51,8 +51,8 @@ github.com/Microsoft/go-winio/pkg/etwlogrus
51 51
 github.com/Microsoft/go-winio/pkg/fs
52 52
 github.com/Microsoft/go-winio/pkg/guid
53 53
 github.com/Microsoft/go-winio/vhd
54
-# github.com/Microsoft/hcsshim v0.11.4
55
-## explicit; go 1.18
54
+# github.com/Microsoft/hcsshim v0.11.5
55
+## explicit; go 1.21
56 56
 github.com/Microsoft/hcsshim
57 57
 github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options
58 58
 github.com/Microsoft/hcsshim/computestorage
... ...
@@ -261,7 +261,7 @@ github.com/containerd/cgroups/v3/cgroup2/stats
261 261
 # github.com/containerd/console v1.0.4
262 262
 ## explicit; go 1.13
263 263
 github.com/containerd/console
264
-# github.com/containerd/containerd v1.7.16
264
+# github.com/containerd/containerd v1.7.17
265 265
 ## explicit; go 1.21
266 266
 github.com/containerd/containerd
267 267
 github.com/containerd/containerd/api/events
... ...
@@ -397,7 +397,7 @@ github.com/containerd/nydus-snapshotter/pkg/label
397 397
 ## explicit; go 1.19
398 398
 github.com/containerd/stargz-snapshotter/estargz
399 399
 github.com/containerd/stargz-snapshotter/estargz/errorutil
400
-# github.com/containerd/ttrpc v1.2.3
400
+# github.com/containerd/ttrpc v1.2.4
401 401
 ## explicit; go 1.19
402 402
 github.com/containerd/ttrpc
403 403
 # github.com/containerd/typeurl/v2 v2.1.1
... ...
@@ -981,7 +981,7 @@ github.com/morikuni/aec
981 981
 ## explicit; go 1.13
982 982
 github.com/opencontainers/go-digest
983 983
 github.com/opencontainers/go-digest/digestset
984
-# github.com/opencontainers/image-spec v1.1.0-rc5
984
+# github.com/opencontainers/image-spec v1.1.0
985 985
 ## explicit; go 1.18
986 986
 github.com/opencontainers/image-spec/identity
987 987
 github.com/opencontainers/image-spec/specs-go