From f2cbe790a5c3c3e8cb59b592c252b2b84025bd91 Mon Sep 17 00:00:00 2001 From: Lukas Macko Date: Thu, 7 Sep 2017 10:00:26 +0200 Subject: Wait until vpp is ready + Update vendor Change-Id: I7c42d44d60f84fd21e55f9e4928d776f5466cc83 Signed-off-by: Lukas Macko --- core/core.go | 47 + glide.lock | 14 +- glide.yaml | 4 + vendor/github.com/fsnotify/fsnotify/.editorconfig | 5 + .../fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md | 11 + .../fsnotify/.github/PULL_REQUEST_TEMPLATE.md | 8 + vendor/github.com/fsnotify/fsnotify/.gitignore | 6 + vendor/github.com/fsnotify/fsnotify/.travis.yml | 30 + vendor/github.com/fsnotify/fsnotify/AUTHORS | 46 + vendor/github.com/fsnotify/fsnotify/CHANGELOG.md | 307 +++++ .../github.com/fsnotify/fsnotify/CONTRIBUTING.md | 77 ++ vendor/github.com/fsnotify/fsnotify/LICENSE | 28 + vendor/github.com/fsnotify/fsnotify/README.md | 79 ++ .../github.com/fsnotify/fsnotify/example_test.go | 42 + vendor/github.com/fsnotify/fsnotify/fen.go | 37 + vendor/github.com/fsnotify/fsnotify/fsnotify.go | 66 ++ .../github.com/fsnotify/fsnotify/fsnotify_test.go | 40 + vendor/github.com/fsnotify/fsnotify/inotify.go | 337 ++++++ .../github.com/fsnotify/fsnotify/inotify_poller.go | 187 +++ .../fsnotify/fsnotify/inotify_poller_test.go | 229 ++++ .../github.com/fsnotify/fsnotify/inotify_test.go | 449 +++++++ .../fsnotify/fsnotify/integration_darwin_test.go | 147 +++ .../fsnotify/fsnotify/integration_test.go | 1237 ++++++++++++++++++++ vendor/github.com/fsnotify/fsnotify/kqueue.go | 503 ++++++++ .../github.com/fsnotify/fsnotify/open_mode_bsd.go | 11 + .../fsnotify/fsnotify/open_mode_darwin.go | 12 + vendor/github.com/fsnotify/fsnotify/windows.go | 561 +++++++++ vendor/github.com/lunixbochs/struc/field.go | 1 - vendor/github.com/lunixbochs/struc/fields.go | 17 +- vendor/github.com/lunixbochs/struc/parse.go | 22 +- vendor/github.com/lunixbochs/struc/struc_test.go | 3 + vendor/github.com/pkg/profile/.travis.yml | 11 + vendor/github.com/pkg/profile/AUTHORS | 1 + vendor/github.com/pkg/profile/LICENSE | 24 + vendor/github.com/pkg/profile/README.md | 54 + vendor/github.com/pkg/profile/example_test.go | 58 + vendor/github.com/pkg/profile/mutex.go | 13 + vendor/github.com/pkg/profile/mutex17.go | 9 + vendor/github.com/pkg/profile/profile.go | 244 ++++ vendor/github.com/pkg/profile/profile_test.go | 330 ++++++ vendor/github.com/pkg/profile/trace.go | 8 + vendor/github.com/pkg/profile/trace16.go | 10 + vendor/github.com/pkg/profile/trace_test.go | 8 + vendor/golang.org/x/sys/unix/README.md | 173 --- vendor/golang.org/x/sys/unix/dirent.go | 102 -- vendor/golang.org/x/sys/unix/endian_big.go | 9 - vendor/golang.org/x/sys/unix/endian_little.go | 9 - vendor/golang.org/x/sys/unix/linux/Dockerfile | 48 - vendor/golang.org/x/sys/unix/linux/mkall.go | 379 ------ vendor/golang.org/x/sys/unix/linux/mksysnum.pl | 85 -- vendor/golang.org/x/sys/unix/linux/types.go | 536 --------- vendor/golang.org/x/sys/unix/mkall.sh | 143 ++- vendor/golang.org/x/sys/unix/mkerrors.sh | 54 +- vendor/golang.org/x/sys/unix/mkpost.go | 74 +- vendor/golang.org/x/sys/unix/mksyscall.pl | 12 +- vendor/golang.org/x/sys/unix/mksyscall_solaris.pl | 2 +- vendor/golang.org/x/sys/unix/mksysnum_darwin.pl | 2 +- vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl | 2 +- vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl | 2 +- vendor/golang.org/x/sys/unix/mksysnum_linux.pl | 78 ++ vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl | 2 +- vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl | 2 +- vendor/golang.org/x/sys/unix/openbsd_pledge.go | 38 - vendor/golang.org/x/sys/unix/openbsd_test.go | 113 -- vendor/golang.org/x/sys/unix/syscall_darwin.go | 36 +- vendor/golang.org/x/sys/unix/syscall_dragonfly.go | 64 +- vendor/golang.org/x/sys/unix/syscall_freebsd.go | 36 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 81 +- vendor/golang.org/x/sys/unix/syscall_netbsd.go | 36 +- vendor/golang.org/x/sys/unix/syscall_openbsd.go | 36 +- vendor/golang.org/x/sys/unix/syscall_solaris.go | 38 +- vendor/golang.org/x/sys/unix/types_darwin.go | 2 +- vendor/golang.org/x/sys/unix/types_dragonfly.go | 2 +- vendor/golang.org/x/sys/unix/types_freebsd.go | 2 +- vendor/golang.org/x/sys/unix/types_linux.go | 465 ++++++++ vendor/golang.org/x/sys/unix/types_netbsd.go | 2 +- vendor/golang.org/x/sys/unix/types_openbsd.go | 2 +- vendor/golang.org/x/sys/unix/types_solaris.go | 2 +- .../x/sys/unix/zerrors_dragonfly_amd64.go | 56 +- vendor/golang.org/x/sys/unix/zerrors_linux_386.go | 281 +---- .../golang.org/x/sys/unix/zerrors_linux_amd64.go | 275 +---- vendor/golang.org/x/sys/unix/zerrors_linux_arm.go | 350 +----- .../golang.org/x/sys/unix/zerrors_linux_arm64.go | 196 +--- vendor/golang.org/x/sys/unix/zerrors_linux_mips.go | 344 +----- .../golang.org/x/sys/unix/zerrors_linux_mips64.go | 191 +-- .../x/sys/unix/zerrors_linux_mips64le.go | 191 +-- .../golang.org/x/sys/unix/zerrors_linux_mipsle.go | 84 +- .../golang.org/x/sys/unix/zerrors_linux_ppc64.go | 176 +-- .../golang.org/x/sys/unix/zerrors_linux_ppc64le.go | 226 +--- .../golang.org/x/sys/unix/zerrors_linux_s390x.go | 86 +- .../golang.org/x/sys/unix/zerrors_linux_sparc64.go | 12 - .../x/sys/unix/zsyscall_dragonfly_amd64.go | 13 +- vendor/golang.org/x/sys/unix/zsyscall_linux_386.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_amd64.go | 2 +- vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_arm64.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_mips.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_mips64.go | 2 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_mipsle.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_ppc64.go | 2 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux_s390x.go | 2 +- .../x/sys/unix/zsysnum_dragonfly_amd64.go | 21 +- vendor/golang.org/x/sys/unix/zsysnum_linux_386.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_amd64.go | 4 +- vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_arm64.go | 4 +- vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_mips64.go | 4 +- .../x/sys/unix/zsysnum_linux_mips64le.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_mipsle.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_ppc64.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_ppc64le.go | 4 +- .../golang.org/x/sys/unix/zsysnum_linux_s390x.go | 4 +- .../x/sys/unix/ztypes_dragonfly_amd64.go | 6 +- vendor/golang.org/x/sys/unix/ztypes_linux_386.go | 42 +- vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go | 70 +- vendor/golang.org/x/sys/unix/ztypes_linux_arm.go | 42 +- vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go | 72 +- vendor/golang.org/x/sys/unix/ztypes_linux_mips.go | 39 +- .../golang.org/x/sys/unix/ztypes_linux_mips64.go | 49 +- .../golang.org/x/sys/unix/ztypes_linux_mips64le.go | 49 +- .../golang.org/x/sys/unix/ztypes_linux_mipsle.go | 39 +- vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go | 74 +- .../golang.org/x/sys/unix/ztypes_linux_ppc64le.go | 74 +- vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go | 42 +- .../golang.org/x/sys/unix/ztypes_linux_sparc64.go | 9 - vendor/golang.org/x/sys/windows/syscall_windows.go | 8 +- .../golang.org/x/sys/windows/zsyscall_windows.go | 21 +- vendor/golang.org/x/sys/windows/ztypes_windows.go | 6 +- vendor/gopkg.in/yaml.v2/LICENSE | 208 +++- vendor/gopkg.in/yaml.v2/README.md | 2 + vendor/gopkg.in/yaml.v2/decode.go | 7 +- vendor/gopkg.in/yaml.v2/decode_test.go | 21 +- vendor/gopkg.in/yaml.v2/emitterc.go | 8 +- vendor/gopkg.in/yaml.v2/example_embedded_test.go | 41 + vendor/gopkg.in/yaml.v2/scannerc.go | 9 +- vendor/gopkg.in/yaml.v2/yaml.go | 13 +- vendor/gopkg.in/yaml.v2/yamlh.go | 2 +- 140 files changed, 7060 insertions(+), 4463 deletions(-) create mode 100644 vendor/github.com/fsnotify/fsnotify/.editorconfig create mode 100644 vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md create mode 100644 vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 vendor/github.com/fsnotify/fsnotify/.gitignore create mode 100644 vendor/github.com/fsnotify/fsnotify/.travis.yml create mode 100644 vendor/github.com/fsnotify/fsnotify/AUTHORS create mode 100644 vendor/github.com/fsnotify/fsnotify/CHANGELOG.md create mode 100644 vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md create mode 100644 vendor/github.com/fsnotify/fsnotify/LICENSE create mode 100644 vendor/github.com/fsnotify/fsnotify/README.md create mode 100644 vendor/github.com/fsnotify/fsnotify/example_test.go create mode 100644 vendor/github.com/fsnotify/fsnotify/fen.go create mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify.go create mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify_test.go create mode 100644 vendor/github.com/fsnotify/fsnotify/inotify.go create mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_poller.go create mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go create mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_test.go create mode 100644 vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go create mode 100644 vendor/github.com/fsnotify/fsnotify/integration_test.go create mode 100644 vendor/github.com/fsnotify/fsnotify/kqueue.go create mode 100644 vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go create mode 100644 vendor/github.com/fsnotify/fsnotify/windows.go create mode 100644 vendor/github.com/pkg/profile/.travis.yml create mode 100644 vendor/github.com/pkg/profile/AUTHORS create mode 100644 vendor/github.com/pkg/profile/LICENSE create mode 100644 vendor/github.com/pkg/profile/README.md create mode 100644 vendor/github.com/pkg/profile/example_test.go create mode 100644 vendor/github.com/pkg/profile/mutex.go create mode 100644 vendor/github.com/pkg/profile/mutex17.go create mode 100644 vendor/github.com/pkg/profile/profile.go create mode 100644 vendor/github.com/pkg/profile/profile_test.go create mode 100644 vendor/github.com/pkg/profile/trace.go create mode 100644 vendor/github.com/pkg/profile/trace16.go create mode 100644 vendor/github.com/pkg/profile/trace_test.go delete mode 100644 vendor/golang.org/x/sys/unix/README.md delete mode 100644 vendor/golang.org/x/sys/unix/dirent.go delete mode 100644 vendor/golang.org/x/sys/unix/endian_big.go delete mode 100644 vendor/golang.org/x/sys/unix/endian_little.go delete mode 100644 vendor/golang.org/x/sys/unix/linux/Dockerfile delete mode 100644 vendor/golang.org/x/sys/unix/linux/mkall.go delete mode 100755 vendor/golang.org/x/sys/unix/linux/mksysnum.pl delete mode 100644 vendor/golang.org/x/sys/unix/linux/types.go create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_linux.pl delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_pledge.go delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/types_linux.go create mode 100644 vendor/gopkg.in/yaml.v2/example_embedded_test.go diff --git a/core/core.go b/core/core.go index 8977902..3eea332 100644 --- a/core/core.go +++ b/core/core.go @@ -28,6 +28,7 @@ import ( "git.fd.io/govpp.git/adapter" "git.fd.io/govpp.git/api" "git.fd.io/govpp.git/core/bin_api/vpe" + "github.com/fsnotify/fsnotify" ) const ( @@ -52,6 +53,15 @@ const ( Disconnected = iota ) +const ( + // watchedFolder is a folder where vpp's shared memory is supposed to be created. + // File system events are monitored in this folder. + watchedFolder = "/dev/shm/" + // watchedFile is a name of the file in the watchedFolder. Once the file is present + // the vpp is ready to accept a new connection. + watchedFile = watchedFolder + "vpe-api" +) + // ConnectionEvent is a notification about change in the VPP connection state. type ConnectionEvent struct { // Timestamp holds the time when the event has been generated. @@ -202,11 +212,48 @@ func (c *Connection) disconnectVPP() { } } +func fileExists(name string) bool { + if _, err := os.Stat(name); err != nil { + if os.IsNotExist(err) { + return false + } + } + return true +} + +// waitForVpp blocks until shared memory for sending bin api calls +// is present on the file system. +func waitForVpp() error { + watcher, err := fsnotify.NewWatcher() + if err != nil { + return err + } + defer watcher.Close() + + err = watcher.Add(watchedFolder) + if err != nil { + return err + } + + if fileExists(watchedFile) { + return nil + } + + for { + ev := <-watcher.Events + if ev.Name == watchedFile && (ev.Op&fsnotify.Create) == fsnotify.Create { + break + } + } + return nil +} + // connectLoop attempts to connect to VPP until it succeeds. // Then it continues with healthCheckLoop. func (c *Connection) connectLoop(connChan chan ConnectionEvent) { // loop until connected for { + waitForVpp() err := c.connectVPP() if err == nil { // signal connected event diff --git a/glide.lock b/glide.lock index c7cc164..249e414 100644 --- a/glide.lock +++ b/glide.lock @@ -1,14 +1,18 @@ -hash: 63211bb08ba0fe7dc97a226b16d682e53e502832d42a08f3dc0dfb0419da126c -updated: 2017-05-04T10:44:17.166761301+02:00 +hash: d2f925bd432f2ecb4c13a9fafd03b3feb046c661190c978cb5b95507ed1ef80b +updated: 2017-09-07T09:58:11.434867834+02:00 imports: - name: github.com/bennyscetbun/jsongo version: 5240b3f82c6665fe3ccd96bdf5e6f38fe1e1399d +- name: github.com/fsnotify/fsnotify + version: 4da3e2cfbabc9f751898f250b49f2439785783a1 - name: github.com/lunixbochs/struc - version: ae5aa8161e35c822b55526833b1635764b740770 + version: ef56447db6a068ad9e52bc54a1aff5fb9e1ed2dd +- name: github.com/pkg/profile + version: 5b67d428864e92711fcbd2f8629456121a56d91f - name: github.com/Sirupsen/logrus version: ba1b36c82c5e05c4f912a88eab0dcd91a171688f - name: golang.org/x/sys - version: 9ccfe848b9db8435a24c424abbc07a921adf1df5 + version: e48874b42435b4347fc52bdee0424a52abc974d7 subpackages: - unix testImports: @@ -27,4 +31,4 @@ testImports: - matchers/support/goraph/util - types - name: gopkg.in/yaml.v2 - version: cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b + version: eb3733d160e74a9c7e442f435eb3bea458e1d19f diff --git a/glide.yaml b/glide.yaml index 3cf9e37..9f31bc1 100644 --- a/glide.yaml +++ b/glide.yaml @@ -3,7 +3,11 @@ import: - package: github.com/Sirupsen/logrus version: v0.11.5 - package: github.com/bennyscetbun/jsongo + version: 5240b3f82c6665fe3ccd96bdf5e6f38fe1e1399d - package: github.com/lunixbochs/struc + version: ef56447db6a068ad9e52bc54a1aff5fb9e1ed2dd +- package: github.com/fsnotify/fsnotify + version: 4da3e2cfbabc9f751898f250b49f2439785783a1 testImport: - package: github.com/onsi/gomega version: v1.1.0 diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig new file mode 100644 index 0000000..ba49e3c --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.editorconfig @@ -0,0 +1,5 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 diff --git a/vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md b/vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..4ad1aed --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +Before reporting an issue, please ensure you are using the latest release of fsnotify. + +### Which operating system (GOOS) and version are you using? + +Linux: lsb_release -a +macOS: sw_vers +Windows: systeminfo | findstr /B /C:OS + +### Please describe the issue that occurred. + +### Are you able to reproduce the issue? Please provide steps to reproduce and a code sample if possible. diff --git a/vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..64ddf7c --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +#### What does this pull request do? + + +#### Where should the reviewer start? + + +#### How should this be manually tested? + diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore new file mode 100644 index 0000000..4cd0cba --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.gitignore @@ -0,0 +1,6 @@ +# Setup a Global .gitignore for OS and editor generated files: +# https://help.github.com/articles/ignoring-files +# git config --global core.excludesfile ~/.gitignore_global + +.vagrant +*.sublime-project diff --git a/vendor/github.com/fsnotify/fsnotify/.travis.yml b/vendor/github.com/fsnotify/fsnotify/.travis.yml new file mode 100644 index 0000000..22e5fa4 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.travis.yml @@ -0,0 +1,30 @@ +sudo: false +language: go + +go: + - 1.8 + - 1.7.x + - tip + +matrix: + allow_failures: + - go: tip + fast_finish: true + +before_script: + - go get -u github.com/golang/lint/golint + +script: + - go test -v --race ./... + +after_script: + - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" + - test -z "$(golint ./... | tee /dev/stderr)" + - go vet ./... + +os: + - linux + - osx + +notifications: + email: false diff --git a/vendor/github.com/fsnotify/fsnotify/AUTHORS b/vendor/github.com/fsnotify/fsnotify/AUTHORS new file mode 100644 index 0000000..0a5bf8f --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/AUTHORS @@ -0,0 +1,46 @@ +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# You can update this list using the following command: +# +# $ git shortlog -se | awk '{print $2 " " $3 " " $4}' + +# Please keep the list sorted. + +Adrien Bustany +Amit Krishnan +Bjørn Erik Pedersen +Bruno Bigras +Caleb Spare +Case Nelson +Chris Howey +Christoffer Buchholz +Daniel Wagner-Hall +Dave Cheney +Evan Phoenix +Francisco Souza +Hari haran +John C Barstow +Kelvin Fo +Ken-ichirou MATSUZAWA +Matt Layher +Nathan Youngman +Patrick +Paul Hammond +Pawel Knap +Pieter Droogendijk +Pursuit92 +Riku Voipio +Rob Figueiredo +Slawek Ligus +Soge Zhang +Tiffany Jernigan +Tilak Sharma +Travis Cline +Tudor Golubenco +Yukang +bronze1man +debrando +henrikedwards +铁哥 diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md new file mode 100644 index 0000000..8c732c1 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md @@ -0,0 +1,307 @@ +# Changelog + +## v1.4.2 / 2016-10-10 + +* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) + +## v1.4.1 / 2016-10-04 + +* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) + +## v1.4.0 / 2016-10-01 + +* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) + +## v1.3.1 / 2016-06-28 + +* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) + +## v1.3.0 / 2016-04-19 + +* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) + +## v1.2.10 / 2016-03-02 + +* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) + +## v1.2.9 / 2016-01-13 + +kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) + +## v1.2.8 / 2015-12-17 + +* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) +* inotify: fix race in test +* enable race detection for continuous integration (Linux, Mac, Windows) + +## v1.2.5 / 2015-10-17 + +* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) +* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) +* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) +* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) + +## v1.2.1 / 2015-10-14 + +* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) + +## v1.2.0 / 2015-02-08 + +* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) +* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) +* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) + +## v1.1.1 / 2015-02-05 + +* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) + +## v1.1.0 / 2014-12-12 + +* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) + * add low-level functions + * only need to store flags on directories + * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) + * done can be an unbuffered channel + * remove calls to os.NewSyscallError +* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) +* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) +* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) + +## v1.0.4 / 2014-09-07 + +* kqueue: add dragonfly to the build tags. +* Rename source code files, rearrange code so exported APIs are at the top. +* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) + +## v1.0.3 / 2014-08-19 + +* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) + +## v1.0.2 / 2014-08-17 + +* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) +* [Fix] Make ./path and path equivalent. (thanks @zhsso) + +## v1.0.0 / 2014-08-15 + +* [API] Remove AddWatch on Windows, use Add. +* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) +* Minor updates based on feedback from golint. + +## dev / 2014-07-09 + +* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). +* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) + +## dev / 2014-07-04 + +* kqueue: fix incorrect mutex used in Close() +* Update example to demonstrate usage of Op. + +## dev / 2014-06-28 + +* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) +* Fix for String() method on Event (thanks Alex Brainman) +* Don't build on Plan 9 or Solaris (thanks @4ad) + +## dev / 2014-06-21 + +* Events channel of type Event rather than *Event. +* [internal] use syscall constants directly for inotify and kqueue. +* [internal] kqueue: rename events to kevents and fileEvent to event. + +## dev / 2014-06-19 + +* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). +* [internal] remove cookie from Event struct (unused). +* [internal] Event struct has the same definition across every OS. +* [internal] remove internal watch and removeWatch methods. + +## dev / 2014-06-12 + +* [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). +* [API] Pluralized channel names: Events and Errors. +* [API] Renamed FileEvent struct to Event. +* [API] Op constants replace methods like IsCreate(). + +## dev / 2014-06-12 + +* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) + +## dev / 2014-05-23 + +* [API] Remove current implementation of WatchFlags. + * current implementation doesn't take advantage of OS for efficiency + * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes + * no tests for the current implementation + * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) + +## v0.9.3 / 2014-12-31 + +* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) + +## v0.9.2 / 2014-08-17 + +* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) + +## v0.9.1 / 2014-06-12 + +* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) + +## v0.9.0 / 2014-01-17 + +* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) +* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) +* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. + +## v0.8.12 / 2013-11-13 + +* [API] Remove FD_SET and friends from Linux adapter + +## v0.8.11 / 2013-11-02 + +* [Doc] Add Changelog [#72][] (thanks @nathany) +* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) + +## v0.8.10 / 2013-10-19 + +* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) +* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) +* [Doc] specify OS-specific limits in README (thanks @debrando) + +## v0.8.9 / 2013-09-08 + +* [Doc] Contributing (thanks @nathany) +* [Doc] update package path in example code [#63][] (thanks @paulhammond) +* [Doc] GoCI badge in README (Linux only) [#60][] +* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) + +## v0.8.8 / 2013-06-17 + +* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) + +## v0.8.7 / 2013-06-03 + +* [API] Make syscall flags internal +* [Fix] inotify: ignore event changes +* [Fix] race in symlink test [#45][] (reported by @srid) +* [Fix] tests on Windows +* lower case error messages + +## v0.8.6 / 2013-05-23 + +* kqueue: Use EVT_ONLY flag on Darwin +* [Doc] Update README with full example + +## v0.8.5 / 2013-05-09 + +* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) + +## v0.8.4 / 2013-04-07 + +* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) + +## v0.8.3 / 2013-03-13 + +* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) +* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) + +## v0.8.2 / 2013-02-07 + +* [Doc] add Authors +* [Fix] fix data races for map access [#29][] (thanks @fsouza) + +## v0.8.1 / 2013-01-09 + +* [Fix] Windows path separators +* [Doc] BSD License + +## v0.8.0 / 2012-11-09 + +* kqueue: directory watching improvements (thanks @vmirage) +* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) +* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) + +## v0.7.4 / 2012-10-09 + +* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) +* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) +* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) +* [Fix] kqueue: modify after recreation of file + +## v0.7.3 / 2012-09-27 + +* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) +* [Fix] kqueue: no longer get duplicate CREATE events + +## v0.7.2 / 2012-09-01 + +* kqueue: events for created directories + +## v0.7.1 / 2012-07-14 + +* [Fix] for renaming files + +## v0.7.0 / 2012-07-02 + +* [Feature] FSNotify flags +* [Fix] inotify: Added file name back to event path + +## v0.6.0 / 2012-06-06 + +* kqueue: watch files after directory created (thanks @tmc) + +## v0.5.1 / 2012-05-22 + +* [Fix] inotify: remove all watches before Close() + +## v0.5.0 / 2012-05-03 + +* [API] kqueue: return errors during watch instead of sending over channel +* kqueue: match symlink behavior on Linux +* inotify: add `DELETE_SELF` (requested by @taralx) +* [Fix] kqueue: handle EINTR (reported by @robfig) +* [Doc] Godoc example [#1][] (thanks @davecheney) + +## v0.4.0 / 2012-03-30 + +* Go 1 released: build with go tool +* [Feature] Windows support using winfsnotify +* Windows does not have attribute change notifications +* Roll attribute notifications into IsModify + +## v0.3.0 / 2012-02-19 + +* kqueue: add files when watch directory + +## v0.2.0 / 2011-12-30 + +* update to latest Go weekly code + +## v0.1.0 / 2011-10-19 + +* kqueue: add watch on file creation to match inotify +* kqueue: create file event +* inotify: ignore `IN_IGNORED` events +* event String() +* linux: common FileEvent functions +* initial commit + +[#79]: https://github.com/howeyc/fsnotify/pull/79 +[#77]: https://github.com/howeyc/fsnotify/pull/77 +[#72]: https://github.com/howeyc/fsnotify/issues/72 +[#71]: https://github.com/howeyc/fsnotify/issues/71 +[#70]: https://github.com/howeyc/fsnotify/issues/70 +[#63]: https://github.com/howeyc/fsnotify/issues/63 +[#62]: https://github.com/howeyc/fsnotify/issues/62 +[#60]: https://github.com/howeyc/fsnotify/issues/60 +[#59]: https://github.com/howeyc/fsnotify/issues/59 +[#49]: https://github.com/howeyc/fsnotify/issues/49 +[#45]: https://github.com/howeyc/fsnotify/issues/45 +[#40]: https://github.com/howeyc/fsnotify/issues/40 +[#36]: https://github.com/howeyc/fsnotify/issues/36 +[#33]: https://github.com/howeyc/fsnotify/issues/33 +[#29]: https://github.com/howeyc/fsnotify/issues/29 +[#25]: https://github.com/howeyc/fsnotify/issues/25 +[#24]: https://github.com/howeyc/fsnotify/issues/24 +[#21]: https://github.com/howeyc/fsnotify/issues/21 diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md new file mode 100644 index 0000000..828a60b --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md @@ -0,0 +1,77 @@ +# Contributing + +## Issues + +* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues). +* Please indicate the platform you are using fsnotify on. +* A code example to reproduce the problem is appreciated. + +## Pull Requests + +### Contributor License Agreement + +fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual). + +Please indicate that you have signed the CLA in your pull request. + +### How fsnotify is Developed + +* Development is done on feature branches. +* Tests are run on BSD, Linux, macOS and Windows. +* Pull requests are reviewed and [applied to master][am] using [hub][]. + * Maintainers may modify or squash commits rather than asking contributors to. +* To issue a new release, the maintainers will: + * Update the CHANGELOG + * Tag a version, which will become available through gopkg.in. + +### How to Fork + +For smooth sailing, always use the original import path. Installing with `go get` makes this easy. + +1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`) +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Ensure everything works and the tests pass (see below) +4. Commit your changes (`git commit -am 'Add some feature'`) + +Contribute upstream: + +1. Fork fsnotify on GitHub +2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`) +3. Push to the branch (`git push fork my-new-feature`) +4. Create a new Pull Request on GitHub + +This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/). + +### Testing + +fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows. + +Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on. + +To aid in cross-platform testing there is a Vagrantfile for Linux and BSD. + +* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) +* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder. +* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password) +* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`. +* When you're done, you will want to halt or destroy the Vagrant boxes. + +Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory. + +Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads). + +### Maintainers + +Help maintaining fsnotify is welcome. To be a maintainer: + +* Submit a pull request and sign the CLA as above. +* You must be able to run the test suite on Mac, Windows, Linux and BSD. + +To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][]. + +All code changes should be internal pull requests. + +Releases are tagged using [Semantic Versioning](http://semver.org/). + +[hub]: https://github.com/github/hub +[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE new file mode 100644 index 0000000..f21e540 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2012 fsnotify Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md new file mode 100644 index 0000000..3993207 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/README.md @@ -0,0 +1,79 @@ +# File system notifications for Go + +[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify) + +fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running: + +```console +go get -u golang.org/x/sys/... +``` + +Cross platform: Windows, Linux, BSD and macOS. + +|Adapter |OS |Status | +|----------|----------|----------| +|inotify |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| +|kqueue |BSD, macOS, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| +|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)| +|FSEvents |macOS |[Planned](https://github.com/fsnotify/fsnotify/issues/11)| +|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)| +|fanotify |Linux 2.6.37+ | | +|USN Journals |Windows |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)| +|Polling |*All* |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)| + +\* Android and iOS are untested. + +Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information. + +## API stability + +fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA). + +All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number. + +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`. + +## Contributing + +Please refer to [CONTRIBUTING][] before opening an issue or pull request. + +## Example + +See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go). + +## FAQ + +**When a file is moved to another directory is it still being watched?** + +No (it shouldn't be, unless you are watching where it was moved to). + +**When I watch a directory, are all subdirectories watched as well?** + +No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]). + +**Do I have to watch the Error and Event channels in a separate goroutine?** + +As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7]) + +**Why am I receiving multiple events for the same file on OS X?** + +Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]). + +**How many files can be watched at once?** + +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. +* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error. + +[#62]: https://github.com/howeyc/fsnotify/issues/62 +[#18]: https://github.com/fsnotify/fsnotify/issues/18 +[#11]: https://github.com/fsnotify/fsnotify/issues/11 +[#7]: https://github.com/howeyc/fsnotify/issues/7 + +[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md + +## Related Projects + +* [notify](https://github.com/rjeczalik/notify) +* [fsevents](https://github.com/fsnotify/fsevents) + diff --git a/vendor/github.com/fsnotify/fsnotify/example_test.go b/vendor/github.com/fsnotify/fsnotify/example_test.go new file mode 100644 index 0000000..700502c --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/example_test.go @@ -0,0 +1,42 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9 + +package fsnotify_test + +import ( + "log" + + "github.com/fsnotify/fsnotify" +) + +func ExampleNewWatcher() { + watcher, err := fsnotify.NewWatcher() + if err != nil { + log.Fatal(err) + } + defer watcher.Close() + + done := make(chan bool) + go func() { + for { + select { + case event := <-watcher.Events: + log.Println("event:", event) + if event.Op&fsnotify.Write == fsnotify.Write { + log.Println("modified file:", event.Name) + } + case err := <-watcher.Errors: + log.Println("error:", err) + } + } + }() + + err = watcher.Add("/tmp/foo") + if err != nil { + log.Fatal(err) + } + <-done +} diff --git a/vendor/github.com/fsnotify/fsnotify/fen.go b/vendor/github.com/fsnotify/fsnotify/fen.go new file mode 100644 index 0000000..ced39cb --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/fen.go @@ -0,0 +1,37 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build solaris + +package fsnotify + +import ( + "errors" +) + +// Watcher watches a set of files, delivering events to a channel. +type Watcher struct { + Events chan Event + Errors chan error +} + +// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. +func NewWatcher() (*Watcher, error) { + return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") +} + +// Close removes all watches and closes the events channel. +func (w *Watcher) Close() error { + return nil +} + +// Add starts watching the named file or directory (non-recursively). +func (w *Watcher) Add(name string) error { + return nil +} + +// Remove stops watching the the named file or directory (non-recursively). +func (w *Watcher) Remove(name string) error { + return nil +} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go new file mode 100644 index 0000000..190bf0d --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/fsnotify.go @@ -0,0 +1,66 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9 + +// Package fsnotify provides a platform-independent interface for file system notifications. +package fsnotify + +import ( + "bytes" + "errors" + "fmt" +) + +// Event represents a single file system notification. +type Event struct { + Name string // Relative path to the file or directory. + Op Op // File operation that triggered the event. +} + +// Op describes a set of file operations. +type Op uint32 + +// These are the generalized file operations that can trigger a notification. +const ( + Create Op = 1 << iota + Write + Remove + Rename + Chmod +) + +func (op Op) String() string { + // Use a buffer for efficient string concatenation + var buffer bytes.Buffer + + if op&Create == Create { + buffer.WriteString("|CREATE") + } + if op&Remove == Remove { + buffer.WriteString("|REMOVE") + } + if op&Write == Write { + buffer.WriteString("|WRITE") + } + if op&Rename == Rename { + buffer.WriteString("|RENAME") + } + if op&Chmod == Chmod { + buffer.WriteString("|CHMOD") + } + if buffer.Len() == 0 { + return "" + } + return buffer.String()[1:] // Strip leading pipe +} + +// String returns a string representation of the event in the form +// "file: REMOVE|WRITE|..." +func (e Event) String() string { + return fmt.Sprintf("%q: %s", e.Name, e.Op.String()) +} + +// Common errors that can be reported by a watcher +var ErrEventOverflow = errors.New("fsnotify queue overflow") diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go b/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go new file mode 100644 index 0000000..9d6d72a --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go @@ -0,0 +1,40 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9 + +package fsnotify + +import "testing" + +func TestEventStringWithValue(t *testing.T) { + for opMask, expectedString := range map[Op]string{ + Chmod | Create: `"/usr/someFile": CREATE|CHMOD`, + Rename: `"/usr/someFile": RENAME`, + Remove: `"/usr/someFile": REMOVE`, + Write | Chmod: `"/usr/someFile": WRITE|CHMOD`, + } { + event := Event{Name: "/usr/someFile", Op: opMask} + if event.String() != expectedString { + t.Fatalf("Expected %s, got: %v", expectedString, event.String()) + } + + } +} + +func TestEventOpStringWithValue(t *testing.T) { + expectedOpString := "WRITE|CHMOD" + event := Event{Name: "someFile", Op: Write | Chmod} + if event.Op.String() != expectedOpString { + t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) + } +} + +func TestEventOpStringWithNoValue(t *testing.T) { + expectedOpString := "" + event := Event{Name: "testFile", Op: 0} + if event.Op.String() != expectedOpString { + t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) + } +} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go new file mode 100644 index 0000000..d9fd1b8 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/inotify.go @@ -0,0 +1,337 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package fsnotify + +import ( + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "sync" + "unsafe" + + "golang.org/x/sys/unix" +) + +// Watcher watches a set of files, delivering events to a channel. +type Watcher struct { + Events chan Event + Errors chan error + mu sync.Mutex // Map access + fd int + poller *fdPoller + watches map[string]*watch // Map of inotify watches (key: path) + paths map[int]string // Map of watched paths (key: watch descriptor) + done chan struct{} // Channel for sending a "quit message" to the reader goroutine + doneResp chan struct{} // Channel to respond to Close +} + +// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. +func NewWatcher() (*Watcher, error) { + // Create inotify fd + fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC) + if fd == -1 { + return nil, errno + } + // Create epoll + poller, err := newFdPoller(fd) + if err != nil { + unix.Close(fd) + return nil, err + } + w := &Watcher{ + fd: fd, + poller: poller, + watches: make(map[string]*watch), + paths: make(map[int]string), + Events: make(chan Event), + Errors: make(chan error), + done: make(chan struct{}), + doneResp: make(chan struct{}), + } + + go w.readEvents() + return w, nil +} + +func (w *Watcher) isClosed() bool { + select { + case <-w.done: + return true + default: + return false + } +} + +// Close removes all watches and closes the events channel. +func (w *Watcher) Close() error { + if w.isClosed() { + return nil + } + + // Send 'close' signal to goroutine, and set the Watcher to closed. + close(w.done) + + // Wake up goroutine + w.poller.wake() + + // Wait for goroutine to close + <-w.doneResp + + return nil +} + +// Add starts watching the named file or directory (non-recursively). +func (w *Watcher) Add(name string) error { + name = filepath.Clean(name) + if w.isClosed() { + return errors.New("inotify instance already closed") + } + + const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM | + unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY | + unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF + + var flags uint32 = agnosticEvents + + w.mu.Lock() + defer w.mu.Unlock() + watchEntry := w.watches[name] + if watchEntry != nil { + flags |= watchEntry.flags | unix.IN_MASK_ADD + } + wd, errno := unix.InotifyAddWatch(w.fd, name, flags) + if wd == -1 { + return errno + } + + if watchEntry == nil { + w.watches[name] = &watch{wd: uint32(wd), flags: flags} + w.paths[wd] = name + } else { + watchEntry.wd = uint32(wd) + watchEntry.flags = flags + } + + return nil +} + +// Remove stops watching the named file or directory (non-recursively). +func (w *Watcher) Remove(name string) error { + name = filepath.Clean(name) + + // Fetch the watch. + w.mu.Lock() + defer w.mu.Unlock() + watch, ok := w.watches[name] + + // Remove it from inotify. + if !ok { + return fmt.Errorf("can't remove non-existent inotify watch for: %s", name) + } + + // We successfully removed the watch if InotifyRmWatch doesn't return an + // error, we need to clean up our internal state to ensure it matches + // inotify's kernel state. + delete(w.paths, int(watch.wd)) + delete(w.watches, name) + + // inotify_rm_watch will return EINVAL if the file has been deleted; + // the inotify will already have been removed. + // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously + // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE + // so that EINVAL means that the wd is being rm_watch()ed or its file removed + // by another thread and we have not received IN_IGNORE event. + success, errno := unix.InotifyRmWatch(w.fd, watch.wd) + if success == -1 { + // TODO: Perhaps it's not helpful to return an error here in every case. + // the only two possible errors are: + // EBADF, which happens when w.fd is not a valid file descriptor of any kind. + // EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor. + // Watch descriptors are invalidated when they are removed explicitly or implicitly; + // explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted. + return errno + } + + return nil +} + +type watch struct { + wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) + flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) +} + +// readEvents reads from the inotify file descriptor, converts the +// received events into Event objects and sends them via the Events channel +func (w *Watcher) readEvents() { + var ( + buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events + n int // Number of bytes read with read() + errno error // Syscall errno + ok bool // For poller.wait + ) + + defer close(w.doneResp) + defer close(w.Errors) + defer close(w.Events) + defer unix.Close(w.fd) + defer w.poller.close() + + for { + // See if we have been closed. + if w.isClosed() { + return + } + + ok, errno = w.poller.wait() + if errno != nil { + select { + case w.Errors <- errno: + case <-w.done: + return + } + continue + } + + if !ok { + continue + } + + n, errno = unix.Read(w.fd, buf[:]) + // If a signal interrupted execution, see if we've been asked to close, and try again. + // http://man7.org/linux/man-pages/man7/signal.7.html : + // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable" + if errno == unix.EINTR { + continue + } + + // unix.Read might have been woken up by Close. If so, we're done. + if w.isClosed() { + return + } + + if n < unix.SizeofInotifyEvent { + var err error + if n == 0 { + // If EOF is received. This should really never happen. + err = io.EOF + } else if n < 0 { + // If an error occurred while reading. + err = errno + } else { + // Read was too short. + err = errors.New("notify: short read in readEvents()") + } + select { + case w.Errors <- err: + case <-w.done: + return + } + continue + } + + var offset uint32 + // We don't know how many events we just read into the buffer + // While the offset points to at least one whole event... + for offset <= uint32(n-unix.SizeofInotifyEvent) { + // Point "raw" to the event in the buffer + raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) + + mask := uint32(raw.Mask) + nameLen := uint32(raw.Len) + + if mask&unix.IN_Q_OVERFLOW != 0 { + select { + case w.Errors <- ErrEventOverflow: + case <-w.done: + return + } + } + + // If the event happened to the watched directory or the watched file, the kernel + // doesn't append the filename to the event, but we would like to always fill the + // the "Name" field with a valid filename. We retrieve the path of the watch from + // the "paths" map. + w.mu.Lock() + name, ok := w.paths[int(raw.Wd)] + // IN_DELETE_SELF occurs when the file/directory being watched is removed. + // This is a sign to clean up the maps, otherwise we are no longer in sync + // with the inotify kernel state which has already deleted the watch + // automatically. + if ok && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF { + delete(w.paths, int(raw.Wd)) + delete(w.watches, name) + } + w.mu.Unlock() + + if nameLen > 0 { + // Point "bytes" at the first byte of the filename + bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent])) + // The filename is padded with NULL bytes. TrimRight() gets rid of those. + name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") + } + + event := newEvent(name, mask) + + // Send the events that are not ignored on the events channel + if !event.ignoreLinux(mask) { + select { + case w.Events <- event: + case <-w.done: + return + } + } + + // Move to the next event in the buffer + offset += unix.SizeofInotifyEvent + nameLen + } + } +} + +// Certain types of events can be "ignored" and not sent over the Events +// channel. Such as events marked ignore by the kernel, or MODIFY events +// against files that do not exist. +func (e *Event) ignoreLinux(mask uint32) bool { + // Ignore anything the inotify API says to ignore + if mask&unix.IN_IGNORED == unix.IN_IGNORED { + return true + } + + // If the event is not a DELETE or RENAME, the file must exist. + // Otherwise the event is ignored. + // *Note*: this was put in place because it was seen that a MODIFY + // event was sent after the DELETE. This ignores that MODIFY and + // assumes a DELETE will come or has come if the file doesn't exist. + if !(e.Op&Remove == Remove || e.Op&Rename == Rename) { + _, statErr := os.Lstat(e.Name) + return os.IsNotExist(statErr) + } + return false +} + +// newEvent returns an platform-independent Event based on an inotify mask. +func newEvent(name string, mask uint32) Event { + e := Event{Name: name} + if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { + e.Op |= Create + } + if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE { + e.Op |= Remove + } + if mask&unix.IN_MODIFY == unix.IN_MODIFY { + e.Op |= Write + } + if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { + e.Op |= Rename + } + if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { + e.Op |= Chmod + } + return e +} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go new file mode 100644 index 0000000..cc7db4b --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go @@ -0,0 +1,187 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package fsnotify + +import ( + "errors" + + "golang.org/x/sys/unix" +) + +type fdPoller struct { + fd int // File descriptor (as returned by the inotify_init() syscall) + epfd int // Epoll file descriptor + pipe [2]int // Pipe for waking up +} + +func emptyPoller(fd int) *fdPoller { + poller := new(fdPoller) + poller.fd = fd + poller.epfd = -1 + poller.pipe[0] = -1 + poller.pipe[1] = -1 + return poller +} + +// Create a new inotify poller. +// This creates an inotify handler, and an epoll handler. +func newFdPoller(fd int) (*fdPoller, error) { + var errno error + poller := emptyPoller(fd) + defer func() { + if errno != nil { + poller.close() + } + }() + poller.fd = fd + + // Create epoll fd + poller.epfd, errno = unix.EpollCreate1(0) + if poller.epfd == -1 { + return nil, errno + } + // Create pipe; pipe[0] is the read end, pipe[1] the write end. + errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK) + if errno != nil { + return nil, errno + } + + // Register inotify fd with epoll + event := unix.EpollEvent{ + Fd: int32(poller.fd), + Events: unix.EPOLLIN, + } + errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event) + if errno != nil { + return nil, errno + } + + // Register pipe fd with epoll + event = unix.EpollEvent{ + Fd: int32(poller.pipe[0]), + Events: unix.EPOLLIN, + } + errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event) + if errno != nil { + return nil, errno + } + + return poller, nil +} + +// Wait using epoll. +// Returns true if something is ready to be read, +// false if there is not. +func (poller *fdPoller) wait() (bool, error) { + // 3 possible events per fd, and 2 fds, makes a maximum of 6 events. + // I don't know whether epoll_wait returns the number of events returned, + // or the total number of events ready. + // I decided to catch both by making the buffer one larger than the maximum. + events := make([]unix.EpollEvent, 7) + for { + n, errno := unix.EpollWait(poller.epfd, events, -1) + if n == -1 { + if errno == unix.EINTR { + continue + } + return false, errno + } + if n == 0 { + // If there are no events, try again. + continue + } + if n > 6 { + // This should never happen. More events were returned than should be possible. + return false, errors.New("epoll_wait returned more events than I know what to do with") + } + ready := events[:n] + epollhup := false + epollerr := false + epollin := false + for _, event := range ready { + if event.Fd == int32(poller.fd) { + if event.Events&unix.EPOLLHUP != 0 { + // This should not happen, but if it does, treat it as a wakeup. + epollhup = true + } + if event.Events&unix.EPOLLERR != 0 { + // If an error is waiting on the file descriptor, we should pretend + // something is ready to read, and let unix.Read pick up the error. + epollerr = true + } + if event.Events&unix.EPOLLIN != 0 { + // There is data to read. + epollin = true + } + } + if event.Fd == int32(poller.pipe[0]) { + if event.Events&unix.EPOLLHUP != 0 { + // Write pipe descriptor was closed, by us. This means we're closing down the + // watcher, and we should wake up. + } + if event.Events&unix.EPOLLERR != 0 { + // If an error is waiting on the pipe file descriptor. + // This is an absolute mystery, and should never ever happen. + return false, errors.New("Error on the pipe descriptor.") + } + if event.Events&unix.EPOLLIN != 0 { + // This is a regular wakeup, so we have to clear the buffer. + err := poller.clearWake() + if err != nil { + return false, err + } + } + } + } + + if epollhup || epollerr || epollin { + return true, nil + } + return false, nil + } +} + +// Close the write end of the poller. +func (poller *fdPoller) wake() error { + buf := make([]byte, 1) + n, errno := unix.Write(poller.pipe[1], buf) + if n == -1 { + if errno == unix.EAGAIN { + // Buffer is full, poller will wake. + return nil + } + return errno + } + return nil +} + +func (poller *fdPoller) clearWake() error { + // You have to be woken up a LOT in order to get to 100! + buf := make([]byte, 100) + n, errno := unix.Read(poller.pipe[0], buf) + if n == -1 { + if errno == unix.EAGAIN { + // Buffer is empty, someone else cleared our wake. + return nil + } + return errno + } + return nil +} + +// Close all poller file descriptors, but not the one passed to it. +func (poller *fdPoller) close() { + if poller.pipe[1] != -1 { + unix.Close(poller.pipe[1]) + } + if poller.pipe[0] != -1 { + unix.Close(poller.pipe[0]) + } + if poller.epfd != -1 { + unix.Close(poller.epfd) + } +} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go new file mode 100644 index 0000000..26623ef --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go @@ -0,0 +1,229 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package fsnotify + +import ( + "testing" + "time" + + "golang.org/x/sys/unix" +) + +type testFd [2]int + +func makeTestFd(t *testing.T) testFd { + var tfd testFd + errno := unix.Pipe(tfd[:]) + if errno != nil { + t.Fatalf("Failed to create pipe: %v", errno) + } + return tfd +} + +func (tfd testFd) fd() int { + return tfd[0] +} + +func (tfd testFd) closeWrite(t *testing.T) { + errno := unix.Close(tfd[1]) + if errno != nil { + t.Fatalf("Failed to close write end of pipe: %v", errno) + } +} + +func (tfd testFd) put(t *testing.T) { + buf := make([]byte, 10) + _, errno := unix.Write(tfd[1], buf) + if errno != nil { + t.Fatalf("Failed to write to pipe: %v", errno) + } +} + +func (tfd testFd) get(t *testing.T) { + buf := make([]byte, 10) + _, errno := unix.Read(tfd[0], buf) + if errno != nil { + t.Fatalf("Failed to read from pipe: %v", errno) + } +} + +func (tfd testFd) close() { + unix.Close(tfd[1]) + unix.Close(tfd[0]) +} + +func makePoller(t *testing.T) (testFd, *fdPoller) { + tfd := makeTestFd(t) + poller, err := newFdPoller(tfd.fd()) + if err != nil { + t.Fatalf("Failed to create poller: %v", err) + } + return tfd, poller +} + +func TestPollerWithBadFd(t *testing.T) { + _, err := newFdPoller(-1) + if err != unix.EBADF { + t.Fatalf("Expected EBADF, got: %v", err) + } +} + +func TestPollerWithData(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + tfd.put(t) + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } + tfd.get(t) +} + +func TestPollerWithWakeup(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + err := poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if ok { + t.Fatalf("expected poller to return false") + } +} + +func TestPollerWithClose(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + tfd.closeWrite(t) + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } +} + +func TestPollerWithWakeupAndData(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + tfd.put(t) + err := poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + + // both data and wakeup + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } + + // data is still in the buffer, wakeup is cleared + ok, err = poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } + + tfd.get(t) + // data is gone, only wakeup now + err = poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + ok, err = poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if ok { + t.Fatalf("expected poller to return false") + } +} + +func TestPollerConcurrent(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + oks := make(chan bool) + live := make(chan bool) + defer close(live) + go func() { + defer close(oks) + for { + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + oks <- ok + if !<-live { + return + } + } + }() + + // Try a write + select { + case <-time.After(50 * time.Millisecond): + case <-oks: + t.Fatalf("poller did not wait") + } + tfd.put(t) + if !<-oks { + t.Fatalf("expected true") + } + tfd.get(t) + live <- true + + // Try a wakeup + select { + case <-time.After(50 * time.Millisecond): + case <-oks: + t.Fatalf("poller did not wait") + } + err := poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + if <-oks { + t.Fatalf("expected false") + } + live <- true + + // Try a close + select { + case <-time.After(50 * time.Millisecond): + case <-oks: + t.Fatalf("poller did not wait") + } + tfd.closeWrite(t) + if !<-oks { + t.Fatalf("expected true") + } + tfd.get(t) +} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_test.go new file mode 100644 index 0000000..2cc6d93 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/inotify_test.go @@ -0,0 +1,449 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package fsnotify + +import ( + "fmt" + "os" + "path/filepath" + "strings" + "testing" + "time" +) + +func TestInotifyCloseRightAway(t *testing.T) { + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + + // Close immediately; it won't even reach the first unix.Read. + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func TestInotifyCloseSlightlyLater(t *testing.T) { + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + + // Wait until readEvents has reached unix.Read, and Close. + <-time.After(50 * time.Millisecond) + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func TestInotifyCloseSlightlyLaterWithWatch(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + w.Add(testDir) + + // Wait until readEvents has reached unix.Read, and Close. + <-time.After(50 * time.Millisecond) + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func TestInotifyCloseAfterRead(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + + err = w.Add(testDir) + if err != nil { + t.Fatalf("Failed to add .") + } + + // Generate an event. + os.Create(filepath.Join(testDir, "somethingSOMETHINGsomethingSOMETHING")) + + // Wait for readEvents to read the event, then close the watcher. + <-time.After(50 * time.Millisecond) + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func isWatcherReallyClosed(t *testing.T, w *Watcher) { + select { + case err, ok := <-w.Errors: + if ok { + t.Fatalf("w.Errors is not closed; readEvents is still alive after closing (error: %v)", err) + } + default: + t.Fatalf("w.Errors would have blocked; readEvents is still alive!") + } + + select { + case _, ok := <-w.Events: + if ok { + t.Fatalf("w.Events is not closed; readEvents is still alive after closing") + } + default: + t.Fatalf("w.Events would have blocked; readEvents is still alive!") + } +} + +func TestInotifyCloseCreate(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testDir) + if err != nil { + t.Fatalf("Failed to add testDir: %v", err) + } + h, err := os.Create(filepath.Join(testDir, "testfile")) + if err != nil { + t.Fatalf("Failed to create file in testdir: %v", err) + } + h.Close() + select { + case _ = <-w.Events: + case err := <-w.Errors: + t.Fatalf("Error from watcher: %v", err) + case <-time.After(50 * time.Millisecond): + t.Fatalf("Took too long to wait for event") + } + + // At this point, we've received one event, so the goroutine is ready. + // It's also blocking on unix.Read. + // Now we try to swap the file descriptor under its nose. + w.Close() + w, err = NewWatcher() + defer w.Close() + if err != nil { + t.Fatalf("Failed to create second watcher: %v", err) + } + + <-time.After(50 * time.Millisecond) + err = w.Add(testDir) + if err != nil { + t.Fatalf("Error adding testDir again: %v", err) + } +} + +// This test verifies the watcher can keep up with file creations/deletions +// when under load. +func TestInotifyStress(t *testing.T) { + maxNumToCreate := 1000 + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + testFilePrefix := filepath.Join(testDir, "testfile") + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testDir) + if err != nil { + t.Fatalf("Failed to add testDir: %v", err) + } + + doneChan := make(chan struct{}) + // The buffer ensures that the file generation goroutine is never blocked. + errChan := make(chan error, 2*maxNumToCreate) + + go func() { + for i := 0; i < maxNumToCreate; i++ { + testFile := fmt.Sprintf("%s%d", testFilePrefix, i) + + handle, err := os.Create(testFile) + if err != nil { + errChan <- fmt.Errorf("Create failed: %v", err) + continue + } + + err = handle.Close() + if err != nil { + errChan <- fmt.Errorf("Close failed: %v", err) + continue + } + } + + // If we delete a newly created file too quickly, inotify will skip the + // create event and only send the delete event. + time.Sleep(100 * time.Millisecond) + + for i := 0; i < maxNumToCreate; i++ { + testFile := fmt.Sprintf("%s%d", testFilePrefix, i) + err = os.Remove(testFile) + if err != nil { + errChan <- fmt.Errorf("Remove failed: %v", err) + } + } + + close(doneChan) + }() + + creates := 0 + removes := 0 + + finished := false + after := time.After(10 * time.Second) + for !finished { + select { + case <-after: + t.Fatalf("Not done") + case <-doneChan: + finished = true + case err := <-errChan: + t.Fatalf("Got an error from file creator goroutine: %v", err) + case err := <-w.Errors: + t.Fatalf("Got an error from watcher: %v", err) + case evt := <-w.Events: + if !strings.HasPrefix(evt.Name, testFilePrefix) { + t.Fatalf("Got an event for an unknown file: %s", evt.Name) + } + if evt.Op == Create { + creates++ + } + if evt.Op == Remove { + removes++ + } + } + } + + // Drain remaining events from channels + count := 0 + for count < 10 { + select { + case err := <-errChan: + t.Fatalf("Got an error from file creator goroutine: %v", err) + case err := <-w.Errors: + t.Fatalf("Got an error from watcher: %v", err) + case evt := <-w.Events: + if !strings.HasPrefix(evt.Name, testFilePrefix) { + t.Fatalf("Got an event for an unknown file: %s", evt.Name) + } + if evt.Op == Create { + creates++ + } + if evt.Op == Remove { + removes++ + } + count = 0 + default: + count++ + // Give the watcher chances to fill the channels. + time.Sleep(time.Millisecond) + } + } + + if creates-removes > 1 || creates-removes < -1 { + t.Fatalf("Creates and removes should not be off by more than one: %d creates, %d removes", creates, removes) + } + if creates < 50 { + t.Fatalf("Expected at least 50 creates, got %d", creates) + } +} + +func TestInotifyRemoveTwice(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + testFile := filepath.Join(testDir, "testfile") + + handle, err := os.Create(testFile) + if err != nil { + t.Fatalf("Create failed: %v", err) + } + handle.Close() + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testFile) + if err != nil { + t.Fatalf("Failed to add testFile: %v", err) + } + + err = w.Remove(testFile) + if err != nil { + t.Fatalf("wanted successful remove but got:", err) + } + + err = w.Remove(testFile) + if err == nil { + t.Fatalf("no error on removing invalid file") + } + + w.mu.Lock() + defer w.mu.Unlock() + if len(w.watches) != 0 { + t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches) + } + if len(w.paths) != 0 { + t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths) + } +} + +func TestInotifyInnerMapLength(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + testFile := filepath.Join(testDir, "testfile") + + handle, err := os.Create(testFile) + if err != nil { + t.Fatalf("Create failed: %v", err) + } + handle.Close() + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testFile) + if err != nil { + t.Fatalf("Failed to add testFile: %v", err) + } + go func() { + for err := range w.Errors { + t.Fatalf("error received: %s", err) + } + }() + + err = os.Remove(testFile) + if err != nil { + t.Fatalf("Failed to remove testFile: %v", err) + } + _ = <-w.Events // consume Remove event + <-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated + + w.mu.Lock() + defer w.mu.Unlock() + if len(w.watches) != 0 { + t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches) + } + if len(w.paths) != 0 { + t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths) + } +} + +func TestInotifyOverflow(t *testing.T) { + // We need to generate many more events than the + // fs.inotify.max_queued_events sysctl setting. + // We use multiple goroutines (one per directory) + // to speed up file creation. + numDirs := 128 + numFiles := 1024 + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + for dn := 0; dn < numDirs; dn++ { + testSubdir := fmt.Sprintf("%s/%d", testDir, dn) + + err := os.Mkdir(testSubdir, 0777) + if err != nil { + t.Fatalf("Cannot create subdir: %v", err) + } + + err = w.Add(testSubdir) + if err != nil { + t.Fatalf("Failed to add subdir: %v", err) + } + } + + errChan := make(chan error, numDirs*numFiles) + + for dn := 0; dn < numDirs; dn++ { + testSubdir := fmt.Sprintf("%s/%d", testDir, dn) + + go func() { + for fn := 0; fn < numFiles; fn++ { + testFile := fmt.Sprintf("%s/%d", testSubdir, fn) + + handle, err := os.Create(testFile) + if err != nil { + errChan <- fmt.Errorf("Create failed: %v", err) + continue + } + + err = handle.Close() + if err != nil { + errChan <- fmt.Errorf("Close failed: %v", err) + continue + } + } + }() + } + + creates := 0 + overflows := 0 + + after := time.After(10 * time.Second) + for overflows == 0 && creates < numDirs*numFiles { + select { + case <-after: + t.Fatalf("Not done") + case err := <-errChan: + t.Fatalf("Got an error from file creator goroutine: %v", err) + case err := <-w.Errors: + if err == ErrEventOverflow { + overflows++ + } else { + t.Fatalf("Got an error from watcher: %v", err) + } + case evt := <-w.Events: + if !strings.HasPrefix(evt.Name, testDir) { + t.Fatalf("Got an event for an unknown file: %s", evt.Name) + } + if evt.Op == Create { + creates++ + } + } + } + + if creates == numDirs*numFiles { + t.Fatalf("Could not trigger overflow") + } + + if overflows == 0 { + t.Fatalf("No overflow and not enough creates (expected %d, got %d)", + numDirs*numFiles, creates) + } +} diff --git a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go b/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go new file mode 100644 index 0000000..cd6adc2 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go @@ -0,0 +1,147 @@ +// Copyright 2016 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 fsnotify + +import ( + "os" + "path/filepath" + "testing" + "time" + + "golang.org/x/sys/unix" +) + +// testExchangedataForWatcher tests the watcher with the exchangedata operation on macOS. +// +// This is widely used for atomic saves on macOS, e.g. TextMate and in Apple's NSDocument. +// +// See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/exchangedata.2.html +// Also see: https://github.com/textmate/textmate/blob/cd016be29489eba5f3c09b7b70b06da134dda550/Frameworks/io/src/swap_file_data.cc#L20 +func testExchangedataForWatcher(t *testing.T, watchDir bool) { + // Create directory to watch + testDir1 := tempMkdir(t) + + // For the intermediate file + testDir2 := tempMkdir(t) + + defer os.RemoveAll(testDir1) + defer os.RemoveAll(testDir2) + + resolvedFilename := "TestFsnotifyEvents.file" + + // TextMate does: + // + // 1. exchangedata (intermediate, resolved) + // 2. unlink intermediate + // + // Let's try to simulate that: + resolved := filepath.Join(testDir1, resolvedFilename) + intermediate := filepath.Join(testDir2, resolvedFilename+"~") + + // Make sure we create the file before we start watching + createAndSyncFile(t, resolved) + + watcher := newWatcher(t) + + // Test both variants in isolation + if watchDir { + addWatch(t, watcher, testDir1) + } else { + addWatch(t, watcher, resolved) + } + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var removeReceived counter + var createReceived counter + + done := make(chan bool) + + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(resolved) { + if event.Op&Remove == Remove { + removeReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + } + t.Logf("event received: %s", event) + } + done <- true + }() + + // Repeat to make sure the watched file/directory "survives" the REMOVE/CREATE loop. + for i := 1; i <= 3; i++ { + // The intermediate file is created in a folder outside the watcher + createAndSyncFile(t, intermediate) + + // 1. Swap + if err := unix.Exchangedata(intermediate, resolved, 0); err != nil { + t.Fatalf("[%d] exchangedata failed: %s", i, err) + } + + time.Sleep(50 * time.Millisecond) + + // 2. Delete the intermediate file + err := os.Remove(intermediate) + + if err != nil { + t.Fatalf("[%d] remove %s failed: %s", i, intermediate, err) + } + + time.Sleep(50 * time.Millisecond) + + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + + // The events will be (CHMOD + REMOVE + CREATE) X 2. Let's focus on the last two: + if removeReceived.value() < 3 { + t.Fatal("fsnotify remove events have not been received after 500 ms") + } + + if createReceived.value() < 3 { + t.Fatal("fsnotify create events have not been received after 500 ms") + } + + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +// TestExchangedataInWatchedDir test exchangedata operation on file in watched dir. +func TestExchangedataInWatchedDir(t *testing.T) { + testExchangedataForWatcher(t, true) +} + +// TestExchangedataInWatchedDir test exchangedata operation on watched file. +func TestExchangedataInWatchedFile(t *testing.T) { + testExchangedataForWatcher(t, false) +} + +func createAndSyncFile(t *testing.T, filepath string) { + f1, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating %s failed: %s", filepath, err) + } + f1.Sync() + f1.Close() +} diff --git a/vendor/github.com/fsnotify/fsnotify/integration_test.go b/vendor/github.com/fsnotify/fsnotify/integration_test.go new file mode 100644 index 0000000..8b7e9d3 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/integration_test.go @@ -0,0 +1,1237 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9,!solaris + +package fsnotify + +import ( + "io/ioutil" + "os" + "os/exec" + "path" + "path/filepath" + "runtime" + "sync/atomic" + "testing" + "time" +) + +// An atomic counter +type counter struct { + val int32 +} + +func (c *counter) increment() { + atomic.AddInt32(&c.val, 1) +} + +func (c *counter) value() int32 { + return atomic.LoadInt32(&c.val) +} + +func (c *counter) reset() { + atomic.StoreInt32(&c.val, 0) +} + +// tempMkdir makes a temporary directory +func tempMkdir(t *testing.T) string { + dir, err := ioutil.TempDir("", "fsnotify") + if err != nil { + t.Fatalf("failed to create test directory: %s", err) + } + return dir +} + +// tempMkFile makes a temporary file. +func tempMkFile(t *testing.T, dir string) string { + f, err := ioutil.TempFile(dir, "fsnotify") + if err != nil { + t.Fatalf("failed to create test file: %v", err) + } + defer f.Close() + return f.Name() +} + +// newWatcher initializes an fsnotify Watcher instance. +func newWatcher(t *testing.T) *Watcher { + watcher, err := NewWatcher() + if err != nil { + t.Fatalf("NewWatcher() failed: %s", err) + } + return watcher +} + +// addWatch adds a watch for a directory +func addWatch(t *testing.T, watcher *Watcher, dir string) { + if err := watcher.Add(dir); err != nil { + t.Fatalf("watcher.Add(%q) failed: %s", dir, err) + } +} + +func TestFsnotifyMultipleOperations(t *testing.T) { + watcher := newWatcher(t) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create directory that's not watched + testDirToMoveFiles := tempMkdir(t) + defer os.RemoveAll(testDirToMoveFiles) + + testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") + testFileRenamed := filepath.Join(testDirToMoveFiles, "TestFsnotifySeqRename.testfile") + + addWatch(t, watcher, testDir) + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, modifyReceived, deleteReceived, renameReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + if event.Op&Write == Write { + modifyReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + if event.Op&Rename == Rename { + renameReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // Modify the file outside of the watched dir + f, err = os.Open(testFileRenamed) + if err != nil { + t.Fatalf("open test renamed file failed: %s", err) + } + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Recreate the file that was moved + f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Close() + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 2 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) + } + mReceived := modifyReceived.value() + if mReceived != 1 { + t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) + } + dReceived := deleteReceived.value() + rReceived := renameReceived.value() + if dReceived+rReceived != 1 { + t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", rReceived+dReceived, 1) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyMultipleCreates(t *testing.T) { + watcher := newWatcher(t) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") + + addWatch(t, watcher, testDir) + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, modifyReceived, deleteReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + if event.Op&Write == Write { + modifyReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + os.Remove(testFile) + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Recreate the file + f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Close() + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Modify + f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Modify + f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 2 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) + } + mReceived := modifyReceived.value() + if mReceived < 3 { + t.Fatalf("incorrect number of modify events received after 500 ms (%d vs atleast %d)", mReceived, 3) + } + dReceived := deleteReceived.value() + if dReceived != 1 { + t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", dReceived, 1) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyDirOnly(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + // This should NOT add any events to the fsnotify event queue + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDir, "TestFsnotifyDirOnly.testfile") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, modifyReceived, deleteReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileAlreadyExists) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + if event.Op&Write == Write { + modifyReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + os.Remove(testFile) + os.Remove(testFileAlreadyExists) + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 1 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 1) + } + mReceived := modifyReceived.value() + if mReceived != 1 { + t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) + } + dReceived := deleteReceived.value() + if dReceived != 2 { + t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyDeleteWatchedDir(t *testing.T) { + watcher := newWatcher(t) + defer watcher.Close() + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + addWatch(t, watcher, testDir) + + // Add a watch for testFile + addWatch(t, watcher, testFileAlreadyExists) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var deleteReceived counter + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFileAlreadyExists) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + }() + + os.RemoveAll(testDir) + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + dReceived := deleteReceived.value() + if dReceived < 2 { + t.Fatalf("did not receive at least %d delete events, received %d after 500 ms", 2, dReceived) + } +} + +func TestFsnotifySubDir(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + testFile1 := filepath.Join(testDir, "TestFsnotifyFile1.testfile") + testSubDir := filepath.Join(testDir, "sub") + testSubDirFile := filepath.Join(testDir, "sub/TestFsnotifyFile1.testfile") + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, deleteReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testSubDir) || event.Name == filepath.Clean(testFile1) { + t.Logf("event received: %s", event) + if event.Op&Create == Create { + createReceived.increment() + } + if event.Op&Remove == Remove { + deleteReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + addWatch(t, watcher, testDir) + + // Create sub-directory + if err := os.Mkdir(testSubDir, 0777); err != nil { + t.Fatalf("failed to create test sub-directory: %s", err) + } + + // Create a file + var f *os.File + f, err := os.OpenFile(testFile1, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + + // Create a file (Should not see this! we are not watching subdir) + var fs *os.File + fs, err = os.OpenFile(testSubDirFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + fs.Sync() + fs.Close() + + time.Sleep(200 * time.Millisecond) + + // Make sure receive deletes for both file and sub-directory + os.RemoveAll(testSubDir) + os.Remove(testFile1) + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 2 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) + } + dReceived := deleteReceived.value() + if dReceived != 2 { + t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyRename(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDir, "TestFsnotifyEvents.testfile") + testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var renameReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { + if event.Op&Rename == Rename { + renameReceived.increment() + } + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + f.WriteString("data") + f.Sync() + f.Close() + + // Add a watch for testFile + addWatch(t, watcher, testFile) + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + if renameReceived.value() == 0 { + t.Fatal("fsnotify rename events have not been received after 500 ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } + + os.Remove(testFileRenamed) +} + +func TestFsnotifyRenameToCreate(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create directory to get file + testDirFrom := tempMkdir(t) + defer os.RemoveAll(testDirFrom) + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") + testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { + if event.Op&Create == Create { + createReceived.increment() + } + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + if createReceived.value() == 0 { + t.Fatal("fsnotify create events have not been received after 500 ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } + + os.Remove(testFileRenamed) +} + +func TestFsnotifyRenameToOverwrite(t *testing.T) { + switch runtime.GOOS { + case "plan9", "windows": + t.Skipf("skipping test on %q (os.Rename over existing file does not create event).", runtime.GOOS) + } + + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create directory to get file + testDirFrom := tempMkdir(t) + defer os.RemoveAll(testDirFrom) + + testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") + testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") + + // Create a file + var fr *os.File + fr, err := os.OpenFile(testFileRenamed, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + fr.Sync() + fr.Close() + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var eventReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testFileRenamed) { + eventReceived.increment() + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + if eventReceived.value() == 0 { + t.Fatal("fsnotify events have not been received after 500 ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } + + os.Remove(testFileRenamed) +} + +func TestRemovalOfWatch(t *testing.T) { + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + watcher := newWatcher(t) + defer watcher.Close() + + addWatch(t, watcher, testDir) + if err := watcher.Remove(testDir); err != nil { + t.Fatalf("Could not remove the watch: %v\n", err) + } + + go func() { + select { + case ev := <-watcher.Events: + t.Fatalf("We received event: %v\n", ev) + case <-time.After(500 * time.Millisecond): + t.Log("No event received, as expected.") + } + }() + + time.Sleep(200 * time.Millisecond) + // Modify the file outside of the watched dir + f, err := os.Open(testFileAlreadyExists) + if err != nil { + t.Fatalf("Open test file failed: %s", err) + } + f.WriteString("data") + f.Sync() + f.Close() + if err := os.Chmod(testFileAlreadyExists, 0700); err != nil { + t.Fatalf("chmod failed: %s", err) + } + time.Sleep(400 * time.Millisecond) +} + +func TestFsnotifyAttrib(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("attributes don't work on Windows.") + } + + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDir, "TestFsnotifyAttrib.testfile") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + // The modifyReceived counter counts IsModify events that are not IsAttrib, + // and the attribReceived counts IsAttrib events (which are also IsModify as + // a consequence). + var modifyReceived counter + var attribReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { + if event.Op&Write == Write { + modifyReceived.increment() + } + if event.Op&Chmod == Chmod { + attribReceived.increment() + } + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + f.WriteString("data") + f.Sync() + f.Close() + + // Add a watch for testFile + addWatch(t, watcher, testFile) + + if err := os.Chmod(testFile, 0700); err != nil { + t.Fatalf("chmod failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + // Creating/writing a file changes also the mtime, so IsAttrib should be set to true here + time.Sleep(500 * time.Millisecond) + if modifyReceived.value() != 0 { + t.Fatal("received an unexpected modify event when creating a test file") + } + if attribReceived.value() == 0 { + t.Fatal("fsnotify attribute events have not received after 500 ms") + } + + // Modifying the contents of the file does not set the attrib flag (although eg. the mtime + // might have been modified). + modifyReceived.reset() + attribReceived.reset() + + f, err = os.OpenFile(testFile, os.O_WRONLY, 0) + if err != nil { + t.Fatalf("reopening test file failed: %s", err) + } + + f.WriteString("more data") + f.Sync() + f.Close() + + time.Sleep(500 * time.Millisecond) + + if modifyReceived.value() != 1 { + t.Fatal("didn't receive a modify event after changing test file contents") + } + + if attribReceived.value() != 0 { + t.Fatal("did receive an unexpected attrib event after changing test file contents") + } + + modifyReceived.reset() + attribReceived.reset() + + // Doing a chmod on the file should trigger an event with the "attrib" flag set (the contents + // of the file are not changed though) + if err := os.Chmod(testFile, 0600); err != nil { + t.Fatalf("chmod failed: %s", err) + } + + time.Sleep(500 * time.Millisecond) + + if attribReceived.value() != 1 { + t.Fatal("didn't receive an attribute change after 500ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(1e9): + t.Fatal("event stream was not closed after 1 second") + } + + os.Remove(testFile) +} + +func TestFsnotifyClose(t *testing.T) { + watcher := newWatcher(t) + watcher.Close() + + var done int32 + go func() { + watcher.Close() + atomic.StoreInt32(&done, 1) + }() + + time.Sleep(50e6) // 50 ms + if atomic.LoadInt32(&done) == 0 { + t.Fatal("double Close() test failed: second Close() call didn't return") + } + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + if err := watcher.Add(testDir); err == nil { + t.Fatal("expected error on Watch() after Close(), got nil") + } +} + +func TestFsnotifyFakeSymlink(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("symlinks don't work on Windows.") + } + + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + var errorsReceived counter + // Receive errors on the error channel on a separate goroutine + go func() { + for errors := range watcher.Errors { + t.Logf("Received error: %s", errors) + errorsReceived.increment() + } + }() + + // Count the CREATE events received + var createEventsReceived, otherEventsReceived counter + go func() { + for ev := range watcher.Events { + t.Logf("event received: %s", ev) + if ev.Op&Create == Create { + createEventsReceived.increment() + } else { + otherEventsReceived.increment() + } + } + }() + + addWatch(t, watcher, testDir) + + if err := os.Symlink(filepath.Join(testDir, "zzz"), filepath.Join(testDir, "zzznew")); err != nil { + t.Fatalf("Failed to create bogus symlink: %s", err) + } + t.Logf("Created bogus symlink") + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + + // Should not be error, just no events for broken links (watching nothing) + if errorsReceived.value() > 0 { + t.Fatal("fsnotify errors have been received.") + } + if otherEventsReceived.value() > 0 { + t.Fatal("fsnotify other events received on the broken link") + } + + // Except for 1 create event (for the link itself) + if createEventsReceived.value() == 0 { + t.Fatal("fsnotify create events were not received after 500 ms") + } + if createEventsReceived.value() > 1 { + t.Fatal("fsnotify more create events received than expected") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() +} + +func TestCyclicSymlink(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("symlinks don't work on Windows.") + } + + watcher := newWatcher(t) + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + link := path.Join(testDir, "link") + if err := os.Symlink(".", link); err != nil { + t.Fatalf("could not make symlink: %v", err) + } + addWatch(t, watcher, testDir) + + var createEventsReceived counter + go func() { + for ev := range watcher.Events { + if ev.Op&Create == Create { + createEventsReceived.increment() + } + } + }() + + if err := os.Remove(link); err != nil { + t.Fatalf("Error removing link: %v", err) + } + + // It would be nice to be able to expect a delete event here, but kqueue has + // no way for us to get events on symlinks themselves, because opening them + // opens an fd to the file to which they point. + + if err := ioutil.WriteFile(link, []byte("foo"), 0700); err != nil { + t.Fatalf("could not make symlink: %v", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + + if got := createEventsReceived.value(); got == 0 { + t.Errorf("want at least 1 create event got %v", got) + } + + watcher.Close() +} + +// TestConcurrentRemovalOfWatch tests that concurrent calls to RemoveWatch do not race. +// See https://codereview.appspot.com/103300045/ +// go test -test.run=TestConcurrentRemovalOfWatch -test.cpu=1,1,1,1,1 -race +func TestConcurrentRemovalOfWatch(t *testing.T) { + if runtime.GOOS != "darwin" { + t.Skip("regression test for race only present on darwin") + } + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + watcher := newWatcher(t) + defer watcher.Close() + + addWatch(t, watcher, testDir) + + // Test that RemoveWatch can be invoked concurrently, with no data races. + removed1 := make(chan struct{}) + go func() { + defer close(removed1) + watcher.Remove(testDir) + }() + removed2 := make(chan struct{}) + go func() { + close(removed2) + watcher.Remove(testDir) + }() + <-removed1 + <-removed2 +} + +func TestClose(t *testing.T) { + // Regression test for #59 bad file descriptor from Close + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + watcher := newWatcher(t) + if err := watcher.Add(testDir); err != nil { + t.Fatalf("Expected no error on Add, got %v", err) + } + err := watcher.Close() + if err != nil { + t.Fatalf("Expected no error on Close, got %v.", err) + } +} + +// TestRemoveWithClose tests if one can handle Remove events and, at the same +// time, close Watcher object without any data races. +func TestRemoveWithClose(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + const fileN = 200 + tempFiles := make([]string, 0, fileN) + for i := 0; i < fileN; i++ { + tempFiles = append(tempFiles, tempMkFile(t, testDir)) + } + watcher := newWatcher(t) + if err := watcher.Add(testDir); err != nil { + t.Fatalf("Expected no error on Add, got %v", err) + } + startC, stopC := make(chan struct{}), make(chan struct{}) + errC := make(chan error) + go func() { + for { + select { + case <-watcher.Errors: + case <-watcher.Events: + case <-stopC: + return + } + } + }() + go func() { + <-startC + for _, fileName := range tempFiles { + os.Remove(fileName) + } + }() + go func() { + <-startC + errC <- watcher.Close() + }() + close(startC) + defer close(stopC) + if err := <-errC; err != nil { + t.Fatalf("Expected no error on Close, got %v.", err) + } +} + +func testRename(file1, file2 string) error { + switch runtime.GOOS { + case "windows", "plan9": + return os.Rename(file1, file2) + default: + cmd := exec.Command("mv", file1, file2) + return cmd.Run() + } +} diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go new file mode 100644 index 0000000..c2b4acb --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/kqueue.go @@ -0,0 +1,503 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build freebsd openbsd netbsd dragonfly darwin + +package fsnotify + +import ( + "errors" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "sync" + "time" + + "golang.org/x/sys/unix" +) + +// Watcher watches a set of files, delivering events to a channel. +type Watcher struct { + Events chan Event + Errors chan error + done chan bool // Channel for sending a "quit message" to the reader goroutine + + kq int // File descriptor (as returned by the kqueue() syscall). + + mu sync.Mutex // Protects access to watcher data + watches map[string]int // Map of watched file descriptors (key: path). + externalWatches map[string]bool // Map of watches added by user of the library. + dirFlags map[string]uint32 // Map of watched directories to fflags used in kqueue. + paths map[int]pathInfo // Map file descriptors to path names for processing kqueue events. + fileExists map[string]bool // Keep track of if we know this file exists (to stop duplicate create events). + isClosed bool // Set to true when Close() is first called +} + +type pathInfo struct { + name string + isDir bool +} + +// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. +func NewWatcher() (*Watcher, error) { + kq, err := kqueue() + if err != nil { + return nil, err + } + + w := &Watcher{ + kq: kq, + watches: make(map[string]int), + dirFlags: make(map[string]uint32), + paths: make(map[int]pathInfo), + fileExists: make(map[string]bool), + externalWatches: make(map[string]bool), + Events: make(chan Event), + Errors: make(chan error), + done: make(chan bool), + } + + go w.readEvents() + return w, nil +} + +// Close removes all watches and closes the events channel. +func (w *Watcher) Close() error { + w.mu.Lock() + if w.isClosed { + w.mu.Unlock() + return nil + } + w.isClosed = true + w.mu.Unlock() + + // copy paths to remove while locked + w.mu.Lock() + var pathsToRemove = make([]string, 0, len(w.watches)) + for name := range w.watches { + pathsToRemove = append(pathsToRemove, name) + } + w.mu.Unlock() + // unlock before calling Remove, which also locks + + var err error + for _, name := range pathsToRemove { + if e := w.Remove(name); e != nil && err == nil { + err = e + } + } + + // Send "quit" message to the reader goroutine: + w.done <- true + + return nil +} + +// Add starts watching the named file or directory (non-recursively). +func (w *Watcher) Add(name string) error { + w.mu.Lock() + w.externalWatches[name] = true + w.mu.Unlock() + _, err := w.addWatch(name, noteAllEvents) + return err +} + +// Remove stops watching the the named file or directory (non-recursively). +func (w *Watcher) Remove(name string) error { + name = filepath.Clean(name) + w.mu.Lock() + watchfd, ok := w.watches[name] + w.mu.Unlock() + if !ok { + return fmt.Errorf("can't remove non-existent kevent watch for: %s", name) + } + + const registerRemove = unix.EV_DELETE + if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil { + return err + } + + unix.Close(watchfd) + + w.mu.Lock() + isDir := w.paths[watchfd].isDir + delete(w.watches, name) + delete(w.paths, watchfd) + delete(w.dirFlags, name) + w.mu.Unlock() + + // Find all watched paths that are in this directory that are not external. + if isDir { + var pathsToRemove []string + w.mu.Lock() + for _, path := range w.paths { + wdir, _ := filepath.Split(path.name) + if filepath.Clean(wdir) == name { + if !w.externalWatches[path.name] { + pathsToRemove = append(pathsToRemove, path.name) + } + } + } + w.mu.Unlock() + for _, name := range pathsToRemove { + // Since these are internal, not much sense in propagating error + // to the user, as that will just confuse them with an error about + // a path they did not explicitly watch themselves. + w.Remove(name) + } + } + + return nil +} + +// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) +const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME + +// keventWaitTime to block on each read from kevent +var keventWaitTime = durationToTimespec(100 * time.Millisecond) + +// addWatch adds name to the watched file set. +// The flags are interpreted as described in kevent(2). +// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks. +func (w *Watcher) addWatch(name string, flags uint32) (string, error) { + var isDir bool + // Make ./name and name equivalent + name = filepath.Clean(name) + + w.mu.Lock() + if w.isClosed { + w.mu.Unlock() + return "", errors.New("kevent instance already closed") + } + watchfd, alreadyWatching := w.watches[name] + // We already have a watch, but we can still override flags. + if alreadyWatching { + isDir = w.paths[watchfd].isDir + } + w.mu.Unlock() + + if !alreadyWatching { + fi, err := os.Lstat(name) + if err != nil { + return "", err + } + + // Don't watch sockets. + if fi.Mode()&os.ModeSocket == os.ModeSocket { + return "", nil + } + + // Don't watch named pipes. + if fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe { + return "", nil + } + + // Follow Symlinks + // Unfortunately, Linux can add bogus symlinks to watch list without + // issue, and Windows can't do symlinks period (AFAIK). To maintain + // consistency, we will act like everything is fine. There will simply + // be no file events for broken symlinks. + // Hence the returns of nil on errors. + if fi.Mode()&os.ModeSymlink == os.ModeSymlink { + name, err = filepath.EvalSymlinks(name) + if err != nil { + return "", nil + } + + w.mu.Lock() + _, alreadyWatching = w.watches[name] + w.mu.Unlock() + + if alreadyWatching { + return name, nil + } + + fi, err = os.Lstat(name) + if err != nil { + return "", nil + } + } + + watchfd, err = unix.Open(name, openMode, 0700) + if watchfd == -1 { + return "", err + } + + isDir = fi.IsDir() + } + + const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE + if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil { + unix.Close(watchfd) + return "", err + } + + if !alreadyWatching { + w.mu.Lock() + w.watches[name] = watchfd + w.paths[watchfd] = pathInfo{name: name, isDir: isDir} + w.mu.Unlock() + } + + if isDir { + // Watch the directory if it has not been watched before, + // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) + w.mu.Lock() + + watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && + (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE) + // Store flags so this watch can be updated later + w.dirFlags[name] = flags + w.mu.Unlock() + + if watchDir { + if err := w.watchDirectoryFiles(name); err != nil { + return "", err + } + } + } + return name, nil +} + +// readEvents reads from kqueue and converts the received kevents into +// Event values that it sends down the Events channel. +func (w *Watcher) readEvents() { + eventBuffer := make([]unix.Kevent_t, 10) + + for { + // See if there is a message on the "done" channel + select { + case <-w.done: + err := unix.Close(w.kq) + if err != nil { + w.Errors <- err + } + close(w.Events) + close(w.Errors) + return + default: + } + + // Get new events + kevents, err := read(w.kq, eventBuffer, &keventWaitTime) + // EINTR is okay, the syscall was interrupted before timeout expired. + if err != nil && err != unix.EINTR { + w.Errors <- err + continue + } + + // Flush the events we received to the Events channel + for len(kevents) > 0 { + kevent := &kevents[0] + watchfd := int(kevent.Ident) + mask := uint32(kevent.Fflags) + w.mu.Lock() + path := w.paths[watchfd] + w.mu.Unlock() + event := newEvent(path.name, mask) + + if path.isDir && !(event.Op&Remove == Remove) { + // Double check to make sure the directory exists. This can happen when + // we do a rm -fr on a recursively watched folders and we receive a + // modification event first but the folder has been deleted and later + // receive the delete event + if _, err := os.Lstat(event.Name); os.IsNotExist(err) { + // mark is as delete event + event.Op |= Remove + } + } + + if event.Op&Rename == Rename || event.Op&Remove == Remove { + w.Remove(event.Name) + w.mu.Lock() + delete(w.fileExists, event.Name) + w.mu.Unlock() + } + + if path.isDir && event.Op&Write == Write && !(event.Op&Remove == Remove) { + w.sendDirectoryChangeEvents(event.Name) + } else { + // Send the event on the Events channel + w.Events <- event + } + + if event.Op&Remove == Remove { + // Look for a file that may have overwritten this. + // For example, mv f1 f2 will delete f2, then create f2. + if path.isDir { + fileDir := filepath.Clean(event.Name) + w.mu.Lock() + _, found := w.watches[fileDir] + w.mu.Unlock() + if found { + // make sure the directory exists before we watch for changes. When we + // do a recursive watch and perform rm -fr, the parent directory might + // have gone missing, ignore the missing directory and let the + // upcoming delete event remove the watch from the parent directory. + if _, err := os.Lstat(fileDir); err == nil { + w.sendDirectoryChangeEvents(fileDir) + } + } + } else { + filePath := filepath.Clean(event.Name) + if fileInfo, err := os.Lstat(filePath); err == nil { + w.sendFileCreatedEventIfNew(filePath, fileInfo) + } + } + } + + // Move to next event + kevents = kevents[1:] + } + } +} + +// newEvent returns an platform-independent Event based on kqueue Fflags. +func newEvent(name string, mask uint32) Event { + e := Event{Name: name} + if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { + e.Op |= Remove + } + if mask&unix.NOTE_WRITE == unix.NOTE_WRITE { + e.Op |= Write + } + if mask&unix.NOTE_RENAME == unix.NOTE_RENAME { + e.Op |= Rename + } + if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB { + e.Op |= Chmod + } + return e +} + +func newCreateEvent(name string) Event { + return Event{Name: name, Op: Create} +} + +// watchDirectoryFiles to mimic inotify when adding a watch on a directory +func (w *Watcher) watchDirectoryFiles(dirPath string) error { + // Get all files + files, err := ioutil.ReadDir(dirPath) + if err != nil { + return err + } + + for _, fileInfo := range files { + filePath := filepath.Join(dirPath, fileInfo.Name()) + filePath, err = w.internalWatch(filePath, fileInfo) + if err != nil { + return err + } + + w.mu.Lock() + w.fileExists[filePath] = true + w.mu.Unlock() + } + + return nil +} + +// sendDirectoryEvents searches the directory for newly created files +// and sends them over the event channel. This functionality is to have +// the BSD version of fsnotify match Linux inotify which provides a +// create event for files created in a watched directory. +func (w *Watcher) sendDirectoryChangeEvents(dirPath string) { + // Get all files + files, err := ioutil.ReadDir(dirPath) + if err != nil { + w.Errors <- err + } + + // Search for new files + for _, fileInfo := range files { + filePath := filepath.Join(dirPath, fileInfo.Name()) + err := w.sendFileCreatedEventIfNew(filePath, fileInfo) + + if err != nil { + return + } + } +} + +// sendFileCreatedEvent sends a create event if the file isn't already being tracked. +func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) { + w.mu.Lock() + _, doesExist := w.fileExists[filePath] + w.mu.Unlock() + if !doesExist { + // Send create event + w.Events <- newCreateEvent(filePath) + } + + // like watchDirectoryFiles (but without doing another ReadDir) + filePath, err = w.internalWatch(filePath, fileInfo) + if err != nil { + return err + } + + w.mu.Lock() + w.fileExists[filePath] = true + w.mu.Unlock() + + return nil +} + +func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) { + if fileInfo.IsDir() { + // mimic Linux providing delete events for subdirectories + // but preserve the flags used if currently watching subdirectory + w.mu.Lock() + flags := w.dirFlags[name] + w.mu.Unlock() + + flags |= unix.NOTE_DELETE | unix.NOTE_RENAME + return w.addWatch(name, flags) + } + + // watch file to mimic Linux inotify + return w.addWatch(name, noteAllEvents) +} + +// kqueue creates a new kernel event queue and returns a descriptor. +func kqueue() (kq int, err error) { + kq, err = unix.Kqueue() + if kq == -1 { + return kq, err + } + return kq, nil +} + +// register events with the queue +func register(kq int, fds []int, flags int, fflags uint32) error { + changes := make([]unix.Kevent_t, len(fds)) + + for i, fd := range fds { + // SetKevent converts int to the platform-specific types: + unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags) + changes[i].Fflags = fflags + } + + // register the events + success, err := unix.Kevent(kq, changes, nil, nil) + if success == -1 { + return err + } + return nil +} + +// read retrieves pending events, or waits until an event occurs. +// A timeout of nil blocks indefinitely, while 0 polls the queue. +func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) { + n, err := unix.Kevent(kq, nil, events, timeout) + if err != nil { + return nil, err + } + return events[0:n], nil +} + +// durationToTimespec prepares a timeout value +func durationToTimespec(d time.Duration) unix.Timespec { + return unix.NsecToTimespec(d.Nanoseconds()) +} diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go new file mode 100644 index 0000000..7d8de14 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go @@ -0,0 +1,11 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build freebsd openbsd netbsd dragonfly + +package fsnotify + +import "golang.org/x/sys/unix" + +const openMode = unix.O_NONBLOCK | unix.O_RDONLY diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go new file mode 100644 index 0000000..9139e17 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go @@ -0,0 +1,12 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin + +package fsnotify + +import "golang.org/x/sys/unix" + +// note: this constant is not defined on BSD +const openMode = unix.O_EVTONLY diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go new file mode 100644 index 0000000..09436f3 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/windows.go @@ -0,0 +1,561 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package fsnotify + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "runtime" + "sync" + "syscall" + "unsafe" +) + +// Watcher watches a set of files, delivering events to a channel. +type Watcher struct { + Events chan Event + Errors chan error + isClosed bool // Set to true when Close() is first called + mu sync.Mutex // Map access + port syscall.Handle // Handle to completion port + watches watchMap // Map of watches (key: i-number) + input chan *input // Inputs to the reader are sent on this channel + quit chan chan<- error +} + +// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. +func NewWatcher() (*Watcher, error) { + port, e := syscall.CreateIoCompletionPort(syscall.InvalidHandle, 0, 0, 0) + if e != nil { + return nil, os.NewSyscallError("CreateIoCompletionPort", e) + } + w := &Watcher{ + port: port, + watches: make(watchMap), + input: make(chan *input, 1), + Events: make(chan Event, 50), + Errors: make(chan error), + quit: make(chan chan<- error, 1), + } + go w.readEvents() + return w, nil +} + +// Close removes all watches and closes the events channel. +func (w *Watcher) Close() error { + if w.isClosed { + return nil + } + w.isClosed = true + + // Send "quit" message to the reader goroutine + ch := make(chan error) + w.quit <- ch + if err := w.wakeupReader(); err != nil { + return err + } + return <-ch +} + +// Add starts watching the named file or directory (non-recursively). +func (w *Watcher) Add(name string) error { + if w.isClosed { + return errors.New("watcher already closed") + } + in := &input{ + op: opAddWatch, + path: filepath.Clean(name), + flags: sysFSALLEVENTS, + reply: make(chan error), + } + w.input <- in + if err := w.wakeupReader(); err != nil { + return err + } + return <-in.reply +} + +// Remove stops watching the the named file or directory (non-recursively). +func (w *Watcher) Remove(name string) error { + in := &input{ + op: opRemoveWatch, + path: filepath.Clean(name), + reply: make(chan error), + } + w.input <- in + if err := w.wakeupReader(); err != nil { + return err + } + return <-in.reply +} + +const ( + // Options for AddWatch + sysFSONESHOT = 0x80000000 + sysFSONLYDIR = 0x1000000 + + // Events + sysFSACCESS = 0x1 + sysFSALLEVENTS = 0xfff + sysFSATTRIB = 0x4 + sysFSCLOSE = 0x18 + sysFSCREATE = 0x100 + sysFSDELETE = 0x200 + sysFSDELETESELF = 0x400 + sysFSMODIFY = 0x2 + sysFSMOVE = 0xc0 + sysFSMOVEDFROM = 0x40 + sysFSMOVEDTO = 0x80 + sysFSMOVESELF = 0x800 + + // Special events + sysFSIGNORED = 0x8000 + sysFSQOVERFLOW = 0x4000 +) + +func newEvent(name string, mask uint32) Event { + e := Event{Name: name} + if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO { + e.Op |= Create + } + if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF { + e.Op |= Remove + } + if mask&sysFSMODIFY == sysFSMODIFY { + e.Op |= Write + } + if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM { + e.Op |= Rename + } + if mask&sysFSATTRIB == sysFSATTRIB { + e.Op |= Chmod + } + return e +} + +const ( + opAddWatch = iota + opRemoveWatch +) + +const ( + provisional uint64 = 1 << (32 + iota) +) + +type input struct { + op int + path string + flags uint32 + reply chan error +} + +type inode struct { + handle syscall.Handle + volume uint32 + index uint64 +} + +type watch struct { + ov syscall.Overlapped + ino *inode // i-number + path string // Directory path + mask uint64 // Directory itself is being watched with these notify flags + names map[string]uint64 // Map of names being watched and their notify flags + rename string // Remembers the old name while renaming a file + buf [4096]byte +} + +type indexMap map[uint64]*watch +type watchMap map[uint32]indexMap + +func (w *Watcher) wakeupReader() error { + e := syscall.PostQueuedCompletionStatus(w.port, 0, 0, nil) + if e != nil { + return os.NewSyscallError("PostQueuedCompletionStatus", e) + } + return nil +} + +func getDir(pathname string) (dir string, err error) { + attr, e := syscall.GetFileAttributes(syscall.StringToUTF16Ptr(pathname)) + if e != nil { + return "", os.NewSyscallError("GetFileAttributes", e) + } + if attr&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 { + dir = pathname + } else { + dir, _ = filepath.Split(pathname) + dir = filepath.Clean(dir) + } + return +} + +func getIno(path string) (ino *inode, err error) { + h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(path), + syscall.FILE_LIST_DIRECTORY, + syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE, + nil, syscall.OPEN_EXISTING, + syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OVERLAPPED, 0) + if e != nil { + return nil, os.NewSyscallError("CreateFile", e) + } + var fi syscall.ByHandleFileInformation + if e = syscall.GetFileInformationByHandle(h, &fi); e != nil { + syscall.CloseHandle(h) + return nil, os.NewSyscallError("GetFileInformationByHandle", e) + } + ino = &inode{ + handle: h, + volume: fi.VolumeSerialNumber, + index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow), + } + return ino, nil +} + +// Must run within the I/O thread. +func (m watchMap) get(ino *inode) *watch { + if i := m[ino.volume]; i != nil { + return i[ino.index] + } + return nil +} + +// Must run within the I/O thread. +func (m watchMap) set(ino *inode, watch *watch) { + i := m[ino.volume] + if i == nil { + i = make(indexMap) + m[ino.volume] = i + } + i[ino.index] = watch +} + +// Must run within the I/O thread. +func (w *Watcher) addWatch(pathname string, flags uint64) error { + dir, err := getDir(pathname) + if err != nil { + return err + } + if flags&sysFSONLYDIR != 0 && pathname != dir { + return nil + } + ino, err := getIno(dir) + if err != nil { + return err + } + w.mu.Lock() + watchEntry := w.watches.get(ino) + w.mu.Unlock() + if watchEntry == nil { + if _, e := syscall.CreateIoCompletionPort(ino.handle, w.port, 0, 0); e != nil { + syscall.CloseHandle(ino.handle) + return os.NewSyscallError("CreateIoCompletionPort", e) + } + watchEntry = &watch{ + ino: ino, + path: dir, + names: make(map[string]uint64), + } + w.mu.Lock() + w.watches.set(ino, watchEntry) + w.mu.Unlock() + flags |= provisional + } else { + syscall.CloseHandle(ino.handle) + } + if pathname == dir { + watchEntry.mask |= flags + } else { + watchEntry.names[filepath.Base(pathname)] |= flags + } + if err = w.startRead(watchEntry); err != nil { + return err + } + if pathname == dir { + watchEntry.mask &= ^provisional + } else { + watchEntry.names[filepath.Base(pathname)] &= ^provisional + } + return nil +} + +// Must run within the I/O thread. +func (w *Watcher) remWatch(pathname string) error { + dir, err := getDir(pathname) + if err != nil { + return err + } + ino, err := getIno(dir) + if err != nil { + return err + } + w.mu.Lock() + watch := w.watches.get(ino) + w.mu.Unlock() + if watch == nil { + return fmt.Errorf("can't remove non-existent watch for: %s", pathname) + } + if pathname == dir { + w.sendEvent(watch.path, watch.mask&sysFSIGNORED) + watch.mask = 0 + } else { + name := filepath.Base(pathname) + w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED) + delete(watch.names, name) + } + return w.startRead(watch) +} + +// Must run within the I/O thread. +func (w *Watcher) deleteWatch(watch *watch) { + for name, mask := range watch.names { + if mask&provisional == 0 { + w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED) + } + delete(watch.names, name) + } + if watch.mask != 0 { + if watch.mask&provisional == 0 { + w.sendEvent(watch.path, watch.mask&sysFSIGNORED) + } + watch.mask = 0 + } +} + +// Must run within the I/O thread. +func (w *Watcher) startRead(watch *watch) error { + if e := syscall.CancelIo(watch.ino.handle); e != nil { + w.Errors <- os.NewSyscallError("CancelIo", e) + w.deleteWatch(watch) + } + mask := toWindowsFlags(watch.mask) + for _, m := range watch.names { + mask |= toWindowsFlags(m) + } + if mask == 0 { + if e := syscall.CloseHandle(watch.ino.handle); e != nil { + w.Errors <- os.NewSyscallError("CloseHandle", e) + } + w.mu.Lock() + delete(w.watches[watch.ino.volume], watch.ino.index) + w.mu.Unlock() + return nil + } + e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0], + uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0) + if e != nil { + err := os.NewSyscallError("ReadDirectoryChanges", e) + if e == syscall.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 { + // Watched directory was probably removed + if w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) { + if watch.mask&sysFSONESHOT != 0 { + watch.mask = 0 + } + } + err = nil + } + w.deleteWatch(watch) + w.startRead(watch) + return err + } + return nil +} + +// readEvents reads from the I/O completion port, converts the +// received events into Event objects and sends them via the Events channel. +// Entry point to the I/O thread. +func (w *Watcher) readEvents() { + var ( + n, key uint32 + ov *syscall.Overlapped + ) + runtime.LockOSThread() + + for { + e := syscall.GetQueuedCompletionStatus(w.port, &n, &key, &ov, syscall.INFINITE) + watch := (*watch)(unsafe.Pointer(ov)) + + if watch == nil { + select { + case ch := <-w.quit: + w.mu.Lock() + var indexes []indexMap + for _, index := range w.watches { + indexes = append(indexes, index) + } + w.mu.Unlock() + for _, index := range indexes { + for _, watch := range index { + w.deleteWatch(watch) + w.startRead(watch) + } + } + var err error + if e := syscall.CloseHandle(w.port); e != nil { + err = os.NewSyscallError("CloseHandle", e) + } + close(w.Events) + close(w.Errors) + ch <- err + return + case in := <-w.input: + switch in.op { + case opAddWatch: + in.reply <- w.addWatch(in.path, uint64(in.flags)) + case opRemoveWatch: + in.reply <- w.remWatch(in.path) + } + default: + } + continue + } + + switch e { + case syscall.ERROR_MORE_DATA: + if watch == nil { + w.Errors <- errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer") + } else { + // The i/o succeeded but the buffer is full. + // In theory we should be building up a full packet. + // In practice we can get away with just carrying on. + n = uint32(unsafe.Sizeof(watch.buf)) + } + case syscall.ERROR_ACCESS_DENIED: + // Watched directory was probably removed + w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) + w.deleteWatch(watch) + w.startRead(watch) + continue + case syscall.ERROR_OPERATION_ABORTED: + // CancelIo was called on this handle + continue + default: + w.Errors <- os.NewSyscallError("GetQueuedCompletionPort", e) + continue + case nil: + } + + var offset uint32 + for { + if n == 0 { + w.Events <- newEvent("", sysFSQOVERFLOW) + w.Errors <- errors.New("short read in readEvents()") + break + } + + // Point "raw" to the event in the buffer + raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset])) + buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName)) + name := syscall.UTF16ToString(buf[:raw.FileNameLength/2]) + fullname := filepath.Join(watch.path, name) + + var mask uint64 + switch raw.Action { + case syscall.FILE_ACTION_REMOVED: + mask = sysFSDELETESELF + case syscall.FILE_ACTION_MODIFIED: + mask = sysFSMODIFY + case syscall.FILE_ACTION_RENAMED_OLD_NAME: + watch.rename = name + case syscall.FILE_ACTION_RENAMED_NEW_NAME: + if watch.names[watch.rename] != 0 { + watch.names[name] |= watch.names[watch.rename] + delete(watch.names, watch.rename) + mask = sysFSMOVESELF + } + } + + sendNameEvent := func() { + if w.sendEvent(fullname, watch.names[name]&mask) { + if watch.names[name]&sysFSONESHOT != 0 { + delete(watch.names, name) + } + } + } + if raw.Action != syscall.FILE_ACTION_RENAMED_NEW_NAME { + sendNameEvent() + } + if raw.Action == syscall.FILE_ACTION_REMOVED { + w.sendEvent(fullname, watch.names[name]&sysFSIGNORED) + delete(watch.names, name) + } + if w.sendEvent(fullname, watch.mask&toFSnotifyFlags(raw.Action)) { + if watch.mask&sysFSONESHOT != 0 { + watch.mask = 0 + } + } + if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME { + fullname = filepath.Join(watch.path, watch.rename) + sendNameEvent() + } + + // Move to the next event in the buffer + if raw.NextEntryOffset == 0 { + break + } + offset += raw.NextEntryOffset + + // Error! + if offset >= n { + w.Errors <- errors.New("Windows system assumed buffer larger than it is, events have likely been missed.") + break + } + } + + if err := w.startRead(watch); err != nil { + w.Errors <- err + } + } +} + +func (w *Watcher) sendEvent(name string, mask uint64) bool { + if mask == 0 { + return false + } + event := newEvent(name, uint32(mask)) + select { + case ch := <-w.quit: + w.quit <- ch + case w.Events <- event: + } + return true +} + +func toWindowsFlags(mask uint64) uint32 { + var m uint32 + if mask&sysFSACCESS != 0 { + m |= syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS + } + if mask&sysFSMODIFY != 0 { + m |= syscall.FILE_NOTIFY_CHANGE_LAST_WRITE + } + if mask&sysFSATTRIB != 0 { + m |= syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES + } + if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 { + m |= syscall.FILE_NOTIFY_CHANGE_FILE_NAME | syscall.FILE_NOTIFY_CHANGE_DIR_NAME + } + return m +} + +func toFSnotifyFlags(action uint32) uint64 { + switch action { + case syscall.FILE_ACTION_ADDED: + return sysFSCREATE + case syscall.FILE_ACTION_REMOVED: + return sysFSDELETE + case syscall.FILE_ACTION_MODIFIED: + return sysFSMODIFY + case syscall.FILE_ACTION_RENAMED_OLD_NAME: + return sysFSMOVEDFROM + case syscall.FILE_ACTION_RENAMED_NEW_NAME: + return sysFSMOVEDTO + } + return 0 +} diff --git a/vendor/github.com/lunixbochs/struc/field.go b/vendor/github.com/lunixbochs/struc/field.go index 4af10a7..5ab7da6 100644 --- a/vendor/github.com/lunixbochs/struc/field.go +++ b/vendor/github.com/lunixbochs/struc/field.go @@ -10,7 +10,6 @@ import ( type Field struct { Name string - CanSet bool Ptr bool Index int Type Type diff --git a/vendor/github.com/lunixbochs/struc/fields.go b/vendor/github.com/lunixbochs/struc/fields.go index 80e2045..5d591bf 100644 --- a/vendor/github.com/lunixbochs/struc/fields.go +++ b/vendor/github.com/lunixbochs/struc/fields.go @@ -12,14 +12,18 @@ type Fields []*Field func (f Fields) SetByteOrder(order binary.ByteOrder) { for _, field := range f { - field.Order = order + if field != nil { + field.Order = order + } } } func (f Fields) String() string { fields := make([]string, len(f)) for i, field := range f { - fields[i] = field.String() + if field != nil { + fields[i] = field.String() + } } return "{" + strings.Join(fields, ", ") + "}" } @@ -30,9 +34,8 @@ func (f Fields) Sizeof(val reflect.Value, options *Options) int { } size := 0 for i, field := range f { - v := val.Field(i) - if v.CanSet() { - size += field.Size(v, options) + if field != nil { + size += field.Size(val.Field(i), options) } } return size @@ -63,7 +66,7 @@ func (f Fields) Pack(buf []byte, val reflect.Value, options *Options) (int, erro } pos := 0 for i, field := range f { - if !field.CanSet { + if field == nil { continue } v := val.Field(i) @@ -106,7 +109,7 @@ func (f Fields) Unpack(r io.Reader, val reflect.Value, options *Options) error { var tmp [8]byte var buf []byte for i, field := range f { - if !field.CanSet { + if field == nil { continue } v := val.Field(i) diff --git a/vendor/github.com/lunixbochs/struc/parse.go b/vendor/github.com/lunixbochs/struc/parse.go index 5a30d53..060f43d 100644 --- a/vendor/github.com/lunixbochs/struc/parse.go +++ b/vendor/github.com/lunixbochs/struc/parse.go @@ -13,12 +13,11 @@ import ( // struc:"int32,big,sizeof=Data" -var tagWordsRe = regexp.MustCompile(`(\[|\b)[^"]+\b+$`) - type strucTag struct { Type string Order binary.ByteOrder Sizeof string + Skip bool } func parseStrucTag(tag reflect.StructTag) *strucTag { @@ -40,6 +39,8 @@ func parseStrucTag(tag reflect.StructTag) *strucTag { t.Order = binary.BigEndian } else if s == "little" { t.Order = binary.LittleEndian + } else if s == "skip" { + t.Skip = true } else { t.Type = s } @@ -49,8 +50,8 @@ func parseStrucTag(tag reflect.StructTag) *strucTag { var typeLenRe = regexp.MustCompile(`^\[(\d*)\]`) -func parseField(f reflect.StructField) (fd *Field, err error) { - tag := parseStrucTag(f.Tag) +func parseField(f reflect.StructField) (fd *Field, tag *strucTag, err error) { + tag = parseStrucTag(f.Tag) var ok bool fd = &Field{ Name: f.Name, @@ -124,19 +125,20 @@ func parseFieldsLocked(v reflect.Value) (Fields, error) { return nil, errors.New("struc: Struct has no fields.") } sizeofMap := make(map[string][]int) - fields := make(Fields, 0, v.NumField()) + fields := make(Fields, v.NumField()) for i := 0; i < t.NumField(); i++ { field := t.Field(i) - f, err := parseField(field) + f, tag, err := parseField(field) + if tag.Skip { + continue + } if err != nil { return nil, err } - f.CanSet = v.Field(i).CanSet() - if !f.CanSet { + if !v.Field(i).CanSet() { continue } f.Index = i - tag := parseStrucTag(field.Tag) if tag.Sizeof != "" { target, ok := t.FieldByName(tag.Sizeof) if !ok { @@ -166,7 +168,7 @@ func parseFieldsLocked(v reflect.Value) (Fields, error) { return nil, err } } - fields = append(fields, f) + fields[i] = f } return fields, nil } diff --git a/vendor/github.com/lunixbochs/struc/struc_test.go b/vendor/github.com/lunixbochs/struc/struc_test.go index 939c3e3..4b50707 100644 --- a/vendor/github.com/lunixbochs/struc/struc_test.go +++ b/vendor/github.com/lunixbochs/struc/struc_test.go @@ -55,6 +55,8 @@ type Example struct { NestedSize int `struc:"sizeof=NestedA"` // 00 00 00 02 NestedA []Nested // [00 00 00 03, 00 00 00 04] + Skip int `struc:"skip"` + CustomTypeSize Int3 `struc:"sizeof=CustomTypeSizeArr"` // 00 00 00 04 CustomTypeSizeArr []byte // "ABCD" } @@ -71,6 +73,7 @@ var reference = &Example{ 4, []byte("5678"), Nested{1}, &Nested{2}, &five, 6, []Nested{{3}, {4}, {5}, {6}, {7}, {8}}, + 0, Int3(4), []byte("ABCD"), } diff --git a/vendor/github.com/pkg/profile/.travis.yml b/vendor/github.com/pkg/profile/.travis.yml new file mode 100644 index 0000000..192c5c2 --- /dev/null +++ b/vendor/github.com/pkg/profile/.travis.yml @@ -0,0 +1,11 @@ +language: go +go_import_path: github.com/pkg/profile +go: + - 1.4.3 + - 1.5.2 + - 1.6.3 + - tip + +script: + - go test github.com/pkg/profile + - go test -race github.com/pkg/profile diff --git a/vendor/github.com/pkg/profile/AUTHORS b/vendor/github.com/pkg/profile/AUTHORS new file mode 100644 index 0000000..00441d3 --- /dev/null +++ b/vendor/github.com/pkg/profile/AUTHORS @@ -0,0 +1 @@ +Dave Cheney diff --git a/vendor/github.com/pkg/profile/LICENSE b/vendor/github.com/pkg/profile/LICENSE new file mode 100644 index 0000000..f747a84 --- /dev/null +++ b/vendor/github.com/pkg/profile/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2013 Dave Cheney. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pkg/profile/README.md b/vendor/github.com/pkg/profile/README.md new file mode 100644 index 0000000..37bfa58 --- /dev/null +++ b/vendor/github.com/pkg/profile/README.md @@ -0,0 +1,54 @@ +profile +======= + +Simple profiling support package for Go + +[![Build Status](https://travis-ci.org/pkg/profile.svg?branch=master)](https://travis-ci.org/pkg/profile) [![GoDoc](http://godoc.org/github.com/pkg/profile?status.svg)](http://godoc.org/github.com/pkg/profile) + + +installation +------------ + + go get github.com/pkg/profile + +usage +----- + +Enabling profiling in your application is as simple as one line at the top of your main function + +```go +import "github.com/pkg/profile" + +func main() { + defer profile.Start().Stop() + ... +} +``` + +options +------- + +What to profile is controlled by config value passed to profile.Start. +By default CPU profiling is enabled. + +```go +import "github.com/pkg/profile" + +func main() { + // p.Stop() must be called before the program exits to + // ensure profiling information is written to disk. + p := profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook) + ... +} +``` + +Several convenience package level values are provided for cpu, memory, and block (contention) profiling. + +For more complex options, consult the [documentation](http://godoc.org/github.com/pkg/profile). + +contributing +------------ + +We welcome pull requests, bug fixes and issue reports. + +Before proposing a change, please discuss it first by raising an issue. diff --git a/vendor/github.com/pkg/profile/example_test.go b/vendor/github.com/pkg/profile/example_test.go new file mode 100644 index 0000000..98a54b5 --- /dev/null +++ b/vendor/github.com/pkg/profile/example_test.go @@ -0,0 +1,58 @@ +package profile_test + +import ( + "flag" + "os" + + "github.com/pkg/profile" +) + +func ExampleStart() { + // start a simple CPU profile and register + // a defer to Stop (flush) the profiling data. + defer profile.Start().Stop() +} + +func ExampleCPUProfile() { + // CPU profiling is the default profiling mode, but you can specify it + // explicitly for completeness. + defer profile.Start(profile.CPUProfile).Stop() +} + +func ExampleMemProfile() { + // use memory profiling, rather than the default cpu profiling. + defer profile.Start(profile.MemProfile).Stop() +} + +func ExampleMemProfileRate() { + // use memory profiling with custom rate. + defer profile.Start(profile.MemProfileRate(2048)).Stop() +} + +func ExampleProfilePath() { + // set the location that the profile will be written to + defer profile.Start(profile.ProfilePath(os.Getenv("HOME"))).Stop() +} + +func ExampleNoShutdownHook() { + // disable the automatic shutdown hook. + defer profile.Start(profile.NoShutdownHook).Stop() +} + +func ExampleStart_withFlags() { + // use the flags package to selectively enable profiling. + mode := flag.String("profile.mode", "", "enable profiling mode, one of [cpu, mem, mutex, block]") + flag.Parse() + switch *mode { + case "cpu": + defer profile.Start(profile.CPUProfile).Stop() + case "mem": + defer profile.Start(profile.MemProfile).Stop() + case "mutex": + defer profile.Start(profile.MutexProfile).Stop() + case "block": + defer profile.Start(profile.BlockProfile).Stop() + default: + // do nothing + } +} diff --git a/vendor/github.com/pkg/profile/mutex.go b/vendor/github.com/pkg/profile/mutex.go new file mode 100644 index 0000000..e69c5b4 --- /dev/null +++ b/vendor/github.com/pkg/profile/mutex.go @@ -0,0 +1,13 @@ +// +build go1.8 + +package profile + +import "runtime" + +func enableMutexProfile() { + runtime.SetMutexProfileFraction(1) +} + +func disableMutexProfile() { + runtime.SetMutexProfileFraction(0) +} diff --git a/vendor/github.com/pkg/profile/mutex17.go b/vendor/github.com/pkg/profile/mutex17.go new file mode 100644 index 0000000..b004c21 --- /dev/null +++ b/vendor/github.com/pkg/profile/mutex17.go @@ -0,0 +1,9 @@ +// +build !go1.8 + +package profile + +// mock mutex support for Go 1.7 and earlier. + +func enableMutexProfile() {} + +func disableMutexProfile() {} diff --git a/vendor/github.com/pkg/profile/profile.go b/vendor/github.com/pkg/profile/profile.go new file mode 100644 index 0000000..c44913a --- /dev/null +++ b/vendor/github.com/pkg/profile/profile.go @@ -0,0 +1,244 @@ +// Package profile provides a simple way to manage runtime/pprof +// profiling of your Go application. +package profile + +import ( + "io/ioutil" + "log" + "os" + "os/signal" + "path/filepath" + "runtime" + "runtime/pprof" + "sync/atomic" +) + +const ( + cpuMode = iota + memMode + mutexMode + blockMode + traceMode +) + +// Profile represents an active profiling session. +type Profile struct { + // quiet suppresses informational messages during profiling. + quiet bool + + // noShutdownHook controls whether the profiling package should + // hook SIGINT to write profiles cleanly. + noShutdownHook bool + + // mode holds the type of profiling that will be made + mode int + + // path holds the base path where various profiling files are written. + // If blank, the base path will be generated by ioutil.TempDir. + path string + + // memProfileRate holds the rate for the memory profile. + memProfileRate int + + // closer holds a cleanup function that run after each profile + closer func() + + // stopped records if a call to profile.Stop has been made + stopped uint32 +} + +// NoShutdownHook controls whether the profiling package should +// hook SIGINT to write profiles cleanly. +// Programs with more sophisticated signal handling should set +// this to true and ensure the Stop() function returned from Start() +// is called during shutdown. +func NoShutdownHook(p *Profile) { p.noShutdownHook = true } + +// Quiet suppresses informational messages during profiling. +func Quiet(p *Profile) { p.quiet = true } + +// CPUProfile enables cpu profiling. +// It disables any previous profiling settings. +func CPUProfile(p *Profile) { p.mode = cpuMode } + +// DefaultMemProfileRate is the default memory profiling rate. +// See also http://golang.org/pkg/runtime/#pkg-variables +const DefaultMemProfileRate = 4096 + +// MemProfile enables memory profiling. +// It disables any previous profiling settings. +func MemProfile(p *Profile) { + p.memProfileRate = DefaultMemProfileRate + p.mode = memMode +} + +// MemProfileRate enables memory profiling at the preferred rate. +// It disables any previous profiling settings. +func MemProfileRate(rate int) func(*Profile) { + return func(p *Profile) { + p.memProfileRate = rate + p.mode = memMode + } +} + +// MutexProfile enables mutex profiling. +// It disables any previous profiling settings. +// +// Mutex profiling is a no-op before go1.8. +func MutexProfile(p *Profile) { p.mode = mutexMode } + +// BlockProfile enables block (contention) profiling. +// It disables any previous profiling settings. +func BlockProfile(p *Profile) { p.mode = blockMode } + +// Trace profile controls if execution tracing will be enabled. It disables any previous profiling settings. +func TraceProfile(p *Profile) { p.mode = traceMode } + +// ProfilePath controls the base path where various profiling +// files are written. If blank, the base path will be generated +// by ioutil.TempDir. +func ProfilePath(path string) func(*Profile) { + return func(p *Profile) { + p.path = path + } +} + +// Stop stops the profile and flushes any unwritten data. +func (p *Profile) Stop() { + if !atomic.CompareAndSwapUint32(&p.stopped, 0, 1) { + // someone has already called close + return + } + p.closer() + atomic.StoreUint32(&started, 0) +} + +// started is non zero if a profile is running. +var started uint32 + +// Start starts a new profiling session. +// The caller should call the Stop method on the value returned +// to cleanly stop profiling. +func Start(options ...func(*Profile)) interface { + Stop() +} { + if !atomic.CompareAndSwapUint32(&started, 0, 1) { + log.Fatal("profile: Start() already called") + } + + var prof Profile + for _, option := range options { + option(&prof) + } + + path, err := func() (string, error) { + if p := prof.path; p != "" { + return p, os.MkdirAll(p, 0777) + } + return ioutil.TempDir("", "profile") + }() + + if err != nil { + log.Fatalf("profile: could not create initial output directory: %v", err) + } + + logf := func(format string, args ...interface{}) { + if !prof.quiet { + log.Printf(format, args...) + } + } + + switch prof.mode { + case cpuMode: + fn := filepath.Join(path, "cpu.pprof") + f, err := os.Create(fn) + if err != nil { + log.Fatalf("profile: could not create cpu profile %q: %v", fn, err) + } + logf("profile: cpu profiling enabled, %s", fn) + pprof.StartCPUProfile(f) + prof.closer = func() { + pprof.StopCPUProfile() + f.Close() + logf("profile: cpu profiling disabled, %s", fn) + } + + case memMode: + fn := filepath.Join(path, "mem.pprof") + f, err := os.Create(fn) + if err != nil { + log.Fatalf("profile: could not create memory profile %q: %v", fn, err) + } + old := runtime.MemProfileRate + runtime.MemProfileRate = prof.memProfileRate + logf("profile: memory profiling enabled (rate %d), %s", runtime.MemProfileRate, fn) + prof.closer = func() { + pprof.Lookup("heap").WriteTo(f, 0) + f.Close() + runtime.MemProfileRate = old + logf("profile: memory profiling disabled, %s", fn) + } + + case mutexMode: + fn := filepath.Join(path, "mutex.pprof") + f, err := os.Create(fn) + if err != nil { + log.Fatalf("profile: could not create mutex profile %q: %v", fn, err) + } + enableMutexProfile() + logf("profile: mutex profiling enabled, %s", fn) + prof.closer = func() { + if mp := pprof.Lookup("mutex"); mp != nil { + mp.WriteTo(f, 0) + } + f.Close() + disableMutexProfile() + logf("profile: mutex profiling disabled, %s", fn) + } + + case blockMode: + fn := filepath.Join(path, "block.pprof") + f, err := os.Create(fn) + if err != nil { + log.Fatalf("profile: could not create block profile %q: %v", fn, err) + } + runtime.SetBlockProfileRate(1) + logf("profile: block profiling enabled, %s", fn) + prof.closer = func() { + pprof.Lookup("block").WriteTo(f, 0) + f.Close() + runtime.SetBlockProfileRate(0) + logf("profile: block profiling disabled, %s", fn) + } + + case traceMode: + fn := filepath.Join(path, "trace.out") + f, err := os.Create(fn) + if err != nil { + log.Fatalf("profile: could not create trace output file %q: %v", fn, err) + } + if err := startTrace(f); err != nil { + log.Fatalf("profile: could not start trace: %v", err) + } + logf("profile: trace enabled, %s", fn) + prof.closer = func() { + stopTrace() + logf("profile: trace disabled, %s", fn) + } + } + + if !prof.noShutdownHook { + go func() { + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt) + <-c + + log.Println("profile: caught interrupt, stopping profiles") + prof.Stop() + + os.Exit(0) + }() + } + + return &prof +} diff --git a/vendor/github.com/pkg/profile/profile_test.go b/vendor/github.com/pkg/profile/profile_test.go new file mode 100644 index 0000000..e33012c --- /dev/null +++ b/vendor/github.com/pkg/profile/profile_test.go @@ -0,0 +1,330 @@ +package profile + +import ( + "bufio" + "bytes" + "io" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" +) + +type checkFn func(t *testing.T, stdout, stderr []byte, err error) + +func TestProfile(t *testing.T) { + f, err := ioutil.TempFile("", "profile_test") + if err != nil { + t.Fatal(err) + } + defer os.Remove(f.Name()) + + var profileTests = []struct { + name string + code string + checks []checkFn + }{{ + name: "default profile (cpu)", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start().Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: cpu profiling enabled"), + NoErr, + }, + }, { + name: "memory profile", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.MemProfile).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: memory profiling enabled"), + NoErr, + }, + }, { + name: "memory profile (rate 2048)", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.MemProfileRate(2048)).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: memory profiling enabled (rate 2048)"), + NoErr, + }, + }, { + name: "double start", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + profile.Start() + profile.Start() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("cpu profiling enabled", "profile: Start() already called"), + Err, + }, + }, { + name: "block profile", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.BlockProfile).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: block profiling enabled"), + NoErr, + }, + }, { + name: "mutex profile", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.MutexProfile).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: mutex profiling enabled"), + NoErr, + }, + }, { + name: "profile path", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.ProfilePath(".")).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: cpu profiling enabled, cpu.pprof"), + NoErr, + }, + }, { + name: "profile path error", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.ProfilePath("` + f.Name() + `")).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("could not create initial output"), + Err, + }, + }, { + name: "multiple profile sessions", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + profile.Start(profile.CPUProfile).Stop() + profile.Start(profile.MemProfile).Stop() + profile.Start(profile.BlockProfile).Stop() + profile.Start(profile.CPUProfile).Stop() + profile.Start(profile.MutexProfile).Stop() +} +`, + checks: []checkFn{ + NoStdout, + Stderr("profile: cpu profiling enabled", + "profile: cpu profiling disabled", + "profile: memory profiling enabled", + "profile: memory profiling disabled", + "profile: block profiling enabled", + "profile: block profiling disabled", + "profile: cpu profiling enabled", + "profile: cpu profiling disabled", + "profile: mutex profiling enabled", + "profile: mutex profiling disabled"), + NoErr, + }, + }, { + name: "profile quiet", + code: ` +package main + +import "github.com/pkg/profile" + +func main() { + defer profile.Start(profile.Quiet).Stop() +} +`, + checks: []checkFn{NoStdout, NoStderr, NoErr}, + }} + for _, tt := range profileTests { + t.Log(tt.name) + stdout, stderr, err := runTest(t, tt.code) + for _, f := range tt.checks { + f(t, stdout, stderr, err) + } + } +} + +// NoStdout checks that stdout was blank. +func NoStdout(t *testing.T, stdout, _ []byte, _ error) { + if len := len(stdout); len > 0 { + t.Errorf("stdout: wanted 0 bytes, got %d", len) + } +} + +// Stderr verifies that the given lines match the output from stderr +func Stderr(lines ...string) checkFn { + return func(t *testing.T, _, stderr []byte, _ error) { + r := bytes.NewReader(stderr) + if !validateOutput(r, lines) { + t.Errorf("stderr: wanted '%s', got '%s'", lines, stderr) + } + } +} + +// NoStderr checks that stderr was blank. +func NoStderr(t *testing.T, _, stderr []byte, _ error) { + if len := len(stderr); len > 0 { + t.Errorf("stderr: wanted 0 bytes, got %d", len) + } +} + +// Err checks that there was an error returned +func Err(t *testing.T, _, _ []byte, err error) { + if err == nil { + t.Errorf("expected error") + } +} + +// NoErr checks that err was nil +func NoErr(t *testing.T, _, _ []byte, err error) { + if err != nil { + t.Errorf("error: expected nil, got %v", err) + } +} + +// validatedOutput validates the given slice of lines against data from the given reader. +func validateOutput(r io.Reader, want []string) bool { + s := bufio.NewScanner(r) + for _, line := range want { + if !s.Scan() || !strings.Contains(s.Text(), line) { + return false + } + } + return true +} + +var validateOutputTests = []struct { + input string + lines []string + want bool +}{{ + input: "", + want: true, +}, { + input: `profile: yes +`, + want: true, +}, { + input: `profile: yes +`, + lines: []string{"profile: yes"}, + want: true, +}, { + input: `profile: yes +profile: no +`, + lines: []string{"profile: yes"}, + want: true, +}, { + input: `profile: yes +profile: no +`, + lines: []string{"profile: yes", "profile: no"}, + want: true, +}, { + input: `profile: yes +profile: no +`, + lines: []string{"profile: no"}, + want: false, +}} + +func TestValidateOutput(t *testing.T) { + for _, tt := range validateOutputTests { + r := strings.NewReader(tt.input) + got := validateOutput(r, tt.lines) + if tt.want != got { + t.Errorf("validateOutput(%q, %q), want %v, got %v", tt.input, tt.lines, tt.want, got) + } + } +} + +// runTest executes the go program supplied and returns the contents of stdout, +// stderr, and an error which may contain status information about the result +// of the program. +func runTest(t *testing.T, code string) ([]byte, []byte, error) { + chk := func(err error) { + if err != nil { + t.Fatal(err) + } + } + gopath, err := ioutil.TempDir("", "profile-gopath") + chk(err) + defer os.RemoveAll(gopath) + + srcdir := filepath.Join(gopath, "src") + err = os.Mkdir(srcdir, 0755) + chk(err) + src := filepath.Join(srcdir, "main.go") + err = ioutil.WriteFile(src, []byte(code), 0644) + chk(err) + + cmd := exec.Command("go", "run", src) + + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err = cmd.Run() + return stdout.Bytes(), stderr.Bytes(), err +} diff --git a/vendor/github.com/pkg/profile/trace.go b/vendor/github.com/pkg/profile/trace.go new file mode 100644 index 0000000..b349ed8 --- /dev/null +++ b/vendor/github.com/pkg/profile/trace.go @@ -0,0 +1,8 @@ +// +build go1.7 + +package profile + +import "runtime/trace" + +var startTrace = trace.Start +var stopTrace = trace.Stop diff --git a/vendor/github.com/pkg/profile/trace16.go b/vendor/github.com/pkg/profile/trace16.go new file mode 100644 index 0000000..6aa6566 --- /dev/null +++ b/vendor/github.com/pkg/profile/trace16.go @@ -0,0 +1,10 @@ +// +build !go1.7 + +package profile + +import "io" + +// mock trace support for Go 1.6 and earlier. + +func startTrace(w io.Writer) error { return nil } +func stopTrace() {} diff --git a/vendor/github.com/pkg/profile/trace_test.go b/vendor/github.com/pkg/profile/trace_test.go new file mode 100644 index 0000000..6a61d79 --- /dev/null +++ b/vendor/github.com/pkg/profile/trace_test.go @@ -0,0 +1,8 @@ +package profile_test + +import "github.com/pkg/profile" + +func ExampleTraceProfile() { + // use execution tracing, rather than the default cpu profiling. + defer profile.Start(profile.TraceProfile).Stop() +} diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md deleted file mode 100644 index bc6f603..0000000 --- a/vendor/golang.org/x/sys/unix/README.md +++ /dev/null @@ -1,173 +0,0 @@ -# Building `sys/unix` - -The sys/unix package provides access to the raw system call interface of the -underlying operating system. See: https://godoc.org/golang.org/x/sys/unix - -Porting Go to a new architecture/OS combination or adding syscalls, types, or -constants to an existing architecture/OS pair requires some manual effort; -however, there are tools that automate much of the process. - -## Build Systems - -There are currently two ways we generate the necessary files. We are currently -migrating the build system to use containers so the builds are reproducible. -This is being done on an OS-by-OS basis. Please update this documentation as -components of the build system change. - -### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`) - -The old build system generates the Go files based on the C header files -present on your system. This means that files -for a given GOOS/GOARCH pair must be generated on a system with that OS and -architecture. This also means that the generated code can differ from system -to system, based on differences in the header files. - -To avoid this, if you are using the old build system, only generate the Go -files on an installation with unmodified header files. It is also important to -keep track of which version of the OS the files were generated from (ex. -Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes -and have each OS upgrade correspond to a single change. - -To build the files for your current OS and architecture, make sure GOOS and -GOARCH are set correctly and run `mkall.sh`. This will generate the files for -your specific system. Running `mkall.sh -n` shows the commands that will be run. - -Requirements: bash, perl, go - -### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`) - -The new build system uses a Docker container to generate the go files directly -from source checkouts of the kernel and various system libraries. This means -that on any platform that supports Docker, all the files using the new build -system can be generated at once, and generated files will not change based on -what the person running the scripts has installed on their computer. - -The OS specific files for the new build system are located in the `${GOOS}` -directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When -the kernel or system library updates, modify the Dockerfile at -`${GOOS}/Dockerfile` to checkout the new release of the source. - -To build all the files under the new build system, you must be on an amd64/Linux -system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will -then generate all of the files for all of the GOOS/GOARCH pairs in the new build -system. Running `mkall.sh -n` shows the commands that will be run. - -Requirements: bash, perl, go, docker - -## Component files - -This section describes the various files used in the code generation process. -It also contains instructions on how to modify these files to add a new -architecture/OS or to add additional syscalls, types, or constants. Note that -if you are using the new build system, the scripts cannot be called normally. -They must be called from within the docker container. - -### asm files - -The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system -call dispatch. There are three entry points: -``` - func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) - func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) - func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) -``` -The first and second are the standard ones; they differ only in how many -arguments can be passed to the kernel. The third is for low-level use by the -ForkExec wrapper. Unlike the first two, it does not call into the scheduler to -let it know that a system call is running. - -When porting Go to an new architecture/OS, this file must be implemented for -each GOOS/GOARCH pair. - -### mksysnum - -Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl` -for the old system). This script takes in a list of header files containing the -syscall number declarations and parses them to produce the corresponding list of -Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated -constants. - -Adding new syscall numbers is mostly done by running the build on a sufficiently -new installation of the target OS (or updating the source checkouts for the -new build system). However, depending on the OS, you make need to update the -parsing in mksysnum. - -### mksyscall.pl - -The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are -hand-written Go files which implement system calls (for unix, the specific OS, -or the specific OS/Architecture pair respectively) that need special handling -and list `//sys` comments giving prototypes for ones that can be generated. - -The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts -them into syscalls. This requires the name of the prototype in the comment to -match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function -prototype can be exported (capitalized) or not. - -Adding a new syscall often just requires adding a new `//sys` function prototype -with the desired arguments and a capitalized name so it is exported. However, if -you want the interface to the syscall to be different, often one will make an -unexported `//sys` prototype, an then write a custom wrapper in -`syscall_${GOOS}.go`. - -### types files - -For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or -`types_${GOOS}.go` on the old system). This file includes standard C headers and -creates Go type aliases to the corresponding C types. The file is then fed -through godef to get the Go compatible definitions. Finally, the generated code -is fed though mkpost.go to format the code correctly and remove any hidden or -private identifiers. This cleaned-up code is written to -`ztypes_${GOOS}_${GOARCH}.go`. - -The hardest part about preparing this file is figuring out which headers to -include and which symbols need to be `#define`d to get the actual data -structures that pass through to the kernel system calls. Some C libraries -preset alternate versions for binary compatibility and translate them on the -way in and out of system calls, but there is almost always a `#define` that can -get the real ones. -See `types_darwin.go` and `linux/types.go` for examples. - -To add a new type, add in the necessary include statement at the top of the -file (if it is not already there) and add in a type alias line. Note that if -your type is significantly different on different architectures, you may need -some `#if/#elif` macros in your include statements. - -### mkerrors.sh - -This script is used to generate the system's various constants. This doesn't -just include the error numbers and error strings, but also the signal numbers -an a wide variety of miscellaneous constants. The constants come from the list -of include files in the `includes_${uname}` variable. A regex then picks out -the desired `#define` statements, and generates the corresponding Go constants. -The error numbers and strings are generated from `#include `, and the -signal numbers and strings are generated from `#include `. All of -these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program, -`_errors.c`, which prints out all the constants. - -To add a constant, add the header that includes it to the appropriate variable. -Then, edit the regex (if necessary) to match the desired constant. Avoid making -the regex too broad to avoid matching unintended constants. - - -## Generated files - -### `zerror_${GOOS}_${GOARCH}.go` - -A file containing all of the system's generated error numbers, error strings, -signal numbers, and constants. Generated by `mkerrors.sh` (see above). - -### `zsyscall_${GOOS}_${GOARCH}.go` - -A file containing all the generated syscalls for a specific GOOS and GOARCH. -Generated by `mksyscall.pl` (see above). - -### `zsysnum_${GOOS}_${GOARCH}.go` - -A list of numeric constants for all the syscall number of the specific GOOS -and GOARCH. Generated by mksysnum (see above). - -### `ztypes_${GOOS}_${GOARCH}.go` - -A file containing Go types for passing into (or returning from) syscalls. -Generated by godefs and the types file (see above). diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go deleted file mode 100644 index bd47581..0000000 --- a/vendor/golang.org/x/sys/unix/dirent.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris - -package unix - -import "unsafe" - -// readInt returns the size-bytes unsigned integer in native byte order at offset off. -func readInt(b []byte, off, size uintptr) (u uint64, ok bool) { - if len(b) < int(off+size) { - return 0, false - } - if isBigEndian { - return readIntBE(b[off:], size), true - } - return readIntLE(b[off:], size), true -} - -func readIntBE(b []byte, size uintptr) uint64 { - switch size { - case 1: - return uint64(b[0]) - case 2: - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[1]) | uint64(b[0])<<8 - case 4: - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24 - case 8: - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 - default: - panic("syscall: readInt with unsupported size") - } -} - -func readIntLE(b []byte, size uintptr) uint64 { - switch size { - case 1: - return uint64(b[0]) - case 2: - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 - case 4: - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 - case 8: - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 - default: - panic("syscall: readInt with unsupported size") - } -} - -// ParseDirent parses up to max directory entries in buf, -// appending the names to names. It returns the number of -// bytes consumed from buf, the number of entries added -// to names, and the new names slice. -func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { - origlen := len(buf) - count = 0 - for max != 0 && len(buf) > 0 { - reclen, ok := direntReclen(buf) - if !ok || reclen > uint64(len(buf)) { - return origlen, count, names - } - rec := buf[:reclen] - buf = buf[reclen:] - ino, ok := direntIno(rec) - if !ok { - break - } - if ino == 0 { // File absent in directory. - continue - } - const namoff = uint64(unsafe.Offsetof(Dirent{}.Name)) - namlen, ok := direntNamlen(rec) - if !ok || namoff+namlen > uint64(len(rec)) { - break - } - name := rec[namoff : namoff+namlen] - for i, c := range name { - if c == 0 { - name = name[:i] - break - } - } - // Check for useless names before allocating a string. - if string(name) == "." || string(name) == ".." { - continue - } - max-- - count++ - names = append(names, string(name)) - } - return origlen - len(buf), count, names -} diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go deleted file mode 100644 index 5e92690..0000000 --- a/vendor/golang.org/x/sys/unix/endian_big.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// +build ppc64 s390x mips mips64 - -package unix - -const isBigEndian = true diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go deleted file mode 100644 index 085df2d..0000000 --- a/vendor/golang.org/x/sys/unix/endian_little.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le - -package unix - -const isBigEndian = false diff --git a/vendor/golang.org/x/sys/unix/linux/Dockerfile b/vendor/golang.org/x/sys/unix/linux/Dockerfile deleted file mode 100644 index 4397143..0000000 --- a/vendor/golang.org/x/sys/unix/linux/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM ubuntu:16.04 - -# Dependencies to get the git sources and go binaries -RUN apt-get update && apt-get install -y \ - curl \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Get the git sources. If not cached, this takes O(5 minutes). -WORKDIR /git -RUN git config --global advice.detachedHead false -# Linux Kernel: Released 19 Feb 2017 -RUN git clone --branch v4.10 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux -# GNU C library: Released 05 Feb 2017 (we should try to get a secure way to clone this) -RUN git clone --branch glibc-2.25 --depth 1 git://sourceware.org/git/glibc.git - -# Get Go 1.8 (https://github.com/docker-library/golang/blob/master/1.8/Dockerfile) -ENV GOLANG_VERSION 1.8 -ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca - -RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ - && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ - && tar -C /usr/local -xzf golang.tar.gz \ - && rm golang.tar.gz - -ENV PATH /usr/local/go/bin:$PATH - -# Linux and Glibc build dependencies -RUN apt-get update && apt-get install -y \ - gawk make python \ - gcc gcc-multilib \ - gettext texinfo \ - && rm -rf /var/lib/apt/lists/* -# Emulator and cross compilers -RUN apt-get update && apt-get install -y \ - qemu \ - gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi \ - gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \ - gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \ - gcc-powerpc64-linux-gnu gcc-powerpc64le-linux-gnu \ - gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \ - && rm -rf /var/lib/apt/lists/* - -# Let the scripts know they are in the docker environment -ENV GOLANG_SYS_BUILD docker -WORKDIR /build -ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"] diff --git a/vendor/golang.org/x/sys/unix/linux/mkall.go b/vendor/golang.org/x/sys/unix/linux/mkall.go deleted file mode 100644 index 429754f..0000000 --- a/vendor/golang.org/x/sys/unix/linux/mkall.go +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// linux/mkall.go - Generates all Linux zsysnum, zsyscall, zerror, and ztype -// files for all 11 linux architectures supported by the go compiler. See -// README.md for more information about the build system. - -// To run it you must have a git checkout of the Linux kernel and glibc. Once -// the appropriate sources are ready, the program is run as: -// go run linux/mkall.go - -// +build ignore - -package main - -import ( - "fmt" - "os" - "os/exec" - "path/filepath" - "runtime" - "strings" -) - -// These will be paths to the appropriate source directories. -var LinuxDir string -var GlibcDir string - -const TempDir = "/tmp" -const IncludeDir = TempDir + "/include" // To hold our C headers -const BuildDir = TempDir + "/build" // To hold intermediate build files - -const GOOS = "linux" // Only for Linux targets -const BuildArch = "amd64" // Must be built on this architecture -const MinKernel = "2.6.23" // https://golang.org/doc/install#requirements - -type target struct { - GoArch string // Architecture name according to Go - LinuxArch string // Architecture name according to the Linux Kernel - GNUArch string // Architecture name according to GNU tools (https://wiki.debian.org/Multiarch/Tuples) - BigEndian bool // Default Little Endian - SignedChar bool // Is -fsigned-char needed (default no) - Bits int -} - -// List of the 11 Linux targets supported by the go compiler. sparc64 is not -// currently supported, though a port is in progress. -var targets = []target{ - { - GoArch: "386", - LinuxArch: "x86", - GNUArch: "i686-linux-gnu", // Note "i686" not "i386" - Bits: 32, - }, - { - GoArch: "amd64", - LinuxArch: "x86", - GNUArch: "x86_64-linux-gnu", - Bits: 64, - }, - { - GoArch: "arm64", - LinuxArch: "arm64", - GNUArch: "aarch64-linux-gnu", - SignedChar: true, - Bits: 64, - }, - { - GoArch: "arm", - LinuxArch: "arm", - GNUArch: "arm-linux-gnueabi", - Bits: 32, - }, - { - GoArch: "mips", - LinuxArch: "mips", - GNUArch: "mips-linux-gnu", - BigEndian: true, - Bits: 32, - }, - { - GoArch: "mipsle", - LinuxArch: "mips", - GNUArch: "mipsel-linux-gnu", - Bits: 32, - }, - { - GoArch: "mips64", - LinuxArch: "mips", - GNUArch: "mips64-linux-gnuabi64", - BigEndian: true, - Bits: 64, - }, - { - GoArch: "mips64le", - LinuxArch: "mips", - GNUArch: "mips64el-linux-gnuabi64", - Bits: 64, - }, - { - GoArch: "ppc64", - LinuxArch: "powerpc", - GNUArch: "powerpc64-linux-gnu", - BigEndian: true, - Bits: 64, - }, - { - GoArch: "ppc64le", - LinuxArch: "powerpc", - GNUArch: "powerpc64le-linux-gnu", - Bits: 64, - }, - { - GoArch: "s390x", - LinuxArch: "s390", - GNUArch: "s390x-linux-gnu", - BigEndian: true, - SignedChar: true, - Bits: 64, - }, - // { - // GoArch: "sparc64", - // LinuxArch: "sparc", - // GNUArch: "sparc64-linux-gnu", - // BigEndian: true, - // Bits: 64, - // }, -} - -func main() { - if runtime.GOOS != GOOS || runtime.GOARCH != BuildArch { - fmt.Printf("Build system has GOOS_GOARCH = %s_%s, need %s_%s\n", - runtime.GOOS, runtime.GOARCH, GOOS, BuildArch) - return - } - - // Check that we are using the new build system if we should - if os.Getenv("GOLANG_SYS_BUILD") != "docker" { - fmt.Println("In the new build system, mkall.go should not be called directly.") - fmt.Println("See README.md") - return - } - - // Parse the command line options - if len(os.Args) != 3 { - fmt.Println("USAGE: go run linux/mkall.go ") - return - } - LinuxDir = os.Args[1] - GlibcDir = os.Args[2] - - for _, t := range targets { - fmt.Printf("----- GENERATING: %s -----\n", t.GoArch) - if err := t.generateFiles(); err != nil { - fmt.Printf("%v\n***** FAILURE: %s *****\n\n", err, t.GoArch) - } else { - fmt.Printf("----- SUCCESS: %s -----\n\n", t.GoArch) - } - } -} - -// Makes an exec.Cmd with Stderr attached to os.Stderr -func makeCommand(name string, args ...string) *exec.Cmd { - cmd := exec.Command(name, args...) - cmd.Stderr = os.Stderr - return cmd -} - -// Runs the command, pipes output to a formatter, pipes that to an output file. -func (t *target) commandFormatOutput(formatter string, outputFile string, - name string, args ...string) (err error) { - mainCmd := makeCommand(name, args...) - - fmtCmd := makeCommand(formatter) - if formatter == "mkpost" { - fmtCmd = makeCommand("go", "run", "mkpost.go") - // Set GOARCH_TARGET so mkpost knows what GOARCH is.. - fmtCmd.Env = append(os.Environ(), "GOARCH_TARGET="+t.GoArch) - // Set GOARCH to host arch for mkpost, so it can run natively. - for i, s := range fmtCmd.Env { - if strings.HasPrefix(s, "GOARCH=") { - fmtCmd.Env[i] = "GOARCH=" + BuildArch - } - } - } - - // mainCmd | fmtCmd > outputFile - if fmtCmd.Stdin, err = mainCmd.StdoutPipe(); err != nil { - return - } - if fmtCmd.Stdout, err = os.Create(outputFile); err != nil { - return - } - - // Make sure the formatter eventually closes - if err = fmtCmd.Start(); err != nil { - return - } - defer func() { - fmtErr := fmtCmd.Wait() - if err == nil { - err = fmtErr - } - }() - - return mainCmd.Run() -} - -// Generates all the files for a Linux target -func (t *target) generateFiles() error { - // Setup environment variables - os.Setenv("GOOS", GOOS) - os.Setenv("GOARCH", t.GoArch) - - // Get appropriate compiler and emulator (unless on x86) - if t.LinuxArch != "x86" { - // Check/Setup cross compiler - compiler := t.GNUArch + "-gcc" - if _, err := exec.LookPath(compiler); err != nil { - return err - } - os.Setenv("CC", compiler) - - // Check/Setup emulator (usually first component of GNUArch) - qemuArchName := t.GNUArch[:strings.Index(t.GNUArch, "-")] - if t.LinuxArch == "powerpc" { - qemuArchName = t.GoArch - } - os.Setenv("GORUN", "qemu-"+qemuArchName) - } else { - os.Setenv("CC", "gcc") - } - - // Make the include directory and fill it with headers - if err := os.MkdirAll(IncludeDir, os.ModePerm); err != nil { - return err - } - defer os.RemoveAll(IncludeDir) - if err := t.makeHeaders(); err != nil { - return fmt.Errorf("could not make header files: %v", err) - } - fmt.Println("header files generated") - - // Make each of the four files - if err := t.makeZSysnumFile(); err != nil { - return fmt.Errorf("could not make zsysnum file: %v", err) - } - fmt.Println("zsysnum file generated") - - if err := t.makeZSyscallFile(); err != nil { - return fmt.Errorf("could not make zsyscall file: %v", err) - } - fmt.Println("zsyscall file generated") - - if err := t.makeZTypesFile(); err != nil { - return fmt.Errorf("could not make ztypes file: %v", err) - } - fmt.Println("ztypes file generated") - - if err := t.makeZErrorsFile(); err != nil { - return fmt.Errorf("could not make zerrors file: %v", err) - } - fmt.Println("zerrors file generated") - - return nil -} - -// Create the Linux and glibc headers in the include directory. -func (t *target) makeHeaders() error { - // Make the Linux headers we need for this architecture - linuxMake := makeCommand("make", "headers_install", "ARCH="+t.LinuxArch, "INSTALL_HDR_PATH="+TempDir) - linuxMake.Dir = LinuxDir - if err := linuxMake.Run(); err != nil { - return err - } - - // A Temporary build directory for glibc - if err := os.MkdirAll(BuildDir, os.ModePerm); err != nil { - return err - } - defer os.RemoveAll(BuildDir) - - // Make the glibc headers we need for this architecture - confScript := filepath.Join(GlibcDir, "configure") - glibcConf := makeCommand(confScript, "--prefix="+TempDir, "--host="+t.GNUArch, "--enable-kernel="+MinKernel) - glibcConf.Dir = BuildDir - if err := glibcConf.Run(); err != nil { - return err - } - glibcMake := makeCommand("make", "install-headers") - glibcMake.Dir = BuildDir - if err := glibcMake.Run(); err != nil { - return err - } - // We only need an empty stubs file - stubsFile := filepath.Join(IncludeDir, "gnu/stubs.h") - if file, err := os.Create(stubsFile); err != nil { - return err - } else { - file.Close() - } - - return nil -} - -// makes the zsysnum_linux_$GOARCH.go file -func (t *target) makeZSysnumFile() error { - zsysnumFile := fmt.Sprintf("zsysnum_linux_%s.go", t.GoArch) - unistdFile := filepath.Join(IncludeDir, "asm/unistd.h") - - args := append(t.cFlags(), unistdFile) - return t.commandFormatOutput("gofmt", zsysnumFile, "linux/mksysnum.pl", args...) -} - -// makes the zsyscall_linux_$GOARCH.go file -func (t *target) makeZSyscallFile() error { - zsyscallFile := fmt.Sprintf("zsyscall_linux_%s.go", t.GoArch) - // Find the correct architecture syscall file (might end with x.go) - archSyscallFile := fmt.Sprintf("syscall_linux_%s.go", t.GoArch) - if _, err := os.Stat(archSyscallFile); os.IsNotExist(err) { - shortArch := strings.TrimSuffix(t.GoArch, "le") - archSyscallFile = fmt.Sprintf("syscall_linux_%sx.go", shortArch) - } - - args := append(t.mksyscallFlags(), "-tags", "linux,"+t.GoArch, - "syscall_linux.go", archSyscallFile) - return t.commandFormatOutput("gofmt", zsyscallFile, "./mksyscall.pl", args...) -} - -// makes the zerrors_linux_$GOARCH.go file -func (t *target) makeZErrorsFile() error { - zerrorsFile := fmt.Sprintf("zerrors_linux_%s.go", t.GoArch) - - return t.commandFormatOutput("gofmt", zerrorsFile, "./mkerrors.sh", t.cFlags()...) -} - -// makes the ztypes_linux_$GOARCH.go file -func (t *target) makeZTypesFile() error { - ztypesFile := fmt.Sprintf("ztypes_linux_%s.go", t.GoArch) - - args := []string{"tool", "cgo", "-godefs", "--"} - args = append(args, t.cFlags()...) - args = append(args, "linux/types.go") - return t.commandFormatOutput("mkpost", ztypesFile, "go", args...) -} - -// Flags that should be given to gcc and cgo for this target -func (t *target) cFlags() []string { - // Compile statically to avoid cross-architecture dynamic linking. - flags := []string{"-Wall", "-Werror", "-static", "-I" + IncludeDir} - - // Architecture-specific flags - if t.SignedChar { - flags = append(flags, "-fsigned-char") - } - if t.LinuxArch == "x86" { - flags = append(flags, fmt.Sprintf("-m%d", t.Bits)) - } - - return flags -} - -// Flags that should be given to mksyscall for this target -func (t *target) mksyscallFlags() (flags []string) { - if t.Bits == 32 { - if t.BigEndian { - flags = append(flags, "-b32") - } else { - flags = append(flags, "-l32") - } - } - - // This flag menas a 64-bit value should use (even, odd)-pair. - if t.GoArch == "arm" || (t.LinuxArch == "mips" && t.Bits == 32) { - flags = append(flags, "-arm") - } - return -} diff --git a/vendor/golang.org/x/sys/unix/linux/mksysnum.pl b/vendor/golang.org/x/sys/unix/linux/mksysnum.pl deleted file mode 100755 index 63fd800..0000000 --- a/vendor/golang.org/x/sys/unix/linux/mksysnum.pl +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env perl -# Copyright 2009 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. - -use strict; - -if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { - print STDERR "GOARCH or GOOS not defined in environment\n"; - exit 1; -} - -# Check that we are using the new build system if we should -if($ENV{'GOLANG_SYS_BUILD'} ne "docker") { - print STDERR "In the new build system, mksysnum should not be called directly.\n"; - print STDERR "See README.md\n"; - exit 1; -} - -my $command = "$0 ". join(' ', @ARGV); - -print < 999){ - # ignore deprecated syscalls that are no longer implemented - # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716 - return; - } - $name =~ y/a-z/A-Z/; - $num = $num + $offset; - print " SYS_$name = $num;\n"; -} - -my $prev; -open(CC, "$ENV{'CC'} -E -dD @ARGV |") || die "can't run $ENV{'CC'}"; -while(){ - if(/^#define __NR_Linux\s+([0-9]+)/){ - # mips/mips64: extract offset - $offset = $1; - } - elsif(/^#define __NR(\w*)_SYSCALL_BASE\s+([0-9]+)/){ - # arm: extract offset - $offset = $1; - } - elsif(/^#define __NR_syscalls\s+/) { - # ignore redefinitions of __NR_syscalls - } - elsif(/^#define __NR_(\w*)Linux_syscalls\s+/) { - # mips/mips64: ignore definitions about the number of syscalls - } - elsif(/^#define __NR_(\w+)\s+([0-9]+)/){ - $prev = $2; - fmt($1, $2); - } - elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){ - $prev = $2; - fmt($1, $2); - } - elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){ - fmt($1, $prev+$2) - } - elsif(/^#define __NR_(\w+)\s+\(__NR_Linux \+ ([0-9]+)/){ - fmt($1, $2); - } - elsif(/^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE \+ ([0-9]+)/){ - fmt($1, $2); - } -} - -print < -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// On mips64, the glibc stat and kernel stat do not agree -#if (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64) - -// Use the stat defined by the kernel with a few modifications. These are: -// * The time fields (like st_atime and st_atimensec) use the timespec -// struct (like st_atim) for consitancy with the glibc fields. -// * The padding fields get different names to not break compatibility. -// * st_blocks is signed, again for compatibility. -struct stat { - unsigned int st_dev; - unsigned int st_pad1[3]; // Reserved for st_dev expansion - - unsigned long st_ino; - - mode_t st_mode; - __u32 st_nlink; - - uid_t st_uid; - gid_t st_gid; - - unsigned int st_rdev; - unsigned int st_pad2[3]; // Reserved for st_rdev expansion - - off_t st_size; - - // These are declared as speperate fields in the kernel. Here we use - // the timespec struct for consistancy with the other stat structs. - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - - unsigned int st_blksize; - unsigned int st_pad4; - - long st_blocks; -}; - -// These are needed because we do not include fcntl.h or sys/types.h -#include -#include - -#else - -// Use the stat defined by glibc -#include -#include - -#endif - -// Certain constants and structs are missing from the fs/crypto UAPI -#define FS_MAX_KEY_SIZE 64 -struct fscrypt_key { - __u32 mode; - __u8 raw[FS_MAX_KEY_SIZE]; - __u32 size; -}; - -#ifdef TCSETS2 -// On systems that have "struct termios2" use this as type Termios. -typedef struct termios2 termios_t; -#else -typedef struct termios termios_t; -#endif - -enum { - sizeofPtr = sizeof(void*), -}; - -union sockaddr_all { - struct sockaddr s1; // this one gets used for fields - struct sockaddr_in s2; // these pad it out - struct sockaddr_in6 s3; - struct sockaddr_un s4; - struct sockaddr_ll s5; - struct sockaddr_nl s6; -}; - -struct sockaddr_any { - struct sockaddr addr; - char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; -}; - -// copied from /usr/include/bluetooth/hci.h -struct sockaddr_hci { - sa_family_t hci_family; - unsigned short hci_dev; - unsigned short hci_channel; -};; - -// copied from /usr/include/linux/un.h -struct my_sockaddr_un { - sa_family_t sun_family; -#if defined(__ARM_EABI__) || defined(__powerpc64__) - // on ARM char is by default unsigned - signed char sun_path[108]; -#else - char sun_path[108]; -#endif -}; - -#ifdef __ARM_EABI__ -typedef struct user_regs PtraceRegs; -#elif defined(__aarch64__) -typedef struct user_pt_regs PtraceRegs; -#elif defined(__powerpc64__) -typedef struct pt_regs PtraceRegs; -#elif defined(__mips__) -typedef struct user PtraceRegs; -#elif defined(__s390x__) -typedef struct _user_regs_struct PtraceRegs; -#elif defined(__sparc__) -#include -typedef struct pt_regs PtraceRegs; -#else -typedef struct user_regs_struct PtraceRegs; -#endif - -#if defined(__s390x__) -typedef struct _user_psw_struct ptracePsw; -typedef struct _user_fpregs_struct ptraceFpregs; -typedef struct _user_per_struct ptracePer; -#else -typedef struct {} ptracePsw; -typedef struct {} ptraceFpregs; -typedef struct {} ptracePer; -#endif - -// The real epoll_event is a union, and godefs doesn't handle it well. -struct my_epoll_event { - uint32_t events; -#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32) - // padding is not specified in linux/eventpoll.h but added to conform to the - // alignment requirements of EABI - int32_t padFd; -#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) - int32_t _padFd; -#endif - int32_t fd; - int32_t pad; -}; - -*/ -import "C" - -// Machine characteristics; for internal use. - -const ( - sizeofPtr = C.sizeofPtr - sizeofShort = C.sizeof_short - sizeofInt = C.sizeof_int - sizeofLong = C.sizeof_long - sizeofLongLong = C.sizeof_longlong - PathMax = C.PATH_MAX -) - -// Basic types - -type ( - _C_short C.short - _C_int C.int - _C_long C.long - _C_long_long C.longlong -) - -// Time - -type Timespec C.struct_timespec - -type Timeval C.struct_timeval - -type Timex C.struct_timex - -type Time_t C.time_t - -type Tms C.struct_tms - -type Utimbuf C.struct_utimbuf - -// Processes - -type Rusage C.struct_rusage - -type Rlimit C.struct_rlimit - -type _Gid_t C.gid_t - -// Files - -type Stat_t C.struct_stat - -type Statfs_t C.struct_statfs - -type Dirent C.struct_dirent - -type Fsid C.fsid_t - -type Flock_t C.struct_flock - -// Filesystem Encryption - -type FscryptPolicy C.struct_fscrypt_policy - -type FscryptKey C.struct_fscrypt_key - -// Advice to Fadvise - -const ( - FADV_NORMAL = C.POSIX_FADV_NORMAL - FADV_RANDOM = C.POSIX_FADV_RANDOM - FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL - FADV_WILLNEED = C.POSIX_FADV_WILLNEED - FADV_DONTNEED = C.POSIX_FADV_DONTNEED - FADV_NOREUSE = C.POSIX_FADV_NOREUSE -) - -// Sockets - -type RawSockaddrInet4 C.struct_sockaddr_in - -type RawSockaddrInet6 C.struct_sockaddr_in6 - -type RawSockaddrUnix C.struct_my_sockaddr_un - -type RawSockaddrLinklayer C.struct_sockaddr_ll - -type RawSockaddrNetlink C.struct_sockaddr_nl - -type RawSockaddrHCI C.struct_sockaddr_hci - -type RawSockaddrCAN C.struct_sockaddr_can - -type RawSockaddrALG C.struct_sockaddr_alg - -type RawSockaddrVM C.struct_sockaddr_vm - -type RawSockaddr C.struct_sockaddr - -type RawSockaddrAny C.struct_sockaddr_any - -type _Socklen C.socklen_t - -type Linger C.struct_linger - -type Iovec C.struct_iovec - -type IPMreq C.struct_ip_mreq - -type IPMreqn C.struct_ip_mreqn - -type IPv6Mreq C.struct_ipv6_mreq - -type Msghdr C.struct_msghdr - -type Cmsghdr C.struct_cmsghdr - -type Inet4Pktinfo C.struct_in_pktinfo - -type Inet6Pktinfo C.struct_in6_pktinfo - -type IPv6MTUInfo C.struct_ip6_mtuinfo - -type ICMPv6Filter C.struct_icmp6_filter - -type Ucred C.struct_ucred - -type TCPInfo C.struct_tcp_info - -const ( - SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in - SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - SizeofSockaddrAny = C.sizeof_struct_sockaddr_any - SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un - SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll - SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl - SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci - SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can - SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg - SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm - SizeofLinger = C.sizeof_struct_linger - SizeofIPMreq = C.sizeof_struct_ip_mreq - SizeofIPMreqn = C.sizeof_struct_ip_mreqn - SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - SizeofMsghdr = C.sizeof_struct_msghdr - SizeofCmsghdr = C.sizeof_struct_cmsghdr - SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo - SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo - SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter - SizeofUcred = C.sizeof_struct_ucred - SizeofTCPInfo = C.sizeof_struct_tcp_info -) - -// Netlink routing and interface messages - -const ( - IFA_UNSPEC = C.IFA_UNSPEC - IFA_ADDRESS = C.IFA_ADDRESS - IFA_LOCAL = C.IFA_LOCAL - IFA_LABEL = C.IFA_LABEL - IFA_BROADCAST = C.IFA_BROADCAST - IFA_ANYCAST = C.IFA_ANYCAST - IFA_CACHEINFO = C.IFA_CACHEINFO - IFA_MULTICAST = C.IFA_MULTICAST - IFLA_UNSPEC = C.IFLA_UNSPEC - IFLA_ADDRESS = C.IFLA_ADDRESS - IFLA_BROADCAST = C.IFLA_BROADCAST - IFLA_IFNAME = C.IFLA_IFNAME - IFLA_MTU = C.IFLA_MTU - IFLA_LINK = C.IFLA_LINK - IFLA_QDISC = C.IFLA_QDISC - IFLA_STATS = C.IFLA_STATS - IFLA_COST = C.IFLA_COST - IFLA_PRIORITY = C.IFLA_PRIORITY - IFLA_MASTER = C.IFLA_MASTER - IFLA_WIRELESS = C.IFLA_WIRELESS - IFLA_PROTINFO = C.IFLA_PROTINFO - IFLA_TXQLEN = C.IFLA_TXQLEN - IFLA_MAP = C.IFLA_MAP - IFLA_WEIGHT = C.IFLA_WEIGHT - IFLA_OPERSTATE = C.IFLA_OPERSTATE - IFLA_LINKMODE = C.IFLA_LINKMODE - IFLA_LINKINFO = C.IFLA_LINKINFO - IFLA_NET_NS_PID = C.IFLA_NET_NS_PID - IFLA_IFALIAS = C.IFLA_IFALIAS - IFLA_MAX = C.IFLA_MAX - RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE - RT_SCOPE_SITE = C.RT_SCOPE_SITE - RT_SCOPE_LINK = C.RT_SCOPE_LINK - RT_SCOPE_HOST = C.RT_SCOPE_HOST - RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE - RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC - RT_TABLE_COMPAT = C.RT_TABLE_COMPAT - RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT - RT_TABLE_MAIN = C.RT_TABLE_MAIN - RT_TABLE_LOCAL = C.RT_TABLE_LOCAL - RT_TABLE_MAX = C.RT_TABLE_MAX - RTA_UNSPEC = C.RTA_UNSPEC - RTA_DST = C.RTA_DST - RTA_SRC = C.RTA_SRC - RTA_IIF = C.RTA_IIF - RTA_OIF = C.RTA_OIF - RTA_GATEWAY = C.RTA_GATEWAY - RTA_PRIORITY = C.RTA_PRIORITY - RTA_PREFSRC = C.RTA_PREFSRC - RTA_METRICS = C.RTA_METRICS - RTA_MULTIPATH = C.RTA_MULTIPATH - RTA_FLOW = C.RTA_FLOW - RTA_CACHEINFO = C.RTA_CACHEINFO - RTA_TABLE = C.RTA_TABLE - RTN_UNSPEC = C.RTN_UNSPEC - RTN_UNICAST = C.RTN_UNICAST - RTN_LOCAL = C.RTN_LOCAL - RTN_BROADCAST = C.RTN_BROADCAST - RTN_ANYCAST = C.RTN_ANYCAST - RTN_MULTICAST = C.RTN_MULTICAST - RTN_BLACKHOLE = C.RTN_BLACKHOLE - RTN_UNREACHABLE = C.RTN_UNREACHABLE - RTN_PROHIBIT = C.RTN_PROHIBIT - RTN_THROW = C.RTN_THROW - RTN_NAT = C.RTN_NAT - RTN_XRESOLVE = C.RTN_XRESOLVE - RTNLGRP_NONE = C.RTNLGRP_NONE - RTNLGRP_LINK = C.RTNLGRP_LINK - RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY - RTNLGRP_NEIGH = C.RTNLGRP_NEIGH - RTNLGRP_TC = C.RTNLGRP_TC - RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR - RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE - RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE - RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE - RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR - RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE - RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE - RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO - RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX - RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE - RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT - SizeofNlMsghdr = C.sizeof_struct_nlmsghdr - SizeofNlMsgerr = C.sizeof_struct_nlmsgerr - SizeofRtGenmsg = C.sizeof_struct_rtgenmsg - SizeofNlAttr = C.sizeof_struct_nlattr - SizeofRtAttr = C.sizeof_struct_rtattr - SizeofIfInfomsg = C.sizeof_struct_ifinfomsg - SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg - SizeofRtMsg = C.sizeof_struct_rtmsg - SizeofRtNexthop = C.sizeof_struct_rtnexthop -) - -type NlMsghdr C.struct_nlmsghdr - -type NlMsgerr C.struct_nlmsgerr - -type RtGenmsg C.struct_rtgenmsg - -type NlAttr C.struct_nlattr - -type RtAttr C.struct_rtattr - -type IfInfomsg C.struct_ifinfomsg - -type IfAddrmsg C.struct_ifaddrmsg - -type RtMsg C.struct_rtmsg - -type RtNexthop C.struct_rtnexthop - -// Linux socket filter - -const ( - SizeofSockFilter = C.sizeof_struct_sock_filter - SizeofSockFprog = C.sizeof_struct_sock_fprog -) - -type SockFilter C.struct_sock_filter - -type SockFprog C.struct_sock_fprog - -// Inotify - -type InotifyEvent C.struct_inotify_event - -const SizeofInotifyEvent = C.sizeof_struct_inotify_event - -// Ptrace - -// Register structures -type PtraceRegs C.PtraceRegs - -// Structures contained in PtraceRegs on s390x (exported by mkpost.go) -type PtracePsw C.ptracePsw - -type PtraceFpregs C.ptraceFpregs - -type PtracePer C.ptracePer - -// Misc - -type FdSet C.fd_set - -type Sysinfo_t C.struct_sysinfo - -type Utsname C.struct_utsname - -type Ustat_t C.struct_ustat - -type EpollEvent C.struct_my_epoll_event - -const ( - AT_FDCWD = C.AT_FDCWD - AT_REMOVEDIR = C.AT_REMOVEDIR - AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW - AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW -) - -type PollFd C.struct_pollfd - -const ( - POLLIN = C.POLLIN - POLLPRI = C.POLLPRI - POLLOUT = C.POLLOUT - POLLRDHUP = C.POLLRDHUP - POLLERR = C.POLLERR - POLLHUP = C.POLLHUP - POLLNVAL = C.POLLNVAL -) - -type Sigset_t C.sigset_t - -// sysconf information - -const _SC_PAGESIZE = C._SC_PAGESIZE - -// Terminal handling - -type Termios C.termios_t diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index f0d6566..c1fc2ad 100755 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -3,9 +3,75 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -# This script runs or (given -n) prints suggested commands to generate files for -# the Architecture/OS specified by the GOARCH and GOOS environment variables. -# See README.md for more information about how the build system works. +# The unix package provides access to the raw system call +# interface of the underlying operating system. Porting Go to +# a new architecture/operating system combination requires +# some manual effort, though there are tools that automate +# much of the process. The auto-generated files have names +# beginning with z. +# +# This script runs or (given -n) prints suggested commands to generate z files +# for the current system. Running those commands is not automatic. +# This script is documentation more than anything else. +# +# * asm_${GOOS}_${GOARCH}.s +# +# This hand-written assembly file implements system call dispatch. +# There are three entry points: +# +# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); +# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# +# The first and second are the standard ones; they differ only in +# how many arguments can be passed to the kernel. +# The third is for low-level use by the ForkExec wrapper; +# unlike the first two, it does not call into the scheduler to +# let it know that a system call is running. +# +# * syscall_${GOOS}.go +# +# This hand-written Go file implements system calls that need +# special handling and lists "//sys" comments giving prototypes +# for ones that can be auto-generated. Mksyscall reads those +# comments to generate the stubs. +# +# * syscall_${GOOS}_${GOARCH}.go +# +# Same as syscall_${GOOS}.go except that it contains code specific +# to ${GOOS} on one particular architecture. +# +# * types_${GOOS}.c +# +# This hand-written C file includes standard C headers and then +# creates typedef or enum names beginning with a dollar sign +# (use of $ in variable names is a gcc extension). The hardest +# part about preparing this file is figuring out which headers to +# include and which symbols need to be #defined to get the +# actual data structures that pass through to the kernel system calls. +# Some C libraries present alternate versions for binary compatibility +# and translate them on the way in and out of system calls, but +# there is almost always a #define that can get the real ones. +# See types_darwin.c and types_linux.c for examples. +# +# * zerror_${GOOS}_${GOARCH}.go +# +# This machine-generated file defines the system's error numbers, +# error strings, and signal numbers. The generator is "mkerrors.sh". +# Usually no arguments are needed, but mkerrors.sh will pass its +# arguments on to godefs. +# +# * zsyscall_${GOOS}_${GOARCH}.go +# +# Generated by mksyscall.pl; see syscall_${GOOS}.go above. +# +# * zsysnum_${GOOS}_${GOARCH}.go +# +# Generated by mksysnum_${GOOS}. +# +# * ztypes_${GOOS}_${GOARCH}.go +# +# Generated by godefs; see types_${GOOS}.c above. GOOSARCH="${GOOS}_${GOARCH}" @@ -18,7 +84,6 @@ zsysctl="zsysctl_$GOOSARCH.go" mksysnum= mktypes= run="sh" -cmd="" case "$1" in -syscalls) @@ -33,7 +98,6 @@ case "$1" in ;; -n) run="cat" - cmd="echo" shift esac @@ -45,14 +109,6 @@ case "$#" in exit 2 esac -if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - # Use then new build system - # Files generated through docker (use $cmd so you can Ctl-C the build or run) - $cmd docker build --tag generate:$GOOS $GOOS - $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS - exit -fi - GOOSARCH_in=syscall_$GOOSARCH.go case "$GOOSARCH" in _* | *_ | _) @@ -111,6 +167,64 @@ freebsd_arm) # API consistent across over platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; +linux_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_amd64) + unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1) + if [ "$unistd_h" = "" ]; then + echo >&2 cannot find unistd_64.h + exit 1 + fi + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -arm" + mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_arm64) + unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1) + if [ "$unistd_h" = "" ]; then + echo >&2 cannot find unistd_64.h + exit 1 + fi + mksysnum="./mksysnum_linux.pl $unistd_h" + # Let the type of C char be signed for making the bare syscall + # API consistent across over platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; +linux_ppc64) + GOOSARCH_in=syscall_linux_ppc64x.go + unistd_h=/usr/include/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_ppc64le) + GOOSARCH_in=syscall_linux_ppc64x.go + unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_s390x) + GOOSARCH_in=syscall_linux_s390x.go + unistd_h=/usr/include/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + # Let the type of C char be signed to make the bare sys + # API more consistent between platforms. + # This is a deliberate departure from the way the syscall + # package generates its version of the types file. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; linux_sparc64) GOOSARCH_in=syscall_linux_sparc64.go unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h @@ -174,6 +288,7 @@ esac if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi if [ -n "$mktypes" ]; then - echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; + echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go"; + echo "$mktypes types_$GOOS.go | go run mkpost.go >>ztypes_$GOOSARCH.go"; fi ) | $run diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 1bd1c9e..bbc6d19 100755 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -16,15 +16,6 @@ if test -z "$GOARCH" -o -z "$GOOS"; then exit 1 fi -# Check that we are using the new build system if we should -if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then - echo 1>&2 "In the new build system, mkerrors should not be called directly." - echo 1>&2 "See README.md" - exit 1 - fi -fi - CC=${CC:-cc} if [[ "$GOOS" -eq "solaris" ]]; then @@ -111,36 +102,6 @@ includes_Linux=' #endif #define _GNU_SOURCE -// is broken on powerpc64, as it fails to include definitions of -// these structures. We just include them copied from . -#if defined(__powerpc__) -struct sgttyb { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - short sg_flags; -}; - -struct tchars { - char t_intrc; - char t_quitc; - char t_startc; - char t_stopc; - char t_eofc; - char t_brkc; -}; - -struct ltchars { - char t_suspc; - char t_dsuspc; - char t_rprntc; - char t_flushc; - char t_werasc; - char t_lnextc; -}; -#endif - #include #include #include @@ -161,7 +122,6 @@ struct ltchars { #include #include #include -#include #include #include #include @@ -172,7 +132,6 @@ struct ltchars { #include #include #include -#include #include #include @@ -197,11 +156,6 @@ struct ltchars { // but it is already in bluetooth_linux.go #undef SOL_BLUETOOTH #endif - -// Certain constants are missing from the fs/crypto UAPI -#define FS_KEY_DESC_PREFIX "fscrypt:" -#define FS_KEY_DESC_PREFIX_SIZE 8 -#define FS_MAX_KEY_SIZE 64 ' includes_NetBSD=' @@ -396,13 +350,11 @@ ccflags="$@" $2 ~ /^CLOCK_/ || $2 ~ /^CAN_/ || $2 ~ /^ALG_/ || - $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ || $2 ~ /^GRND_/ || $2 ~ /^SPLICE_/ || - $2 ~ /^(VM|VMADDR)_/ || $2 !~ "WMESGLEN" && $2 ~ /^W[A-Z0-9]+$/ || - $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)} + $2 ~ /^BLK/ {printf("\t%s = C.%s\n", $2, $2)} $2 ~ /^__WCOREFLAG$/ {next} $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} @@ -437,7 +389,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | sort >_signal.grep echo '// mkerrors.sh' "$@" -echo '// Code generated by the command above; see README.md. DO NOT EDIT.' +echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT' echo echo "// +build ${GOARCH},${GOOS}" echo @@ -499,7 +451,7 @@ intcmp(const void *a, const void *b) int main(void) { - int i, e; + int i, j, e; char buf[1024], *p; printf("\n\n// Error table\n"); diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go index d3ff659..ed50d90 100644 --- a/vendor/golang.org/x/sys/unix/mkpost.go +++ b/vendor/golang.org/x/sys/unix/mkpost.go @@ -8,11 +8,10 @@ // modify the generated types. It is used to clean up // the sys API in an architecture specific manner. // -// mkpost is run after cgo -godefs; see README.md. +// mkpost is run after cgo -godefs by mkall.sh. package main import ( - "bytes" "fmt" "go/format" "io/ioutil" @@ -22,67 +21,42 @@ import ( ) func main() { - // Get the OS and architecture (using GOARCH_TARGET if it exists) - goos := os.Getenv("GOOS") - goarch := os.Getenv("GOARCH_TARGET") - if goarch == "" { - goarch = os.Getenv("GOARCH") - } - // Check that we are using the new build system if we should be. - if goos == "linux" && goarch != "sparc64" { - if os.Getenv("GOLANG_SYS_BUILD") != "docker" { - os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n") - os.Stderr.WriteString("See README.md\n") - os.Exit(1) - } - } - b, err := ioutil.ReadAll(os.Stdin) if err != nil { log.Fatal(err) } + s := string(b) - // If we have empty Ptrace structs, we should delete them. Only s390x emits - // nonempty Ptrace structs. - ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`) - b = ptraceRexexp.ReplaceAll(b, nil) - - // Replace the control_regs union with a blank identifier for now. - controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`) - b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64")) - - // Remove fields that are added by glibc - // Note that this is unstable as the identifers are private. - removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`) - b = removeFieldsRegex.ReplaceAll(b, []byte("_")) - - // We refuse to export private fields on s390x + goarch := os.Getenv("GOARCH") + goos := os.Getenv("GOOS") if goarch == "s390x" && goos == "linux" { - // Remove cgo padding fields - removeFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`) - b = removeFieldsRegex.ReplaceAll(b, []byte("_")) + // Export the types of PtraceRegs fields. + re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)") + s = re.ReplaceAllString(s, "Ptrace$1") - // Remove padding, hidden, or unused fields - removeFieldsRegex = regexp.MustCompile(`X_\S+`) - b = removeFieldsRegex.ReplaceAll(b, []byte("_")) - } + // Replace padding fields inserted by cgo with blank identifiers. + re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*") + s = re.ReplaceAllString(s, "_") - // Remove the first line of warning from cgo - b = b[bytes.IndexByte(b, '\n')+1:] - // Modify the command in the header to include: - // mkpost, our own warning, and a build tag. - replacement := fmt.Sprintf(`$1 | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. + // Replace other unwanted fields with blank identifiers. + re = regexp.MustCompile("X_[A-Za-z0-9_]*") + s = re.ReplaceAllString(s, "_") -// +build %s,%s`, goarch, goos) - cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`) - b = cgoCommandRegex.ReplaceAll(b, []byte(replacement)) + // Replace the control_regs union with a blank identifier for now. + re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64") + s = re.ReplaceAllString(s, "_ [0]uint64") + } // gofmt - b, err = format.Source(b) + b, err = format.Source([]byte(s)) if err != nil { log.Fatal(err) } - os.Stdout.Write(b) + // Append this command to the header to show where the new file + // came from. + re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)") + b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go")) + + fmt.Printf("%s", b) } diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl index fb929b4..34f8ef8 100755 --- a/vendor/golang.org/x/sys/unix/mksyscall.pl +++ b/vendor/golang.org/x/sys/unix/mksyscall.pl @@ -69,16 +69,6 @@ if($ARGV[0] =~ /^-/) { exit 1; } -# Check that we are using the new build system if we should -if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") { - if($ENV{'GOLANG_SYS_BUILD'} ne "docker") { - print STDERR "In the new build system, mksyscall should not be called directly.\n"; - print STDERR "See README.md\n"; - exit 1; - } -} - - sub parseparamlist($) { my ($list) = @_; $list =~ s/^\s*//; @@ -310,7 +300,7 @@ if($errors) { print < 999){ + # ignore deprecated syscalls that are no longer implemented + # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716 + return; + } + $name =~ y/a-z/A-Z/; + $num = $num + $offset; + print " SYS_$name = $num;\n"; +} + +my $prev; +open(GCC, "gcc -E -dD @ARGV |") || die "can't run gcc"; +while(){ + if(/^#define __NR_Linux\s+([0-9]+)/){ + # mips/mips64: extract offset + $offset = $1; + } + elsif(/^#define __NR(\w*)_SYSCALL_BASE\s+([0-9]+)/){ + # arm: extract offset + $offset = $1; + } + elsif(/^#define __NR_syscalls\s+/) { + # ignore redefinitions of __NR_syscalls + } + elsif(/^#define __NR_(\w*)Linux_syscalls\s+/) { + # mips/mips64: ignore definitions about the number of syscalls + } + elsif(/^#define __NR_(\w+)\s+([0-9]+)/){ + $prev = $2; + fmt($1, $2); + } + elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){ + $prev = $2; + fmt($1, $2); + } + elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){ + fmt($1, $prev+$2) + } + elsif(/^#define __NR_(\w+)\s+\(__NR_Linux \+ ([0-9]+)/){ + fmt($1, $2); + } + elsif(/^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE \+ ([0-9]+)/){ + fmt($1, $2); + } +} + +print < 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names } //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 7e0210f..fbbe0dc 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -1,8 +1,8 @@ -// Copyright 2009 The Go Authors. All rights reserved. +// Copyright 2009,2010 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. -// DragonFly BSD system calls. +// FreeBSD system calls. // This file is compiled as ordinary Go code, // but it is also input to mksyscall, // which parses the //sys lines and generates system call stubs. @@ -34,7 +34,7 @@ func nametomib(name string) (mib []_C_int, err error) { // NOTE(rsc): It seems strange to set the buffer to have // size CTL_MAXNAME+2 but use only CTL_MAXNAME - // as the size. I don't know why the +2 is here, but the + // as the size. I don't know why the +2 is here, but the // kernel uses +2 for its own implementation of this function. // I am scared that if we don't include the +2 here, the kernel // will silently write 2 words farther than we specify @@ -56,20 +56,29 @@ func nametomib(name string) (mib []_C_int, err error) { return buf[0 : n/siz], nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - namlen, ok := direntNamlen(buf) - if !ok { - return 0, false +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + reclen := int(16+dirent.Namlen+1+7) & ^7 + buf = buf[reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) } - return (16 + namlen + 1 + 7) &^ 7, true -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) + return origlen - len(buf), count, names } //sysnb pipe() (r int, w int, err error) @@ -92,24 +101,6 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { return extpwrite(fd, p, 0, offset) } -func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { - var rsa RawSockaddrAny - var len _Socklen = SizeofSockaddrAny - nfd, err = accept4(fd, &rsa, &len, flags) - if err != nil { - return - } - if len > SizeofSockaddrAny { - panic("RawSockaddrAny too small") - } - sa, err = anyToSockaddr(&rsa) - if err != nil { - Close(nfd) - nfd = 0 - } - return -} - func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { var _p0 unsafe.Pointer var bufsize uintptr @@ -217,7 +208,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { //sys munmap(addr uintptr, length uintptr) (err error) //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE -//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) /* * Unimplemented @@ -253,8 +243,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { // Kdebug_trace // Sigreturn // Mmap -// Mlock -// Munlock // Atsocket // Kqueue_from_portset_np // Kqueue_portset @@ -347,8 +335,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { // Lio_listio // __pthread_cond_wait // Iopolicysys -// Mlockall -// Munlockall // __pthread_kill // __pthread_sigmask // __sigwait diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 077d1f3..ec56ed6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -54,16 +54,32 @@ func nametomib(name string) (mib []_C_int, err error) { return buf[0 : n/siz], nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names } //sysnb pipe() (r int, w int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 9737e08..c011947 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -551,28 +551,6 @@ func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) { return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil } -// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets. -// SockaddrVM provides access to Linux VM sockets: a mechanism that enables -// bidirectional communication between a hypervisor and its guest virtual -// machines. -type SockaddrVM struct { - // CID and Port specify a context ID and port address for a VM socket. - // Guests have a unique CID, and hosts may have a well-known CID of: - // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process. - // - VMADDR_CID_HOST: refers to other processes on the host. - CID uint32 - Port uint32 - raw RawSockaddrVM -} - -func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) { - sa.raw.Family = AF_VSOCK - sa.raw.Port = sa.Port - sa.raw.Cid = sa.CID - - return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil -} - func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_NETLINK: @@ -642,14 +620,6 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { sa.Addr[i] = pp.Addr[i] } return sa, nil - - case AF_VSOCK: - pp := (*RawSockaddrVM)(unsafe.Pointer(rsa)) - sa := &SockaddrVM{ - CID: pp.Cid, - Port: pp.Port, - } - return sa, nil } return nil, EAFNOSUPPORT } @@ -744,13 +714,6 @@ func GetsockoptUcred(fd, level, opt int) (*Ucred, error) { return &value, err } -func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { - var value TCPInfo - vallen := _Socklen(SizeofTCPInfo) - err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) - return &value, err -} - func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) } @@ -888,10 +851,6 @@ func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) { return ptracePeek(PTRACE_PEEKDATA, pid, addr, out) } -func PtracePeekUser(pid int, addr uintptr, out []byte) (count int, err error) { - return ptracePeek(PTRACE_PEEKUSR, pid, addr, out) -} - func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) { // As for ptracePeek, we need to align our accesses to deal // with the possibility of straddling an invalid page. @@ -990,24 +949,38 @@ func Reboot(cmd int) (err error) { return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "") } -func ReadDirent(fd int, buf []byte) (n int, err error) { - return Getdents(fd, buf) -} - -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) } -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) +func ReadDirent(fd int, buf []byte) (n int, err error) { + return Getdents(fd, buf) } -func direntNamlen(buf []byte) (uint64, bool) { - reclen, ok := direntReclen(buf) - if !ok { - return 0, false +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + count = 0 + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:clen(bytes[:])]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) } - return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true + return origlen - len(buf), count, names } //sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 01f6a48..c4e945c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -93,16 +93,32 @@ func nametomib(name string) (mib []_C_int, err error) { return mib, nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names } //sysnb pipe() (fd1 int, fd2 int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index c0d2b6c..246131d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -53,16 +53,32 @@ func nametomib(name string) (mib []_C_int, err error) { return nil, EINVAL } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names } //sysnb pipe(p *[2]_C_int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 3cb1d0b..acb74b1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -44,20 +44,32 @@ func clen(n []byte) int { return len(n) } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - reclen, ok := direntReclen(buf) - if !ok { - return 0, false +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:clen(bytes[:])]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) } - return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true + return origlen - len(buf), count, names } //sysnb pipe(p *[2]_C_int) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go index a350817..1153261 100644 --- a/vendor/golang.org/x/sys/unix/types_darwin.go +++ b/vendor/golang.org/x/sys/unix/types_darwin.go @@ -5,7 +5,7 @@ // +build ignore /* -Input to cgo -godefs. See README.md +Input to cgo -godefs. See also mkerrors.sh and mkall.sh */ // +godefs map struct_in_addr [4]byte /* in_addr */ diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go index a818704..f3c971d 100644 --- a/vendor/golang.org/x/sys/unix/types_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go @@ -5,7 +5,7 @@ // +build ignore /* -Input to cgo -godefs. See README.md +Input to cgo -godefs. See also mkerrors.sh and mkall.sh */ // +godefs map struct_in_addr [4]byte /* in_addr */ diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go index 972e69a..ae24557 100644 --- a/vendor/golang.org/x/sys/unix/types_freebsd.go +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go @@ -5,7 +5,7 @@ // +build ignore /* -Input to cgo -godefs. See README.md +Input to cgo -godefs. See also mkerrors.sh and mkall.sh */ // +godefs map struct_in_addr [4]byte /* in_addr */ diff --git a/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go new file mode 100644 index 0000000..a08f7fb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_linux.go @@ -0,0 +1,465 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#define _FILE_OFFSET_BITS 64 +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef TCSETS2 +// On systems that have "struct termios2" use this as type Termios. +typedef struct termios2 termios_t; +#else +typedef struct termios termios_t; +#endif + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_ll s5; + struct sockaddr_nl s6; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +// copied from /usr/include/linux/un.h +struct my_sockaddr_un { + sa_family_t sun_family; +#if defined(__ARM_EABI__) || defined(__powerpc64__) + // on ARM char is by default unsigned + signed char sun_path[108]; +#else + char sun_path[108]; +#endif +}; + +#ifdef __ARM_EABI__ +typedef struct user_regs PtraceRegs; +#elif defined(__aarch64__) +typedef struct user_pt_regs PtraceRegs; +#elif defined(__powerpc64__) +typedef struct pt_regs PtraceRegs; +#elif defined(__mips__) +typedef struct user PtraceRegs; +#elif defined(__s390x__) +typedef struct _user_regs_struct PtraceRegs; +#elif defined(__sparc__) +#include +typedef struct pt_regs PtraceRegs; +#else +typedef struct user_regs_struct PtraceRegs; +#endif + +#if defined(__s390x__) +typedef struct _user_psw_struct ptracePsw; +typedef struct _user_fpregs_struct ptraceFpregs; +typedef struct _user_per_struct ptracePer; +#else +typedef struct {} ptracePsw; +typedef struct {} ptraceFpregs; +typedef struct {} ptracePer; +#endif + +// The real epoll_event is a union, and godefs doesn't handle it well. +struct my_epoll_event { + uint32_t events; +#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32) + // padding is not specified in linux/eventpoll.h but added to conform to the + // alignment requirements of EABI + int32_t padFd; +#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) + int32_t _padFd; +#endif + int32_t fd; + int32_t pad; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong + PathMax = C.PATH_MAX +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timex C.struct_timex + +type Time_t C.time_t + +type Tms C.struct_tms + +type Utimbuf C.struct_utimbuf + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +type Flock_t C.struct_flock + +// Advice to Fadvise + +const ( + FADV_NORMAL = C.POSIX_FADV_NORMAL + FADV_RANDOM = C.POSIX_FADV_RANDOM + FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL + FADV_WILLNEED = C.POSIX_FADV_WILLNEED + FADV_DONTNEED = C.POSIX_FADV_DONTNEED + FADV_NOREUSE = C.POSIX_FADV_NOREUSE +) + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_my_sockaddr_un + +type RawSockaddrLinklayer C.struct_sockaddr_ll + +type RawSockaddrNetlink C.struct_sockaddr_nl + +type RawSockaddrHCI C.struct_sockaddr_hci + +type RawSockaddrCAN C.struct_sockaddr_can + +type RawSockaddrALG C.struct_sockaddr_alg + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPMreqn C.struct_ip_mreqn + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet4Pktinfo C.struct_in_pktinfo + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +type Ucred C.struct_ucred + +type TCPInfo C.struct_tcp_info + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll + SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl + SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci + SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can + SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPMreqn = C.sizeof_struct_ip_mreqn + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter + SizeofUcred = C.sizeof_struct_ucred + SizeofTCPInfo = C.sizeof_struct_tcp_info +) + +// Netlink routing and interface messages + +const ( + IFA_UNSPEC = C.IFA_UNSPEC + IFA_ADDRESS = C.IFA_ADDRESS + IFA_LOCAL = C.IFA_LOCAL + IFA_LABEL = C.IFA_LABEL + IFA_BROADCAST = C.IFA_BROADCAST + IFA_ANYCAST = C.IFA_ANYCAST + IFA_CACHEINFO = C.IFA_CACHEINFO + IFA_MULTICAST = C.IFA_MULTICAST + IFLA_UNSPEC = C.IFLA_UNSPEC + IFLA_ADDRESS = C.IFLA_ADDRESS + IFLA_BROADCAST = C.IFLA_BROADCAST + IFLA_IFNAME = C.IFLA_IFNAME + IFLA_MTU = C.IFLA_MTU + IFLA_LINK = C.IFLA_LINK + IFLA_QDISC = C.IFLA_QDISC + IFLA_STATS = C.IFLA_STATS + IFLA_COST = C.IFLA_COST + IFLA_PRIORITY = C.IFLA_PRIORITY + IFLA_MASTER = C.IFLA_MASTER + IFLA_WIRELESS = C.IFLA_WIRELESS + IFLA_PROTINFO = C.IFLA_PROTINFO + IFLA_TXQLEN = C.IFLA_TXQLEN + IFLA_MAP = C.IFLA_MAP + IFLA_WEIGHT = C.IFLA_WEIGHT + IFLA_OPERSTATE = C.IFLA_OPERSTATE + IFLA_LINKMODE = C.IFLA_LINKMODE + IFLA_LINKINFO = C.IFLA_LINKINFO + IFLA_NET_NS_PID = C.IFLA_NET_NS_PID + IFLA_IFALIAS = C.IFLA_IFALIAS + IFLA_MAX = C.IFLA_MAX + RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE + RT_SCOPE_SITE = C.RT_SCOPE_SITE + RT_SCOPE_LINK = C.RT_SCOPE_LINK + RT_SCOPE_HOST = C.RT_SCOPE_HOST + RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE + RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC + RT_TABLE_COMPAT = C.RT_TABLE_COMPAT + RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT + RT_TABLE_MAIN = C.RT_TABLE_MAIN + RT_TABLE_LOCAL = C.RT_TABLE_LOCAL + RT_TABLE_MAX = C.RT_TABLE_MAX + RTA_UNSPEC = C.RTA_UNSPEC + RTA_DST = C.RTA_DST + RTA_SRC = C.RTA_SRC + RTA_IIF = C.RTA_IIF + RTA_OIF = C.RTA_OIF + RTA_GATEWAY = C.RTA_GATEWAY + RTA_PRIORITY = C.RTA_PRIORITY + RTA_PREFSRC = C.RTA_PREFSRC + RTA_METRICS = C.RTA_METRICS + RTA_MULTIPATH = C.RTA_MULTIPATH + RTA_FLOW = C.RTA_FLOW + RTA_CACHEINFO = C.RTA_CACHEINFO + RTA_TABLE = C.RTA_TABLE + RTN_UNSPEC = C.RTN_UNSPEC + RTN_UNICAST = C.RTN_UNICAST + RTN_LOCAL = C.RTN_LOCAL + RTN_BROADCAST = C.RTN_BROADCAST + RTN_ANYCAST = C.RTN_ANYCAST + RTN_MULTICAST = C.RTN_MULTICAST + RTN_BLACKHOLE = C.RTN_BLACKHOLE + RTN_UNREACHABLE = C.RTN_UNREACHABLE + RTN_PROHIBIT = C.RTN_PROHIBIT + RTN_THROW = C.RTN_THROW + RTN_NAT = C.RTN_NAT + RTN_XRESOLVE = C.RTN_XRESOLVE + RTNLGRP_NONE = C.RTNLGRP_NONE + RTNLGRP_LINK = C.RTNLGRP_LINK + RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY + RTNLGRP_NEIGH = C.RTNLGRP_NEIGH + RTNLGRP_TC = C.RTNLGRP_TC + RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR + RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE + RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE + RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE + RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR + RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE + RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE + RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO + RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX + RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE + RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT + SizeofNlMsghdr = C.sizeof_struct_nlmsghdr + SizeofNlMsgerr = C.sizeof_struct_nlmsgerr + SizeofRtGenmsg = C.sizeof_struct_rtgenmsg + SizeofNlAttr = C.sizeof_struct_nlattr + SizeofRtAttr = C.sizeof_struct_rtattr + SizeofIfInfomsg = C.sizeof_struct_ifinfomsg + SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg + SizeofRtMsg = C.sizeof_struct_rtmsg + SizeofRtNexthop = C.sizeof_struct_rtnexthop +) + +type NlMsghdr C.struct_nlmsghdr + +type NlMsgerr C.struct_nlmsgerr + +type RtGenmsg C.struct_rtgenmsg + +type NlAttr C.struct_nlattr + +type RtAttr C.struct_rtattr + +type IfInfomsg C.struct_ifinfomsg + +type IfAddrmsg C.struct_ifaddrmsg + +type RtMsg C.struct_rtmsg + +type RtNexthop C.struct_rtnexthop + +// Linux socket filter + +const ( + SizeofSockFilter = C.sizeof_struct_sock_filter + SizeofSockFprog = C.sizeof_struct_sock_fprog +) + +type SockFilter C.struct_sock_filter + +type SockFprog C.struct_sock_fprog + +// Inotify + +type InotifyEvent C.struct_inotify_event + +const SizeofInotifyEvent = C.sizeof_struct_inotify_event + +// Ptrace + +// Register structures +type PtraceRegs C.PtraceRegs + +// Structures contained in PtraceRegs on s390x (exported by mkpost.go) +type ptracePsw C.ptracePsw + +type ptraceFpregs C.ptraceFpregs + +type ptracePer C.ptracePer + +// Misc + +type FdSet C.fd_set + +type Sysinfo_t C.struct_sysinfo + +type Utsname C.struct_utsname + +type Ustat_t C.struct_ustat + +type EpollEvent C.struct_my_epoll_event + +const ( + AT_FDCWD = C.AT_FDCWD + AT_REMOVEDIR = C.AT_REMOVEDIR + AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) + +type PollFd C.struct_pollfd + +const ( + POLLIN = C.POLLIN + POLLPRI = C.POLLPRI + POLLOUT = C.POLLOUT + POLLRDHUP = C.POLLRDHUP + POLLERR = C.POLLERR + POLLHUP = C.POLLHUP + POLLNVAL = C.POLLNVAL +) + +type Sigset_t C.sigset_t + +// sysconf information + +const _SC_PAGESIZE = C._SC_PAGESIZE + +// Terminal handling + +type Termios C.termios_t diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go index 7cfdb9c..d15f93d 100644 --- a/vendor/golang.org/x/sys/unix/types_netbsd.go +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go @@ -5,7 +5,7 @@ // +build ignore /* -Input to cgo -godefs. See README.md +Input to cgo -godefs. See also mkerrors.sh and mkall.sh */ // +godefs map struct_in_addr [4]byte /* in_addr */ diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go index 6c7c227..b66fe25 100644 --- a/vendor/golang.org/x/sys/unix/types_openbsd.go +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -5,7 +5,7 @@ // +build ignore /* -Input to cgo -godefs. See README.md +Input to cgo -godefs. See also mkerrors.sh and mkall.sh */ // +godefs map struct_in_addr [4]byte /* in_addr */ diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go index 69bf1bc..c5d5c8f 100644 --- a/vendor/golang.org/x/sys/unix/types_solaris.go +++ b/vendor/golang.org/x/sys/unix/types_solaris.go @@ -5,7 +5,7 @@ // +build ignore /* -Input to cgo -godefs. See README.md +Input to cgo -godefs. See also mkerrors.sh and mkall.sh */ // +godefs map struct_in_addr [4]byte /* in_addr */ diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go index 8f40598..0feceee 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go @@ -1,5 +1,5 @@ // mkerrors.sh -m64 -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build amd64,dragonfly @@ -37,8 +37,8 @@ const ( AF_MAX = 0x24 AF_MPLS = 0x22 AF_NATM = 0x1d - AF_NETBIOS = 0x6 AF_NETGRAPH = 0x20 + AF_NS = 0x6 AF_OSI = 0x7 AF_PUP = 0x4 AF_ROUTE = 0x11 @@ -46,7 +46,6 @@ const ( AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 - ALTWERASE = 0x200 B0 = 0x0 B110 = 0x6e B115200 = 0x1c200 @@ -142,22 +141,7 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 - CLOCK_MONOTONIC = 0x4 - CLOCK_MONOTONIC_FAST = 0xc - CLOCK_MONOTONIC_PRECISE = 0xb - CLOCK_PROCESS_CPUTIME_ID = 0xf - CLOCK_PROF = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_FAST = 0xa - CLOCK_REALTIME_PRECISE = 0x9 - CLOCK_SECOND = 0xd - CLOCK_THREAD_CPUTIME_ID = 0xe - CLOCK_UPTIME = 0x5 - CLOCK_UPTIME_FAST = 0x8 - CLOCK_UPTIME_PRECISE = 0x7 - CLOCK_VIRTUAL = 0x1 CREAD = 0x800 - CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 @@ -302,28 +286,24 @@ const ( ECHOPRT = 0x20 EVFILT_AIO = -0x3 EVFILT_EXCEPT = -0x8 - EVFILT_FS = -0xa EVFILT_MARKER = 0xf EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0xa + EVFILT_SYSCOUNT = 0x8 EVFILT_TIMER = -0x7 - EVFILT_USER = -0x9 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 - EV_DISPATCH = 0x80 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_NODATA = 0x1000 EV_ONESHOT = 0x10 - EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTB = 0x9600 @@ -699,6 +679,7 @@ const ( IPPROTO_SATEXPAK = 0x40 IPPROTO_SATMON = 0x45 IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 IPPROTO_SDRP = 0x2a IPPROTO_SEP = 0x21 IPPROTO_SKIP = 0x39 @@ -749,7 +730,6 @@ const ( IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff - IPV6_MINHLIM = 0x28 IPV6_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa @@ -798,7 +778,6 @@ const ( IP_FW_FLUSH = 0x34 IP_FW_GET = 0x36 IP_FW_RESETLOG = 0x37 - IP_FW_X = 0x31 IP_FW_ZERO = 0x35 IP_HDRINCL = 0x2 IP_IPSEC_POLICY = 0x15 @@ -854,7 +833,6 @@ const ( MADV_SETMAP = 0xb MADV_WILLNEED = 0x3 MAP_ANON = 0x1000 - MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 @@ -873,7 +851,6 @@ const ( MAP_VPAGETABLE = 0x2000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MSG_CMSG_CLOEXEC = 0x1000 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 @@ -883,11 +860,11 @@ const ( MSG_FMASK = 0xffff0000 MSG_FNONBLOCKING = 0x20000 MSG_NOSIGNAL = 0x400 + MSG_NOTIFICATION = 0x200 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_SYNC = 0x800 MSG_TRUNC = 0x10 - MSG_UNUSED09 = 0x200 MSG_WAITALL = 0x40 MS_ASYNC = 0x1 MS_INVALIDATE = 0x2 @@ -898,19 +875,12 @@ const ( NET_RT_IFLIST = 0x3 NET_RT_MAXID = 0x4 NOFLSH = 0x80000000 - NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EXEC = 0x20000000 NOTE_EXIT = 0x80000000 NOTE_EXTEND = 0x4 - NOTE_FFAND = 0x40000000 - NOTE_FFCOPY = 0xc0000000 - NOTE_FFCTRLMASK = 0xc0000000 - NOTE_FFLAGSMASK = 0xffffff - NOTE_FFNOP = 0x0 - NOTE_FFOR = 0x80000000 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 @@ -921,7 +891,6 @@ const ( NOTE_REVOKE = 0x40 NOTE_TRACK = 0x1 NOTE_TRACKERR = 0x2 - NOTE_TRIGGER = 0x1000000 NOTE_WRITE = 0x2 OCRNL = 0x10 ONLCR = 0x2 @@ -929,7 +898,6 @@ const ( ONOCR = 0x20 ONOEOT = 0x8 OPOST = 0x1 - OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 @@ -942,11 +910,14 @@ const ( O_FAPPEND = 0x100000 O_FASYNCWRITE = 0x800000 O_FBLOCKING = 0x40000 - O_FMASK = 0xfc0000 + O_FBUFFERED = 0x2000000 + O_FMASK = 0x7fc0000 O_FNONBLOCKING = 0x80000 O_FOFFSET = 0x200000 O_FSYNC = 0x80 O_FSYNCWRITE = 0x400000 + O_FUNBUFFERED = 0x1000000 + O_MAPONREAD = 0x4000000 O_NDELAY = 0x4 O_NOCTTY = 0x8000 O_NOFOLLOW = 0x100 @@ -1125,10 +1096,8 @@ const ( SIOCSLIFPHYADDR = 0x8118694a SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 - SOCK_CLOEXEC = 0x10000000 SOCK_DGRAM = 0x2 SOCK_MAXADDRLEN = 0xff - SOCK_NONBLOCK = 0x20000000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 @@ -1138,7 +1107,6 @@ const ( SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BROADCAST = 0x20 - SO_CPUHINT = 0x1030 SO_DEBUG = 0x1 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 @@ -1159,12 +1127,8 @@ const ( SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 TCIFLUSH = 0x1 - TCIOFF = 0x3 TCIOFLUSH = 0x3 - TCION = 0x4 TCOFLUSH = 0x2 - TCOOFF = 0x1 - TCOON = 0x2 TCP_FASTKEEP = 0x80 TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 @@ -1263,8 +1227,6 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 - VM_BCACHE_SIZE_MAX = 0x0 - VM_SWZONE_SIZE_MAX = 0x4000000000 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 341bdfc..94c7e30 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -m32 -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build 386,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go +// cgo -godefs -- -m32 _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,12 +31,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x28 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 @@ -45,7 +42,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -55,7 +51,6 @@ const ( AF_TIPC = 0x1e AF_UNIX = 0x1 AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 AF_WANPIPE = 0x19 AF_X25 = 0x9 ALG_OP_DECRYPT = 0x0 @@ -65,7 +60,6 @@ const ( ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 - ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 @@ -100,10 +94,8 @@ const ( ARPHRD_IEEE80211_PRISM = 0x322 ARPHRD_IEEE80211_RADIOTAP = 0x323 ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 ARPHRD_IEEE802_TR = 0x320 ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 ARPHRD_IPDDP = 0x309 ARPHRD_IPGRE = 0x30a ARPHRD_IRDA = 0x30f @@ -111,7 +103,6 @@ const ( ARPHRD_LOCALTLK = 0x305 ARPHRD_LOOPBACK = 0x304 ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 ARPHRD_NETROM = 0x0 ARPHRD_NONE = 0xfffe ARPHRD_PHONET = 0x334 @@ -168,7 +159,6 @@ const ( BLKFRASET = 0x1264 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80041272 - BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e @@ -198,7 +188,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -206,11 +195,9 @@ const ( BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 - BPF_MOD = 0x90 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -221,7 +208,6 @@ const ( BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 - BPF_XOR = 0xa0 BRKINT = 0x2 BS0 = 0x0 BS1 = 0x2000 @@ -240,7 +226,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -263,7 +248,6 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -333,7 +317,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -343,22 +326,19 @@ const ( EPOLLRDBAND = 0x80 EPOLLRDHUP = 0x2000 EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 EPOLLWRBAND = 0x200 EPOLLWRNORM = 0x100 EPOLL_CLOEXEC = 0x80000 EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 ETH_P_1588 = 0x88f7 ETH_P_8021AD = 0x88a8 ETH_P_8021AH = 0x88e7 ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 ETH_P_802_2 = 0x4 ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 ETH_P_AARP = 0x80f3 ETH_P_AF_IUCV = 0xfbfb ETH_P_ALL = 0x3 @@ -369,11 +349,9 @@ const ( ETH_P_ATMFATE = 0x8884 ETH_P_ATMMPOA = 0x884c ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 ETH_P_BPQ = 0x8ff ETH_P_CAIF = 0xf7 ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd ETH_P_CONTROL = 0x16 ETH_P_CUST = 0x6006 ETH_P_DDCMP = 0x6 @@ -388,7 +366,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -400,13 +377,9 @@ const ( ETH_P_LINK_CTL = 0x886c ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -414,7 +387,6 @@ const ( ETH_P_PPP_DISC = 0x8863 ETH_P_PPP_MP = 0x8 ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb ETH_P_PUP = 0x200 ETH_P_PUPAT = 0x201 ETH_P_QINQ1 = 0x9100 @@ -429,11 +401,9 @@ const ( ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 @@ -442,7 +412,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +419,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -482,9 +433,6 @@ const ( F_GETSIG = 0xb F_LOCK = 0x1 F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 F_OK = 0x0 F_RDLCK = 0x0 F_SETFD = 0x2 @@ -515,48 +463,57 @@ const ( IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 IFF_BROADCAST = 0x2 IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 IFF_DORMANT = 0x20000 IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 IFF_LOOPBACK = 0x8 IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 IFF_NOTRAILERS = 0x20 IFF_NO_PI = 0x1000 IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 + IFF_OVS_DATAPATH = 0x8000 IFF_POINTOPOINT = 0x10 IFF_PORTSEL = 0x2000 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 IFF_TAP = 0x2 IFF_TUN = 0x1 IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 IFNAMSIZ = 0x10 IGNBRK = 0x1 IGNCR = 0x80 @@ -603,7 +560,6 @@ const ( IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c IPPROTO_DCCP = 0x21 IPPROTO_DSTOPTS = 0x3c @@ -620,8 +576,6 @@ const ( IPPROTO_IP = 0x0 IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -644,10 +598,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -661,19 +613,15 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 IPV6_PMTUDISC_PROBE = 0x3 IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -691,9 +639,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -714,7 +660,6 @@ const ( IP_MULTICAST_IF = 0x20 IP_MULTICAST_LOOP = 0x22 IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 IP_OFFMASK = 0x1fff IP_OPTIONS = 0x4 IP_ORIGDSTADDR = 0x14 @@ -724,8 +669,6 @@ const ( IP_PMTUDISC = 0xa IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb @@ -741,7 +684,6 @@ const ( IP_TRANSPARENT = 0x13 IP_TTL = 0x2 IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 @@ -764,12 +706,9 @@ const ( LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 - MADV_DODUMP = 0x11 MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -789,8 +728,6 @@ const ( MAP_FIXED = 0x10 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 @@ -801,11 +738,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -829,12 +764,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -843,8 +776,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -853,7 +784,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -861,12 +792,10 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa NETLINK_CONNECTOR = 0xb NETLINK_CRYPTO = 0x15 NETLINK_DNRTMSG = 0xe @@ -879,19 +808,14 @@ const ( NETLINK_IP6_FW = 0xd NETLINK_ISCSI = 0x8 NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 NETLINK_NETFILTER = 0xc NETLINK_NFLOG = 0x5 NETLINK_NO_ENOBUFS = 0x5 NETLINK_PKTINFO = 0x3 NETLINK_RDMA = 0x14 NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 @@ -962,21 +886,13 @@ const ( PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 PACKET_FASTROUTE = 0x6 PACKET_HDRLEN = 0xb PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 PACKET_LOOPBACK = 0x5 PACKET_LOSS = 0xe PACKET_MR_ALLMULTI = 0x2 @@ -987,17 +903,13 @@ const ( PACKET_ORIGDEV = 0x9 PACKET_OTHERHOST = 0x3 PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 PACKET_TX_RING = 0xd PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 PACKET_VERSION = 0xa PACKET_VNET_HDR = 0xf PARENB = 0x100 @@ -1023,11 +935,6 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1043,22 +950,16 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 PR_GET_TIMERSLACK = 0x1e PR_GET_TIMING = 0xd PR_GET_TSC = 0x19 @@ -1070,27 +971,15 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc PR_SET_MM_BRK = 0x7 PR_SET_MM_END_CODE = 0x2 PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf PR_SET_MM_START_BRK = 0x6 PR_SET_MM_START_CODE = 0x1 PR_SET_MM_START_DATA = 0x3 @@ -1102,7 +991,6 @@ const ( PR_SET_PTRACER_ANY = 0xffffffff PR_SET_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a @@ -1132,15 +1020,12 @@ const ( PTRACE_GETREGS = 0xc PTRACE_GETREGSET = 0x4204 PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a PTRACE_GET_THREAD_AREA = 0x19 PTRACE_INTERRUPT = 0x4207 PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0xff PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 @@ -1150,22 +1035,19 @@ const ( PTRACE_O_TRACEVFORK = 0x4 PTRACE_O_TRACEVFORKDONE = 0x20 PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 PTRACE_PEEKTEXT = 0x1 PTRACE_PEEKUSR = 0x3 PTRACE_POKEDATA = 0x5 PTRACE_POKETEXT = 0x4 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 PTRACE_SETFPREGS = 0xf PTRACE_SETFPXREGS = 0x13 PTRACE_SETOPTIONS = 0x4200 PTRACE_SETREGS = 0xd PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SINGLEBLOCK = 0x21 PTRACE_SINGLESTEP = 0x9 @@ -1182,21 +1064,18 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x1 RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xe RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 RTAX_RTO_MIN = 0xd RTAX_RTT = 0x4 @@ -1205,7 +1084,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x10 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1247,9 +1126,7 @@ const ( RTM_DELADDR = 0x15 RTM_DELADDRLABEL = 0x49 RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1257,7 +1134,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1266,57 +1142,44 @@ const ( RTM_GETANYCAST = 0x3e RTM_GETDCB = 0x4e RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 RTM_GETMULTICAST = 0x3a RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x4f RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 RTPROT_DNROUTED = 0xd RTPROT_GATED = 0x8 RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 RTPROT_MRT = 0xa RTPROT_NTK = 0xf RTPROT_RA = 0x9 @@ -1337,9 +1200,7 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1411,63 +1272,36 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f @@ -1478,12 +1312,10 @@ const ( SO_RCVLOWAT = 0x12 SO_RCVTIMEO = 0x14 SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf SO_RXQ_OVFL = 0x28 SO_SECURITY_AUTHENTICATION = 0x16 SO_SECURITY_ENCRYPTION_NETWORK = 0x18 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d SO_SNDBUF = 0x7 SO_SNDBUFFORCE = 0x20 SO_SNDLOWAT = 0x13 @@ -1492,14 +1324,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 @@ -1548,17 +1372,9 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1570,25 +1386,9 @@ const ( TCP_MD5SIG = 0xe TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 TCSBRK = 0x5409 @@ -1678,27 +1478,20 @@ const ( TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x800854db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd TUNSETDEBUG = 0x400454c9 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb @@ -1707,13 +1500,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 @@ -2031,7 +1818,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale file handle", + 116: "stale NFS file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", @@ -2048,7 +1835,7 @@ var errors = [...]string{ 130: "owner died", 131: "state not recoverable", 132: "operation not possible due to RF-kill", - 133: "memory page has hardware error", + 133: "unknown error 133", } // Signal table diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index f636a39..887210a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -m64 -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build amd64,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go +// cgo -godefs -- -m64 _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,12 +31,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x28 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 @@ -45,7 +42,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -55,7 +51,6 @@ const ( AF_TIPC = 0x1e AF_UNIX = 0x1 AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 AF_WANPIPE = 0x19 AF_X25 = 0x9 ALG_OP_DECRYPT = 0x0 @@ -65,7 +60,6 @@ const ( ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 - ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 @@ -100,10 +94,8 @@ const ( ARPHRD_IEEE80211_PRISM = 0x322 ARPHRD_IEEE80211_RADIOTAP = 0x323 ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 ARPHRD_IEEE802_TR = 0x320 ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 ARPHRD_IPDDP = 0x309 ARPHRD_IPGRE = 0x30a ARPHRD_IRDA = 0x30f @@ -111,7 +103,6 @@ const ( ARPHRD_LOCALTLK = 0x305 ARPHRD_LOOPBACK = 0x304 ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 ARPHRD_NETROM = 0x0 ARPHRD_NONE = 0xfffe ARPHRD_PHONET = 0x334 @@ -168,7 +159,6 @@ const ( BLKFRASET = 0x1264 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e @@ -198,7 +188,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -206,11 +195,9 @@ const ( BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 - BPF_MOD = 0x90 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -221,7 +208,6 @@ const ( BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 - BPF_XOR = 0xa0 BRKINT = 0x2 BS0 = 0x0 BS1 = 0x2000 @@ -240,7 +226,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -263,7 +248,6 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -333,7 +317,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -343,22 +326,19 @@ const ( EPOLLRDBAND = 0x80 EPOLLRDHUP = 0x2000 EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 EPOLLWRBAND = 0x200 EPOLLWRNORM = 0x100 EPOLL_CLOEXEC = 0x80000 EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 ETH_P_1588 = 0x88f7 ETH_P_8021AD = 0x88a8 ETH_P_8021AH = 0x88e7 ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 ETH_P_802_2 = 0x4 ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 ETH_P_AARP = 0x80f3 ETH_P_AF_IUCV = 0xfbfb ETH_P_ALL = 0x3 @@ -369,11 +349,9 @@ const ( ETH_P_ATMFATE = 0x8884 ETH_P_ATMMPOA = 0x884c ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 ETH_P_BPQ = 0x8ff ETH_P_CAIF = 0xf7 ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd ETH_P_CONTROL = 0x16 ETH_P_CUST = 0x6006 ETH_P_DDCMP = 0x6 @@ -388,7 +366,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -400,13 +377,9 @@ const ( ETH_P_LINK_CTL = 0x886c ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -414,7 +387,6 @@ const ( ETH_P_PPP_DISC = 0x8863 ETH_P_PPP_MP = 0x8 ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb ETH_P_PUP = 0x200 ETH_P_PUPAT = 0x201 ETH_P_QINQ1 = 0x9100 @@ -429,11 +401,9 @@ const ( ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 @@ -442,7 +412,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +419,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -482,9 +433,6 @@ const ( F_GETSIG = 0xb F_LOCK = 0x1 F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 F_OK = 0x0 F_RDLCK = 0x0 F_SETFD = 0x2 @@ -515,48 +463,57 @@ const ( IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 IFF_BROADCAST = 0x2 IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 IFF_DORMANT = 0x20000 IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 IFF_LOOPBACK = 0x8 IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 IFF_NOTRAILERS = 0x20 IFF_NO_PI = 0x1000 IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 + IFF_OVS_DATAPATH = 0x8000 IFF_POINTOPOINT = 0x10 IFF_PORTSEL = 0x2000 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 IFF_TAP = 0x2 IFF_TUN = 0x1 IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 IFNAMSIZ = 0x10 IGNBRK = 0x1 IGNCR = 0x80 @@ -603,7 +560,6 @@ const ( IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c IPPROTO_DCCP = 0x21 IPPROTO_DSTOPTS = 0x3c @@ -620,8 +576,6 @@ const ( IPPROTO_IP = 0x0 IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -644,10 +598,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -661,19 +613,15 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 IPV6_PMTUDISC_PROBE = 0x3 IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -691,9 +639,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -714,7 +660,6 @@ const ( IP_MULTICAST_IF = 0x20 IP_MULTICAST_LOOP = 0x22 IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 IP_OFFMASK = 0x1fff IP_OPTIONS = 0x4 IP_ORIGDSTADDR = 0x14 @@ -724,8 +669,6 @@ const ( IP_PMTUDISC = 0xa IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb @@ -741,7 +684,6 @@ const ( IP_TRANSPARENT = 0x13 IP_TTL = 0x2 IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 @@ -764,12 +706,9 @@ const ( LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 - MADV_DODUMP = 0x11 MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -789,8 +728,6 @@ const ( MAP_FIXED = 0x10 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 @@ -801,11 +738,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -829,12 +764,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -843,8 +776,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -853,7 +784,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -861,7 +792,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -962,21 +892,13 @@ const ( PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 PACKET_FASTROUTE = 0x6 PACKET_HDRLEN = 0xb PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 PACKET_LOOPBACK = 0x5 PACKET_LOSS = 0xe PACKET_MR_ALLMULTI = 0x2 @@ -987,17 +909,13 @@ const ( PACKET_ORIGDEV = 0x9 PACKET_OTHERHOST = 0x3 PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 PACKET_TX_RING = 0xd PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 PACKET_VERSION = 0xa PACKET_VNET_HDR = 0xf PARENB = 0x100 @@ -1023,11 +941,6 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1043,22 +956,16 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 PR_GET_TIMERSLACK = 0x1e PR_GET_TIMING = 0xd PR_GET_TSC = 0x19 @@ -1070,27 +977,15 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc PR_SET_MM_BRK = 0x7 PR_SET_MM_END_CODE = 0x2 PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf PR_SET_MM_START_BRK = 0x6 PR_SET_MM_START_CODE = 0x1 PR_SET_MM_START_DATA = 0x3 @@ -1102,7 +997,6 @@ const ( PR_SET_PTRACER_ANY = -0x1 PR_SET_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a @@ -1133,15 +1027,12 @@ const ( PTRACE_GETREGS = 0xc PTRACE_GETREGSET = 0x4204 PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a PTRACE_GET_THREAD_AREA = 0x19 PTRACE_INTERRUPT = 0x4207 PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0xff PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 @@ -1151,22 +1042,19 @@ const ( PTRACE_O_TRACEVFORK = 0x4 PTRACE_O_TRACEVFORKDONE = 0x20 PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 PTRACE_PEEKTEXT = 0x1 PTRACE_PEEKUSR = 0x3 PTRACE_POKEDATA = 0x5 PTRACE_POKETEXT = 0x4 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 PTRACE_SETFPREGS = 0xf PTRACE_SETFPXREGS = 0x13 PTRACE_SETOPTIONS = 0x4200 PTRACE_SETREGS = 0xd PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SINGLEBLOCK = 0x21 PTRACE_SINGLESTEP = 0x9 @@ -1183,21 +1071,18 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x1 RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xe RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 RTAX_RTO_MIN = 0xd RTAX_RTT = 0x4 @@ -1206,7 +1091,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x10 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1248,9 +1133,7 @@ const ( RTM_DELADDR = 0x15 RTM_DELADDRLABEL = 0x49 RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1258,7 +1141,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1267,57 +1149,44 @@ const ( RTM_GETANYCAST = 0x3e RTM_GETDCB = 0x4e RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 RTM_GETMULTICAST = 0x3a RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x4f RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 RTPROT_DNROUTED = 0xd RTPROT_GATED = 0x8 RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 RTPROT_MRT = 0xa RTPROT_NTK = 0xf RTPROT_RA = 0x9 @@ -1338,9 +1207,7 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1412,63 +1279,36 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f @@ -1479,12 +1319,10 @@ const ( SO_RCVLOWAT = 0x12 SO_RCVTIMEO = 0x14 SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf SO_RXQ_OVFL = 0x28 SO_SECURITY_AUTHENTICATION = 0x16 SO_SECURITY_ENCRYPTION_NETWORK = 0x18 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d SO_SNDBUF = 0x7 SO_SNDBUFFORCE = 0x20 SO_SNDLOWAT = 0x13 @@ -1493,14 +1331,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 @@ -1549,17 +1379,9 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1571,25 +1393,9 @@ const ( TCP_MD5SIG = 0xe TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 TCSBRK = 0x5409 @@ -1679,27 +1485,20 @@ const ( TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd TUNSETDEBUG = 0x400454c9 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb @@ -1708,13 +1507,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 @@ -2032,7 +1825,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale file handle", + 116: "stale NFS file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", @@ -2049,7 +1842,7 @@ var errors = [...]string{ 130: "owner died", 131: "state not recoverable", 132: "operation not possible due to RF-kill", - 133: "memory page has hardware error", + 133: "unknown error 133", } // Signal table diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 986a947..f691747 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build arm,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,20 +31,16 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x27 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 - AF_NFC = 0x27 AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -55,7 +50,6 @@ const ( AF_TIPC = 0x1e AF_UNIX = 0x1 AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 AF_WANPIPE = 0x19 AF_X25 = 0x9 ALG_OP_DECRYPT = 0x0 @@ -65,7 +59,6 @@ const ( ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 - ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 @@ -73,8 +66,6 @@ const ( ARPHRD_ATM = 0x13 ARPHRD_AX25 = 0x3 ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 ARPHRD_CHAOS = 0x5 ARPHRD_CISCO = 0x201 ARPHRD_CSLIP = 0x101 @@ -100,10 +91,9 @@ const ( ARPHRD_IEEE80211_PRISM = 0x322 ARPHRD_IEEE80211_RADIOTAP = 0x323 ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802154_PHY = 0x325 ARPHRD_IEEE802_TR = 0x320 ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 ARPHRD_IPDDP = 0x309 ARPHRD_IPGRE = 0x30a ARPHRD_IRDA = 0x30f @@ -111,11 +101,8 @@ const ( ARPHRD_LOCALTLK = 0x305 ARPHRD_LOOPBACK = 0x304 ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 ARPHRD_NETROM = 0x0 ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 ARPHRD_PIMREG = 0x30b ARPHRD_PPP = 0x200 ARPHRD_PRONET = 0x4 @@ -161,14 +148,13 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd - BLKBSZGET = 0x80041270 - BLKBSZSET = 0x40041271 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80041272 - BLKPBSZGET = 0x127b + BLKGETSIZE64 = 0x80081272 BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e @@ -198,7 +184,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -206,11 +191,9 @@ const ( BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 - BPF_MOD = 0x90 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -221,7 +204,6 @@ const ( BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 - BPF_XOR = 0xa0 BRKINT = 0x2 BS0 = 0x0 BS1 = 0x2000 @@ -240,7 +222,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -263,7 +244,6 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -318,6 +298,8 @@ const ( DT_SOCK = 0xc DT_UNKNOWN = 0x0 DT_WHT = 0xe + ELF_NGREG = 0x12 + ELF_PRARGSZ = 0x50 ECHO = 0x8 ECHOCTL = 0x200 ECHOE = 0x10 @@ -325,15 +307,8 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 + EPOLLET = -0x80000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -343,24 +318,18 @@ const ( EPOLLRDBAND = 0x80 EPOLLRDHUP = 0x2000 EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 EPOLLWRBAND = 0x200 EPOLLWRNORM = 0x100 EPOLL_CLOEXEC = 0x80000 EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 ETH_P_802_2 = 0x4 ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb ETH_P_ALL = 0x3 ETH_P_AOE = 0x88a2 ETH_P_ARCNET = 0x1a @@ -369,11 +338,9 @@ const ( ETH_P_ATMFATE = 0x8884 ETH_P_ATMMPOA = 0x884c ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 ETH_P_BPQ = 0x8ff ETH_P_CAIF = 0xf7 ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd ETH_P_CONTROL = 0x16 ETH_P_CUST = 0x6006 ETH_P_DDCMP = 0x6 @@ -388,7 +355,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -400,13 +366,9 @@ const ( ETH_P_LINK_CTL = 0x886c ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -414,26 +376,19 @@ const ( ETH_P_PPP_DISC = 0x8863 ETH_P_PPP_MP = 0x8 ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb ETH_P_PUP = 0x200 ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 ETH_P_RARP = 0x8035 ETH_P_SCA = 0x6007 ETH_P_SLOW = 0x8809 ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d ETH_P_TEB = 0x6558 ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 @@ -442,7 +397,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +404,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -482,9 +418,6 @@ const ( F_GETSIG = 0xb F_LOCK = 0x1 F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 F_OK = 0x0 F_RDLCK = 0x0 F_SETFD = 0x2 @@ -515,37 +448,25 @@ const ( IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 + IFA_MAX = 0x7 IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 IFF_AUTOMEDIA = 0x4000 IFF_BROADCAST = 0x2 IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 IFF_MASTER = 0x400 IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 IFF_NOTRAILERS = 0x20 IFF_NO_PI = 0x1000 IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 IFF_POINTOPOINT = 0x10 IFF_PORTSEL = 0x2000 IFF_PROMISC = 0x100 @@ -556,7 +477,6 @@ const ( IFF_TUN_EXCL = 0x8000 IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a IFNAMSIZ = 0x10 IGNBRK = 0x1 IGNCR = 0x80 @@ -603,7 +523,6 @@ const ( IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c IPPROTO_DCCP = 0x21 IPPROTO_DSTOPTS = 0x3c @@ -620,8 +539,6 @@ const ( IPPROTO_IP = 0x0 IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -644,10 +561,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -661,19 +576,15 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 IPV6_PMTUDISC_PROBE = 0x3 IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -691,9 +602,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -710,11 +619,9 @@ const ( IP_MSS = 0x240 IP_MTU = 0xe IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 IP_MULTICAST_IF = 0x20 IP_MULTICAST_LOOP = 0x22 IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 IP_OFFMASK = 0x1fff IP_OPTIONS = 0x4 IP_ORIGDSTADDR = 0x14 @@ -724,8 +631,6 @@ const ( IP_PMTUDISC = 0xa IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb @@ -741,7 +646,6 @@ const ( IP_TRANSPARENT = 0x13 IP_TTL = 0x2 IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 @@ -764,12 +668,9 @@ const ( LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 - MADV_DODUMP = 0x11 MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -787,24 +688,18 @@ const ( MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_PRIVATE = 0x2 MAP_SHARED = 0x1 - MAP_STACK = 0x20000 MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -828,12 +723,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -842,8 +735,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -852,7 +743,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -860,12 +751,10 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa NETLINK_CONNECTOR = 0xb NETLINK_CRYPTO = 0x15 NETLINK_DNRTMSG = 0xe @@ -878,8 +767,6 @@ const ( NETLINK_IP6_FW = 0xd NETLINK_ISCSI = 0x8 NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 NETLINK_NETFILTER = 0xc NETLINK_NFLOG = 0x5 NETLINK_NO_ENOBUFS = 0x5 @@ -914,7 +801,6 @@ const ( NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 NLM_F_ECHO = 0x8 NLM_F_EXCL = 0x200 NLM_F_MATCH = 0x200 @@ -940,7 +826,7 @@ const ( O_DIRECTORY = 0x4000 O_DSYNC = 0x1000 O_EXCL = 0x80 - O_FSYNC = 0x101000 + O_FSYNC = 0x1000 O_LARGEFILE = 0x20000 O_NDELAY = 0x800 O_NOATIME = 0x40000 @@ -950,64 +836,26 @@ const ( O_PATH = 0x200000 O_RDONLY = 0x0 O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x404000 + O_RSYNC = 0x1000 + O_SYNC = 0x1000 O_TRUNC = 0x200 O_WRONLY = 0x1 PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe PACKET_MR_ALLMULTI = 0x2 PACKET_MR_MULTICAST = 0x0 PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 PACKET_OTHERHOST = 0x3 PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 PARMRK = 0x8 PARODD = 0x200 PENDIN = 0x4000 @@ -1022,11 +870,7 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 + PR_CLEAR_SECCOMP_FILTER = 0x25 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1042,22 +886,16 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 + PR_GET_SECCOMP_FILTER = 0x23 PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 PR_GET_TIMERSLACK = 0x1e PR_GET_TIMING = 0xd PR_GET_TSC = 0x19 @@ -1069,39 +907,19 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_SET_CHILD_SUBREAPER = 0x24 + PR_SECCOMP_FILTER_EVENT = 0x1 + PR_SECCOMP_FILTER_SYSCALL = 0x0 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 PR_SET_PDEATHSIG = 0x1 PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff PR_SET_SECCOMP = 0x16 + PR_SET_SECCOMP_FILTER = 0x24 PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a @@ -1121,8 +939,6 @@ const ( PTRACE_EVENT_EXEC = 0x4 PTRACE_EVENT_EXIT = 0x6 PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 PTRACE_EVENT_VFORK = 0x2 PTRACE_EVENT_VFORK_DONE = 0x5 PTRACE_GETCRUNCHREGS = 0x19 @@ -1132,35 +948,25 @@ const ( PTRACE_GETREGS = 0xc PTRACE_GETREGSET = 0x4204 PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a PTRACE_GETVFPREGS = 0x1b PTRACE_GETWMMXREGS = 0x12 PTRACE_GET_THREAD_AREA = 0x16 - PTRACE_INTERRUPT = 0x4207 PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0x7f PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 PTRACE_O_TRACESYSGOOD = 0x1 PTRACE_O_TRACEVFORK = 0x4 PTRACE_O_TRACEVFORKDONE = 0x20 PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 PTRACE_PEEKTEXT = 0x1 PTRACE_PEEKUSR = 0x3 PTRACE_POKEDATA = 0x5 PTRACE_POKETEXT = 0x4 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SEIZE = 0x4206 PTRACE_SETCRUNCHREGS = 0x1a PTRACE_SETFPREGS = 0xf PTRACE_SETHBPREGS = 0x1e @@ -1168,7 +974,6 @@ const ( PTRACE_SETREGS = 0xd PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b PTRACE_SETVFPREGS = 0x1c PTRACE_SETWMMXREGS = 0x13 PTRACE_SET_SYSCALL = 0x17 @@ -1187,21 +992,18 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x1 RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xe RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 RTAX_RTO_MIN = 0xd RTAX_RTT = 0x4 @@ -1210,7 +1012,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x10 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1252,9 +1054,7 @@ const ( RTM_DELADDR = 0x15 RTM_DELADDRLABEL = 0x49 RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1262,7 +1062,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1271,57 +1070,44 @@ const ( RTM_GETANYCAST = 0x3e RTM_GETDCB = 0x4e RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 RTM_GETMULTICAST = 0x3a RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x4f RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 RTPROT_DNROUTED = 0xd RTPROT_GATED = 0x8 RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 RTPROT_MRT = 0xa RTPROT_NTK = 0xf RTPROT_RA = 0x9 @@ -1342,9 +1128,7 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1416,63 +1200,36 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f @@ -1483,12 +1240,10 @@ const ( SO_RCVLOWAT = 0x12 SO_RCVTIMEO = 0x14 SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf SO_RXQ_OVFL = 0x28 SO_SECURITY_AUTHENTICATION = 0x16 SO_SECURITY_ENCRYPTION_NETWORK = 0x18 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d SO_SNDBUF = 0x7 SO_SNDBUFFORCE = 0x20 SO_SNDLOWAT = 0x13 @@ -1497,14 +1252,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 @@ -1553,17 +1300,9 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1575,25 +1314,9 @@ const ( TCP_MD5SIG = 0xe TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 TCSBRK = 0x5409 @@ -1683,27 +1406,20 @@ const ( TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x800854db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd TUNSETDEBUG = 0x400454c9 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb @@ -1712,13 +1428,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 @@ -2036,7 +1746,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale file handle", + 116: "stale NFS file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", @@ -2053,7 +1763,7 @@ var errors = [...]string{ 130: "owner died", 131: "state not recoverable", 132: "operation not possible due to RF-kill", - 133: "memory page has hardware error", + 133: "unknown error 133", } // Signal table diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index b72a645..6f6d1d9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build arm64,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go +// cgo -godefs -- _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,12 +31,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x29 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 @@ -45,7 +42,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -65,7 +61,6 @@ const ( ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 - ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 @@ -168,7 +163,6 @@ const ( BLKFRASET = 0x1264 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e @@ -198,7 +192,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -210,7 +203,6 @@ const ( BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -240,7 +232,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -263,7 +254,6 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -325,6 +315,8 @@ const ( ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 + ELF_NGREG = 0x22 + ELF_PRARGSZ = 0x50 ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 @@ -333,7 +325,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -350,12 +341,10 @@ const ( EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 - ESR_MAGIC = 0x45535201 ETH_P_1588 = 0x88f7 ETH_P_8021AD = 0x88a8 ETH_P_8021AH = 0x88e7 ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 ETH_P_802_2 = 0x4 ETH_P_802_3 = 0x1 ETH_P_802_3_MIN = 0x600 @@ -389,7 +378,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -401,13 +389,10 @@ const ( ETH_P_LINK_CTL = 0x886c ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -430,11 +415,9 @@ const ( ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 @@ -443,7 +426,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -451,24 +433,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -483,9 +447,6 @@ const ( F_GETSIG = 0xb F_LOCK = 0x1 F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 F_OK = 0x0 F_RDLCK = 0x0 F_SETFD = 0x2 @@ -516,29 +477,38 @@ const ( IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 IFF_ALLMULTI = 0x200 IFF_ATTACH_QUEUE = 0x200 IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 IFF_BROADCAST = 0x2 IFF_DEBUG = 0x4 IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 IFF_DORMANT = 0x20000 IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LIVE_ADDR_CHANGE = 0x100000 IFF_LOOPBACK = 0x8 IFF_LOWER_UP = 0x10000 + IFF_MACVLAN = 0x200000 + IFF_MACVLAN_PORT = 0x2000 IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 IFF_MULTICAST = 0x1000 IFF_MULTI_QUEUE = 0x100 IFF_NOARP = 0x80 @@ -546,18 +516,27 @@ const ( IFF_NOTRAILERS = 0x20 IFF_NO_PI = 0x1000 IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 IFF_PERSIST = 0x800 IFF_POINTOPOINT = 0x10 IFF_PORTSEL = 0x2000 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_SUPP_NOFCS = 0x80000 IFF_TAP = 0x2 + IFF_TEAM_PORT = 0x40000 IFF_TUN = 0x1 IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 IFNAMSIZ = 0x10 IGNBRK = 0x1 IGNCR = 0x80 @@ -622,7 +601,6 @@ const ( IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -645,10 +623,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -662,19 +638,15 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 IPV6_PMTUDISC_PROBE = 0x3 IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -692,9 +664,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -715,7 +685,6 @@ const ( IP_MULTICAST_IF = 0x20 IP_MULTICAST_LOOP = 0x22 IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 IP_OFFMASK = 0x1fff IP_OPTIONS = 0x4 IP_ORIGDSTADDR = 0x14 @@ -725,8 +694,6 @@ const ( IP_PMTUDISC = 0xa IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb @@ -770,7 +737,6 @@ const ( MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -801,11 +767,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -829,12 +793,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -843,8 +805,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -853,7 +813,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -861,7 +821,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -953,7 +912,7 @@ const ( O_RDWR = 0x2 O_RSYNC = 0x101000 O_SYNC = 0x101000 - O_TMPFILE = 0x404000 + O_TMPFILE = 0x410000 O_TRUNC = 0x200 O_WRONLY = 0x1 PACKET_ADD_MEMBERSHIP = 0x1 @@ -962,21 +921,16 @@ const ( PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 PACKET_FANOUT_RND = 0x4 PACKET_FANOUT_ROLLOVER = 0x3 PACKET_FASTROUTE = 0x6 PACKET_HDRLEN = 0xb PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 PACKET_LOOPBACK = 0x5 PACKET_LOSS = 0xe PACKET_MR_ALLMULTI = 0x2 @@ -987,17 +941,14 @@ const ( PACKET_ORIGDEV = 0x9 PACKET_OTHERHOST = 0x3 PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 PACKET_TIMESTAMP = 0x11 PACKET_TX_HAS_OFF = 0x13 PACKET_TX_RING = 0xd PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 PACKET_VERSION = 0xa PACKET_VNET_HDR = 0xf PARENB = 0x100 @@ -1023,11 +974,6 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1043,21 +989,17 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a PR_GET_TID_ADDRESS = 0x28 PR_GET_TIMERSLACK = 0x1e PR_GET_TIMING = 0xd @@ -1070,14 +1012,11 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 PR_SET_MM = 0x23 PR_SET_MM_ARG_END = 0x9 @@ -1089,8 +1028,6 @@ const ( PR_SET_MM_ENV_END = 0xb PR_SET_MM_ENV_START = 0xa PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf PR_SET_MM_START_BRK = 0x6 PR_SET_MM_START_CODE = 0x1 PR_SET_MM_START_DATA = 0x3 @@ -1102,7 +1039,6 @@ const ( PR_SET_PTRACER_ANY = -0x1 PR_SET_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a @@ -1135,8 +1071,7 @@ const ( PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0x1000ff PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 @@ -1153,7 +1088,6 @@ const ( PTRACE_POKEDATA = 0x5 PTRACE_POKETEXT = 0x4 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 PTRACE_SETOPTIONS = 0x4200 PTRACE_SETREGS = 0xd @@ -1172,19 +1106,17 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x1 RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xf RTAX_MTU = 0x2 RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 @@ -1195,7 +1127,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x11 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1239,7 +1171,6 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1247,7 +1178,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1261,14 +1191,12 @@ const ( RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x57 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1278,28 +1206,22 @@ const ( RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 @@ -1327,7 +1249,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1401,52 +1322,31 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -1482,13 +1382,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1538,7 +1431,6 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1563,15 +1455,11 @@ const ( TCP_MSS_DEFAULT = 0x218 TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 TCP_S_DATA_IN = 0x4 TCP_S_DATA_OUT = 0x8 @@ -1671,9 +1559,7 @@ const ( TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd TUNSETDEBUG = 0x400454c9 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca @@ -1686,9 +1572,7 @@ const ( TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb @@ -1697,13 +1581,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 198a305..37d16f7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build mips,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,20 +31,16 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x27 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 - AF_NFC = 0x27 AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -55,7 +50,6 @@ const ( AF_TIPC = 0x1e AF_UNIX = 0x1 AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 AF_WANPIPE = 0x19 AF_X25 = 0x9 ALG_OP_DECRYPT = 0x0 @@ -65,7 +59,6 @@ const ( ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 - ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 @@ -100,10 +93,8 @@ const ( ARPHRD_IEEE80211_PRISM = 0x322 ARPHRD_IEEE80211_RADIOTAP = 0x323 ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 ARPHRD_IEEE802_TR = 0x320 ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 ARPHRD_IPDDP = 0x309 ARPHRD_IPGRE = 0x30a ARPHRD_IRDA = 0x30f @@ -111,7 +102,6 @@ const ( ARPHRD_LOCALTLK = 0x305 ARPHRD_LOOPBACK = 0x304 ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 ARPHRD_NETROM = 0x0 ARPHRD_NONE = 0xfffe ARPHRD_PHONET = 0x334 @@ -161,22 +151,21 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd - BLKBSZGET = 0x40041270 - BLKBSZSET = 0x80041271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40041272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 BOTHER = 0x1000 BPF_A = 0x10 BPF_ABS = 0x20 @@ -198,7 +187,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -206,11 +194,9 @@ const ( BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 - BPF_MOD = 0x90 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -221,28 +207,21 @@ const ( BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 - BPF_XOR = 0xa0 BRKINT = 0x2 BS0 = 0x0 BS1 = 0x2000 BSDLY = 0x2000 CAN_BCM = 0x2 CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d CAN_EFF_MASK = 0x1fffffff CAN_ERR_FLAG = 0x20000000 CAN_ERR_MASK = 0x1fffffff CAN_INV_FILTER = 0x20000000 CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 CAN_MCNET = 0x5 - CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff CAN_TP16 = 0x3 CAN_TP20 = 0x4 @@ -251,8 +230,6 @@ const ( CFLUSH = 0xf CIBAUD = 0x100f0000 CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 CLOCK_DEFAULT = 0x0 CLOCK_EXT = 0x1 CLOCK_INT = 0x2 @@ -261,9 +238,7 @@ const ( CLOCK_MONOTONIC_RAW = 0x4 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -273,7 +248,6 @@ const ( CLONE_FILES = 0x400 CLONE_FS = 0x200 CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 CLONE_NEWIPC = 0x8000000 CLONE_NEWNET = 0x40000000 CLONE_NEWNS = 0x20000 @@ -332,8 +306,7 @@ const ( ENCODING_NRZ = 0x1 ENCODING_NRZI = 0x2 EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 + EPOLLET = -0x80000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -343,22 +316,19 @@ const ( EPOLLRDBAND = 0x80 EPOLLRDHUP = 0x2000 EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 EPOLLWRBAND = 0x200 EPOLLWRNORM = 0x100 EPOLL_CLOEXEC = 0x80000 EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x80 ETH_P_1588 = 0x88f7 ETH_P_8021AD = 0x88a8 ETH_P_8021AH = 0x88e7 ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 ETH_P_802_2 = 0x4 ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 ETH_P_AARP = 0x80f3 ETH_P_AF_IUCV = 0xfbfb ETH_P_ALL = 0x3 @@ -369,11 +339,9 @@ const ( ETH_P_ATMFATE = 0x8884 ETH_P_ATMMPOA = 0x884c ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 ETH_P_BPQ = 0x8ff ETH_P_CAIF = 0xf7 ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd ETH_P_CONTROL = 0x16 ETH_P_CUST = 0x6006 ETH_P_DDCMP = 0x6 @@ -388,7 +356,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -400,13 +367,9 @@ const ( ETH_P_LINK_CTL = 0x886c ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -414,7 +377,6 @@ const ( ETH_P_PPP_DISC = 0x8863 ETH_P_PPP_MP = 0x8 ETH_P_PPP_SES = 0x8864 - ETH_P_PRP = 0x88fb ETH_P_PUP = 0x200 ETH_P_PUPAT = 0x201 ETH_P_QINQ1 = 0x9100 @@ -429,11 +391,9 @@ const ( ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 @@ -442,7 +402,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +409,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -482,9 +423,6 @@ const ( F_GETSIG = 0xb F_LOCK = 0x1 F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 F_OK = 0x0 F_RDLCK = 0x0 F_SETFD = 0x2 @@ -515,48 +453,57 @@ const ( IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 IFF_BROADCAST = 0x2 IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 IFF_DORMANT = 0x20000 IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 IFF_LOOPBACK = 0x8 IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 IFF_NOTRAILERS = 0x20 IFF_NO_PI = 0x1000 IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 + IFF_OVS_DATAPATH = 0x8000 IFF_POINTOPOINT = 0x10 IFF_PORTSEL = 0x2000 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 IFF_TAP = 0x2 IFF_TUN = 0x1 IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 IFNAMSIZ = 0x10 IGNBRK = 0x1 IGNCR = 0x80 @@ -603,7 +550,6 @@ const ( IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c IPPROTO_DCCP = 0x21 IPPROTO_DSTOPTS = 0x3c @@ -620,8 +566,6 @@ const ( IPPROTO_IP = 0x0 IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -644,10 +588,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -661,19 +603,15 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 IPV6_PMTUDISC_PROBE = 0x3 IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -691,9 +629,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -710,11 +646,9 @@ const ( IP_MSS = 0x240 IP_MTU = 0xe IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 IP_MULTICAST_IF = 0x20 IP_MULTICAST_LOOP = 0x22 IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 IP_OFFMASK = 0x1fff IP_OPTIONS = 0x4 IP_ORIGDSTADDR = 0x14 @@ -724,8 +658,6 @@ const ( IP_PMTUDISC = 0xa IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb @@ -741,7 +673,6 @@ const ( IP_TRANSPARENT = 0x13 IP_TTL = 0x2 IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 @@ -764,12 +695,9 @@ const ( LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 - MADV_DODUMP = 0x11 MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -787,9 +715,6 @@ const ( MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a MAP_LOCKED = 0x8000 MAP_NONBLOCK = 0x20000 MAP_NORESERVE = 0x400 @@ -797,15 +722,12 @@ const ( MAP_PRIVATE = 0x2 MAP_RENAME = 0x800 MAP_SHARED = 0x1 - MAP_STACK = 0x40000 MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -829,12 +751,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -843,8 +763,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -853,7 +771,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -861,7 +779,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -948,12 +865,10 @@ const ( O_NOCTTY = 0x800 O_NOFOLLOW = 0x20000 O_NONBLOCK = 0x80 - O_PATH = 0x200000 O_RDONLY = 0x0 O_RDWR = 0x2 O_RSYNC = 0x4010 O_SYNC = 0x4010 - O_TMPFILE = 0x410000 O_TRUNC = 0x200 O_WRONLY = 0x1 PACKET_ADD_MEMBERSHIP = 0x1 @@ -962,21 +877,13 @@ const ( PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 PACKET_FASTROUTE = 0x6 PACKET_HDRLEN = 0xb PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 PACKET_LOOPBACK = 0x5 PACKET_LOSS = 0xe PACKET_MR_ALLMULTI = 0x2 @@ -987,17 +894,13 @@ const ( PACKET_ORIGDEV = 0x9 PACKET_OTHERHOST = 0x3 PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 PACKET_TX_RING = 0xd PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 PACKET_VERSION = 0xa PACKET_VNET_HDR = 0xf PARENB = 0x100 @@ -1023,11 +926,6 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1043,22 +941,15 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 PR_GET_TIMERSLACK = 0x1e PR_GET_TIMING = 0xd PR_GET_TSC = 0x19 @@ -1070,39 +961,15 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff PR_SET_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a @@ -1122,8 +989,7 @@ const ( PTRACE_EVENT_EXEC = 0x4 PTRACE_EVENT_EXIT = 0x6 PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_STOP = 0x7 PTRACE_EVENT_VFORK = 0x2 PTRACE_EVENT_VFORK_DONE = 0x5 PTRACE_GETEVENTMSG = 0x4201 @@ -1131,7 +997,6 @@ const ( PTRACE_GETREGS = 0xc PTRACE_GETREGSET = 0x4204 PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 PTRACE_GET_WATCH_REGS = 0xd0 @@ -1139,21 +1004,16 @@ const ( PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0x7f PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 PTRACE_O_TRACESYSGOOD = 0x1 PTRACE_O_TRACEVFORK = 0x4 PTRACE_O_TRACEVFORKDONE = 0x20 PTRACE_PEEKDATA = 0x2 PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 PTRACE_PEEKTEXT = 0x1 PTRACE_PEEKTEXT_3264 = 0xc0 PTRACE_PEEKUSR = 0x3 @@ -1162,14 +1022,13 @@ const ( PTRACE_POKETEXT = 0x4 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 PTRACE_SETFPREGS = 0xf PTRACE_SETOPTIONS = 0x4200 PTRACE_SETREGS = 0xd PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SET_WATCH_REGS = 0xd1 PTRACE_SINGLESTEP = 0x9 @@ -1182,23 +1041,20 @@ const ( RLIMIT_FSIZE = 0x1 RLIMIT_NOFILE = 0x5 RLIMIT_STACK = 0x3 - RLIM_INFINITY = -0x1 + RLIM_INFINITY = 0x7fffffffffffffff RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xe RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 RTAX_RTO_MIN = 0xd RTAX_RTT = 0x4 @@ -1207,7 +1063,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x10 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1249,9 +1105,7 @@ const ( RTM_DELADDR = 0x15 RTM_DELADDRLABEL = 0x49 RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1259,7 +1113,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1268,57 +1121,44 @@ const ( RTM_GETANYCAST = 0x3e RTM_GETDCB = 0x4e RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 RTM_GETMULTICAST = 0x3a RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x4f RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 RTPROT_DNROUTED = 0xd RTPROT_GATED = 0x8 RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 RTPROT_MRT = 0xa RTPROT_NTK = 0xf RTPROT_RA = 0x9 @@ -1339,9 +1179,7 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 - SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1413,63 +1251,37 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x2 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0xffff SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1009 - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e @@ -1480,12 +1292,10 @@ const ( SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 SO_RXQ_OVFL = 0x28 SO_SECURITY_AUTHENTICATION = 0x16 SO_SECURITY_ENCRYPTION_NETWORK = 0x18 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d SO_SNDBUF = 0x1001 SO_SNDBUFFORCE = 0x1f SO_SNDLOWAT = 0x1003 @@ -1495,14 +1305,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 @@ -1550,17 +1352,9 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1572,25 +1366,9 @@ const ( TCP_MD5SIG = 0xe TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x5410 TCSBRK = 0x5405 @@ -1611,15 +1389,11 @@ const ( TIOCGDEV = 0x40045432 TIOCGETD = 0x7400 TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x5492 TIOCGLCKTRMIOS = 0x548b TIOCGLTC = 0x7474 TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 - TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 TIOCGSOFTCAR = 0x5481 @@ -1672,7 +1446,6 @@ const ( TIOCSLTC = 0x7475 TIOCSPGRP = 0x80047476 TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0xc020542f TIOCSSERIAL = 0x5485 TIOCSSOFTCAR = 0x5482 TIOCSTI = 0x5472 @@ -1682,27 +1455,20 @@ const ( TUNATTACHFILTER = 0x800854d5 TUNDETACHFILTER = 0x800854d6 TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x400854db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd TUNSETDEBUG = 0x800454c9 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc VDISCARD = 0xd VEOF = 0x10 VEOL = 0x11 @@ -1711,13 +1477,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 @@ -2045,7 +1805,7 @@ var errors = [...]string{ 148: "no route to host", 149: "operation already in progress", 150: "operation now in progress", - 151: "stale file handle", + 151: "stale NFS file handle", 158: "operation canceled", 159: "no medium found", 160: "wrong medium type", @@ -2056,7 +1816,7 @@ var errors = [...]string{ 165: "owner died", 166: "state not recoverable", 167: "operation not possible due to RF-kill", - 168: "memory page has hardware error", + 168: "unknown error 168", 1133: "disk quota exceeded", } diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 37d66f3..3aa557b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build mips64,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- _const.go package unix @@ -32,11 +32,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x29 AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -45,7 +44,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -161,23 +159,21 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -223,33 +219,7 @@ const ( BPF_X = 0x8 BPF_XOR = 0xa0 BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CBAUD = 0x100f - CBAUDEX = 0x1000 CFLUSH = 0xf - CIBAUD = 0x100f0000 CLOCAL = 0x800 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -290,14 +260,7 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRDLY = 0x600 CREAD = 0x80 - CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 @@ -333,7 +296,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -388,7 +350,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -401,12 +362,10 @@ const ( ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -442,32 +401,10 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -507,7 +444,6 @@ const ( GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 - IBSHIFT = 0x10 ICANON = 0x2 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -621,7 +557,6 @@ const ( IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -647,7 +582,6 @@ const ( IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -691,7 +625,6 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 @@ -745,7 +678,6 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 - IUCLC = 0x200 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x1000 @@ -769,7 +701,6 @@ const ( MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -801,11 +732,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -829,7 +758,6 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 @@ -843,8 +771,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -861,7 +787,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -895,13 +820,10 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 - NL0 = 0x0 - NL1 = 0x100 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 - NLDLY = 0x100 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -927,7 +849,6 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 - OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -1162,7 +1083,6 @@ const ( PTRACE_POKETEXT = 0x4 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 PTRACE_SETFPREGS = 0xf PTRACE_SETOPTIONS = 0x4200 @@ -1207,7 +1127,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x16 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1259,7 +1179,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1277,10 +1196,9 @@ const ( RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x5b RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1295,16 +1213,15 @@ const ( RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x13 + RTM_NR_MSGTYPES = 0x4c RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 + RTNH_COMPARE_MASK = 0x11 RTNH_F_DEAD = 0x1 RTNH_F_LINKDOWN = 0x10 RTNH_F_OFFLOAD = 0x8 @@ -1339,7 +1256,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1413,44 +1329,27 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x2 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0xffff SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1009 SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1495,13 +1394,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1534,23 +1426,10 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 TCFLSH = 0x5407 - TCGETA = 0x5401 - TCGETS = 0x540d - TCGETS2 = 0x4030542a TCIFLUSH = 0x0 - TCIOFF = 0x2 TCIOFLUSH = 0x2 - TCION = 0x3 TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1575,15 +1454,11 @@ const ( TCP_MSS_DEFAULT = 0x218 TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 TCP_S_DATA_IN = 0x4 TCP_S_DATA_OUT = 0x8 @@ -1594,16 +1469,6 @@ const ( TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x5410 TCSBRK = 0x5405 - TCSBRKP = 0x5486 - TCSETA = 0x5402 - TCSETAF = 0x5404 - TCSETAW = 0x5403 - TCSETS = 0x540e - TCSETS2 = 0x8030542b - TCSETSF = 0x5410 - TCSETSF2 = 0x8030542d - TCSETSW = 0x540f - TCSETSW2 = 0x8030542c TCXONC = 0x5406 TIOCCBRK = 0x5428 TIOCCONS = 0x80047478 @@ -1711,13 +1576,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 @@ -1740,8 +1599,6 @@ const ( WORDSIZE = 0x40 WSTOPPED = 0x2 WUNTRACED = 0x2 - XCASE = 0x4 - XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 0f33f0f..3b50d85 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build mips64le,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- _const.go package unix @@ -32,11 +32,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x29 AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -45,7 +44,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -161,23 +159,21 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -223,33 +219,7 @@ const ( BPF_X = 0x8 BPF_XOR = 0xa0 BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CBAUD = 0x100f - CBAUDEX = 0x1000 CFLUSH = 0xf - CIBAUD = 0x100f0000 CLOCAL = 0x800 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -290,14 +260,7 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRDLY = 0x600 CREAD = 0x80 - CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 @@ -333,7 +296,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -388,7 +350,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -401,12 +362,10 @@ const ( ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -442,32 +401,10 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -507,7 +444,6 @@ const ( GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HUPCL = 0x400 - IBSHIFT = 0x10 ICANON = 0x2 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -621,7 +557,6 @@ const ( IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -647,7 +582,6 @@ const ( IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -691,7 +625,6 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 @@ -745,7 +678,6 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 - IUCLC = 0x200 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x1000 @@ -769,7 +701,6 @@ const ( MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -801,11 +732,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -829,7 +758,6 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 @@ -843,8 +771,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -861,7 +787,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -895,13 +820,10 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 - NL0 = 0x0 - NL1 = 0x100 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 - NLDLY = 0x100 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -927,7 +849,6 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 - OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -1162,7 +1083,6 @@ const ( PTRACE_POKETEXT = 0x4 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 PTRACE_SETFPREGS = 0xf PTRACE_SETOPTIONS = 0x4200 @@ -1207,7 +1127,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x16 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1259,7 +1179,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1277,10 +1196,9 @@ const ( RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x5b RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1295,16 +1213,15 @@ const ( RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x13 + RTM_NR_MSGTYPES = 0x4c RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 + RTNH_COMPARE_MASK = 0x11 RTNH_F_DEAD = 0x1 RTNH_F_LINKDOWN = 0x10 RTNH_F_OFFLOAD = 0x8 @@ -1339,7 +1256,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1413,44 +1329,27 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x2 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0xffff SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1009 SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1495,13 +1394,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1534,23 +1426,10 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 TCFLSH = 0x5407 - TCGETA = 0x5401 - TCGETS = 0x540d - TCGETS2 = 0x4030542a TCIFLUSH = 0x0 - TCIOFF = 0x2 TCIOFLUSH = 0x2 - TCION = 0x3 TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1575,15 +1454,11 @@ const ( TCP_MSS_DEFAULT = 0x218 TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 TCP_S_DATA_IN = 0x4 TCP_S_DATA_OUT = 0x8 @@ -1594,16 +1469,6 @@ const ( TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x5410 TCSBRK = 0x5405 - TCSBRKP = 0x5486 - TCSETA = 0x5402 - TCSETAF = 0x5404 - TCSETAW = 0x5403 - TCSETS = 0x540e - TCSETS2 = 0x8030542b - TCSETSF = 0x5410 - TCSETSF2 = 0x8030542d - TCSETSW = 0x540f - TCSETSW2 = 0x8030542c TCXONC = 0x5406 TIOCCBRK = 0x5428 TIOCCONS = 0x80047478 @@ -1711,13 +1576,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 @@ -1740,8 +1599,6 @@ const ( WORDSIZE = 0x40 WSTOPPED = 0x2 WUNTRACED = 0x2 - XCASE = 0x4 - XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 3fa39fa..8a122ad 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build mipsle,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- _const.go package unix @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2a AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -45,7 +45,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -161,22 +160,21 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd - BLKBSZGET = 0x40041270 - BLKBSZSET = 0x80041271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40041272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 BOTHER = 0x1000 BPF_A = 0x10 BPF_ABS = 0x20 @@ -240,7 +238,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -406,7 +403,6 @@ const ( ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -442,7 +438,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +445,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -829,7 +806,6 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 @@ -843,8 +819,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -861,7 +835,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -1207,7 +1180,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x18 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1304,7 +1277,7 @@ const ( RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 + RTNH_COMPARE_MASK = 0x11 RTNH_F_DEAD = 0x1 RTNH_F_LINKDOWN = 0x10 RTNH_F_OFFLOAD = 0x8 @@ -1339,7 +1312,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1495,13 +1467,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1581,7 +1546,6 @@ const ( TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d TCP_SAVED_SYN = 0x1c TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 @@ -1711,13 +1675,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 4585ef7..e2dd7aa 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build ppc64,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- -m64 _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,12 +31,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x29 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 @@ -45,7 +42,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -161,22 +157,21 @@ const ( B75 = 0x2 B921600 = 0x16 B9600 = 0xd - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 BOTHER = 0x1f BPF_A = 0x10 BPF_ABS = 0x20 @@ -198,7 +193,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -210,7 +204,6 @@ const ( BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -240,7 +233,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -263,7 +255,6 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -333,7 +324,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -388,7 +378,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -401,12 +390,10 @@ const ( ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -429,7 +416,6 @@ const ( ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 @@ -442,7 +428,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +435,6 @@ const ( FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -516,13 +483,11 @@ const ( IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 IFA_MAX = 0x8 @@ -621,7 +586,6 @@ const ( IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -644,10 +608,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -661,7 +623,6 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 @@ -673,7 +634,6 @@ const ( IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -691,9 +651,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -769,7 +727,6 @@ const ( MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -800,11 +757,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x2000 MCL_FUTURE = 0x4000 - MCL_ONFAULT = 0x8000 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -828,12 +783,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -842,8 +795,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -852,7 +803,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -860,7 +811,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -954,7 +904,7 @@ const ( O_RDWR = 0x2 O_RSYNC = 0x101000 O_SYNC = 0x101000 - O_TMPFILE = 0x404000 + O_TMPFILE = 0x410000 O_TRUNC = 0x200 O_WRONLY = 0x1 PACKET_ADD_MEMBERSHIP = 0x1 @@ -963,10 +913,7 @@ const ( PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_HASH = 0x0 @@ -991,7 +938,6 @@ const ( PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 PACKET_TIMESTAMP = 0x11 @@ -1025,11 +971,6 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1045,14 +986,11 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 @@ -1072,14 +1010,11 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 PR_SET_MM = 0x23 PR_SET_MM_ARG_END = 0x9 @@ -1143,8 +1078,7 @@ const ( PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0x1000ff PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 @@ -1161,7 +1095,6 @@ const ( PTRACE_POKEDATA = 0x5 PTRACE_POKETEXT = 0x4 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 PTRACE_SETEVRREGS = 0x15 PTRACE_SETFPREGS = 0xf @@ -1240,19 +1173,17 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x1 RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xf RTAX_MTU = 0x2 RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 @@ -1263,7 +1194,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x11 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1307,7 +1238,6 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1315,7 +1245,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1329,14 +1258,12 @@ const ( RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x57 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1346,28 +1273,22 @@ const ( RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 @@ -1395,7 +1316,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1469,52 +1389,32 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -1550,13 +1450,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1604,7 +1497,6 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1629,15 +1521,11 @@ const ( TCP_MSS_DEFAULT = 0x218 TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 TCP_S_DATA_IN = 0x4 TCP_S_DATA_OUT = 0x8 @@ -1743,9 +1631,7 @@ const ( TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd TUNSETDEBUG = 0x800454c9 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca @@ -1758,9 +1644,7 @@ const ( TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc VDISCARD = 0x10 VEOF = 0x4 VEOL = 0x6 @@ -1769,13 +1653,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x5 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xb VSTART = 0xd diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index b2a9128..090cb25 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build ppc64le,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go +// cgo -godefs -- -m64 _const.go package unix @@ -24,7 +24,6 @@ const ( AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 - AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa @@ -32,12 +31,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b - AF_MPLS = 0x1c + AF_MAX = 0x29 AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 @@ -45,7 +42,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -65,7 +61,6 @@ const ( ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 - ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 @@ -161,22 +156,21 @@ const ( B75 = 0x2 B921600 = 0x16 B9600 = 0xd - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 BOTHER = 0x1f BPF_A = 0x10 BPF_ABS = 0x20 @@ -198,7 +192,6 @@ const ( BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -210,7 +203,6 @@ const ( BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 BPF_OR = 0x40 BPF_RET = 0x6 BPF_RSH = 0x70 @@ -240,7 +232,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -263,7 +254,6 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_REALTIME_ALARM = 0x8 CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 @@ -333,7 +323,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -354,7 +343,6 @@ const ( ETH_P_8021AD = 0x88a8 ETH_P_8021AH = 0x88e7 ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 ETH_P_802_2 = 0x4 ETH_P_802_3 = 0x1 ETH_P_802_3_MIN = 0x600 @@ -388,7 +376,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -400,13 +387,10 @@ const ( ETH_P_LINK_CTL = 0x886c ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -429,11 +413,9 @@ const ( ETH_P_TIPC = 0x88ca ETH_P_TRAILER = 0x1c ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000000 @@ -442,7 +424,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +431,6 @@ const ( FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -482,9 +445,6 @@ const ( F_GETSIG = 0xb F_LOCK = 0x1 F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 F_OK = 0x0 F_RDLCK = 0x0 F_SETFD = 0x2 @@ -515,29 +475,38 @@ const ( IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0x8 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 IFF_ALLMULTI = 0x200 IFF_ATTACH_QUEUE = 0x200 IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 IFF_BROADCAST = 0x2 IFF_DEBUG = 0x4 IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 IFF_DORMANT = 0x20000 IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LIVE_ADDR_CHANGE = 0x100000 IFF_LOOPBACK = 0x8 IFF_LOWER_UP = 0x10000 + IFF_MACVLAN = 0x200000 + IFF_MACVLAN_PORT = 0x2000 IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 IFF_MULTICAST = 0x1000 IFF_MULTI_QUEUE = 0x100 IFF_NOARP = 0x80 @@ -545,18 +514,27 @@ const ( IFF_NOTRAILERS = 0x20 IFF_NO_PI = 0x1000 IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 IFF_PERSIST = 0x800 IFF_POINTOPOINT = 0x10 IFF_PORTSEL = 0x2000 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_SUPP_NOFCS = 0x80000 IFF_TAP = 0x2 + IFF_TEAM_PORT = 0x40000 IFF_TUN = 0x1 IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 IFNAMSIZ = 0x10 IGNBRK = 0x1 IGNCR = 0x80 @@ -621,7 +599,6 @@ const ( IPPROTO_IPIP = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -644,10 +621,8 @@ const ( IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -661,19 +636,15 @@ const ( IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 - IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 IPV6_PMTUDISC_PROBE = 0x3 IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 @@ -691,9 +662,7 @@ const ( IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 @@ -714,7 +683,6 @@ const ( IP_MULTICAST_IF = 0x20 IP_MULTICAST_LOOP = 0x22 IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 IP_OFFMASK = 0x1fff IP_OPTIONS = 0x4 IP_ORIGDSTADDR = 0x14 @@ -724,8 +692,6 @@ const ( IP_PMTUDISC = 0xa IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb @@ -769,7 +735,6 @@ const ( MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -800,11 +765,9 @@ const ( MAP_TYPE = 0xf MCL_CURRENT = 0x2000 MCL_FUTURE = 0x4000 - MCL_ONFAULT = 0x8000 MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -828,12 +791,10 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 MS_MANDLOCK = 0x40 MS_MGC_MSK = 0xffff0000 MS_MGC_VAL = 0xc0ed0000 @@ -842,8 +803,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -852,7 +811,7 @@ const ( MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 + MS_RMT_MASK = 0x800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 @@ -860,12 +819,10 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa NETLINK_CONNECTOR = 0xb NETLINK_CRYPTO = 0x15 NETLINK_DNRTMSG = 0xe @@ -878,8 +835,6 @@ const ( NETLINK_IP6_FW = 0xd NETLINK_ISCSI = 0x8 NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 NETLINK_NETFILTER = 0xc NETLINK_NFLOG = 0x5 NETLINK_NO_ENOBUFS = 0x5 @@ -954,7 +909,7 @@ const ( O_RDWR = 0x2 O_RSYNC = 0x101000 O_SYNC = 0x101000 - O_TMPFILE = 0x404000 + O_TMPFILE = 0x410000 O_TRUNC = 0x200 O_WRONLY = 0x1 PACKET_ADD_MEMBERSHIP = 0x1 @@ -963,21 +918,16 @@ const ( PACKET_COPY_THRESH = 0x7 PACKET_DROP_MEMBERSHIP = 0x2 PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 PACKET_FANOUT_RND = 0x4 PACKET_FANOUT_ROLLOVER = 0x3 PACKET_FASTROUTE = 0x6 PACKET_HDRLEN = 0xb PACKET_HOST = 0x0 - PACKET_KERNEL = 0x7 PACKET_LOOPBACK = 0x5 PACKET_LOSS = 0xe PACKET_MR_ALLMULTI = 0x2 @@ -988,17 +938,14 @@ const ( PACKET_ORIGDEV = 0x9 PACKET_OTHERHOST = 0x3 PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 PACKET_RECV_OUTPUT = 0x3 PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 PACKET_TIMESTAMP = 0x11 PACKET_TX_HAS_OFF = 0x13 PACKET_TX_RING = 0xd PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 PACKET_VERSION = 0xa PACKET_VNET_HDR = 0xf PARENB = 0x1000 @@ -1025,11 +972,6 @@ const ( PROT_WRITE = 0x2 PR_CAPBSET_DROP = 0x18 PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -1045,21 +987,17 @@ const ( PR_FP_EXC_RES = 0x80000 PR_FP_EXC_SW_ENABLE = 0x80 PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 PR_GET_SECUREBITS = 0x1b - PR_GET_THP_DISABLE = 0x2a PR_GET_TID_ADDRESS = 0x28 PR_GET_TIMERSLACK = 0x1e PR_GET_TIMING = 0xd @@ -1072,14 +1010,11 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d PR_SET_KEEPCAPS = 0x8 PR_SET_MM = 0x23 PR_SET_MM_ARG_END = 0x9 @@ -1091,8 +1026,6 @@ const ( PR_SET_MM_ENV_END = 0xb PR_SET_MM_ENV_START = 0xa PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf PR_SET_MM_START_BRK = 0x6 PR_SET_MM_START_CODE = 0x1 PR_SET_MM_START_DATA = 0x3 @@ -1104,7 +1037,6 @@ const ( PR_SET_PTRACER_ANY = -0x1 PR_SET_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c - PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a @@ -1143,8 +1075,7 @@ const ( PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_MASK = 0x1000ff PTRACE_O_TRACECLONE = 0x8 PTRACE_O_TRACEEXEC = 0x10 PTRACE_O_TRACEEXIT = 0x40 @@ -1161,7 +1092,6 @@ const ( PTRACE_POKEDATA = 0x5 PTRACE_POKETEXT = 0x4 PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c PTRACE_SEIZE = 0x4206 PTRACE_SETEVRREGS = 0x15 PTRACE_SETFPREGS = 0xf @@ -1240,19 +1170,17 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = -0x1 RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 - RTAX_MAX = 0x10 + RTAX_MAX = 0xf RTAX_MTU = 0x2 RTAX_QUICKACK = 0xf RTAX_REORDERING = 0x9 @@ -1263,7 +1191,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x11 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1307,7 +1235,6 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d - RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 @@ -1315,7 +1242,6 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 - RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 RTM_GETACTION = 0x32 @@ -1329,14 +1255,12 @@ const ( RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 RTM_GETNETCONF = 0x52 - RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x57 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1346,28 +1270,22 @@ const ( RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 RTM_NEWNETCONF = 0x50 - RTM_NEWNSID = 0x58 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTN_MAX = 0xb - RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 @@ -1395,7 +1313,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1469,52 +1386,31 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 - SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -1550,13 +1446,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1604,7 +1493,6 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_CC_INFO = 0x1a TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1629,15 +1517,11 @@ const ( TCP_MSS_DEFAULT = 0x218 TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 TCP_S_DATA_IN = 0x4 TCP_S_DATA_OUT = 0x8 @@ -1743,9 +1627,7 @@ const ( TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd TUNSETDEBUG = 0x800454c9 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca @@ -1758,9 +1640,7 @@ const ( TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc VDISCARD = 0x10 VEOF = 0x4 VEOL = 0x6 @@ -1769,13 +1649,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x5 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xb VSTART = 0xd diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index f8b0eb7..509c100 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -1,10 +1,10 @@ -// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char -// Code generated by the command above; see README.md. DO NOT EDIT. +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build s390x,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go +// cgo -godefs -- -m64 _const.go package unix @@ -32,11 +32,10 @@ const ( AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 - AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x29 AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -45,7 +44,6 @@ const ( AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 @@ -168,7 +166,6 @@ const ( BLKFRASET = 0x1264 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e @@ -240,7 +237,6 @@ const ( CAN_MTU = 0x10 CAN_NPROTO = 0x7 CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -333,7 +329,6 @@ const ( ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 EPOLLHUP = 0x10 EPOLLIN = 0x1 EPOLLMSG = 0x400 @@ -388,7 +383,6 @@ const ( ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -401,12 +395,10 @@ const ( ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 ETH_P_PAE = 0x888e ETH_P_PAUSE = 0x8808 ETH_P_PHONET = 0xf5 @@ -442,7 +434,6 @@ const ( FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 @@ -450,24 +441,6 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x3 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -647,7 +620,6 @@ const ( IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 IPV6_HOPOPTS = 0x36 IPV6_IPSEC_POLICY = 0x22 @@ -769,7 +741,6 @@ const ( MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_MERGEABLE = 0xc @@ -804,7 +775,6 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 - MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 MSG_CONFIRM = 0x800 MSG_CTRUNC = 0x8 @@ -828,7 +798,6 @@ const ( MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 - MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 @@ -842,8 +811,6 @@ const ( MS_NODEV = 0x4 MS_NODIRATIME = 0x800 MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 @@ -860,7 +827,6 @@ const ( MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 NAME_MAX = 0xff NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 @@ -1267,7 +1233,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x16 RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1337,10 +1303,9 @@ const ( RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x5b RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1355,16 +1320,15 @@ const ( RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x13 + RTM_NR_MSGTYPES = 0x4c RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 + RTNH_COMPARE_MASK = 0x11 RTNH_F_DEAD = 0x1 RTNH_F_LINKDOWN = 0x10 RTNH_F_OFFLOAD = 0x8 @@ -1399,7 +1363,6 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SHUT_RD = 0x0 @@ -1473,44 +1436,27 @@ const ( SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_AAL = 0x109 - SOL_ALG = 0x117 SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e - SOL_NFC = 0x118 SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 SOL_SOCKET = 0x1 SOL_TCP = 0x6 - SOL_TIPC = 0x10f SOL_X25 = 0x106 SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1554,13 +1500,6 @@ const ( SO_TIMESTAMPING = 0x25 SO_TIMESTAMPNS = 0x23 SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x29 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1641,7 +1580,6 @@ const ( TCP_REPAIR = 0x13 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d TCP_SAVED_SYN = 0x1c TCP_SAVE_SYN = 0x1b TCP_SYNCNT = 0x7 @@ -1769,13 +1707,7 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 95de199..4fe2476 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -1540,13 +1540,6 @@ const ( SO_TIMESTAMPING = 0x23 SO_TIMESTAMPNS = 0x21 SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 SO_WIFI_STATUS = 0x25 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 @@ -1756,11 +1749,6 @@ const ( VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff VMIN = 0x4 VQUIT = 0x1 VREPRINT = 0xc diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index eafceb8..3e9d82a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -1,5 +1,5 @@ // mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build dragonfly,amd64 @@ -1380,14 +1380,3 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { - r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) - nfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 41693a9..d4ec806 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,386 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index f10621d..8b2e87d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,amd64 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index fae666f..82d36a4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,arm diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index a4dca39..f6cc320 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,arm64 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index b56db72..f91afb4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -1,5 +1,5 @@ // mksyscall.pl -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,mips diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index ca2359d..657d11e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,mips64 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index e574940..31ff177 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,mips64le diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 31836d4..797e633 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -1,5 +1,5 @@ // mksyscall.pl -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,mipsle diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 4a76755..307dbb5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,ppc64 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 5fb3428..f458a63 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,ppc64le diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 79d285c..b1d5a9b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,s390x syscall_linux.go syscall_linux_s390x.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build linux,s390x diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go index b2c9ef8..d6038fa 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go @@ -1,5 +1,5 @@ // mksysnum_dragonfly.pl -// Code generated by the command above; see README.md. DO NOT EDIT. +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build amd64,dragonfly @@ -42,7 +42,7 @@ const ( SYS_SYNC = 36 // { int sync(void); } SYS_KILL = 37 // { int kill(int pid, int signum); } SYS_GETPPID = 39 // { pid_t getppid(void); } - SYS_DUP = 41 // { int dup(int fd); } + SYS_DUP = 41 // { int dup(u_int fd); } SYS_PIPE = 42 // { int pipe(void); } SYS_GETEGID = 43 // { gid_t getegid(void); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ @@ -76,7 +76,7 @@ const ( SYS_SWAPON = 85 // { int swapon(char *name); } SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); } SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } - SYS_DUP2 = 90 // { int dup2(int from, int to); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ SYS_FSYNC = 95 // { int fsync(int fd); } @@ -144,7 +144,7 @@ const ( SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \ SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \ SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } - SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, \ + SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \ SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \ SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \ SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \ @@ -224,7 +224,7 @@ const ( SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_KQUEUE = 362 // { int kqueue(void); } SYS_KEVENT = 363 // { int kevent(int fd, \ - SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } + SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); } SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); } SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); } SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ @@ -301,15 +301,4 @@ const ( SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); } SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } - SYS_PROCCTL = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); } - SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, int flags, int atflags);} - SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); } - SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); } - SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); } - SYS_ACCEPT4 = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); } - SYS_LWP_SETNAME = 542 // { int lwp_setname(lwpid_t tid, const char *name); } - SYS_PPOLL = 543 // { int ppoll(struct pollfd *fds, u_int nfds, \ - SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); } - SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); } - SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); } ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index cef4fed..206b3c2 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m32 -D__i386__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build 386,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 49bfa12..9042317 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build amd64,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 97b182e..e3e6745 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m32 -D__ARM_EABI__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build arm,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 6407843..90e43d0 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build arm64,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 939567c..77ff644 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m32 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__MIPSEB__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build mips,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 09db959..fc86fcd 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 -D_MIPS_SIM=_MIPS_SIM_ABI64 -D__MIPSEB__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build mips64,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d1b872a..993873c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 -D_MIPS_SIM=_MIPS_SIM_ABI64 -D__MIPSEL__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build mips64le,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 82ba20f..f0155ba 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m32 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__MIPSEL__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build mipsle,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index 8944448..0deec82 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__powerpc64__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build ppc64,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 90a039b..3f701be 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__powerpc64__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build ppc64le,linux diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index aab0cdb..8b35997 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -1,5 +1,5 @@ -// linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h -// Code generated by the command above; see README.md. DO NOT EDIT. +// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__s390x__ linux/usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build s390x,linux diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go index e585c89..8a6f4e1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -1,5 +1,5 @@ -// cgo -godefs types_dragonfly.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_dragonfly.go // +build amd64,dragonfly @@ -324,7 +324,7 @@ type IfData struct { Iqdrops uint64 Noproto uint64 Hwassist uint64 - Oqdrops uint64 + Unused uint64 Lastchange Timeval } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 7333755..29b9bf3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build 386,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go package unix @@ -152,20 +151,6 @@ type Flock_t struct { Pid int32 } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -233,14 +218,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -290,9 +267,10 @@ type Msghdr struct { } type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 + Len uint32 + Level int32 + Type int32 + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -365,7 +343,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -410,7 +387,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -560,6 +537,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 + Name [0]int8 } const SizeofInotifyEvent = 0x10 @@ -651,11 +629,9 @@ const ( ) type Sigset_t struct { - X__val [32]uint32 + X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 5807e17..b72cf8e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build amd64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go package unix @@ -99,21 +98,21 @@ type Rlimit struct { type _Gid_t uint32 type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - X__pad0 int32 - Rdev uint64 - Size int64 - Blksize int64 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - _ [3]int64 + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad0 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__unused [3]int64 } type Statfs_t struct { @@ -154,20 +153,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -235,14 +220,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -294,9 +271,10 @@ type Msghdr struct { } type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -369,7 +347,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -414,7 +391,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -564,6 +541,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 + Name [0]int8 } const SizeofInotifyEvent = 0x10 @@ -672,8 +650,6 @@ type Sigset_t struct { X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index db7c8bf..d5c8bb6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build arm,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go | go run mkpost.go package unix @@ -156,20 +155,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -237,14 +222,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -294,9 +271,10 @@ type Msghdr struct { } type Cmsghdr struct { - Len uint32 - Level int32 - Type int32 + Len uint32 + Level int32 + Type int32 + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -369,7 +347,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -414,7 +391,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -564,6 +541,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 + Name [0]uint8 } const SizeofInotifyEvent = 0x10 @@ -640,11 +618,9 @@ const ( ) type Sigset_t struct { - X__val [32]uint32 + X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 19cca4f..24bd089 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build arm64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_linux.go package unix @@ -99,22 +98,22 @@ type Rlimit struct { type _Gid_t uint32 type Stat_t struct { - Dev uint64 - Ino uint64 - Mode uint32 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev uint64 - X__pad1 uint64 - Size int64 - Blksize int32 - X__pad2 int32 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - _ [2]int32 + Dev uint64 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad1 uint64 + Size int64 + Blksize int32 + X__pad2 int32 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved [2]int32 } type Statfs_t struct { @@ -155,20 +154,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -236,14 +221,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -295,9 +272,10 @@ type Msghdr struct { } type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -370,7 +348,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -415,7 +392,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x22 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -565,6 +542,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 + Name [0]int8 } const SizeofInotifyEvent = 0x10 @@ -651,8 +629,6 @@ type Sigset_t struct { X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index d04ca4c..c5a41ab 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build mips,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go | go run mkpost.go package unix @@ -155,20 +154,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -236,14 +221,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -368,7 +345,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -413,7 +389,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -581,6 +557,15 @@ type PtraceRegs struct { U_comm [32]int8 } +type ptracePsw struct { +} + +type ptraceFpregs struct { +} + +type ptracePer struct { +} + type FdSet struct { Bits [32]int32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 60b83a1..3947c44 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build mips64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go package unix @@ -100,7 +99,7 @@ type _Gid_t uint32 type Stat_t struct { Dev uint32 - Pad1 [3]uint32 + Pad1 [3]int32 Ino uint64 Mode uint32 Nlink uint32 @@ -155,20 +154,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -236,14 +221,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -370,7 +347,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -415,7 +391,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x27 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -657,15 +633,12 @@ type Sigset_t struct { X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [23]uint8 - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 9e9c680..de8f9c4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build mips64le,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go package unix @@ -100,7 +99,7 @@ type _Gid_t uint32 type Stat_t struct { Dev uint32 - Pad1 [3]uint32 + Pad1 [3]int32 Ino uint64 Mode uint32 Nlink uint32 @@ -155,20 +154,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -236,14 +221,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -370,7 +347,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -415,7 +391,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x27 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -657,15 +633,12 @@ type Sigset_t struct { X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [23]uint8 - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 482b48f..5a8957f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build mipsle,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go | go run mkpost.go package unix @@ -155,20 +154,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -236,14 +221,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -368,7 +345,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -413,7 +389,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2a RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -581,6 +557,15 @@ type PtraceRegs struct { U_comm [32]int8 } +type ptracePsw struct { +} + +type ptraceFpregs struct { +} + +type ptracePer struct { +} + type FdSet struct { Bits [32]int32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 4410abb..4b87529 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build ppc64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go package unix @@ -99,23 +98,23 @@ type Rlimit struct { type _Gid_t uint32 type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - X__pad2 int32 - Rdev uint64 - Size int64 - Blksize int64 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - _ uint64 - _ uint64 - _ uint64 + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad2 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved4 uint64 + X__glibc_reserved5 uint64 + X__glibc_reserved6 uint64 } type Statfs_t struct { @@ -156,20 +155,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -237,14 +222,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -296,9 +273,10 @@ type Msghdr struct { } type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -371,7 +349,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -416,7 +393,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x23 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -566,6 +543,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 + Name [0]uint8 } const SizeofInotifyEvent = 0x10 @@ -661,8 +639,6 @@ type Sigset_t struct { X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 10947c3..40d51d9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build ppc64le,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go package unix @@ -99,23 +98,23 @@ type Rlimit struct { type _Gid_t uint32 type Stat_t struct { - Dev uint64 - Ino uint64 - Nlink uint64 - Mode uint32 - Uid uint32 - Gid uint32 - X__pad2 int32 - Rdev uint64 - Size int64 - Blksize int64 - Blocks int64 - Atim Timespec - Mtim Timespec - Ctim Timespec - _ uint64 - _ uint64 - _ uint64 + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad2 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved4 uint64 + X__glibc_reserved5 uint64 + X__glibc_reserved6 uint64 } type Statfs_t struct { @@ -156,20 +155,6 @@ type Flock_t struct { Pad_cgo_1 [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -237,14 +222,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -296,9 +273,10 @@ type Msghdr struct { } type Cmsghdr struct { - Len uint64 - Level int32 - Type int32 + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -371,7 +349,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -416,7 +393,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x22 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -566,6 +543,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 + Name [0]uint8 } const SizeofInotifyEvent = 0x10 @@ -661,8 +639,6 @@ type Sigset_t struct { X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index 57dbb36..13f6ea0 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -1,7 +1,6 @@ -// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go -// Code generated by the command above; see README.md. DO NOT EDIT. - // +build s390x,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_linux.go package unix @@ -155,20 +154,6 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -222,10 +207,10 @@ type RawSockaddrHCI struct { } type RawSockaddrCAN struct { - Family uint16 - _ [2]byte - Ifindex int32 - Addr [8]byte + Family uint16 + Pad_cgo_0 [2]byte + Ifindex int32 + Addr [8]byte } type RawSockaddrALG struct { @@ -236,14 +221,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -370,7 +347,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -415,7 +391,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x27 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -675,11 +651,9 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + X__val [16]uint64 } -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index 22bdab9..31a97b3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -226,14 +226,6 @@ type RawSockaddrALG struct { Name [64]uint8 } -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -360,7 +352,6 @@ const ( SizeofSockaddrHCI = 0x6 SizeofSockaddrCAN = 0x10 SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 99b11fe..592d73e 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -93,8 +93,7 @@ func NewCallbackCDecl(fn interface{}) uintptr //sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) //sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff] //sys CloseHandle(handle Handle) (err error) -//sys GetStdHandle(stdhandle uint32) (handle Handle, err error) [failretval==InvalidHandle] -//sys SetStdHandle(stdhandle uint32, handle Handle) (err error) +//sys GetStdHandle(stdhandle int) (handle Handle, err error) [failretval==InvalidHandle] //sys findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstFileW //sys findNextFile1(handle Handle, data *win32finddata1) (err error) = FindNextFileW //sys FindClose(handle Handle) (err error) @@ -110,7 +109,6 @@ func NewCallbackCDecl(fn interface{}) uintptr //sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW //sys SetEndOfFile(handle Handle) (err error) //sys GetSystemTimeAsFileTime(time *Filetime) -//sys GetSystemTimePreciseAsFileTime(time *Filetime) //sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] //sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) //sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) @@ -313,8 +311,8 @@ var ( Stderr = getStdHandle(STD_ERROR_HANDLE) ) -func getStdHandle(stdhandle uint32) (fd Handle) { - r, _ := GetStdHandle(stdhandle) +func getStdHandle(h int) (fd Handle) { + r, _ := GetStdHandle(h) CloseOnExec(r) return r } diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index f7bc8d6..f10ebbf 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -78,7 +78,6 @@ var ( procSetFilePointer = modkernel32.NewProc("SetFilePointer") procCloseHandle = modkernel32.NewProc("CloseHandle") procGetStdHandle = modkernel32.NewProc("GetStdHandle") - procSetStdHandle = modkernel32.NewProc("SetStdHandle") procFindFirstFileW = modkernel32.NewProc("FindFirstFileW") procFindNextFileW = modkernel32.NewProc("FindNextFileW") procFindClose = modkernel32.NewProc("FindClose") @@ -94,7 +93,6 @@ var ( procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime") - procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime") procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation") procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") @@ -621,7 +619,7 @@ func CloseHandle(handle Handle) (err error) { return } -func GetStdHandle(stdhandle uint32) (handle Handle, err error) { +func GetStdHandle(stdhandle int) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0) handle = Handle(r0) if handle == InvalidHandle { @@ -634,18 +632,6 @@ func GetStdHandle(stdhandle uint32) (handle Handle, err error) { return } -func SetStdHandle(stdhandle uint32, handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0) - if r1 == 0 { - if e1 != 0 { - err = errnoErr(e1) - } else { - err = syscall.EINVAL - } - } - return -} - func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0) handle = Handle(r0) @@ -821,11 +807,6 @@ func GetSystemTimeAsFileTime(time *Filetime) { return } -func GetSystemTimePreciseAsFileTime(time *Filetime) { - syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) - return -} - func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) { r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0) rc = uint32(r0) diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows.go b/vendor/golang.org/x/sys/windows/ztypes_windows.go index a907ff2..1fe19d1 100644 --- a/vendor/golang.org/x/sys/windows/ztypes_windows.go +++ b/vendor/golang.org/x/sys/windows/ztypes_windows.go @@ -122,9 +122,9 @@ const ( DUPLICATE_CLOSE_SOURCE = 0x00000001 DUPLICATE_SAME_ACCESS = 0x00000002 - STD_INPUT_HANDLE = -10 & (1<<32 - 1) - STD_OUTPUT_HANDLE = -11 & (1<<32 - 1) - STD_ERROR_HANDLE = -12 & (1<<32 - 1) + STD_INPUT_HANDLE = -10 + STD_OUTPUT_HANDLE = -11 + STD_ERROR_HANDLE = -12 FILE_BEGIN = 0 FILE_CURRENT = 1 diff --git a/vendor/gopkg.in/yaml.v2/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE index 866d74a..8dada3e 100644 --- a/vendor/gopkg.in/yaml.v2/LICENSE +++ b/vendor/gopkg.in/yaml.v2/LICENSE @@ -1,13 +1,201 @@ -Copyright 2011-2016 Canonical Ltd. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - http://www.apache.org/licenses/LICENSE-2.0 + 1. Definitions. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md index 1884de6a..7a512d6 100644 --- a/vendor/gopkg.in/yaml.v2/README.md +++ b/vendor/gopkg.in/yaml.v2/README.md @@ -48,6 +48,8 @@ The yaml package is licensed under the Apache License 2.0. Please see the LICENS Example ------- +Some more examples can be found in the "examples" folder. + ```Go package main diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go index 052ecfc..db1f5f2 100644 --- a/vendor/gopkg.in/yaml.v2/decode.go +++ b/vendor/gopkg.in/yaml.v2/decode.go @@ -190,6 +190,7 @@ type decoder struct { aliases map[string]bool mapType reflect.Type terrors []string + strict bool } var ( @@ -199,8 +200,8 @@ var ( ifaceType = defaultMapType.Elem() ) -func newDecoder() *decoder { - d := &decoder{mapType: defaultMapType} +func newDecoder(strict bool) *decoder { + d := &decoder{mapType: defaultMapType, strict: strict} d.aliases = make(map[string]bool) return d } @@ -639,6 +640,8 @@ func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { value := reflect.New(elemType).Elem() d.unmarshal(n.children[i+1], value) inlineMap.SetMapIndex(name, value) + } else if d.strict { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", n.line+1, name.String(), out.Type())) } } return true diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go index a6fea0f..713b1ee 100644 --- a/vendor/gopkg.in/yaml.v2/decode_test.go +++ b/vendor/gopkg.in/yaml.v2/decode_test.go @@ -405,6 +405,12 @@ var unmarshalTests = []struct { map[string]interface{}{"v": 1}, }, + // Non-specific tag (Issue #75) + { + "v: ! test", + map[string]interface{}{"v": "test"}, + }, + // Anchors and aliases. { "a: &x 1\nb: &y 2\nc: *x\nd: *y\n", @@ -604,7 +610,8 @@ type inlineC struct { } func (s *S) TestUnmarshal(c *C) { - for _, item := range unmarshalTests { + for i, item := range unmarshalTests { + c.Logf("test %d: %q", i, item.data) t := reflect.ValueOf(item.value).Type() var value interface{} switch t.Kind() { @@ -648,6 +655,7 @@ var unmarshalErrorTests = []struct { {"a: !!binary ==", "yaml: !!binary value contains invalid base64 data"}, {"{[.]}", `yaml: invalid map key: \[\]interface \{\}\{"\."\}`}, {"{{.}}", `yaml: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`}, + {"%TAG !%79! tag:yaml.org,2002:\n---\nv: !%79!int '1'", "yaml: did not find expected whitespace"}, } func (s *S) TestUnmarshalErrors(c *C) { @@ -968,6 +976,17 @@ func (s *S) TestUnmarshalSliceOnPreset(c *C) { c.Assert(v.A, DeepEquals, []int{2}) } +func (s *S) TestUnmarshalStrict(c *C) { + v := struct{ A, B int }{} + + err := yaml.UnmarshalStrict([]byte("a: 1\nb: 2"), &v) + c.Check(err, IsNil) + err = yaml.Unmarshal([]byte("a: 1\nb: 2\nc: 3"), &v) + c.Check(err, IsNil) + err = yaml.UnmarshalStrict([]byte("a: 1\nb: 2\nc: 3"), &v) + c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 1: field c not found in struct struct { A int; B int }") +} + //var data []byte //func init() { // var err error diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go index 6ecdcb3..41de8b8 100644 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ b/vendor/gopkg.in/yaml.v2/emitterc.go @@ -994,7 +994,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { break_space = false space_break = false - preceeded_by_whitespace = false + preceded_by_whitespace = false followed_by_whitespace = false previous_space = false previous_break = false @@ -1016,7 +1016,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { flow_indicators = true } - preceeded_by_whitespace = true + preceded_by_whitespace = true for i, w := 0, 0; i < len(value); i += w { w = width(value[i]) followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) @@ -1047,7 +1047,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { block_indicators = true } case '#': - if preceeded_by_whitespace { + if preceded_by_whitespace { flow_indicators = true block_indicators = true } @@ -1088,7 +1088,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { } // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceeded_by_whitespace = is_blankz(value, i) + preceded_by_whitespace = is_blankz(value, i) } emitter.scalar_data.multiline = line_breaks diff --git a/vendor/gopkg.in/yaml.v2/example_embedded_test.go b/vendor/gopkg.in/yaml.v2/example_embedded_test.go new file mode 100644 index 0000000..c8b241d --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/example_embedded_test.go @@ -0,0 +1,41 @@ +package yaml_test + +import ( + "fmt" + "log" + + "gopkg.in/yaml.v2" +) + +// An example showing how to unmarshal embedded +// structs from YAML. + +type StructA struct { + A string `yaml:"a"` +} + +type StructB struct { + // Embedded structs are not treated as embedded in YAML by default. To do that, + // add the ",inline" annotation below + StructA `yaml:",inline"` + B string `yaml:"b"` +} + +var data = ` +a: a string from struct A +b: a string from struct B +` + +func ExampleUnmarshal_embedded() { + var b StructB + + err := yaml.Unmarshal([]byte(data), &b) + if err != nil { + log.Fatal("cannot unmarshal data: %v", err) + } + fmt.Println(b.A) + fmt.Println(b.B) + // Output: + // a string from struct A + // a string from struct B +} diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go index 2c9d511..0744844 100644 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/vendor/gopkg.in/yaml.v2/scannerc.go @@ -611,7 +611,7 @@ func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, co if directive { context = "while parsing a %TAG directive" } - return yaml_parser_set_scanner_error(parser, context, context_mark, "did not find URI escaped octet") + return yaml_parser_set_scanner_error(parser, context, context_mark, problem) } func trace(args ...interface{}) func() { @@ -1944,7 +1944,7 @@ func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_ma } else { // It's either the '!' tag or not really a tag handle. If it's a %TAG // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && !(s[0] == '!' && s[1] == 0) { + if directive && string(s) != "!" { yaml_parser_set_scanner_tag_error(parser, directive, start_mark, "did not find expected '!'") return false @@ -1959,6 +1959,7 @@ func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_ma func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { //size_t length = head ? strlen((char *)head) : 0 var s []byte + hasTag := len(head) > 0 // Copy the head if needed. // @@ -2000,10 +2001,10 @@ func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false } + hasTag = true } - // Check if the tag is non-empty. - if len(s) == 0 { + if !hasTag { yaml_parser_set_scanner_tag_error(parser, directive, start_mark, "did not find expected tag URI") return false diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go index 36d6b88..bf18884 100644 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ b/vendor/gopkg.in/yaml.v2/yaml.go @@ -77,8 +77,19 @@ type Marshaler interface { // supported tag options. // func Unmarshal(in []byte, out interface{}) (err error) { + return unmarshal(in, out, false) +} + +// UnmarshalStrict is like Unmarshal except that any fields that are found +// in the data that do not have corresponding struct members will result in +// an error. +func UnmarshalStrict(in []byte, out interface{}) (err error) { + return unmarshal(in, out, true) +} + +func unmarshal(in []byte, out interface{}, strict bool) (err error) { defer handleErr(&err) - d := newDecoder() + d := newDecoder(strict) p := newParser(in) defer p.destroy() node := p.parse() diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go index d60a6b6..3caeca0 100644 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/vendor/gopkg.in/yaml.v2/yamlh.go @@ -508,7 +508,7 @@ type yaml_parser_t struct { problem string // Error description. - // The byte about which the problem occured. + // The byte about which the problem occurred. problem_offset int problem_value int problem_mark yaml_mark_t -- cgit 1.2.3-korg