Merge pull request #6213 from thaJeztah/bump_moby_sys
go.mod: bump moby/sys/symlink v0.2.0, moby/sys/signal v0.6.0, moby/sys/mountinfo v0.5.0
This commit is contained in:
commit
195def141f
8
go.mod
8
go.mod
@ -38,9 +38,9 @@ require (
|
||||
github.com/imdario/mergo v0.3.12
|
||||
github.com/klauspost/compress v1.11.13
|
||||
github.com/moby/locker v1.0.1
|
||||
github.com/moby/sys/mountinfo v0.4.2-0.20211022201527-95edfa939201
|
||||
github.com/moby/sys/signal v0.5.1-0.20210723232958-8a51b5cc8879
|
||||
github.com/moby/sys/symlink v0.1.0
|
||||
github.com/moby/sys/mountinfo v0.5.0
|
||||
github.com/moby/sys/signal v0.6.0
|
||||
github.com/moby/sys/symlink v0.2.0
|
||||
github.com/opencontainers/go-digest v1.0.0
|
||||
github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283
|
||||
github.com/opencontainers/runc v1.0.2
|
||||
@ -63,7 +63,7 @@ require (
|
||||
go.opentelemetry.io/otel/trace v1.0.1
|
||||
golang.org/x/net v0.0.0-20210825183410-e898025ed96a
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
|
||||
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
|
||||
google.golang.org/grpc v1.41.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
gotest.tools/v3 v3.0.3
|
||||
|
18
go.sum
18
go.sum
@ -427,12 +427,12 @@ github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQ
|
||||
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
github.com/moby/sys/mountinfo v0.4.2-0.20211022201527-95edfa939201 h1:3CCeKh7+WeRmAJdVR2aNruVqoRbHQ4UIq91gPnGdNrY=
|
||||
github.com/moby/sys/mountinfo v0.4.2-0.20211022201527-95edfa939201/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
github.com/moby/sys/signal v0.5.1-0.20210723232958-8a51b5cc8879 h1:PkXi3ZKVBSfi1skhCjUykUKRwKxn/D48Nj4D1sWalXk=
|
||||
github.com/moby/sys/signal v0.5.1-0.20210723232958-8a51b5cc8879/go.mod h1:JwObcMnOrUy2VTP5swPKWwywH0Mbgk8Y5qua9iwtIRM=
|
||||
github.com/moby/sys/symlink v0.1.0 h1:MTFZ74KtNI6qQQpuBxU+uKCim4WtOMokr03hCfJcazE=
|
||||
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
|
||||
github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI=
|
||||
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
|
||||
github.com/moby/sys/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY=
|
||||
github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg=
|
||||
github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc=
|
||||
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs=
|
||||
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
@ -805,7 +805,6 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -821,11 +820,10 @@ golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 h1:7ZDGnxgHAMw7thfC5bEos0RDAccZKxioiWBhfIe+tvw=
|
||||
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
|
||||
|
@ -18,7 +18,7 @@ require (
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
|
||||
gotest.tools/v3 v3.0.3
|
||||
)
|
||||
|
||||
|
@ -403,11 +403,11 @@ github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
|
||||
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
github.com/moby/sys/mountinfo v0.4.2-0.20211022201527-95edfa939201 h1:3CCeKh7+WeRmAJdVR2aNruVqoRbHQ4UIq91gPnGdNrY=
|
||||
github.com/moby/sys/mountinfo v0.4.2-0.20211022201527-95edfa939201/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
github.com/moby/sys/signal v0.5.1-0.20210723232958-8a51b5cc8879 h1:PkXi3ZKVBSfi1skhCjUykUKRwKxn/D48Nj4D1sWalXk=
|
||||
github.com/moby/sys/signal v0.5.1-0.20210723232958-8a51b5cc8879/go.mod h1:JwObcMnOrUy2VTP5swPKWwywH0Mbgk8Y5qua9iwtIRM=
|
||||
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
|
||||
github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI=
|
||||
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
|
||||
github.com/moby/sys/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY=
|
||||
github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg=
|
||||
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs=
|
||||
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@ -756,7 +756,6 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -773,11 +772,10 @@ golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 h1:7ZDGnxgHAMw7thfC5bEos0RDAccZKxioiWBhfIe+tvw=
|
||||
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
|
4
vendor/github.com/moby/sys/mountinfo/go.mod
generated
vendored
4
vendor/github.com/moby/sys/mountinfo/go.mod
generated
vendored
@ -1,5 +1,5 @@
|
||||
module github.com/moby/sys/mountinfo
|
||||
|
||||
go 1.14
|
||||
go 1.16
|
||||
|
||||
require golang.org/x/sys v0.0.0-20200909081042-eff7692f9009
|
||||
require golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
|
||||
|
4
vendor/github.com/moby/sys/mountinfo/go.sum
generated
vendored
4
vendor/github.com/moby/sys/mountinfo/go.sum
generated
vendored
@ -1,2 +1,2 @@
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 h1:W0lCpv29Hv0UaM1LXb9QlBHLNP8UFfcKjblhVCWftOM=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
11
vendor/github.com/moby/sys/mountinfo/mounted_linux.go
generated
vendored
11
vendor/github.com/moby/sys/mountinfo/mounted_linux.go
generated
vendored
@ -16,9 +16,6 @@ func mountedByOpenat2(path string) (bool, error) {
|
||||
Flags: unix.O_PATH | unix.O_CLOEXEC,
|
||||
})
|
||||
if err != nil {
|
||||
if err == unix.ENOENT { // not a mount
|
||||
return false, nil
|
||||
}
|
||||
return false, &os.PathError{Op: "openat2", Path: dir, Err: err}
|
||||
}
|
||||
fd, err := unix.Openat2(dirfd, last, &unix.OpenHow{
|
||||
@ -26,20 +23,22 @@ func mountedByOpenat2(path string) (bool, error) {
|
||||
Resolve: unix.RESOLVE_NO_XDEV,
|
||||
})
|
||||
_ = unix.Close(dirfd)
|
||||
switch err {
|
||||
switch err { //nolint:errorlint // unix errors are bare
|
||||
case nil: // definitely not a mount
|
||||
_ = unix.Close(fd)
|
||||
return false, nil
|
||||
case unix.EXDEV: // definitely a mount
|
||||
return true, nil
|
||||
case unix.ENOENT: // not a mount
|
||||
return false, nil
|
||||
}
|
||||
// not sure
|
||||
return false, &os.PathError{Op: "openat2", Path: path, Err: err}
|
||||
}
|
||||
|
||||
func mounted(path string) (bool, error) {
|
||||
path, err := normalizePath(path)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
// Try a fast path, using openat2() with RESOLVE_NO_XDEV.
|
||||
mounted, err := mountedByOpenat2(path)
|
||||
if err == nil {
|
||||
|
14
vendor/github.com/moby/sys/mountinfo/mounted_unix.go
generated
vendored
14
vendor/github.com/moby/sys/mountinfo/mounted_unix.go
generated
vendored
@ -1,9 +1,9 @@
|
||||
//go:build linux || (freebsd && cgo) || (openbsd && cgo) || (darwin && cgo)
|
||||
// +build linux freebsd,cgo openbsd,cgo darwin,cgo
|
||||
|
||||
package mountinfo
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -15,10 +15,6 @@ func mountedByStat(path string) (bool, error) {
|
||||
var st unix.Stat_t
|
||||
|
||||
if err := unix.Lstat(path, &st); err != nil {
|
||||
if err == unix.ENOENT {
|
||||
// Treat ENOENT as "not mounted".
|
||||
return false, nil
|
||||
}
|
||||
return false, &os.PathError{Op: "stat", Path: path, Err: err}
|
||||
}
|
||||
dev := st.Dev
|
||||
@ -49,14 +45,6 @@ func normalizePath(path string) (realPath string, err error) {
|
||||
}
|
||||
|
||||
func mountedByMountinfo(path string) (bool, error) {
|
||||
path, err := normalizePath(path)
|
||||
if err != nil {
|
||||
if errors.Is(err, unix.ENOENT) {
|
||||
// treat ENOENT as "not mounted"
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
entries, err := GetMounts(SingleEntryFilter(path))
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
9
vendor/github.com/moby/sys/mountinfo/mountinfo.go
generated
vendored
9
vendor/github.com/moby/sys/mountinfo/mountinfo.go
generated
vendored
@ -10,11 +10,12 @@ func GetMounts(f FilterFunc) ([]*Info, error) {
|
||||
return parseMountTable(f)
|
||||
}
|
||||
|
||||
// Mounted determines if a specified path is a mount point.
|
||||
// Mounted determines if a specified path is a mount point. In case of any
|
||||
// error, false (and an error) is returned.
|
||||
//
|
||||
// The argument must be an absolute path, with all symlinks resolved, and clean.
|
||||
// One way to ensure it is to process the path using filepath.Abs followed by
|
||||
// filepath.EvalSymlinks before calling this function.
|
||||
// The non-existent path returns an error. If a caller is not interested
|
||||
// in this particular error, it should handle it separately using e.g.
|
||||
// errors.Is(err, os.ErrNotExist).
|
||||
func Mounted(path string) (bool, error) {
|
||||
// root is always mounted
|
||||
if path == string(os.PathSeparator) {
|
||||
|
5
vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go
generated
vendored
5
vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build (freebsd && cgo) || (openbsd && cgo) || (darwin && cgo)
|
||||
// +build freebsd,cgo openbsd,cgo darwin,cgo
|
||||
|
||||
package mountinfo
|
||||
@ -55,6 +56,10 @@ func parseMountTable(filter FilterFunc) ([]*Info, error) {
|
||||
}
|
||||
|
||||
func mounted(path string) (bool, error) {
|
||||
path, err := normalizePath(path)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
// Fast path: compare st.st_dev fields.
|
||||
// This should always work for FreeBSD and OpenBSD.
|
||||
mounted, err := mountedByStat(path)
|
||||
|
1
vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go
generated
vendored
1
vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build (!windows && !linux && !freebsd && !openbsd && !darwin) || (freebsd && !cgo) || (openbsd && !cgo) || (darwin && !cgo)
|
||||
// +build !windows,!linux,!freebsd,!openbsd,!darwin freebsd,!cgo openbsd,!cgo darwin,!cgo
|
||||
|
||||
package mountinfo
|
||||
|
4
vendor/github.com/moby/sys/signal/go.mod
generated
vendored
4
vendor/github.com/moby/sys/signal/go.mod
generated
vendored
@ -1,5 +1,5 @@
|
||||
module github.com/moby/sys/signal
|
||||
|
||||
go 1.13
|
||||
go 1.16
|
||||
|
||||
require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
|
||||
require golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
|
||||
|
4
vendor/github.com/moby/sys/signal/go.sum
generated
vendored
4
vendor/github.com/moby/sys/signal/go.sum
generated
vendored
@ -1,2 +1,2 @@
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
4
vendor/github.com/moby/sys/signal/signal.go
generated
vendored
4
vendor/github.com/moby/sys/signal/signal.go
generated
vendored
@ -39,13 +39,13 @@ func ParseSignal(rawSignal string) (syscall.Signal, error) {
|
||||
s, err := strconv.Atoi(rawSignal)
|
||||
if err == nil {
|
||||
if s == 0 {
|
||||
return -1, fmt.Errorf("Invalid signal: %s", rawSignal)
|
||||
return -1, fmt.Errorf("invalid signal: %s", rawSignal)
|
||||
}
|
||||
return syscall.Signal(s), nil
|
||||
}
|
||||
signal, ok := SignalMap[strings.TrimPrefix(strings.ToUpper(rawSignal), "SIG")]
|
||||
if !ok {
|
||||
return -1, fmt.Errorf("Invalid signal: %s", rawSignal)
|
||||
return -1, fmt.Errorf("invalid signal: %s", rawSignal)
|
||||
}
|
||||
return signal, nil
|
||||
}
|
||||
|
2
vendor/github.com/moby/sys/signal/signal_darwin.go
generated
vendored
2
vendor/github.com/moby/sys/signal/signal_darwin.go
generated
vendored
@ -8,7 +8,7 @@ import (
|
||||
var SignalMap = map[string]syscall.Signal{
|
||||
"ABRT": syscall.SIGABRT,
|
||||
"ALRM": syscall.SIGALRM,
|
||||
"BUG": syscall.SIGBUS,
|
||||
"BUS": syscall.SIGBUS,
|
||||
"CHLD": syscall.SIGCHLD,
|
||||
"CONT": syscall.SIGCONT,
|
||||
"EMT": syscall.SIGEMT,
|
||||
|
2
vendor/github.com/moby/sys/signal/signal_freebsd.go
generated
vendored
2
vendor/github.com/moby/sys/signal/signal_freebsd.go
generated
vendored
@ -8,7 +8,7 @@ import (
|
||||
var SignalMap = map[string]syscall.Signal{
|
||||
"ABRT": syscall.SIGABRT,
|
||||
"ALRM": syscall.SIGALRM,
|
||||
"BUF": syscall.SIGBUS,
|
||||
"BUS": syscall.SIGBUS,
|
||||
"CHLD": syscall.SIGCHLD,
|
||||
"CONT": syscall.SIGCONT,
|
||||
"EMT": syscall.SIGEMT,
|
||||
|
1
vendor/github.com/moby/sys/signal/signal_linux.go
generated
vendored
1
vendor/github.com/moby/sys/signal/signal_linux.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !mips && !mipsle && !mips64 && !mips64le
|
||||
// +build !mips,!mipsle,!mips64,!mips64le
|
||||
|
||||
package signal
|
||||
|
1
vendor/github.com/moby/sys/signal/signal_linux_mipsx.go
generated
vendored
1
vendor/github.com/moby/sys/signal/signal_linux_mipsx.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build linux && (mips || mipsle || mips64 || mips64le)
|
||||
// +build linux
|
||||
// +build mips mipsle mips64 mips64le
|
||||
|
||||
|
3
vendor/github.com/moby/sys/signal/signal_unix.go
generated
vendored
3
vendor/github.com/moby/sys/signal/signal_unix.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package signal
|
||||
@ -16,6 +17,4 @@ const (
|
||||
SIGWINCH = syscall.SIGWINCH
|
||||
// SIGPIPE is a signal sent to a process when a pipe is written to before the other end is open for reading
|
||||
SIGPIPE = syscall.SIGPIPE
|
||||
// DefaultStopSignal is the syscall signal used to stop a container in unix systems.
|
||||
DefaultStopSignal = "SIGTERM"
|
||||
)
|
||||
|
1
vendor/github.com/moby/sys/signal/signal_unsupported.go
generated
vendored
1
vendor/github.com/moby/sys/signal/signal_unsupported.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !linux && !darwin && !freebsd && !windows
|
||||
// +build !linux,!darwin,!freebsd,!windows
|
||||
|
||||
package signal
|
||||
|
16
vendor/github.com/moby/sys/signal/signal_windows.go
generated
vendored
16
vendor/github.com/moby/sys/signal/signal_windows.go
generated
vendored
@ -12,25 +12,23 @@ const (
|
||||
SIGCHLD = syscall.Signal(0xff)
|
||||
SIGWINCH = syscall.Signal(0xff)
|
||||
SIGPIPE = syscall.Signal(0xff)
|
||||
// DefaultStopSignal is the syscall signal used to stop a container in windows systems.
|
||||
DefaultStopSignal = "15"
|
||||
)
|
||||
|
||||
// SignalMap is a map of "supported" signals. As per the comment in GOLang's
|
||||
// ztypes_windows.go: "More invented values for signals". Windows doesn't
|
||||
// really support signals in any way, shape or form that Unix does.
|
||||
var SignalMap = map[string]syscall.Signal{
|
||||
"HUP": syscall.Signal(windows.SIGHUP),
|
||||
"INT": syscall.Signal(windows.SIGINT),
|
||||
"QUIT": syscall.Signal(windows.SIGQUIT),
|
||||
"ILL": syscall.Signal(windows.SIGILL),
|
||||
"TRAP": syscall.Signal(windows.SIGTRAP),
|
||||
"ABRT": syscall.Signal(windows.SIGABRT),
|
||||
"ALRM": syscall.Signal(windows.SIGALRM),
|
||||
"BUS": syscall.Signal(windows.SIGBUS),
|
||||
"FPE": syscall.Signal(windows.SIGFPE),
|
||||
"HUP": syscall.Signal(windows.SIGHUP),
|
||||
"ILL": syscall.Signal(windows.SIGILL),
|
||||
"INT": syscall.Signal(windows.SIGINT),
|
||||
"KILL": syscall.Signal(windows.SIGKILL),
|
||||
"SEGV": syscall.Signal(windows.SIGSEGV),
|
||||
"PIPE": syscall.Signal(windows.SIGPIPE),
|
||||
"ALRM": syscall.Signal(windows.SIGALRM),
|
||||
"QUIT": syscall.Signal(windows.SIGQUIT),
|
||||
"SEGV": syscall.Signal(windows.SIGSEGV),
|
||||
"TERM": syscall.Signal(windows.SIGTERM),
|
||||
"TRAP": syscall.Signal(windows.SIGTRAP),
|
||||
}
|
||||
|
1
vendor/github.com/moby/sys/symlink/fs_unix.go
generated
vendored
1
vendor/github.com/moby/sys/symlink/fs_unix.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package symlink
|
||||
|
4
vendor/github.com/moby/sys/symlink/fs_windows.go
generated
vendored
4
vendor/github.com/moby/sys/symlink/fs_windows.go
generated
vendored
@ -89,7 +89,7 @@ func walkSymlinks(path string) (string, error) {
|
||||
var b bytes.Buffer
|
||||
for n := 0; path != ""; n++ {
|
||||
if n > maxIter {
|
||||
return "", errors.New("EvalSymlinks: too many links in " + originalPath)
|
||||
return "", errors.New("too many links in " + originalPath)
|
||||
}
|
||||
|
||||
// A path beginning with `\\?\` represents the root, so automatically
|
||||
@ -101,7 +101,7 @@ func walkSymlinks(path string) (string, error) {
|
||||
}
|
||||
|
||||
// find next path component, p
|
||||
var i = -1
|
||||
i := -1
|
||||
for j, c := range path {
|
||||
if c < utf8RuneSelf && os.IsPathSeparator(uint8(c)) {
|
||||
i = j
|
||||
|
4
vendor/github.com/moby/sys/symlink/go.mod
generated
vendored
4
vendor/github.com/moby/sys/symlink/go.mod
generated
vendored
@ -1,5 +1,5 @@
|
||||
module github.com/moby/sys/symlink
|
||||
|
||||
go 1.13
|
||||
go 1.16
|
||||
|
||||
require golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
|
||||
require golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
|
||||
|
4
vendor/github.com/moby/sys/symlink/go.sum
generated
vendored
4
vendor/github.com/moby/sys/symlink/go.sum
generated
vendored
@ -1,2 +1,2 @@
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 h1:YEu4SMq7D0cmT7CBbXfcH0NZeuChAXwsHe/9XueUO6o=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
7
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
7
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@ -54,7 +54,7 @@ includes_AIX='
|
||||
|
||||
includes_Darwin='
|
||||
#define _DARWIN_C_SOURCE
|
||||
#define KERNEL
|
||||
#define KERNEL 1
|
||||
#define _DARWIN_USE_64_BIT_INODE
|
||||
#define __APPLE_USE_RFC_3542
|
||||
#include <stdint.h>
|
||||
@ -75,6 +75,7 @@ includes_Darwin='
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <sys/vsock.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_types.h>
|
||||
@ -82,6 +83,9 @@ includes_Darwin='
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <termios.h>
|
||||
|
||||
// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
|
||||
#define TIOCREMOTE 0x80047469
|
||||
'
|
||||
|
||||
includes_DragonFly='
|
||||
@ -466,7 +470,6 @@ ccflags="$@"
|
||||
$2 !~ /^EQUIV_/ &&
|
||||
$2 !~ /^EXPR_/ &&
|
||||
$2 !~ /^EVIOC/ &&
|
||||
$2 !~ /^EV_/ &&
|
||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
||||
$2 ~ /^B[0-9_]+$/ ||
|
||||
$2 ~ /^(OLD|NEW)DEV$/ ||
|
||||
|
53
vendor/golang.org/x/sys/unix/sockcmsg_linux.go
generated
vendored
53
vendor/golang.org/x/sys/unix/sockcmsg_linux.go
generated
vendored
@ -34,3 +34,56 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
|
||||
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
|
||||
return &ucred, nil
|
||||
}
|
||||
|
||||
// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
|
||||
func PktInfo4(info *Inet4Pktinfo) []byte {
|
||||
b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
|
||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
h.Level = SOL_IP
|
||||
h.Type = IP_PKTINFO
|
||||
h.SetLen(CmsgLen(SizeofInet4Pktinfo))
|
||||
*(*Inet4Pktinfo)(h.data(0)) = *info
|
||||
return b
|
||||
}
|
||||
|
||||
// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
|
||||
func PktInfo6(info *Inet6Pktinfo) []byte {
|
||||
b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
|
||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
h.Level = SOL_IPV6
|
||||
h.Type = IPV6_PKTINFO
|
||||
h.SetLen(CmsgLen(SizeofInet6Pktinfo))
|
||||
*(*Inet6Pktinfo)(h.data(0)) = *info
|
||||
return b
|
||||
}
|
||||
|
||||
// ParseOrigDstAddr decodes a socket control message containing the original
|
||||
// destination address. To receive such a message the IP_RECVORIGDSTADDR or
|
||||
// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
|
||||
func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
|
||||
switch {
|
||||
case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
|
||||
pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
|
||||
sa := new(SockaddrInet4)
|
||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||
sa.Port = int(p[0])<<8 + int(p[1])
|
||||
for i := 0; i < len(sa.Addr); i++ {
|
||||
sa.Addr[i] = pp.Addr[i]
|
||||
}
|
||||
return sa, nil
|
||||
|
||||
case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
|
||||
pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
|
||||
sa := new(SockaddrInet6)
|
||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||
sa.Port = int(p[0])<<8 + int(p[1])
|
||||
sa.ZoneId = pp.Scope_id
|
||||
for i := 0; i < len(sa.Addr); i++ {
|
||||
sa.Addr[i] = pp.Addr[i]
|
||||
}
|
||||
return sa, nil
|
||||
|
||||
default:
|
||||
return nil, EINVAL
|
||||
}
|
||||
}
|
||||
|
40
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
40
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -48,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
|
||||
}
|
||||
|
||||
// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
|
||||
// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
|
||||
// bidirectional communication between a hypervisor and its guest virtual
|
||||
// machines.
|
||||
type SockaddrVM struct {
|
||||
// CID and Port specify a context ID and port address for a VM socket.
|
||||
// Guests have a unique CID, and hosts may have a well-known CID of:
|
||||
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
||||
// - VMADDR_CID_LOCAL: refers to local communication (loopback).
|
||||
// - VMADDR_CID_HOST: refers to other processes on the host.
|
||||
CID uint32
|
||||
Port uint32
|
||||
raw RawSockaddrVM
|
||||
}
|
||||
|
||||
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
sa.raw.Len = SizeofSockaddrVM
|
||||
sa.raw.Family = AF_VSOCK
|
||||
sa.raw.Port = sa.Port
|
||||
sa.raw.Cid = sa.CID
|
||||
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
||||
}
|
||||
|
||||
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
switch rsa.Addr.Family {
|
||||
case AF_SYSTEM:
|
||||
@ -58,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
sa.Unit = pp.Sc_unit
|
||||
return sa, nil
|
||||
}
|
||||
case AF_VSOCK:
|
||||
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
|
||||
sa := &SockaddrVM{
|
||||
CID: pp.Cid,
|
||||
Port: pp.Port,
|
||||
}
|
||||
return sa, nil
|
||||
}
|
||||
return nil, EAFNOSUPPORT
|
||||
}
|
||||
@ -433,6 +464,11 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
|
||||
|
||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||
|
||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
||||
//sys shmdt(addr uintptr) (err error)
|
||||
//sys shmget(key int, size int, flag int) (id int, err error)
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
@ -590,10 +626,6 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
|
||||
// Msgget
|
||||
// Msgsnd
|
||||
// Msgrcv
|
||||
// Shmat
|
||||
// Shmctl
|
||||
// Shmdt
|
||||
// Shmget
|
||||
// Shm_open
|
||||
// Shm_unlink
|
||||
// Sem_open
|
||||
|
40
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
40
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -13,7 +13,6 @@ package unix
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -120,6 +119,23 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
|
||||
return openat2(dirfd, path, how, SizeofOpenHow)
|
||||
}
|
||||
|
||||
func Pipe(p []int) error {
|
||||
return Pipe2(p, 0)
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) error {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return err
|
||||
}
|
||||
|
||||
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
||||
|
||||
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
@ -129,6 +145,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
|
||||
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
||||
}
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
var ts *Timespec
|
||||
if timeout >= 0 {
|
||||
ts = new(Timespec)
|
||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||
}
|
||||
return Ppoll(fds, ts, nil)
|
||||
}
|
||||
|
||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||
|
||||
func Readlink(path string, buf []byte) (n int, err error) {
|
||||
@ -1803,12 +1828,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Dup(oldfd int) (fd int, err error)
|
||||
|
||||
func Dup2(oldfd, newfd int) error {
|
||||
// Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
|
||||
if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
|
||||
return Dup3(oldfd, newfd, 0)
|
||||
}
|
||||
return dup2(oldfd, newfd)
|
||||
}
|
||||
|
||||
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
||||
//sysnb EpollCreate1(flag int) (fd int, err error)
|
||||
@ -2298,6 +2319,11 @@ type RemoteIovec struct {
|
||||
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
|
||||
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
|
||||
|
||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
||||
//sys shmdt(addr uintptr) (err error)
|
||||
//sys shmget(key int, size int, flag int) (id int, err error)
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
@ -2379,10 +2405,6 @@ type RemoteIovec struct {
|
||||
// SetRobustList
|
||||
// SetThreadArea
|
||||
// SetTidAddress
|
||||
// Shmat
|
||||
// Shmctl
|
||||
// Shmdt
|
||||
// Shmget
|
||||
// Sigaltstack
|
||||
// Swapoff
|
||||
// Swapon
|
||||
|
36
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
36
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
@ -19,35 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
// 64-bit file system and 32-bit uid calls
|
||||
// (386 default is 32-bit file system and 16-bit uid).
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
@ -379,12 +352,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint32(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
36
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
36
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
@ -7,7 +7,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
@ -114,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Rip }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
|
||||
@ -164,15 +137,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint64(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||
|
||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||
|
36
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
36
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
@ -19,32 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
newoffset, errno := seek(fd, offset, whence)
|
||||
if errno != 0 {
|
||||
@ -72,7 +46,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
|
||||
// 64-bit file system and 32-bit uid calls
|
||||
// (16-bit uid calls are not always supported in newer kernels)
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
@ -254,15 +227,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint32(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
|
||||
|
||||
func SyncFileRange(fd int, off int64, n int64, flags int) error {
|
||||
|
40
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@ -138,30 +138,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
|
||||
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
||||
func Getrlimit(resource int, rlim *Rlimit) error {
|
||||
err := Prlimit(0, resource, nil, rlim)
|
||||
@ -204,27 +180,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint64(length)
|
||||
}
|
||||
|
||||
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||
// it in an unreachable path. dup2 isn't available on arm64.
|
||||
func dup2(oldfd int, newfd int) error
|
||||
|
||||
func Pause() error {
|
||||
_, err := ppoll(nil, 0, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
var ts *Timespec
|
||||
if timeout >= 0 {
|
||||
ts = new(Timespec)
|
||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||
}
|
||||
if len(fds) == 0 {
|
||||
return ppoll(nil, 0, ts, nil)
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), ts, nil)
|
||||
}
|
||||
|
||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||
|
||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||
|
34
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
34
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
@ -8,7 +8,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
@ -93,30 +92,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
@ -219,12 +194,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint64(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
33
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
33
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
@ -15,7 +15,6 @@ import (
|
||||
|
||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
@ -111,29 +110,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe() (p1 int, p2 int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
p[0], p[1], err = pipe()
|
||||
return
|
||||
}
|
||||
|
||||
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
||||
|
||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||
@ -230,12 +206,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint32(length)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
36
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
generated
vendored
36
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
generated
vendored
@ -12,7 +12,6 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
@ -216,41 +215,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint32(length)
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
||||
|
||||
func SyncFileRange(fd int, off int64, n int64, flags int) error {
|
||||
|
36
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
36
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
@ -8,7 +8,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
@ -102,41 +101,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint64(length)
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
||||
|
||||
func SyncFileRange(fd int, off int64, n int64, flags int) error {
|
||||
|
40
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
40
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
@ -137,30 +137,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
|
||||
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
||||
@ -190,18 +166,6 @@ func Pause() error {
|
||||
return err
|
||||
}
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
var ts *Timespec
|
||||
if timeout >= 0 {
|
||||
ts = new(Timespec)
|
||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||
}
|
||||
if len(fds) == 0 {
|
||||
return ppoll(nil, 0, ts, nil)
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), ts, nil)
|
||||
}
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
||||
}
|
||||
@ -218,7 +182,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
||||
}
|
||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||
}
|
||||
|
||||
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||
// it in an unreachable path. dup2 isn't available on arm64.
|
||||
func dup2(oldfd int, newfd int) error
|
||||
|
34
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
34
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
@ -11,7 +11,6 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
@ -75,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
@ -322,15 +297,6 @@ func Shutdown(s, how int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||
|
||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||
|
36
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
36
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
@ -9,7 +9,6 @@ package unix
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
@ -118,38 +117,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||
rsa.Service_name_len = uint64(length)
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
21
vendor/golang.org/x/sys/unix/sysvshm_linux.go
generated
vendored
Normal file
21
vendor/golang.org/x/sys/unix/sysvshm_linux.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package unix
|
||||
|
||||
import "runtime"
|
||||
|
||||
// SysvShmCtl performs control operations on the shared memory segment
|
||||
// specified by id.
|
||||
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
|
||||
if runtime.GOARCH == "arm" ||
|
||||
runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
|
||||
cmd |= ipc_64
|
||||
}
|
||||
|
||||
return shmctl(id, cmd, desc)
|
||||
}
|
61
vendor/golang.org/x/sys/unix/sysvshm_unix.go
generated
vendored
Normal file
61
vendor/golang.org/x/sys/unix/sysvshm_unix.go
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (darwin && !ios) || linux
|
||||
// +build darwin,!ios linux
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// SysvShmAttach attaches the Sysv shared memory segment associated with the
|
||||
// shared memory identifier id.
|
||||
func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
|
||||
addr, errno := shmat(id, addr, flag)
|
||||
if errno != nil {
|
||||
return nil, errno
|
||||
}
|
||||
|
||||
// Retrieve the size of the shared memory to enable slice creation
|
||||
var info SysvShmDesc
|
||||
|
||||
_, err := SysvShmCtl(id, IPC_STAT, &info)
|
||||
if err != nil {
|
||||
// release the shared memory if we can't find the size
|
||||
|
||||
// ignoring error from shmdt as there's nothing sensible to return here
|
||||
shmdt(addr)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Use unsafe to convert addr into a []byte.
|
||||
// TODO: convert to unsafe.Slice once we can assume Go 1.17
|
||||
var b []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||
hdr.Data = unsafe.Pointer(addr)
|
||||
hdr.Cap = int(info.Segsz)
|
||||
hdr.Len = int(info.Segsz)
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
|
||||
//
|
||||
// It is not safe to use the slice after calling this function.
|
||||
func SysvShmDetach(data []byte) error {
|
||||
if len(data) == 0 {
|
||||
return EINVAL
|
||||
}
|
||||
|
||||
return shmdt(uintptr(unsafe.Pointer(&data[0])))
|
||||
}
|
||||
|
||||
// SysvShmGet returns the Sysv shared memory identifier associated with key.
|
||||
// If the IPC_CREAT flag is specified a new segment is created.
|
||||
func SysvShmGet(key, size, flag int) (id int, err error) {
|
||||
return shmget(key, size, flag)
|
||||
}
|
14
vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
generated
vendored
Normal file
14
vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin && !ios
|
||||
// +build darwin,!ios
|
||||
|
||||
package unix
|
||||
|
||||
// SysvShmCtl performs control operations on the shared memory segment
|
||||
// specified by id.
|
||||
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
|
||||
return shmctl(id, cmd, desc)
|
||||
}
|
28
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
generated
vendored
28
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
generated
vendored
@ -130,8 +130,9 @@ const (
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_SPACEUSED = 0x800000
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
ATTR_VOL_VALIDMASK = 0xf087ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
@ -661,6 +662,7 @@ const (
|
||||
IN_CLASSD_NSHIFT = 0x1c
|
||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
||||
IPPROTO_3PC = 0x22
|
||||
IPPROTO_ADFS = 0x44
|
||||
IPPROTO_AH = 0x33
|
||||
@ -1384,6 +1386,10 @@ const (
|
||||
SO_SNDTIMEO = 0x1005
|
||||
SO_TIMESTAMP = 0x400
|
||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
||||
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
||||
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
||||
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
||||
SO_TYPE = 0x1008
|
||||
SO_UPCALLCLOSEWAIT = 0x1027
|
||||
SO_USELOOPBACK = 0x40
|
||||
@ -1429,6 +1435,21 @@ const (
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_CC = 0xb
|
||||
TCPOPT_CCECHO = 0xd
|
||||
TCPOPT_CCNEW = 0xc
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FASTOPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_HDR = 0x1010500
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_CONNECTIONTIMEOUT = 0x20
|
||||
TCP_CONNECTION_INFO = 0x106
|
||||
TCP_ENABLE_ECN = 0x104
|
||||
@ -1531,6 +1552,11 @@ const (
|
||||
VINTR = 0x8
|
||||
VKILL = 0x5
|
||||
VLNEXT = 0xe
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x10
|
||||
VM_LOADAVG = 0x2
|
||||
VM_MACHFACTOR = 0x4
|
||||
|
28
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
generated
vendored
28
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
generated
vendored
@ -130,8 +130,9 @@ const (
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_SPACEUSED = 0x800000
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
ATTR_VOL_VALIDMASK = 0xf087ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
@ -661,6 +662,7 @@ const (
|
||||
IN_CLASSD_NSHIFT = 0x1c
|
||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
||||
IPPROTO_3PC = 0x22
|
||||
IPPROTO_ADFS = 0x44
|
||||
IPPROTO_AH = 0x33
|
||||
@ -1384,6 +1386,10 @@ const (
|
||||
SO_SNDTIMEO = 0x1005
|
||||
SO_TIMESTAMP = 0x400
|
||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
||||
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
||||
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
||||
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
||||
SO_TYPE = 0x1008
|
||||
SO_UPCALLCLOSEWAIT = 0x1027
|
||||
SO_USELOOPBACK = 0x40
|
||||
@ -1429,6 +1435,21 @@ const (
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_CC = 0xb
|
||||
TCPOPT_CCECHO = 0xd
|
||||
TCPOPT_CCNEW = 0xc
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FASTOPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_HDR = 0x1010500
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_CONNECTIONTIMEOUT = 0x20
|
||||
TCP_CONNECTION_INFO = 0x106
|
||||
TCP_ENABLE_ECN = 0x104
|
||||
@ -1531,6 +1552,11 @@ const (
|
||||
VINTR = 0x8
|
||||
VKILL = 0x5
|
||||
VLNEXT = 0xe
|
||||
VMADDR_CID_ANY = 0xffffffff
|
||||
VMADDR_CID_HOST = 0x2
|
||||
VMADDR_CID_HYPERVISOR = 0x0
|
||||
VMADDR_CID_RESERVED = 0x1
|
||||
VMADDR_PORT_ANY = 0xffffffff
|
||||
VMIN = 0x10
|
||||
VM_LOADAVG = 0x2
|
||||
VM_MACHFACTOR = 0x4
|
||||
|
2
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
@ -1397,6 +1397,8 @@ const (
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_POPULATE_READ = 0x16
|
||||
MADV_POPULATE_WRITE = 0x17
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
|
59
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
59
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
|
||||
ret = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmat_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
||||
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
||||
result = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmctl_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmdt(addr uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmdt_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmget(key int, size int, flag int) (id int, err error) {
|
||||
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
|
||||
id = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmget_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
24
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmat(SB)
|
||||
|
||||
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmctl(SB)
|
||||
|
||||
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmdt(SB)
|
||||
|
||||
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmget(SB)
|
||||
|
||||
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
|
||||
|
||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
|
||||
|
59
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
59
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
|
||||
ret = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmat_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
||||
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
||||
result = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmctl_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmdt(addr uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmdt_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmget(key int, size int, flag int) (id int, err error) {
|
||||
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
|
||||
id = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_shmget_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
24
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmat(SB)
|
||||
|
||||
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmctl(SB)
|
||||
|
||||
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmdt(SB)
|
||||
|
||||
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shmget(SB)
|
||||
|
||||
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
|
||||
|
||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
|
||||
|
47
vendor/golang.org/x/sys/unix/zsyscall_linux.go
generated
vendored
47
vendor/golang.org/x/sys/unix/zsyscall_linux.go
generated
vendored
@ -110,6 +110,16 @@ func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||
n = int(r0)
|
||||
@ -1967,8 +1977,41 @@ func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
|
||||
ret = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
||||
result = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmdt(addr uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func shmget(key int, size int, flag int) (id int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
|
||||
id = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
@ -46,26 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -544,14 +524,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -689,27 +679,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(cmdline)
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
@ -235,16 +225,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -659,17 +639,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
|
||||
if e1 != 0 {
|
||||
|
33
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
33
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -684,18 +674,6 @@ func Pause() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (p1 int, p2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
p1 = int(r0)
|
||||
p2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
||||
xaddr = uintptr(r0)
|
||||
@ -724,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
21
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
21
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -706,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
21
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
21
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -706,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
33
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
33
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -684,18 +674,6 @@ func Pause() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (p1 int, p2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
p1 = int(r0)
|
||||
p2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
||||
xaddr = uintptr(r0)
|
||||
@ -724,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -695,27 +685,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
|
||||
if e1 != 0 {
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -741,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -741,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
21
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
21
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
@ -531,17 +521,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(cmdline)
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
@ -73,16 +73,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchown(fd int, uid int, gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
@ -707,24 +697,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
127
vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
generated
vendored
127
vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
generated
vendored
@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
|
||||
Sc_reserved [5]uint32
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
}
|
||||
|
||||
type XVSockPCB struct {
|
||||
Xv_len uint32
|
||||
Xv_vsockpp uint64
|
||||
Xvp_local_cid uint32
|
||||
Xvp_local_port uint32
|
||||
Xvp_remote_cid uint32
|
||||
Xvp_remote_port uint32
|
||||
Xvp_rxcnt uint32
|
||||
Xvp_txcnt uint32
|
||||
Xvp_peer_rxhiwat uint32
|
||||
Xvp_peer_rxcnt uint32
|
||||
Xvp_last_pid int32
|
||||
Xvp_gencnt uint64
|
||||
Xv_socket XSocket
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XSocket struct {
|
||||
Xso_len uint32
|
||||
Xso_so uint32
|
||||
So_type int16
|
||||
So_options int16
|
||||
So_linger int16
|
||||
So_state int16
|
||||
So_pcb uint32
|
||||
Xso_protocol int32
|
||||
Xso_family int32
|
||||
So_qlen int16
|
||||
So_incqlen int16
|
||||
So_qlimit int16
|
||||
So_timeo int16
|
||||
So_error uint16
|
||||
So_pgid int32
|
||||
So_oobmark uint32
|
||||
So_rcv XSockbuf
|
||||
So_snd XSockbuf
|
||||
So_uid uint32
|
||||
}
|
||||
|
||||
type XSocket64 struct {
|
||||
Xso_len uint32
|
||||
_ [8]byte
|
||||
So_type int16
|
||||
So_options int16
|
||||
So_linger int16
|
||||
So_state int16
|
||||
_ [8]byte
|
||||
Xso_protocol int32
|
||||
Xso_family int32
|
||||
So_qlen int16
|
||||
So_incqlen int16
|
||||
So_qlimit int16
|
||||
So_timeo int16
|
||||
So_error uint16
|
||||
So_pgid int32
|
||||
So_oobmark uint32
|
||||
So_rcv XSockbuf
|
||||
So_snd XSockbuf
|
||||
So_uid uint32
|
||||
}
|
||||
|
||||
type XSockbuf struct {
|
||||
Cc uint32
|
||||
Hiwat uint32
|
||||
Mbcnt uint32
|
||||
Mbmax uint32
|
||||
Lowat int32
|
||||
Flags int16
|
||||
Timeo int16
|
||||
}
|
||||
|
||||
type XVSockPgen struct {
|
||||
Len uint32
|
||||
Count uint64
|
||||
Gen uint64
|
||||
Sogen uint64
|
||||
}
|
||||
|
||||
type _Socklen uint32
|
||||
|
||||
type Xucred struct {
|
||||
@ -287,6 +373,11 @@ const (
|
||||
SizeofSockaddrUnix = 0x6a
|
||||
SizeofSockaddrDatalink = 0x14
|
||||
SizeofSockaddrCtl = 0x20
|
||||
SizeofSockaddrVM = 0xc
|
||||
SizeofXvsockpcb = 0xa8
|
||||
SizeofXSocket = 0x64
|
||||
SizeofXSockbuf = 0x18
|
||||
SizeofXVSockPgen = 0x20
|
||||
SizeofXucred = 0x4c
|
||||
SizeofLinger = 0x8
|
||||
SizeofIovec = 0x10
|
||||
@ -639,3 +730,39 @@ type Ucred struct {
|
||||
Ngroups int16
|
||||
Groups [16]uint32
|
||||
}
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint16
|
||||
_ uint16
|
||||
_ int32
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Lpid int32
|
||||
Cpid int32
|
||||
Nattch uint16
|
||||
_ [34]byte
|
||||
}
|
||||
|
||||
const (
|
||||
IPC_CREAT = 0x200
|
||||
IPC_EXCL = 0x400
|
||||
IPC_NOWAIT = 0x800
|
||||
IPC_PRIVATE = 0x0
|
||||
)
|
||||
|
||||
const (
|
||||
IPC_RMID = 0x0
|
||||
IPC_SET = 0x1
|
||||
IPC_STAT = 0x2
|
||||
)
|
||||
|
||||
const (
|
||||
SHM_RDONLY = 0x1000
|
||||
SHM_RND = 0x2000
|
||||
)
|
||||
|
127
vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
generated
vendored
127
vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
generated
vendored
@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
|
||||
Sc_reserved [5]uint32
|
||||
}
|
||||
|
||||
type RawSockaddrVM struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Reserved1 uint16
|
||||
Port uint32
|
||||
Cid uint32
|
||||
}
|
||||
|
||||
type XVSockPCB struct {
|
||||
Xv_len uint32
|
||||
Xv_vsockpp uint64
|
||||
Xvp_local_cid uint32
|
||||
Xvp_local_port uint32
|
||||
Xvp_remote_cid uint32
|
||||
Xvp_remote_port uint32
|
||||
Xvp_rxcnt uint32
|
||||
Xvp_txcnt uint32
|
||||
Xvp_peer_rxhiwat uint32
|
||||
Xvp_peer_rxcnt uint32
|
||||
Xvp_last_pid int32
|
||||
Xvp_gencnt uint64
|
||||
Xv_socket XSocket
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XSocket struct {
|
||||
Xso_len uint32
|
||||
Xso_so uint32
|
||||
So_type int16
|
||||
So_options int16
|
||||
So_linger int16
|
||||
So_state int16
|
||||
So_pcb uint32
|
||||
Xso_protocol int32
|
||||
Xso_family int32
|
||||
So_qlen int16
|
||||
So_incqlen int16
|
||||
So_qlimit int16
|
||||
So_timeo int16
|
||||
So_error uint16
|
||||
So_pgid int32
|
||||
So_oobmark uint32
|
||||
So_rcv XSockbuf
|
||||
So_snd XSockbuf
|
||||
So_uid uint32
|
||||
}
|
||||
|
||||
type XSocket64 struct {
|
||||
Xso_len uint32
|
||||
_ [8]byte
|
||||
So_type int16
|
||||
So_options int16
|
||||
So_linger int16
|
||||
So_state int16
|
||||
_ [8]byte
|
||||
Xso_protocol int32
|
||||
Xso_family int32
|
||||
So_qlen int16
|
||||
So_incqlen int16
|
||||
So_qlimit int16
|
||||
So_timeo int16
|
||||
So_error uint16
|
||||
So_pgid int32
|
||||
So_oobmark uint32
|
||||
So_rcv XSockbuf
|
||||
So_snd XSockbuf
|
||||
So_uid uint32
|
||||
}
|
||||
|
||||
type XSockbuf struct {
|
||||
Cc uint32
|
||||
Hiwat uint32
|
||||
Mbcnt uint32
|
||||
Mbmax uint32
|
||||
Lowat int32
|
||||
Flags int16
|
||||
Timeo int16
|
||||
}
|
||||
|
||||
type XVSockPgen struct {
|
||||
Len uint32
|
||||
Count uint64
|
||||
Gen uint64
|
||||
Sogen uint64
|
||||
}
|
||||
|
||||
type _Socklen uint32
|
||||
|
||||
type Xucred struct {
|
||||
@ -287,6 +373,11 @@ const (
|
||||
SizeofSockaddrUnix = 0x6a
|
||||
SizeofSockaddrDatalink = 0x14
|
||||
SizeofSockaddrCtl = 0x20
|
||||
SizeofSockaddrVM = 0xc
|
||||
SizeofXvsockpcb = 0xa8
|
||||
SizeofXSocket = 0x64
|
||||
SizeofXSockbuf = 0x18
|
||||
SizeofXVSockPgen = 0x20
|
||||
SizeofXucred = 0x4c
|
||||
SizeofLinger = 0x8
|
||||
SizeofIovec = 0x10
|
||||
@ -639,3 +730,39 @@ type Ucred struct {
|
||||
Ngroups int16
|
||||
Groups [16]uint32
|
||||
}
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint16
|
||||
_ uint16
|
||||
_ int32
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Lpid int32
|
||||
Cpid int32
|
||||
Nattch uint16
|
||||
_ [34]byte
|
||||
}
|
||||
|
||||
const (
|
||||
IPC_CREAT = 0x200
|
||||
IPC_EXCL = 0x400
|
||||
IPC_NOWAIT = 0x800
|
||||
IPC_PRIVATE = 0x0
|
||||
)
|
||||
|
||||
const (
|
||||
IPC_RMID = 0x0
|
||||
IPC_SET = 0x1
|
||||
IPC_STAT = 0x2
|
||||
)
|
||||
|
||||
const (
|
||||
SHM_RDONLY = 0x1000
|
||||
SHM_RND = 0x2000
|
||||
)
|
||||
|
20
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
20
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
@ -3936,3 +3936,23 @@ type LandlockPathBeneathAttr struct {
|
||||
const (
|
||||
LANDLOCK_RULE_PATH_BENEATH = 0x1
|
||||
)
|
||||
|
||||
const (
|
||||
IPC_CREAT = 0x200
|
||||
IPC_EXCL = 0x400
|
||||
IPC_NOWAIT = 0x800
|
||||
IPC_PRIVATE = 0x0
|
||||
|
||||
ipc_64 = 0x100
|
||||
)
|
||||
|
||||
const (
|
||||
IPC_RMID = 0x0
|
||||
IPC_SET = 0x1
|
||||
IPC_STAT = 0x2
|
||||
)
|
||||
|
||||
const (
|
||||
SHM_RDONLY = 0x1000
|
||||
SHM_RND = 0x2000
|
||||
)
|
||||
|
29
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
29
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
@ -639,3 +639,32 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint16
|
||||
_ [2]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint32
|
||||
_ uint32
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint32
|
||||
Atime uint32
|
||||
Atime_high uint32
|
||||
Dtime uint32
|
||||
Dtime_high uint32
|
||||
Ctime uint32
|
||||
Ctime_high uint32
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint32
|
||||
_ uint32
|
||||
_ uint32
|
||||
}
|
||||
|
26
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
@ -657,3 +657,29 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
29
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
29
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
@ -634,3 +634,32 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint16
|
||||
_ [2]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint32
|
||||
_ uint32
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint32
|
||||
Atime uint32
|
||||
Atime_high uint32
|
||||
Dtime uint32
|
||||
Dtime_high uint32
|
||||
Ctime uint32
|
||||
Ctime_high uint32
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint32
|
||||
_ uint32
|
||||
_ uint32
|
||||
}
|
||||
|
26
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
@ -636,3 +636,29 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
28
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
28
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
@ -640,3 +640,31 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint32
|
||||
_ uint32
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint32
|
||||
Atime uint32
|
||||
Dtime uint32
|
||||
Ctime uint32
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint32
|
||||
Atime_high uint16
|
||||
Dtime_high uint16
|
||||
Ctime_high uint16
|
||||
_ uint16
|
||||
}
|
||||
|
26
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
@ -639,3 +639,29 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
26
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
26
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
@ -639,3 +639,29 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
28
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
28
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
@ -640,3 +640,31 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint32
|
||||
_ uint32
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint32
|
||||
Atime uint32
|
||||
Dtime uint32
|
||||
Ctime uint32
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint32
|
||||
Atime_high uint16
|
||||
Dtime_high uint16
|
||||
Ctime_high uint16
|
||||
_ uint16
|
||||
}
|
||||
|
30
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
generated
vendored
30
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
generated
vendored
@ -646,3 +646,33 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
Seq uint32
|
||||
_ uint32
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Atime_high uint32
|
||||
Atime uint32
|
||||
Dtime_high uint32
|
||||
Dtime uint32
|
||||
Ctime_high uint32
|
||||
Ctime uint32
|
||||
_ uint32
|
||||
Segsz uint32
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint32
|
||||
_ uint32
|
||||
_ uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
25
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
25
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
@ -646,3 +646,28 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
Seq uint32
|
||||
_ uint32
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Segsz uint64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
25
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
25
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
@ -646,3 +646,28 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
Seq uint32
|
||||
_ uint32
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Segsz uint64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
26
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
@ -664,3 +664,29 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ [0]uint8
|
||||
Seq uint16
|
||||
_ uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
25
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
25
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
@ -660,3 +660,28 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ uint16
|
||||
Seq uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Segsz uint64
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
25
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
25
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
@ -641,3 +641,28 @@ const (
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x4000
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
Key int32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Cuid uint32
|
||||
Cgid uint32
|
||||
Mode uint32
|
||||
_ uint16
|
||||
Seq uint16
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
type SysvShmDesc struct {
|
||||
Perm SysvIpcPerm
|
||||
Atime int64
|
||||
Dtime int64
|
||||
Ctime int64
|
||||
Segsz uint64
|
||||
Cpid int32
|
||||
Lpid int32
|
||||
Nattch uint64
|
||||
_ uint64
|
||||
_ uint64
|
||||
}
|
||||
|
4
vendor/golang.org/x/sys/windows/aliases.go
generated
vendored
4
vendor/golang.org/x/sys/windows/aliases.go
generated
vendored
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
// +build go1.9
|
||||
//go:build windows && go1.9
|
||||
// +build windows,go1.9
|
||||
|
||||
package windows
|
||||
|
||||
|
1
vendor/golang.org/x/sys/windows/eventlog.go
generated
vendored
1
vendor/golang.org/x/sys/windows/eventlog.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package windows
|
||||
|
11
vendor/golang.org/x/sys/windows/memory_windows.go
generated
vendored
11
vendor/golang.org/x/sys/windows/memory_windows.go
generated
vendored
@ -35,3 +35,14 @@ const (
|
||||
QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
|
||||
QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004
|
||||
)
|
||||
|
||||
type MemoryBasicInformation struct {
|
||||
BaseAddress uintptr
|
||||
AllocationBase uintptr
|
||||
AllocationProtect uint32
|
||||
PartitionId uint16
|
||||
RegionSize uintptr
|
||||
State uint32
|
||||
Protect uint32
|
||||
Type uint32
|
||||
}
|
||||
|
1
vendor/golang.org/x/sys/windows/mksyscall.go
generated
vendored
1
vendor/golang.org/x/sys/windows/mksyscall.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build generate
|
||||
// +build generate
|
||||
|
||||
package windows
|
||||
|
1
vendor/golang.org/x/sys/windows/race.go
generated
vendored
1
vendor/golang.org/x/sys/windows/race.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows && race
|
||||
// +build windows,race
|
||||
|
||||
package windows
|
||||
|
1
vendor/golang.org/x/sys/windows/race0.go
generated
vendored
1
vendor/golang.org/x/sys/windows/race0.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows && !race
|
||||
// +build windows,!race
|
||||
|
||||
package windows
|
||||
|
2
vendor/golang.org/x/sys/windows/service.go
generated
vendored
2
vendor/golang.org/x/sys/windows/service.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package windows
|
||||
@ -235,3 +236,4 @@ type QUERY_SERVICE_LOCK_STATUS struct {
|
||||
//sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
|
||||
//sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
|
||||
//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
|
||||
//sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
|
||||
|
1
vendor/golang.org/x/sys/windows/str.go
generated
vendored
1
vendor/golang.org/x/sys/windows/str.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package windows
|
||||
|
48
vendor/golang.org/x/sys/windows/svc/event.go
generated
vendored
48
vendor/golang.org/x/sys/windows/svc/event.go
generated
vendored
@ -1,48 +0,0 @@
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
|
||||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// event represents auto-reset, initially non-signaled Windows event.
|
||||
// It is used to communicate between go and asm parts of this package.
|
||||
type event struct {
|
||||
h windows.Handle
|
||||
}
|
||||
|
||||
func newEvent() (*event, error) {
|
||||
h, err := windows.CreateEvent(nil, 0, 0, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &event{h: h}, nil
|
||||
}
|
||||
|
||||
func (e *event) Close() error {
|
||||
return windows.CloseHandle(e.h)
|
||||
}
|
||||
|
||||
func (e *event) Set() error {
|
||||
return windows.SetEvent(e.h)
|
||||
}
|
||||
|
||||
func (e *event) Wait() error {
|
||||
s, err := windows.WaitForSingleObject(e.h, windows.INFINITE)
|
||||
switch s {
|
||||
case windows.WAIT_OBJECT_0:
|
||||
break
|
||||
case windows.WAIT_FAILED:
|
||||
return err
|
||||
default:
|
||||
return errors.New("unexpected result from WaitForSingleObject")
|
||||
}
|
||||
return nil
|
||||
}
|
24
vendor/golang.org/x/sys/windows/svc/go12.c
generated
vendored
24
vendor/golang.org/x/sys/windows/svc/go12.c
generated
vendored
@ -1,24 +0,0 @@
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
// +build !go1.3
|
||||
|
||||
// copied from pkg/runtime
|
||||
typedef unsigned int uint32;
|
||||
typedef unsigned long long int uint64;
|
||||
#ifdef _64BIT
|
||||
typedef uint64 uintptr;
|
||||
#else
|
||||
typedef uint32 uintptr;
|
||||
#endif
|
||||
|
||||
// from sys_386.s or sys_amd64.s
|
||||
void ·servicemain(void);
|
||||
|
||||
void
|
||||
·getServiceMain(uintptr *r)
|
||||
{
|
||||
*r = (uintptr)·servicemain;
|
||||
}
|
11
vendor/golang.org/x/sys/windows/svc/go12.go
generated
vendored
11
vendor/golang.org/x/sys/windows/svc/go12.go
generated
vendored
@ -1,11 +0,0 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
// +build !go1.3
|
||||
|
||||
package svc
|
||||
|
||||
// from go12.c
|
||||
func getServiceMain(r *uintptr)
|
31
vendor/golang.org/x/sys/windows/svc/go13.go
generated
vendored
31
vendor/golang.org/x/sys/windows/svc/go13.go
generated
vendored
@ -1,31 +0,0 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
// +build go1.3
|
||||
|
||||
package svc
|
||||
|
||||
import "unsafe"
|
||||
|
||||
const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
|
||||
|
||||
// Should be a built-in for unsafe.Pointer?
|
||||
func add(p unsafe.Pointer, x uintptr) unsafe.Pointer {
|
||||
return unsafe.Pointer(uintptr(p) + x)
|
||||
}
|
||||
|
||||
// funcPC returns the entry PC of the function f.
|
||||
// It assumes that f is a func value. Otherwise the behavior is undefined.
|
||||
func funcPC(f interface{}) uintptr {
|
||||
return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize))
|
||||
}
|
||||
|
||||
// from sys_386.s and sys_amd64.s
|
||||
func servicectlhandler(ctl uint32) uintptr
|
||||
func servicemain(argc uint32, argv **uint16)
|
||||
|
||||
func getServiceMain(r *uintptr) {
|
||||
*r = funcPC(servicemain)
|
||||
}
|
1
vendor/golang.org/x/sys/windows/svc/security.go
generated
vendored
1
vendor/golang.org/x/sys/windows/svc/security.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package svc
|
||||
|
194
vendor/golang.org/x/sys/windows/svc/service.go
generated
vendored
194
vendor/golang.org/x/sys/windows/svc/service.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
// Package svc provides everything required to build Windows service.
|
||||
@ -10,8 +11,7 @@ package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"sync"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
@ -91,7 +91,6 @@ type ChangeRequest struct {
|
||||
|
||||
// Handler is the interface that must be implemented to build Windows service.
|
||||
type Handler interface {
|
||||
|
||||
// Execute will be called by the package code at the start of
|
||||
// the service, and the service will exit once Execute completes.
|
||||
// Inside Execute you must read service change requests from r and
|
||||
@ -106,28 +105,6 @@ type Handler interface {
|
||||
Execute(args []string, r <-chan ChangeRequest, s chan<- Status) (svcSpecificEC bool, exitCode uint32)
|
||||
}
|
||||
|
||||
var (
|
||||
// These are used by asm code.
|
||||
goWaitsH uintptr
|
||||
cWaitsH uintptr
|
||||
ssHandle uintptr
|
||||
sName *uint16
|
||||
sArgc uintptr
|
||||
sArgv **uint16
|
||||
ctlHandlerExProc uintptr
|
||||
cSetEvent uintptr
|
||||
cWaitForSingleObject uintptr
|
||||
cRegisterServiceCtrlHandlerExW uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
k := windows.NewLazySystemDLL("kernel32.dll")
|
||||
cSetEvent = k.NewProc("SetEvent").Addr()
|
||||
cWaitForSingleObject = k.NewProc("WaitForSingleObject").Addr()
|
||||
a := windows.NewLazySystemDLL("advapi32.dll")
|
||||
cRegisterServiceCtrlHandlerExW = a.NewProc("RegisterServiceCtrlHandlerExW").Addr()
|
||||
}
|
||||
|
||||
type ctlEvent struct {
|
||||
cmd Cmd
|
||||
eventType uint32
|
||||
@ -140,36 +117,10 @@ type ctlEvent struct {
|
||||
type service struct {
|
||||
name string
|
||||
h windows.Handle
|
||||
cWaits *event
|
||||
goWaits *event
|
||||
c chan ctlEvent
|
||||
handler Handler
|
||||
}
|
||||
|
||||
func newService(name string, handler Handler) (*service, error) {
|
||||
var s service
|
||||
var err error
|
||||
s.name = name
|
||||
s.c = make(chan ctlEvent)
|
||||
s.handler = handler
|
||||
s.cWaits, err = newEvent()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s.goWaits, err = newEvent()
|
||||
if err != nil {
|
||||
s.cWaits.Close()
|
||||
return nil, err
|
||||
}
|
||||
return &s, nil
|
||||
}
|
||||
|
||||
func (s *service) close() error {
|
||||
s.cWaits.Close()
|
||||
s.goWaits.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
type exitCode struct {
|
||||
isSvcSpecific bool
|
||||
errno uint32
|
||||
@ -224,23 +175,42 @@ func (s *service) updateStatus(status *Status, ec *exitCode) error {
|
||||
return windows.SetServiceStatus(s.h, &t)
|
||||
}
|
||||
|
||||
const (
|
||||
sysErrSetServiceStatusFailed = uint32(syscall.APPLICATION_ERROR) + iota
|
||||
sysErrNewThreadInCallback
|
||||
var (
|
||||
initCallbacks sync.Once
|
||||
ctlHandlerCallback uintptr
|
||||
serviceMainCallback uintptr
|
||||
)
|
||||
|
||||
func (s *service) run() {
|
||||
s.goWaits.Wait()
|
||||
s.h = windows.Handle(ssHandle)
|
||||
func ctlHandler(ctl, evtype, evdata, context uintptr) uintptr {
|
||||
s := (*service)(unsafe.Pointer(context))
|
||||
e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: 123456} // Set context to 123456 to test issue #25660.
|
||||
s.c <- e
|
||||
return 0
|
||||
}
|
||||
|
||||
var argv []*uint16
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&argv))
|
||||
hdr.Data = unsafe.Pointer(sArgv)
|
||||
hdr.Len = int(sArgc)
|
||||
hdr.Cap = int(sArgc)
|
||||
var theService service // This is, unfortunately, a global, which means only one service per process.
|
||||
|
||||
args := make([]string, len(argv))
|
||||
for i, a := range argv {
|
||||
// serviceMain is the entry point called by the service manager, registered earlier by
|
||||
// the call to StartServiceCtrlDispatcher.
|
||||
func serviceMain(argc uint32, argv **uint16) uintptr {
|
||||
handle, err := windows.RegisterServiceCtrlHandlerEx(windows.StringToUTF16Ptr(theService.name), ctlHandlerCallback, uintptr(unsafe.Pointer(&theService)))
|
||||
if sysErr, ok := err.(windows.Errno); ok {
|
||||
return uintptr(sysErr)
|
||||
} else if err != nil {
|
||||
return uintptr(windows.ERROR_UNKNOWN_EXCEPTION)
|
||||
}
|
||||
theService.h = handle
|
||||
defer func() {
|
||||
theService.h = 0
|
||||
}()
|
||||
var args16 []*uint16
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&args16))
|
||||
hdr.Data = unsafe.Pointer(argv)
|
||||
hdr.Len = int(argc)
|
||||
hdr.Cap = int(argc)
|
||||
|
||||
args := make([]string, len(args16))
|
||||
for i, a := range args16 {
|
||||
args[i] = windows.UTF16PtrToString(a)
|
||||
}
|
||||
|
||||
@ -249,7 +219,7 @@ func (s *service) run() {
|
||||
exitFromHandler := make(chan exitCode)
|
||||
|
||||
go func() {
|
||||
ss, errno := s.handler.Execute(args, cmdsToHandler, changesFromHandler)
|
||||
ss, errno := theService.handler.Execute(args, cmdsToHandler, changesFromHandler)
|
||||
exitFromHandler <- exitCode{ss, errno}
|
||||
}()
|
||||
|
||||
@ -258,7 +228,7 @@ func (s *service) run() {
|
||||
CurrentStatus: Status{State: Stopped},
|
||||
}
|
||||
var outch chan ChangeRequest
|
||||
inch := s.c
|
||||
inch := theService.c
|
||||
loop:
|
||||
for {
|
||||
select {
|
||||
@ -274,14 +244,13 @@ loop:
|
||||
outcr.EventData = r.eventData
|
||||
outcr.Context = r.context
|
||||
case outch <- outcr:
|
||||
inch = s.c
|
||||
inch = theService.c
|
||||
outch = nil
|
||||
case c := <-changesFromHandler:
|
||||
err := s.updateStatus(&c, &ec)
|
||||
err := theService.updateStatus(&c, &ec)
|
||||
if err != nil {
|
||||
// best suitable error number
|
||||
ec.errno = sysErrSetServiceStatusFailed
|
||||
if err2, ok := err.(syscall.Errno); ok {
|
||||
ec.errno = uint32(windows.ERROR_EXCEPTION_IN_SERVICE)
|
||||
if err2, ok := err.(windows.Errno); ok {
|
||||
ec.errno = uint32(err2)
|
||||
}
|
||||
break loop
|
||||
@ -292,87 +261,30 @@ loop:
|
||||
}
|
||||
}
|
||||
|
||||
s.updateStatus(&Status{State: Stopped}, &ec)
|
||||
s.cWaits.Set()
|
||||
}
|
||||
theService.updateStatus(&Status{State: Stopped}, &ec)
|
||||
|
||||
func newCallback(fn interface{}) (cb uintptr, err error) {
|
||||
defer func() {
|
||||
r := recover()
|
||||
if r == nil {
|
||||
return
|
||||
}
|
||||
cb = 0
|
||||
switch v := r.(type) {
|
||||
case string:
|
||||
err = errors.New(v)
|
||||
case error:
|
||||
err = v
|
||||
default:
|
||||
err = errors.New("unexpected panic in syscall.NewCallback")
|
||||
}
|
||||
}()
|
||||
return syscall.NewCallback(fn), nil
|
||||
}
|
||||
|
||||
// BUG(brainman): There is no mechanism to run multiple services
|
||||
// inside one single executable. Perhaps, it can be overcome by
|
||||
// using RegisterServiceCtrlHandlerEx Windows api.
|
||||
|
||||
// Run executes service name by calling appropriate handler function.
|
||||
func Run(name string, handler Handler) error {
|
||||
runtime.LockOSThread()
|
||||
|
||||
tid := windows.GetCurrentThreadId()
|
||||
|
||||
s, err := newService(name, handler)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctlHandler := func(ctl, evtype, evdata, context uintptr) uintptr {
|
||||
e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: context}
|
||||
// We assume that this callback function is running on
|
||||
// the same thread as Run. Nowhere in MS documentation
|
||||
// I could find statement to guarantee that. So putting
|
||||
// check here to verify, otherwise things will go bad
|
||||
// quickly, if ignored.
|
||||
i := windows.GetCurrentThreadId()
|
||||
if i != tid {
|
||||
e.errno = sysErrNewThreadInCallback
|
||||
}
|
||||
s.c <- e
|
||||
// Always return NO_ERROR (0) for now.
|
||||
return windows.NO_ERROR
|
||||
}
|
||||
|
||||
var svcmain uintptr
|
||||
getServiceMain(&svcmain)
|
||||
// Run executes service name by calling appropriate handler function.
|
||||
func Run(name string, handler Handler) error {
|
||||
initCallbacks.Do(func() {
|
||||
ctlHandlerCallback = windows.NewCallback(ctlHandler)
|
||||
serviceMainCallback = windows.NewCallback(serviceMain)
|
||||
})
|
||||
theService.name = name
|
||||
theService.handler = handler
|
||||
theService.c = make(chan ctlEvent)
|
||||
t := []windows.SERVICE_TABLE_ENTRY{
|
||||
{ServiceName: syscall.StringToUTF16Ptr(s.name), ServiceProc: svcmain},
|
||||
{ServiceName: windows.StringToUTF16Ptr(theService.name), ServiceProc: serviceMainCallback},
|
||||
{ServiceName: nil, ServiceProc: 0},
|
||||
}
|
||||
|
||||
goWaitsH = uintptr(s.goWaits.h)
|
||||
cWaitsH = uintptr(s.cWaits.h)
|
||||
sName = t[0].ServiceName
|
||||
ctlHandlerExProc, err = newCallback(ctlHandler)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go s.run()
|
||||
|
||||
err = windows.StartServiceCtrlDispatcher(&t[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return windows.StartServiceCtrlDispatcher(&t[0])
|
||||
}
|
||||
|
||||
// StatusHandle returns service status handle. It is safe to call this function
|
||||
// from inside the Handler.Execute because then it is guaranteed to be set.
|
||||
// This code will have to change once multiple services are possible per process.
|
||||
func StatusHandle() windows.Handle {
|
||||
return windows.Handle(ssHandle)
|
||||
return theService.h
|
||||
}
|
||||
|
67
vendor/golang.org/x/sys/windows/svc/sys_windows_386.s
generated
vendored
67
vendor/golang.org/x/sys/windows/svc/sys_windows_386.s
generated
vendored
@ -1,67 +0,0 @@
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),7,$0
|
||||
MOVL argc+0(FP), AX
|
||||
MOVL AX, ·sArgc(SB)
|
||||
MOVL argv+4(FP), AX
|
||||
MOVL AX, ·sArgv(SB)
|
||||
|
||||
PUSHL BP
|
||||
PUSHL BX
|
||||
PUSHL SI
|
||||
PUSHL DI
|
||||
|
||||
SUBL $12, SP
|
||||
|
||||
MOVL ·sName(SB), AX
|
||||
MOVL AX, (SP)
|
||||
MOVL $·servicectlhandler(SB), AX
|
||||
MOVL AX, 4(SP)
|
||||
// Set context to 123456 to test issue #25660.
|
||||
MOVL $123456, 8(SP)
|
||||
MOVL ·cRegisterServiceCtrlHandlerExW(SB), AX
|
||||
MOVL SP, BP
|
||||
CALL AX
|
||||
MOVL BP, SP
|
||||
CMPL AX, $0
|
||||
JE exit
|
||||
MOVL AX, ·ssHandle(SB)
|
||||
|
||||
MOVL ·goWaitsH(SB), AX
|
||||
MOVL AX, (SP)
|
||||
MOVL ·cSetEvent(SB), AX
|
||||
MOVL SP, BP
|
||||
CALL AX
|
||||
MOVL BP, SP
|
||||
|
||||
MOVL ·cWaitsH(SB), AX
|
||||
MOVL AX, (SP)
|
||||
MOVL $-1, AX
|
||||
MOVL AX, 4(SP)
|
||||
MOVL ·cWaitForSingleObject(SB), AX
|
||||
MOVL SP, BP
|
||||
CALL AX
|
||||
MOVL BP, SP
|
||||
|
||||
exit:
|
||||
ADDL $12, SP
|
||||
|
||||
POPL DI
|
||||
POPL SI
|
||||
POPL BX
|
||||
POPL BP
|
||||
|
||||
MOVL 0(SP), CX
|
||||
ADDL $12, SP
|
||||
JMP CX
|
||||
|
||||
// I do not know why, but this seems to be the only way to call
|
||||
// ctlHandlerProc on Windows 7.
|
||||
|
||||
// func servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
|
||||
TEXT ·servicectlhandler(SB),7,$0
|
||||
MOVL ·ctlHandlerExProc(SB), CX
|
||||
JMP CX
|
46
vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s
generated
vendored
46
vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s
generated
vendored
@ -1,46 +0,0 @@
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),7,$0
|
||||
MOVQ SP, AX
|
||||
ANDQ $~15, SP // alignment as per Windows requirement
|
||||
SUBQ $48, SP // room for SP and 4 args as per Windows requirement
|
||||
// plus one extra word to keep stack 16 bytes aligned
|
||||
MOVQ AX, 32(SP)
|
||||
|
||||
MOVL CX, ·sArgc(SB)
|
||||
MOVQ DX, ·sArgv(SB)
|
||||
|
||||
MOVQ ·sName(SB), CX
|
||||
MOVQ $·servicectlhandler(SB), DX
|
||||
// BUG(pastarmovj): Figure out a way to pass in context in R8.
|
||||
// Set context to 123456 to test issue #25660.
|
||||
MOVQ $123456, R8
|
||||
MOVQ ·cRegisterServiceCtrlHandlerExW(SB), AX
|
||||
CALL AX
|
||||
CMPQ AX, $0
|
||||
JE exit
|
||||
MOVQ AX, ·ssHandle(SB)
|
||||
|
||||
MOVQ ·goWaitsH(SB), CX
|
||||
MOVQ ·cSetEvent(SB), AX
|
||||
CALL AX
|
||||
|
||||
MOVQ ·cWaitsH(SB), CX
|
||||
MOVQ $4294967295, DX
|
||||
MOVQ ·cWaitForSingleObject(SB), AX
|
||||
CALL AX
|
||||
|
||||
exit:
|
||||
MOVQ 32(SP), SP
|
||||
RET
|
||||
|
||||
// I do not know why, but this seems to be the only way to call
|
||||
// ctlHandlerProc on Windows 7.
|
||||
|
||||
// func ·servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
|
||||
TEXT ·servicectlhandler(SB),7,$0
|
||||
MOVQ ·ctlHandlerExProc(SB), AX
|
||||
JMP AX
|
36
vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s
generated
vendored
36
vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s
generated
vendored
@ -1,36 +0,0 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
|
||||
MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
|
||||
MOVW R13, R4
|
||||
BIC $0x7, R13 // alignment for ABI
|
||||
|
||||
MOVW R0, ·sArgc(SB)
|
||||
MOVW R1, ·sArgv(SB)
|
||||
|
||||
MOVW ·sName(SB), R0
|
||||
MOVW ·ctlHandlerExProc(SB), R1
|
||||
MOVW $0, R2
|
||||
MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
|
||||
BL (R3)
|
||||
CMP $0, R0
|
||||
BEQ exit
|
||||
MOVW R0, ·ssHandle(SB)
|
||||
|
||||
MOVW ·goWaitsH(SB), R0
|
||||
MOVW ·cSetEvent(SB), R1
|
||||
BL (R1)
|
||||
|
||||
MOVW ·cWaitsH(SB), R0
|
||||
MOVW $-1, R1
|
||||
MOVW ·cWaitForSingleObject(SB), R2
|
||||
BL (R2)
|
||||
|
||||
exit:
|
||||
MOVW R4, R13 // free extra stack space
|
||||
MOVM.IA.W (R13), [R4, R15] // pop {r4, pc}
|
31
vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
generated
vendored
31
vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
generated
vendored
@ -1,31 +0,0 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
|
||||
MOVD R0, ·sArgc(SB)
|
||||
MOVD R1, ·sArgv(SB)
|
||||
|
||||
MOVD ·sName(SB), R0
|
||||
MOVD ·ctlHandlerExProc(SB), R1
|
||||
MOVD $0, R2
|
||||
MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3
|
||||
BL (R3)
|
||||
CMP $0, R0
|
||||
BEQ exit
|
||||
MOVD R0, ·ssHandle(SB)
|
||||
|
||||
MOVD ·goWaitsH(SB), R0
|
||||
MOVD ·cSetEvent(SB), R1
|
||||
BL (R1)
|
||||
|
||||
MOVD ·cWaitsH(SB), R0
|
||||
MOVD $-1, R1
|
||||
MOVD ·cWaitForSingleObject(SB), R2
|
||||
BL (R2)
|
||||
|
||||
exit:
|
||||
RET
|
1
vendor/golang.org/x/sys/windows/syscall.go
generated
vendored
1
vendor/golang.org/x/sys/windows/syscall.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
// Package windows contains an interface to the low-level operating system
|
||||
|
20
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
20
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@ -274,6 +274,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc
|
||||
//sys VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree
|
||||
//sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
|
||||
//sys VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) = kernel32.VirtualProtectEx
|
||||
//sys VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQuery
|
||||
//sys VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQueryEx
|
||||
//sys ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) = kernel32.ReadProcessMemory
|
||||
//sys WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) = kernel32.WriteProcessMemory
|
||||
//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
|
||||
//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
|
||||
//sys FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW
|
||||
@ -396,8 +401,18 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
|
||||
//sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
|
||||
|
||||
// Version APIs
|
||||
//sys GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW
|
||||
//sys GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW
|
||||
//sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
|
||||
|
||||
// Process Status API (PSAPI)
|
||||
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
|
||||
//sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
|
||||
//sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
|
||||
//sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
|
||||
//sys GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW
|
||||
//sys GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW
|
||||
|
||||
// NT Native APIs
|
||||
//sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
|
||||
@ -408,11 +423,16 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
|
||||
//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
|
||||
//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
|
||||
//sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
|
||||
//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
|
||||
//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
|
||||
//sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
|
||||
//sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
|
||||
//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
|
||||
//sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
|
||||
//sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
|
||||
//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
|
||||
//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
|
||||
|
||||
// syscall interface implementation for other packages
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user