Updated and re-enabled statickcheck
This commit is contained in:
parent
07bdb08f9c
commit
6bab8fb769
@ -34,8 +34,7 @@ steps:
|
||||
- make misspell-check
|
||||
- make goconst-check
|
||||
- make gocyclo-check
|
||||
# Disabled until the memory leak on their side is resolved. See https://github.com/dominikh/go-tools/issues/419.
|
||||
# - make static-check
|
||||
- make static-check
|
||||
- make build
|
||||
when:
|
||||
event: [ push, tag, pull_request ]
|
||||
|
8
go.mod
8
go.mod
@ -64,11 +64,11 @@ require (
|
||||
github.com/swaggo/swag v1.4.1-0.20181210033626-0e12fd5eb026
|
||||
github.com/urfave/cli v1.20.0 // indirect
|
||||
github.com/valyala/fasttemplate v1.0.1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c
|
||||
golang.org/x/crypto v0.0.0-20190422183909-d864b10871cd
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3
|
||||
golang.org/x/net v0.0.0-20181217023233-e147a9138326 // indirect
|
||||
golang.org/x/sys v0.0.0-20190329044733-9eb1bfa1ce65 // indirect
|
||||
golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081 // indirect
|
||||
golang.org/x/net v0.0.0-20190420063019-afa5a82059c6 // indirect
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 // indirect
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/d4l3k/messagediff.v1 v1.2.1
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||
|
12
go.sum
12
go.sum
@ -212,10 +212,13 @@ golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9Qel
|
||||
golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b h1:Elez2XeF2p9uyVj0yEUDqQ56NFcDtcBNkYP7yv8YbUE=
|
||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576 h1:aUX/1G2gFSs4AsJJg2cL3HuoRhCSCz733FE5GUSuaT4=
|
||||
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190422183909-d864b10871cd h1:sMHc2rZHuzQmrbVoSpt9HgerkXPyIeCSO6k0zUMGfFk=
|
||||
golang.org/x/crypto v0.0.0-20190422183909-d864b10871cd/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3 h1:x/bBzNauLQAlE3fLku/xy92Y8QwKX5HZymrMz2IiKFc=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -226,6 +229,10 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsq
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181217023233-e147a9138326 h1:iCzOf0xz39Tstp+Tu/WwyGjUXCk34QhQORRxBeXXTA4=
|
||||
golang.org/x/net v0.0.0-20181217023233-e147a9138326/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190420063019-afa5a82059c6 h1:HdqqaWmYAUI7/dmByKKEw+yxDksGSo+9GjkUc9Zp34E=
|
||||
golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -242,10 +249,15 @@ golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc h1:4gbWbmmPFp4ySWICouJl6emP0
|
||||
golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190329044733-9eb1bfa1ce65 h1:hOY+O8MxdkPV10pNf7/XEHaySCiPKxixMKUshfHsGn0=
|
||||
golang.org/x/sys v0.0.0-20190329044733-9eb1bfa1ce65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081 h1:QJP9sxq2/KbTxFnGduVryxJOt6r/UVGyom3tLaqu7tc=
|
||||
golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b h1:NVD8gBK33xpdqCaZVVtd6OFJp+3dxkXuz7+U7KaVN6s=
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk=
|
||||
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
||||
|
@ -44,7 +44,7 @@ type User struct {
|
||||
Username string `xorm:"varchar(250) not null unique" json:"username" valid:"length(3|250)" minLength:"3" maxLength:"250"`
|
||||
Password string `xorm:"varchar(250) not null" json:"-"`
|
||||
// The user's email address.
|
||||
Email string `xorm:"varchar(250) null" json:"email,omitonempty" valid:"email,length(0|250)" maxLength:"250"`
|
||||
Email string `xorm:"varchar(250) null" json:"email,omitempty" valid:"email,length(0|250)" maxLength:"250"`
|
||||
IsActive bool `xorm:"null" json:"-"`
|
||||
|
||||
PasswordResetToken string `xorm:"varchar(450) null" json:"-"`
|
||||
|
@ -14,6 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//lint:file-ignore ST1018 The const below is not ours
|
||||
package v1
|
||||
|
||||
import (
|
||||
|
@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-04-01 20:03:30.060598671 +0200 CEST m=+0.311389858
|
||||
// 2019-04-23 10:33:26.759897853 +0200 CEST m=+0.130092850
|
||||
|
||||
package swagger
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
var doc = `{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "\u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e",
|
||||
"description": "This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. \u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e\n# Authorization\n**JWT-Auth:** Main authorization method, used for most of the requests. Needs ` + "`" + `Authorization: Bearer \u003cjwt-token\u003e` + "`" + `-header to authenticate successfully.\n\n**BasicAuth:** Only used when requesting tasks via caldav.\n\u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e",
|
||||
"title": "Vikunja API",
|
||||
"contact": {
|
||||
"name": "General Vikunja contact",
|
||||
@ -391,7 +391,7 @@ var doc = `{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a team by its ID.",
|
||||
"description": "Returns a list by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -399,13 +399,13 @@ var doc = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"team"
|
||||
"list"
|
||||
],
|
||||
"summary": "Gets one team",
|
||||
"summary": "Gets one list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Team ID",
|
||||
"description": "List ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@ -413,14 +413,14 @@ var doc = `{
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The team",
|
||||
"description": "The list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Team"
|
||||
"$ref": "#/definitions/models.List"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "The user does not have access to the team",
|
||||
"description": "The user does not have access to the list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
@ -2288,13 +2288,13 @@ var doc = `{
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The start date parameter to filter by. Expects a unix timestamp.",
|
||||
"description": "The start date parameter to filter by. Expects a unix timestamp. If no end date, but a start date is specified, the end date is set to the current time.",
|
||||
"name": "startdate",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The end date parameter to filter by. Expects a unix timestamp.",
|
||||
"description": "The end date parameter to filter by. Expects a unix timestamp. If no start date, but an end date is specified, the start date is set to the current time.",
|
||||
"name": "enddate",
|
||||
"in": "query"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "\u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e",
|
||||
"description": "This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. \u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e\n# Authorization\n**JWT-Auth:** Main authorization method, used for most of the requests. Needs ` + \"`\" + `Authorization: Bearer \u003cjwt-token\u003e` + \"`\" + `-header to authenticate successfully.\n\n**BasicAuth:** Only used when requesting tasks via caldav.\n\u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e",
|
||||
"title": "Vikunja API",
|
||||
"contact": {
|
||||
"name": "General Vikunja contact",
|
||||
@ -378,7 +378,7 @@
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a team by its ID.",
|
||||
"description": "Returns a list by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -386,13 +386,13 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"team"
|
||||
"list"
|
||||
],
|
||||
"summary": "Gets one team",
|
||||
"summary": "Gets one list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Team ID",
|
||||
"description": "List ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@ -400,14 +400,14 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The team",
|
||||
"description": "The list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Team"
|
||||
"$ref": "#/definitions/models.List"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "The user does not have access to the team",
|
||||
"description": "The user does not have access to the list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
@ -2275,13 +2275,13 @@
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The start date parameter to filter by. Expects a unix timestamp.",
|
||||
"description": "The start date parameter to filter by. Expects a unix timestamp. If no end date, but a start date is specified, the end date is set to the current time.",
|
||||
"name": "startdate",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The end date parameter to filter by. Expects a unix timestamp.",
|
||||
"description": "The end date parameter to filter by. Expects a unix timestamp. If no start date, but an end date is specified, the start date is set to the current time.",
|
||||
"name": "enddate",
|
||||
"in": "query"
|
||||
}
|
||||
|
@ -631,7 +631,13 @@ info:
|
||||
email: hello@vikunja.io
|
||||
name: General Vikunja contact
|
||||
url: http://vikunja.io/en/contact/
|
||||
description: '<!-- ReDoc-Inject: <security-definitions> -->'
|
||||
description: |-
|
||||
This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. <!-- ReDoc-Inject: <security-definitions> -->
|
||||
# Authorization
|
||||
**JWT-Auth:** Main authorization method, used for most of the requests. Needs ` + "`" + `Authorization: Bearer <jwt-token>` + "`" + `-header to authenticate successfully.
|
||||
|
||||
**BasicAuth:** Only used when requesting tasks via caldav.
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
license:
|
||||
name: GPLv3
|
||||
url: http://code.vikunja.io/api/src/branch/master/LICENSE
|
||||
@ -916,9 +922,9 @@ paths:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns a team by its ID.
|
||||
description: Returns a list by its ID.
|
||||
parameters:
|
||||
- description: Team ID
|
||||
- description: List ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
@ -927,12 +933,12 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The team
|
||||
description: The list
|
||||
schema:
|
||||
$ref: '#/definitions/models.Team'
|
||||
$ref: '#/definitions/models.List'
|
||||
type: object
|
||||
"403":
|
||||
description: The user does not have access to the team
|
||||
description: The user does not have access to the list
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
@ -943,9 +949,9 @@ paths:
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Gets one team
|
||||
summary: Gets one list
|
||||
tags:
|
||||
- team
|
||||
- list
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@ -2545,10 +2551,14 @@ paths:
|
||||
name: sort
|
||||
type: string
|
||||
- description: The start date parameter to filter by. Expects a unix timestamp.
|
||||
If no end date, but a start date is specified, the end date is set to the
|
||||
current time.
|
||||
in: query
|
||||
name: startdate
|
||||
type: integer
|
||||
- description: The end date parameter to filter by. Expects a unix timestamp.
|
||||
If no start date, but an end date is specified, the start date is set to
|
||||
the current time.
|
||||
in: query
|
||||
name: enddate
|
||||
type: integer
|
||||
|
21
vendor/golang.org/x/crypto/acme/autocert/autocert.go
generated
vendored
21
vendor/golang.org/x/crypto/acme/autocert/autocert.go
generated
vendored
@ -32,6 +32,7 @@ import (
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/acme"
|
||||
"golang.org/x/net/idna"
|
||||
)
|
||||
|
||||
// createCertRetryAfter is how much time to wait before removing a failed state
|
||||
@ -62,10 +63,16 @@ type HostPolicy func(ctx context.Context, host string) error
|
||||
// HostWhitelist returns a policy where only the specified host names are allowed.
|
||||
// Only exact matches are currently supported. Subdomains, regexp or wildcard
|
||||
// will not match.
|
||||
//
|
||||
// Note that all hosts will be converted to Punycode via idna.Lookup.ToASCII so that
|
||||
// Manager.GetCertificate can handle the Unicode IDN and mixedcase hosts correctly.
|
||||
// Invalid hosts will be silently ignored.
|
||||
func HostWhitelist(hosts ...string) HostPolicy {
|
||||
whitelist := make(map[string]bool, len(hosts))
|
||||
for _, h := range hosts {
|
||||
whitelist[h] = true
|
||||
if h, err := idna.Lookup.ToASCII(h); err == nil {
|
||||
whitelist[h] = true
|
||||
}
|
||||
}
|
||||
return func(_ context.Context, host string) error {
|
||||
if !whitelist[host] {
|
||||
@ -243,7 +250,17 @@ func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate,
|
||||
if !strings.Contains(strings.Trim(name, "."), ".") {
|
||||
return nil, errors.New("acme/autocert: server name component count invalid")
|
||||
}
|
||||
if strings.ContainsAny(name, `+/\`) {
|
||||
|
||||
// Note that this conversion is necessary because some server names in the handshakes
|
||||
// started by some clients (such as cURL) are not converted to Punycode, which will
|
||||
// prevent us from obtaining certificates for them. In addition, we should also treat
|
||||
// example.com and EXAMPLE.COM as equivalent and return the same certificate for them.
|
||||
// Fortunately, this conversion also helped us deal with this kind of mixedcase problems.
|
||||
//
|
||||
// Due to the "σςΣ" problem (see https://unicode.org/faq/idn.html#22), we can't use
|
||||
// idna.Punycode.ToASCII (or just idna.ToASCII) here.
|
||||
name, err := idna.Lookup.ToASCII(name)
|
||||
if err != nil {
|
||||
return nil, errors.New("acme/autocert: server name contains invalid character")
|
||||
}
|
||||
|
||||
|
5
vendor/golang.org/x/sys/unix/mksyscall.go
generated
vendored
5
vendor/golang.org/x/sys/unix/mksyscall.go
generated
vendored
@ -153,6 +153,11 @@ func main() {
|
||||
}
|
||||
funct, inps, outps, sysname := f[2], f[3], f[4], f[5]
|
||||
|
||||
// ClockGettime doesn't have a syscall number on Darwin, only generate libc wrappers.
|
||||
if goos == "darwin" && !libc && funct == "ClockGettime" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
13
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.go
generated
vendored
13
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.go
generated
vendored
@ -214,6 +214,11 @@ func main() {
|
||||
}
|
||||
|
||||
if funct != "fcntl" && funct != "FcntlInt" && funct != "readlen" && funct != "writelen" {
|
||||
if sysname == "select" {
|
||||
// select is a keyword of Go. Its name is
|
||||
// changed to c_select.
|
||||
cExtern += "#define c_select select\n"
|
||||
}
|
||||
// Imports of system calls from libc
|
||||
cExtern += fmt.Sprintf("%s %s", cRettype, sysname)
|
||||
cIn := strings.Join(cIn, ", ")
|
||||
@ -328,7 +333,13 @@ func main() {
|
||||
} else {
|
||||
call += ""
|
||||
}
|
||||
call += fmt.Sprintf("C.%s(%s)", sysname, arglist)
|
||||
if sysname == "select" {
|
||||
// select is a keyword of Go. Its name is
|
||||
// changed to c_select.
|
||||
call += fmt.Sprintf("C.c_%s(%s)", sysname, arglist)
|
||||
} else {
|
||||
call += fmt.Sprintf("C.%s(%s)", sysname, arglist)
|
||||
}
|
||||
|
||||
// Assign return values.
|
||||
body := ""
|
||||
|
14
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go
generated
vendored
14
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go
generated
vendored
@ -282,6 +282,11 @@ func main() {
|
||||
if !onlyCommon {
|
||||
// GCCGO Prototype Generation
|
||||
// Imports of system calls from libc
|
||||
if sysname == "select" {
|
||||
// select is a keyword of Go. Its name is
|
||||
// changed to c_select.
|
||||
cExtern += "#define c_select select\n"
|
||||
}
|
||||
cExtern += fmt.Sprintf("%s %s", cRettype, sysname)
|
||||
cIn := strings.Join(cIn, ", ")
|
||||
cExtern += fmt.Sprintf("(%s);\n", cIn)
|
||||
@ -490,7 +495,14 @@ func main() {
|
||||
|
||||
// GCCGO function generation
|
||||
argsgccgolist := strings.Join(argsgccgo, ", ")
|
||||
callgccgo := fmt.Sprintf("C.%s(%s)", sysname, argsgccgolist)
|
||||
var callgccgo string
|
||||
if sysname == "select" {
|
||||
// select is a keyword of Go. Its name is
|
||||
// changed to c_select.
|
||||
callgccgo = fmt.Sprintf("C.c_%s(%s)", sysname, argsgccgolist)
|
||||
} else {
|
||||
callgccgo = fmt.Sprintf("C.%s(%s)", sysname, argsgccgolist)
|
||||
}
|
||||
textgccgo += callProto
|
||||
textgccgo += fmt.Sprintf("\tr1 = uintptr(%s)\n", callgccgo)
|
||||
textgccgo += "\te1 = syscall.GetErrno()\n"
|
||||
|
3
vendor/golang.org/x/sys/unix/sockcmsg_unix.go
generated
vendored
3
vendor/golang.org/x/sys/unix/sockcmsg_unix.go
generated
vendored
@ -18,6 +18,9 @@ func cmsgAlignOf(salen int) int {
|
||||
salign := SizeofPtr
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "aix":
|
||||
// There is no alignment on AIX.
|
||||
salign = 1
|
||||
case "darwin", "dragonfly", "solaris":
|
||||
// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
|
||||
// Solaris kernels still require 32-bit aligned access to
|
||||
|
20
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
20
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -444,8 +444,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
//sysnb Times(tms *Tms) (ticks uintptr, err error)
|
||||
//sysnb Umask(mask int) (oldmask int)
|
||||
//sysnb Uname(buf *Utsname) (err error)
|
||||
//TODO umount
|
||||
// //sys Unmount(target string, flags int) (err error) = umount
|
||||
//sys Unlink(path string) (err error)
|
||||
//sys Unlinkat(dirfd int, path string, flags int) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
@ -470,8 +468,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
|
||||
//TODO Select
|
||||
// //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
@ -493,8 +490,10 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
// In order to use msghdr structure with Control, Controllen, nrecvmsg and nsendmsg must be used.
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = nrecvmsg
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg
|
||||
|
||||
//sys munmap(addr uintptr, length uintptr) (err error)
|
||||
|
||||
@ -547,3 +546,12 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
//sys Getsystemcfg(label int) (n uint64)
|
||||
|
||||
//sys umount(target string) (err error)
|
||||
func Unmount(target string, flags int) (err error) {
|
||||
if flags != 0 {
|
||||
// AIX doesn't have any flags for umount.
|
||||
return ENOSYS
|
||||
}
|
||||
return umount(target)
|
||||
}
|
||||
|
17
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
17
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -144,6 +144,23 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
|
||||
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
13
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
13
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -1662,6 +1662,19 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return EACCES
|
||||
}
|
||||
|
||||
//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
|
||||
//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
|
||||
|
||||
// fileHandle is the argument to nameToHandleAt and openByHandleAt. We
|
||||
// originally tried to generate it via unix/linux/types.go with "type
|
||||
// fileHandle C.struct_file_handle" but that generated empty structs
|
||||
// for mips64 and mips64le. Instead, hard code it for now (it's the
|
||||
// same everywhere else) until the mips64 generator issue is fixed.
|
||||
type fileHandle struct {
|
||||
Bytes uint32
|
||||
Type int32
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -351,7 +351,11 @@ func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
|
||||
}
|
||||
|
||||
func SetsockoptString(fd, level, opt int, s string) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
|
||||
var p unsafe.Pointer
|
||||
if len(s) > 0 {
|
||||
p = unsafe.Pointer(&[]byte(s)[0])
|
||||
}
|
||||
return setsockopt(fd, level, opt, p, uintptr(len(s)))
|
||||
}
|
||||
|
||||
func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
|
||||
|
6
vendor/golang.org/x/sys/unix/types_darwin.go
generated
vendored
6
vendor/golang.org/x/sys/unix/types_darwin.go
generated
vendored
@ -275,3 +275,9 @@ const (
|
||||
// uname
|
||||
|
||||
type Utsname C.struct_utsname
|
||||
|
||||
// Clockinfo
|
||||
|
||||
const SizeofClockinfo = C.sizeof_struct_clockinfo
|
||||
|
||||
type Clockinfo C.struct_clockinfo
|
||||
|
2
vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
generated
vendored
@ -926,6 +926,8 @@ const (
|
||||
TCSETSF = 0x5404
|
||||
TCSETSW = 0x5403
|
||||
TCXONC = 0x540b
|
||||
TIMER_ABSTIME = 0x3e7
|
||||
TIMER_MAX = 0x20
|
||||
TIOC = 0x5400
|
||||
TIOCCBRK = 0x2000747a
|
||||
TIOCCDTR = 0x20007478
|
||||
|
4
vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
generated
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
// +build ppc64,aix
|
||||
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -maix64 _const.go
|
||||
|
||||
package unix
|
||||
@ -926,6 +926,8 @@ const (
|
||||
TCSETSF = 0x5404
|
||||
TCSETSW = 0x5403
|
||||
TCXONC = 0x540b
|
||||
TIMER_ABSTIME = 0x3e7
|
||||
TIMER_MAX = 0x20
|
||||
TIOC = 0x5400
|
||||
TIOCCBRK = 0x2000747a
|
||||
TIOCCDTR = 0x20007478
|
||||
|
42
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
generated
vendored
42
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
generated
vendored
@ -83,6 +83,8 @@ int lstat(uintptr_t, uintptr_t);
|
||||
int pause();
|
||||
int pread64(int, uintptr_t, size_t, long long);
|
||||
int pwrite64(int, uintptr_t, size_t, long long);
|
||||
#define c_select select
|
||||
int select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
int setregid(int, int);
|
||||
int setreuid(int, int);
|
||||
@ -103,8 +105,8 @@ int getpeername(int, uintptr_t, uintptr_t);
|
||||
int getsockname(int, uintptr_t, uintptr_t);
|
||||
int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
|
||||
int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
|
||||
int recvmsg(int, uintptr_t, int);
|
||||
int sendmsg(int, uintptr_t, int);
|
||||
int nrecvmsg(int, uintptr_t, int);
|
||||
int nsendmsg(int, uintptr_t, int);
|
||||
int munmap(uintptr_t, uintptr_t);
|
||||
int madvise(uintptr_t, size_t, int);
|
||||
int mprotect(uintptr_t, size_t, int);
|
||||
@ -118,6 +120,8 @@ int poll(uintptr_t, int, int);
|
||||
int gettimeofday(uintptr_t, uintptr_t);
|
||||
int time(uintptr_t);
|
||||
int utime(uintptr_t, uintptr_t);
|
||||
unsigned long long getsystemcfg(int);
|
||||
int umount(uintptr_t);
|
||||
int getrlimit64(int, uintptr_t);
|
||||
int setrlimit64(int, uintptr_t);
|
||||
long long lseek64(int, long long, int);
|
||||
@ -1004,6 +1008,17 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
r0, er := C.c_select(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))))
|
||||
n = int(r0)
|
||||
if r0 == -1 && er != nil {
|
||||
err = er
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask))))
|
||||
n = int(r0)
|
||||
@ -1225,7 +1240,7 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
r0, er := C.recvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
|
||||
r0, er := C.nrecvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
|
||||
n = int(r0)
|
||||
if r0 == -1 && er != nil {
|
||||
err = er
|
||||
@ -1236,7 +1251,7 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
r0, er := C.sendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
|
||||
r0, er := C.nsendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
|
||||
n = int(r0)
|
||||
if r0 == -1 && er != nil {
|
||||
err = er
|
||||
@ -1409,6 +1424,25 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsystemcfg(label int) (n uint64) {
|
||||
r0, _ := C.getsystemcfg(C.int(label))
|
||||
n = uint64(r0)
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func umount(target string) (err error) {
|
||||
_p0 := uintptr(unsafe.Pointer(C.CString(target)))
|
||||
r0, er := C.umount(C.uintptr_t(_p0))
|
||||
if r0 == -1 && er != nil {
|
||||
err = er
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
r0, er := C.getrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
|
||||
if r0 == -1 && er != nil {
|
||||
|
30
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
generated
vendored
30
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
generated
vendored
@ -960,6 +960,17 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
r0, e1 := callselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, e1 := callpselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
|
||||
n = int(r0)
|
||||
@ -1189,7 +1200,7 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
r0, e1 := callrecvmsg(s, uintptr(unsafe.Pointer(msg)), flags)
|
||||
r0, e1 := callnrecvmsg(s, uintptr(unsafe.Pointer(msg)), flags)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -1200,7 +1211,7 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
r0, e1 := callsendmsg(s, uintptr(unsafe.Pointer(msg)), flags)
|
||||
r0, e1 := callnsendmsg(s, uintptr(unsafe.Pointer(msg)), flags)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -1375,6 +1386,21 @@ func Getsystemcfg(label int) (n uint64) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func umount(target string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(target)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, e1 := callumount(uintptr(unsafe.Pointer(_p0)))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
|
||||
if e1 != 0 {
|
||||
|
40
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
generated
vendored
40
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
generated
vendored
@ -85,6 +85,7 @@ import (
|
||||
//go:cgo_import_dynamic libc_pause pause "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_pread64 pread64 "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_pwrite64 pwrite64 "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_select select "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_pselect pselect "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_setregid setregid "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_setreuid setreuid "libc.a/shr_64.o"
|
||||
@ -105,8 +106,8 @@ import (
|
||||
//go:cgo_import_dynamic libc_getsockname getsockname "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_sendto sendto "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_nrecvmsg nrecvmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_nsendmsg nsendmsg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_munmap munmap "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_madvise madvise "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_mprotect mprotect "libc.a/shr_64.o"
|
||||
@ -121,6 +122,7 @@ import (
|
||||
//go:cgo_import_dynamic libc_time time "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_utime utime "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
|
||||
@ -201,6 +203,7 @@ import (
|
||||
//go:linkname libc_pause libc_pause
|
||||
//go:linkname libc_pread64 libc_pread64
|
||||
//go:linkname libc_pwrite64 libc_pwrite64
|
||||
//go:linkname libc_select libc_select
|
||||
//go:linkname libc_pselect libc_pselect
|
||||
//go:linkname libc_setregid libc_setregid
|
||||
//go:linkname libc_setreuid libc_setreuid
|
||||
@ -221,8 +224,8 @@ import (
|
||||
//go:linkname libc_getsockname libc_getsockname
|
||||
//go:linkname libc_recvfrom libc_recvfrom
|
||||
//go:linkname libc_sendto libc_sendto
|
||||
//go:linkname libc_recvmsg libc_recvmsg
|
||||
//go:linkname libc_sendmsg libc_sendmsg
|
||||
//go:linkname libc_nrecvmsg libc_nrecvmsg
|
||||
//go:linkname libc_nsendmsg libc_nsendmsg
|
||||
//go:linkname libc_munmap libc_munmap
|
||||
//go:linkname libc_madvise libc_madvise
|
||||
//go:linkname libc_mprotect libc_mprotect
|
||||
@ -237,6 +240,7 @@ import (
|
||||
//go:linkname libc_time libc_time
|
||||
//go:linkname libc_utime libc_utime
|
||||
//go:linkname libc_getsystemcfg libc_getsystemcfg
|
||||
//go:linkname libc_umount libc_umount
|
||||
//go:linkname libc_getrlimit libc_getrlimit
|
||||
//go:linkname libc_setrlimit libc_setrlimit
|
||||
//go:linkname libc_lseek libc_lseek
|
||||
@ -320,6 +324,7 @@ var (
|
||||
libc_pause,
|
||||
libc_pread64,
|
||||
libc_pwrite64,
|
||||
libc_select,
|
||||
libc_pselect,
|
||||
libc_setregid,
|
||||
libc_setreuid,
|
||||
@ -340,8 +345,8 @@ var (
|
||||
libc_getsockname,
|
||||
libc_recvfrom,
|
||||
libc_sendto,
|
||||
libc_recvmsg,
|
||||
libc_sendmsg,
|
||||
libc_nrecvmsg,
|
||||
libc_nsendmsg,
|
||||
libc_munmap,
|
||||
libc_madvise,
|
||||
libc_mprotect,
|
||||
@ -356,6 +361,7 @@ var (
|
||||
libc_time,
|
||||
libc_utime,
|
||||
libc_getsystemcfg,
|
||||
libc_umount,
|
||||
libc_getrlimit,
|
||||
libc_setrlimit,
|
||||
libc_lseek,
|
||||
@ -893,6 +899,13 @@ func callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_select)), 5, uintptr(nfd), r, w, e, timeout, 0)
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pselect)), 6, uintptr(nfd), r, w, e, timeout, sigmask)
|
||||
return
|
||||
@ -1033,15 +1046,15 @@ func callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen u
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_recvmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)
|
||||
func callnrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nrecvmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sendmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)
|
||||
func callnsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nsendmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
@ -1145,6 +1158,13 @@ func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callumount(_p0 uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_umount)), 1, _p0, 0, 0, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
|
||||
return
|
||||
|
31
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
generated
vendored
31
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
generated
vendored
@ -83,6 +83,8 @@ int lstat(uintptr_t, uintptr_t);
|
||||
int pause();
|
||||
int pread64(int, uintptr_t, size_t, long long);
|
||||
int pwrite64(int, uintptr_t, size_t, long long);
|
||||
#define c_select select
|
||||
int select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
|
||||
int setregid(int, int);
|
||||
int setreuid(int, int);
|
||||
@ -103,8 +105,8 @@ int getpeername(int, uintptr_t, uintptr_t);
|
||||
int getsockname(int, uintptr_t, uintptr_t);
|
||||
int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
|
||||
int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
|
||||
int recvmsg(int, uintptr_t, int);
|
||||
int sendmsg(int, uintptr_t, int);
|
||||
int nrecvmsg(int, uintptr_t, int);
|
||||
int nsendmsg(int, uintptr_t, int);
|
||||
int munmap(uintptr_t, uintptr_t);
|
||||
int madvise(uintptr_t, size_t, int);
|
||||
int mprotect(uintptr_t, size_t, int);
|
||||
@ -119,6 +121,7 @@ int gettimeofday(uintptr_t, uintptr_t);
|
||||
int time(uintptr_t);
|
||||
int utime(uintptr_t, uintptr_t);
|
||||
unsigned long long getsystemcfg(int);
|
||||
int umount(uintptr_t);
|
||||
int getrlimit(int, uintptr_t);
|
||||
int setrlimit(int, uintptr_t);
|
||||
long long lseek(int, long long, int);
|
||||
@ -732,6 +735,14 @@ func callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.c_select(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout)))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.pselect(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout), C.uintptr_t(sigmask)))
|
||||
e1 = syscall.GetErrno()
|
||||
@ -892,16 +903,16 @@ func callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen u
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.recvmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))
|
||||
func callnrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.nrecvmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.sendmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))
|
||||
func callnsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.nsendmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
@ -1020,6 +1031,14 @@ func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callumount(_p0 uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.umount(C.uintptr_t(_p0)))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim)))
|
||||
e1 = syscall.GetErrno()
|
||||
|
26
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
26
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
@ -1679,6 +1679,32 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(pathname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
26
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
@ -1679,6 +1679,32 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(pathname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
if e1 != 0 {
|
||||
|
26
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
26
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
@ -1679,6 +1679,32 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(pathname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
26
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
@ -1679,6 +1679,32 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(pathname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
|
26
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
26
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
@ -1679,6 +1679,32 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(pathname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Dup2(oldfd int, newfd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||