Bump github.com/onsi/ginkgo from 1.12.1 to 1.12.2
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.12.1 to 1.12.2. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v1.12.1...v1.12.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
b5d04c1438
commit
5fa8f9f91b
|
|
@ -8,7 +8,7 @@ require (
|
||||||
github.com/containers/storage v1.20.1
|
github.com/containers/storage v1.20.1
|
||||||
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
|
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
|
||||||
github.com/docker/go-units v0.4.0
|
github.com/docker/go-units v0.4.0
|
||||||
github.com/onsi/ginkgo v1.12.1
|
github.com/onsi/ginkgo v1.12.2
|
||||||
github.com/onsi/gomega v1.10.1
|
github.com/onsi/gomega v1.10.1
|
||||||
github.com/opencontainers/runc v1.0.0-rc9
|
github.com/opencontainers/runc v1.0.0-rc9
|
||||||
github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 // indirect
|
github.com/opencontainers/runtime-spec v0.1.2-0.20190618234442-a950415649c7 // indirect
|
||||||
|
|
@ -19,5 +19,5 @@ require (
|
||||||
github.com/stretchr/testify v1.5.1
|
github.com/stretchr/testify v1.5.1
|
||||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
|
||||||
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5
|
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5
|
||||||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU
|
||||||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
|
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||||
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||||
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
|
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
|
||||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
|
|
@ -147,6 +149,8 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ=
|
github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ=
|
||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||||
|
github.com/onsi/ginkgo v1.12.2 h1:Ke9m3h2Hu0wsZ45yewCqhYr3Z+emcNTuLY2nMWCkrSI=
|
||||||
|
github.com/onsi/ginkgo v1.12.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||||
|
|
@ -272,6 +276,7 @@ golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||||
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191127021746-63cb32ae39b2 h1:/J2nHFg1MTqaRLFO7M+J78ASNsJoz3r0cvHBPQ77fsE=
|
golang.org/x/sys v0.0.0-20191127021746-63cb32ae39b2 h1:/J2nHFg1MTqaRLFO7M+J78ASNsJoz3r0cvHBPQ77fsE=
|
||||||
|
|
@ -280,6 +285,8 @@ golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslYCYz9XgFxvlgsn0n9H8=
|
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslYCYz9XgFxvlgsn0n9H8=
|
||||||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
|
||||||
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*.go]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
go.sum linguist-generated
|
||||||
|
|
@ -2,29 +2,35 @@ sudo: false
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.8.x
|
- "stable"
|
||||||
- 1.9.x
|
- "1.11.x"
|
||||||
- tip
|
- "1.10.x"
|
||||||
|
- "1.9.x"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
include:
|
||||||
|
- go: "stable"
|
||||||
|
env: GOLINT=true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- go: tip
|
- go: tip
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
before_script:
|
|
||||||
- go get -u github.com/golang/lint/golint
|
before_install:
|
||||||
|
- if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -v --race ./...
|
- go test --race ./...
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
|
- test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
|
||||||
- test -z "$(golint ./... | tee /dev/stderr)"
|
- if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
- windows
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Copyright (c) 2012 The Go Authors. All rights reserved.
|
Copyright (c) 2012 The Go Authors. All rights reserved.
|
||||||
Copyright (c) 2012 fsnotify Authors. All rights reserved.
|
Copyright (c) 2012-2019 fsnotify Authors. All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ go get -u golang.org/x/sys/...
|
||||||
Cross platform: Windows, Linux, BSD and macOS.
|
Cross platform: Windows, Linux, BSD and macOS.
|
||||||
|
|
||||||
| Adapter | OS | Status |
|
| Adapter | OS | Status |
|
||||||
|----------|----------|----------|
|
| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| inotify | Linux 2.6.27 or later, Android\* | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
|
| inotify | Linux 2.6.27 or later, Android\* | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
|
||||||
| kqueue | BSD, macOS, iOS\* | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
|
| kqueue | BSD, macOS, iOS\* | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
|
||||||
|ReadDirectoryChangesW|Windows|Supported [](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)|
|
| ReadDirectoryChangesW | Windows | Supported [](https://travis-ci.org/fsnotify/fsnotify) |
|
||||||
| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
|
| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
|
||||||
| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) |
|
| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) |
|
||||||
|fanotify |Linux 2.6.37+ | |
|
| fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) |
|
||||||
| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
|
| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
|
||||||
| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
|
| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
|
||||||
|
|
||||||
|
|
@ -33,6 +33,53 @@ All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based o
|
||||||
|
|
||||||
Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
|
Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/fsnotify/fsnotify"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
watcher, err := fsnotify.NewWatcher()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
defer watcher.Close()
|
||||||
|
|
||||||
|
done := make(chan bool)
|
||||||
|
go func() {
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case event, ok := <-watcher.Events:
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Println("event:", event)
|
||||||
|
if event.Op&fsnotify.Write == fsnotify.Write {
|
||||||
|
log.Println("modified file:", event.Name)
|
||||||
|
}
|
||||||
|
case err, ok := <-watcher.Errors:
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Println("error:", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
err = watcher.Add("/tmp/foo")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
<-done
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Please refer to [CONTRIBUTING][] before opening an issue or pull request.
|
Please refer to [CONTRIBUTING][] before opening an issue or pull request.
|
||||||
|
|
@ -65,6 +112,10 @@ There are OS-specific limits as to how many watches can be created:
|
||||||
* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
|
* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
|
||||||
* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.
|
* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.
|
||||||
|
|
||||||
|
**Why don't notifications work with NFS filesystems or filesystem in userspace (FUSE)?**
|
||||||
|
|
||||||
|
fsnotify requires support from underlying OS to work. The current NFS protocol does not provide network level support for file notifications.
|
||||||
|
|
||||||
[#62]: https://github.com/howeyc/fsnotify/issues/62
|
[#62]: https://github.com/howeyc/fsnotify/issues/62
|
||||||
[#18]: https://github.com/fsnotify/fsnotify/issues/18
|
[#18]: https://github.com/fsnotify/fsnotify/issues/18
|
||||||
[#11]: https://github.com/fsnotify/fsnotify/issues/11
|
[#11]: https://github.com/fsnotify/fsnotify/issues/11
|
||||||
|
|
|
||||||
|
|
@ -63,4 +63,6 @@ func (e Event) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common errors that can be reported by a watcher
|
// Common errors that can be reported by a watcher
|
||||||
var ErrEventOverflow = errors.New("fsnotify queue overflow")
|
var (
|
||||||
|
ErrEventOverflow = errors.New("fsnotify queue overflow")
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
module github.com/fsnotify/fsnotify
|
||||||
|
|
||||||
|
go 1.13
|
||||||
|
|
||||||
|
require golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0=
|
||||||
|
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
|
@ -40,12 +40,12 @@ func newFdPoller(fd int) (*fdPoller, error) {
|
||||||
poller.fd = fd
|
poller.fd = fd
|
||||||
|
|
||||||
// Create epoll fd
|
// Create epoll fd
|
||||||
poller.epfd, errno = unix.EpollCreate1(0)
|
poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
|
||||||
if poller.epfd == -1 {
|
if poller.epfd == -1 {
|
||||||
return nil, errno
|
return nil, errno
|
||||||
}
|
}
|
||||||
// Create pipe; pipe[0] is the read end, pipe[1] the write end.
|
// Create pipe; pipe[0] is the read end, pipe[1] the write end.
|
||||||
errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK)
|
errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK|unix.O_CLOEXEC)
|
||||||
if errno != nil {
|
if errno != nil {
|
||||||
return nil, errno
|
return nil, errno
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,4 @@ package fsnotify
|
||||||
|
|
||||||
import "golang.org/x/sys/unix"
|
import "golang.org/x/sys/unix"
|
||||||
|
|
||||||
const openMode = unix.O_NONBLOCK | unix.O_RDONLY
|
const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@ package fsnotify
|
||||||
import "golang.org/x/sys/unix"
|
import "golang.org/x/sys/unix"
|
||||||
|
|
||||||
// note: this constant is not defined on BSD
|
// note: this constant is not defined on BSD
|
||||||
const openMode = unix.O_EVTONLY
|
const openMode = unix.O_EVTONLY | unix.O_CLOEXEC
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
## 1.12.2
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Update dependencies [ea4a036]
|
||||||
|
|
||||||
## 1.12.1
|
## 1.12.1
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "1.12.1"
|
const VERSION = "1.12.2"
|
||||||
|
|
||||||
type GinkgoConfigType struct {
|
type GinkgoConfigType struct {
|
||||||
RandomSeed int64
|
RandomSeed int64
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
module github.com/onsi/ginkgo
|
module github.com/onsi/ginkgo
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
||||||
github.com/nxadm/tail v1.4.4
|
github.com/nxadm/tail v1.4.4
|
||||||
github.com/onsi/gomega v1.7.1
|
github.com/onsi/gomega v1.10.1
|
||||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299
|
||||||
|
golang.org/x/text v0.3.2 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
go 1.12
|
go 1.13
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,60 @@
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
|
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||||
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||||
|
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||||
|
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||||
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||||
|
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||||
github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ=
|
github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ=
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
|
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||||
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0=
|
||||||
|
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
|
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
|
||||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
|
||||||
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||||
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||||
|
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||||
|
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||||
|
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
|
||||||
|
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||||
|
|
@ -27,3 +63,5 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||||
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
|
|
||||||
30
common/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
generated
vendored
Normal file
30
common/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright 2020 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Package unsafeheader contains header declarations for the Go runtime's
|
||||||
|
// slice and string implementations.
|
||||||
|
//
|
||||||
|
// This package allows x/sys to use types equivalent to
|
||||||
|
// reflect.SliceHeader and reflect.StringHeader without introducing
|
||||||
|
// a dependency on the (relatively heavy) "reflect" package.
|
||||||
|
package unsafeheader
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Slice is the runtime representation of a slice.
|
||||||
|
// It cannot be used safely or portably and its representation may change in a later release.
|
||||||
|
type Slice struct {
|
||||||
|
Data unsafe.Pointer
|
||||||
|
Len int
|
||||||
|
Cap int
|
||||||
|
}
|
||||||
|
|
||||||
|
// String is the runtime representation of a string.
|
||||||
|
// It cannot be used safely or portably and its representation may change in a later release.
|
||||||
|
type String struct {
|
||||||
|
Data unsafe.Pointer
|
||||||
|
Len int
|
||||||
|
}
|
||||||
|
|
@ -187,6 +187,7 @@ struct ltchars {
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <sys/signalfd.h>
|
#include <sys/signalfd.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/timerfd.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <linux/bpf.h>
|
#include <linux/bpf.h>
|
||||||
|
|
@ -480,7 +481,7 @@ ccflags="$@"
|
||||||
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
|
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
|
||||||
$2 ~ /^NS_GET_/ ||
|
$2 ~ /^NS_GET_/ ||
|
||||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
|
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
||||||
$2 ~ /^KEXEC_/ ||
|
$2 ~ /^KEXEC_/ ||
|
||||||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
||||||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import "unsafe"
|
import (
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
|
)
|
||||||
|
|
||||||
//sys closedir(dir uintptr) (err error)
|
//sys closedir(dir uintptr) (err error)
|
||||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||||
|
|
@ -71,6 +75,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||||
cnt++
|
cnt++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
reclen := int(entry.Reclen)
|
reclen := int(entry.Reclen)
|
||||||
if reclen > len(buf) {
|
if reclen > len(buf) {
|
||||||
// Not enough room. Return for now.
|
// Not enough room. Return for now.
|
||||||
|
|
@ -79,13 +84,15 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||||
// restarting is O(n^2) in the length of the directory. Oh well.
|
// restarting is O(n^2) in the length of the directory. Oh well.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy entry into return buffer.
|
// Copy entry into return buffer.
|
||||||
s := struct {
|
var s []byte
|
||||||
ptr unsafe.Pointer
|
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||||
siz int
|
hdr.Data = unsafe.Pointer(&entry)
|
||||||
cap int
|
hdr.Cap = reclen
|
||||||
}{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen}
|
hdr.Len = reclen
|
||||||
copy(buf, *(*[]byte)(unsafe.Pointer(&s)))
|
copy(buf, s)
|
||||||
|
|
||||||
buf = buf[reclen:]
|
buf = buf[reclen:]
|
||||||
n += reclen
|
n += reclen
|
||||||
cnt++
|
cnt++
|
||||||
|
|
|
||||||
|
|
@ -423,6 +423,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||||
//sysnb Getsid(pid int) (sid int, err error)
|
//sysnb Getsid(pid int) (sid int, err error)
|
||||||
|
//sysnb Gettimeofday(tp *Timeval) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb Issetugid() (tainted bool)
|
//sysnb Issetugid() (tainted bool)
|
||||||
//sys Kqueue() (fd int, err error)
|
//sys Kqueue() (fd int, err error)
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = int32(sec)
|
|
||||||
tv.Usec = int32(usec)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint32(fd)
|
k.Ident = uint32(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = sec
|
|
||||||
tv.Usec = usec
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint64(fd)
|
k.Ident = uint64(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = int32(sec)
|
|
||||||
tv.Usec = int32(usec)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint32(fd)
|
k.Ident = uint32(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
||||||
|
|
@ -22,17 +22,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = sec
|
|
||||||
tv.Usec = usec
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint64(fd)
|
k.Ident = uint64(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
||||||
|
|
@ -1633,6 +1633,15 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||||
//sys DeleteModule(name string, flags int) (err error)
|
//sys DeleteModule(name string, flags int) (err error)
|
||||||
//sys Dup(oldfd int) (fd int, err error)
|
//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)
|
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
||||||
//sysnb EpollCreate1(flag int) (fd int, err error)
|
//sysnb EpollCreate1(flag int) (fd int, err error)
|
||||||
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
|
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
|
||||||
|
|
@ -1757,6 +1766,9 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
|
||||||
//sys Syncfs(fd int) (err error)
|
//sys Syncfs(fd int) (err error)
|
||||||
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
||||||
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
|
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
|
||||||
|
//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error)
|
||||||
|
//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error)
|
||||||
|
//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
|
||||||
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
|
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
|
||||||
//sysnb Times(tms *Tms) (ticks uintptr, err error)
|
//sysnb Times(tms *Tms) (ticks uintptr, err error)
|
||||||
//sysnb Umask(mask int) (oldmask int)
|
//sysnb Umask(mask int) (oldmask int)
|
||||||
|
|
@ -2178,7 +2190,6 @@ func Klogset(typ int, arg int) (err error) {
|
||||||
// TimerGetoverrun
|
// TimerGetoverrun
|
||||||
// TimerGettime
|
// TimerGettime
|
||||||
// TimerSettime
|
// TimerSettime
|
||||||
// Timerfd
|
|
||||||
// Tkill (obsolete)
|
// Tkill (obsolete)
|
||||||
// Tuxcall
|
// Tuxcall
|
||||||
// Umount2
|
// Umount2
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (386 default is 32-bit file system and 16-bit uid).
|
// (386 default is 32-bit file system and 16-bit uid).
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (16-bit uid calls are not always supported in newer kernels)
|
// (16-bit uid calls are not always supported in newer kernels)
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ func EpollCreate(size int) (fd int, err error) {
|
||||||
//sysnb Getegid() (egid int)
|
//sysnb Getegid() (egid int)
|
||||||
//sysnb Geteuid() (euid int)
|
//sysnb Geteuid() (euid int)
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
|
|
@ -47,7 +47,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
|
|
@ -168,6 +168,24 @@ func Pipe2(p []int, flags int) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
|
func Getrlimit(resource int, rlim *Rlimit) error {
|
||||||
|
err := prlimit(0, resource, nil, rlim)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return getrlimit(resource, rlim)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) error {
|
||||||
|
err := prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return setrlimit(resource, rlim)
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
||||||
|
|
@ -192,9 +210,9 @@ func InotifyInit() (fd int, err error) {
|
||||||
return InotifyInit1(0)
|
return InotifyInit1(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||||
return Dup3(oldfd, newfd, 0)
|
// it in an unreachable path. dup2 isn't available on arm64.
|
||||||
}
|
func dup2(oldfd int, newfd int) error
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
_, err := ppoll(nil, 0, nil, nil)
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
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 dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
||||||
|
|
@ -191,10 +191,6 @@ func InotifyInit() (fd int, err error) {
|
||||||
return InotifyInit1(0)
|
return InotifyInit1(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
|
||||||
return Dup3(oldfd, newfd, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
_, err := ppoll(nil, 0, nil, nil)
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
return err
|
return err
|
||||||
|
|
@ -228,3 +224,7 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
||||||
}
|
}
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
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
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ package unix
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -113,15 +115,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
|
||||||
return nil, errno
|
return nil, errno
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slice memory layout
|
// Use unsafe to convert addr into a []byte.
|
||||||
var sl = struct {
|
var b []byte
|
||||||
addr uintptr
|
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||||
len int
|
hdr.Data = unsafe.Pointer(addr)
|
||||||
cap int
|
hdr.Cap = length
|
||||||
}{addr, length, length}
|
hdr.Len = length
|
||||||
|
|
||||||
// Use unsafe to turn sl into a []byte.
|
|
||||||
b := *(*[]byte)(unsafe.Pointer(&sl))
|
|
||||||
|
|
||||||
// Register mapping in m and return it.
|
// Register mapping in m and return it.
|
||||||
p := &b[cap(b)-1]
|
p := &b[cap(b)-1]
|
||||||
|
|
|
||||||
|
|
@ -2165,6 +2165,8 @@ const (
|
||||||
TCP_USER_TIMEOUT = 0x12
|
TCP_USER_TIMEOUT = 0x12
|
||||||
TCP_WINDOW_CLAMP = 0xa
|
TCP_WINDOW_CLAMP = 0xa
|
||||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||||
|
TFD_TIMER_ABSTIME = 0x1
|
||||||
|
TFD_TIMER_CANCEL_ON_SET = 0x2
|
||||||
TIMER_ABSTIME = 0x1
|
TIMER_ABSTIME = 0x1
|
||||||
TIOCM_DTR = 0x2
|
TIOCM_DTR = 0x2
|
||||||
TIOCM_LE = 0x1
|
TIOCM_LE = 0x1
|
||||||
|
|
|
||||||
|
|
@ -342,6 +342,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -343,6 +343,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -336,6 +336,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,8 @@ const (
|
||||||
TCSETSF = 0x802c7416
|
TCSETSF = 0x802c7416
|
||||||
TCSETSW = 0x802c7415
|
TCSETSW = 0x802c7415
|
||||||
TCXONC = 0x2000741e
|
TCXONC = 0x2000741e
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,8 @@ const (
|
||||||
TCSETSF = 0x802c7416
|
TCSETSF = 0x802c7416
|
||||||
TCSETSW = 0x802c7415
|
TCSETSW = 0x802c7415
|
||||||
TCXONC = 0x2000741e
|
TCXONC = 0x2000741e
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -330,6 +330,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -403,6 +403,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
||||||
|
|
@ -392,6 +392,8 @@ const (
|
||||||
TCSETSW = 0x8024540a
|
TCSETSW = 0x8024540a
|
||||||
TCSETSW2 = 0x802c540e
|
TCSETSW2 = 0x802c540e
|
||||||
TCXONC = 0x20005406
|
TCXONC = 0x20005406
|
||||||
|
TFD_CLOEXEC = 0x400000
|
||||||
|
TFD_NONBLOCK = 0x4000
|
||||||
TIOCCBRK = 0x2000747a
|
TIOCCBRK = 0x2000747a
|
||||||
TIOCCONS = 0x20007424
|
TIOCCONS = 0x20007424
|
||||||
TIOCEXCL = 0x2000740d
|
TIOCEXCL = 0x2000740d
|
||||||
|
|
|
||||||
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -1709,18 +1719,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -2357,23 +2372,6 @@ func libc_ptrace_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -1709,18 +1719,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -2357,23 +2372,6 @@ func libc_ptrace_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -1682,18 +1692,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -2342,23 +2357,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -1682,18 +1692,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
|
@ -2342,23 +2357,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -1450,6 +1450,37 @@ func Sysinfo(info *Sysinfo_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func TimerfdCreate(clockid int, flags int) (fd int, err error) {
|
||||||
|
r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
|
||||||
|
fd = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
|
||||||
|
_, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
|
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
|
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ func pipe(p *[2]_C_int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ func Getgid() (gid int) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
@ -307,7 +307,7 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ 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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// mksysctl_openbsd.pl
|
// go run mksysctl_openbsd.go
|
||||||
// Code generated by the command above; DO NOT EDIT.
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
// +build 386,openbsd
|
// +build 386,openbsd
|
||||||
|
|
@ -30,6 +30,7 @@ var sysctlMib = []mibentry{
|
||||||
{"hw.model", []_C_int{6, 2}},
|
{"hw.model", []_C_int{6, 2}},
|
||||||
{"hw.ncpu", []_C_int{6, 3}},
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
{"hw.ncpufound", []_C_int{6, 21}},
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
{"hw.pagesize", []_C_int{6, 7}},
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
{"hw.physmem", []_C_int{6, 19}},
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
{"hw.product", []_C_int{6, 15}},
|
{"hw.product", []_C_int{6, 15}},
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ var sysctlMib = []mibentry{
|
||||||
{"hw.model", []_C_int{6, 2}},
|
{"hw.model", []_C_int{6, 2}},
|
||||||
{"hw.ncpu", []_C_int{6, 3}},
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
{"hw.ncpufound", []_C_int{6, 21}},
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
{"hw.pagesize", []_C_int{6, 7}},
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
{"hw.perfpolicy", []_C_int{6, 23}},
|
{"hw.perfpolicy", []_C_int{6, 23}},
|
||||||
{"hw.physmem", []_C_int{6, 19}},
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ var sysctlMib = []mibentry{
|
||||||
{"hw.model", []_C_int{6, 2}},
|
{"hw.model", []_C_int{6, 2}},
|
||||||
{"hw.ncpu", []_C_int{6, 3}},
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
{"hw.ncpufound", []_C_int{6, 21}},
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
{"hw.pagesize", []_C_int{6, 7}},
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
{"hw.physmem", []_C_int{6, 19}},
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
{"hw.product", []_C_int{6, 15}},
|
{"hw.product", []_C_int{6, 15}},
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@ type (
|
||||||
_C_long_long int64
|
_C_long_long int64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ItimerSpec struct {
|
||||||
|
Interval Timespec
|
||||||
|
Value Timespec
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TIME_OK = 0x0
|
TIME_OK = 0x0
|
||||||
TIME_INS = 0x1
|
TIME_INS = 0x1
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,35 @@ func (d *DLL) MustFindProc(name string) *Proc {
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc
|
||||||
|
// if found. It returns an error if search fails.
|
||||||
|
func (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) {
|
||||||
|
a, e := GetProcAddressByOrdinal(d.Handle, ordinal)
|
||||||
|
name := "#" + itoa(int(ordinal))
|
||||||
|
if e != nil {
|
||||||
|
return nil, &DLLError{
|
||||||
|
Err: e,
|
||||||
|
ObjName: name,
|
||||||
|
Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p := &Proc{
|
||||||
|
Dll: d,
|
||||||
|
Name: name,
|
||||||
|
addr: a,
|
||||||
|
}
|
||||||
|
return p, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails.
|
||||||
|
func (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc {
|
||||||
|
p, e := d.FindProcByOrdinal(ordinal)
|
||||||
|
if e != nil {
|
||||||
|
panic(e)
|
||||||
|
}
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
// Release unloads DLL d from memory.
|
// Release unloads DLL d from memory.
|
||||||
func (d *DLL) Release() (err error) {
|
func (d *DLL) Release() (err error) {
|
||||||
return FreeLibrary(d.Handle)
|
return FreeLibrary(d.Handle)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ package windows
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unicode/utf16"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -40,17 +39,11 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
|
||||||
defer DestroyEnvironmentBlock(block)
|
defer DestroyEnvironmentBlock(block)
|
||||||
blockp := uintptr(unsafe.Pointer(block))
|
blockp := uintptr(unsafe.Pointer(block))
|
||||||
for {
|
for {
|
||||||
entry := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(blockp))[:]
|
entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp)))
|
||||||
for i, v := range entry {
|
|
||||||
if v == 0 {
|
|
||||||
entry = entry[:i]
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(entry) == 0 {
|
if len(entry) == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
env = append(env, string(utf16.Decode(entry)))
|
env = append(env, entry)
|
||||||
blockp += 2 * (uintptr(len(entry)) + 1)
|
blockp += 2 * (uintptr(len(entry)) + 1)
|
||||||
}
|
}
|
||||||
return env, nil
|
return env, nil
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ package windows
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -1229,7 +1231,7 @@ func (sd *SECURITY_DESCRIPTOR) String() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
defer LocalFree(Handle(unsafe.Pointer(sddl)))
|
defer LocalFree(Handle(unsafe.Pointer(sddl)))
|
||||||
return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(sddl))[:])
|
return UTF16PtrToString(sddl)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToAbsolute converts a self-relative security descriptor into an absolute one.
|
// ToAbsolute converts a self-relative security descriptor into an absolute one.
|
||||||
|
|
@ -1307,9 +1309,17 @@ func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURIT
|
||||||
}
|
}
|
||||||
|
|
||||||
func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
|
func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
|
||||||
sdBytes := make([]byte, selfRelativeSD.Length())
|
sdLen := (int)(selfRelativeSD.Length())
|
||||||
copy(sdBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(selfRelativeSD))[:len(sdBytes)])
|
|
||||||
return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&sdBytes[0]))
|
var src []byte
|
||||||
|
h := (*unsafeheader.Slice)(unsafe.Pointer(&src))
|
||||||
|
h.Data = unsafe.Pointer(selfRelativeSD)
|
||||||
|
h.Len = sdLen
|
||||||
|
h.Cap = sdLen
|
||||||
|
|
||||||
|
dst := make([]byte, sdLen)
|
||||||
|
copy(dst, src)
|
||||||
|
return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
|
// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
|
||||||
|
|
@ -1391,6 +1401,6 @@ func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL
|
||||||
}
|
}
|
||||||
defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
|
defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
|
||||||
aclBytes := make([]byte, winHeapACL.aclSize)
|
aclBytes := make([]byte, winHeapACL.aclSize)
|
||||||
copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes)])
|
copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)])
|
||||||
return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
|
return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unicode/utf16"
|
"unicode/utf16"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Handle uintptr
|
type Handle uintptr
|
||||||
|
|
@ -117,6 +119,32 @@ func UTF16PtrFromString(s string) (*uint16, error) {
|
||||||
return &a[0], nil
|
return &a[0], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string.
|
||||||
|
// If the pointer is nil, this returns the empty string. This assumes that the UTF-16 sequence is terminated
|
||||||
|
// at a zero word; if the zero word is not present, the program may crash.
|
||||||
|
func UTF16PtrToString(p *uint16) string {
|
||||||
|
if p == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if *p == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find NUL terminator.
|
||||||
|
n := 0
|
||||||
|
for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ {
|
||||||
|
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
|
||||||
|
}
|
||||||
|
|
||||||
|
var s []uint16
|
||||||
|
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||||
|
h.Data = unsafe.Pointer(p)
|
||||||
|
h.Len = n
|
||||||
|
h.Cap = n
|
||||||
|
|
||||||
|
return string(utf16.Decode(s))
|
||||||
|
}
|
||||||
|
|
||||||
func Getpagesize() int { return 4096 }
|
func Getpagesize() int { return 4096 }
|
||||||
|
|
||||||
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
|
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
|
||||||
|
|
@ -1181,7 +1209,12 @@ type IPv6Mreq struct {
|
||||||
Interface uint32
|
Interface uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS }
|
func GetsockoptInt(fd Handle, level, opt int) (int, error) {
|
||||||
|
v := int32(0)
|
||||||
|
l := int32(unsafe.Sizeof(v))
|
||||||
|
err := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l)
|
||||||
|
return int(v), err
|
||||||
|
}
|
||||||
|
|
||||||
func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
|
func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
|
||||||
sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
|
sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
|
||||||
|
|
@ -1378,7 +1411,7 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
defer CoTaskMemFree(unsafe.Pointer(p))
|
defer CoTaskMemFree(unsafe.Pointer(p))
|
||||||
return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil
|
return UTF16PtrToString(p), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RtlGetVersion returns the version of the underlying operating system, ignoring
|
// RtlGetVersion returns the version of the underlying operating system, ignoring
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ github.com/docker/go-connections/tlsconfig
|
||||||
github.com/docker/go-metrics
|
github.com/docker/go-metrics
|
||||||
# github.com/docker/go-units v0.4.0
|
# github.com/docker/go-units v0.4.0
|
||||||
github.com/docker/go-units
|
github.com/docker/go-units
|
||||||
# github.com/fsnotify/fsnotify v1.4.7
|
# github.com/fsnotify/fsnotify v1.4.9
|
||||||
github.com/fsnotify/fsnotify
|
github.com/fsnotify/fsnotify
|
||||||
# github.com/ghodss/yaml v1.0.0
|
# github.com/ghodss/yaml v1.0.0
|
||||||
github.com/ghodss/yaml
|
github.com/ghodss/yaml
|
||||||
|
|
@ -163,7 +163,7 @@ github.com/nxadm/tail/ratelimiter
|
||||||
github.com/nxadm/tail/util
|
github.com/nxadm/tail/util
|
||||||
github.com/nxadm/tail/watch
|
github.com/nxadm/tail/watch
|
||||||
github.com/nxadm/tail/winfile
|
github.com/nxadm/tail/winfile
|
||||||
# github.com/onsi/ginkgo v1.12.1
|
# github.com/onsi/ginkgo v1.12.2
|
||||||
github.com/onsi/ginkgo
|
github.com/onsi/ginkgo
|
||||||
github.com/onsi/ginkgo/config
|
github.com/onsi/ginkgo/config
|
||||||
github.com/onsi/ginkgo/internal/codelocation
|
github.com/onsi/ginkgo/internal/codelocation
|
||||||
|
|
@ -271,7 +271,8 @@ golang.org/x/net/html/atom
|
||||||
golang.org/x/net/html/charset
|
golang.org/x/net/html/charset
|
||||||
golang.org/x/net/internal/socks
|
golang.org/x/net/internal/socks
|
||||||
golang.org/x/net/proxy
|
golang.org/x/net/proxy
|
||||||
# golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f
|
# golang.org/x/sys v0.0.0-20200519105757-fe76b779f299
|
||||||
|
golang.org/x/sys/internal/unsafeheader
|
||||||
golang.org/x/sys/unix
|
golang.org/x/sys/unix
|
||||||
golang.org/x/sys/windows
|
golang.org/x/sys/windows
|
||||||
# golang.org/x/text v0.3.2
|
# golang.org/x/text v0.3.2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue