build(deps): bump github.com/onsi/ginkgo/v2 from 2.3.1 to 2.4.0
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.3.1 to 2.4.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.3.1...v2.4.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
ad61918527
commit
db85fc5ea7
|
|
@ -23,7 +23,7 @@ require (
|
||||||
github.com/hashicorp/go-multierror v1.1.1
|
github.com/hashicorp/go-multierror v1.1.1
|
||||||
github.com/jinzhu/copier v0.3.5
|
github.com/jinzhu/copier v0.3.5
|
||||||
github.com/json-iterator/go v1.1.12
|
github.com/json-iterator/go v1.1.12
|
||||||
github.com/onsi/ginkgo/v2 v2.3.1
|
github.com/onsi/ginkgo/v2 v2.4.0
|
||||||
github.com/onsi/gomega v1.22.1
|
github.com/onsi/gomega v1.22.1
|
||||||
github.com/opencontainers/go-digest v1.0.0
|
github.com/opencontainers/go-digest v1.0.0
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc2
|
github.com/opencontainers/image-spec v1.1.0-rc2
|
||||||
|
|
@ -43,8 +43,8 @@ require (
|
||||||
go.etcd.io/bbolt v1.3.6
|
go.etcd.io/bbolt v1.3.6
|
||||||
golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0
|
golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
|
||||||
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
|
golang.org/x/sys v0.1.0
|
||||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
|
golang.org/x/term v0.1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|
@ -59,6 +59,7 @@ require (
|
||||||
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a // indirect
|
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a // indirect
|
||||||
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
||||||
github.com/docker/go-connections v0.4.0 // indirect
|
github.com/docker/go-connections v0.4.0 // indirect
|
||||||
|
github.com/go-logr/logr v1.2.3 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
github.com/golang/protobuf v1.5.2 // indirect
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
|
|
@ -101,8 +102,8 @@ require (
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||||
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
|
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
|
||||||
go.opencensus.io v0.23.0 // indirect
|
go.opencensus.io v0.23.0 // indirect
|
||||||
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
|
golang.org/x/net v0.1.0 // indirect
|
||||||
golang.org/x/text v0.3.7 // indirect
|
golang.org/x/text v0.4.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20220720214146-176da50484ac // indirect
|
google.golang.org/genproto v0.0.0-20220720214146-176da50484ac // indirect
|
||||||
google.golang.org/grpc v1.48.0 // indirect
|
google.golang.org/grpc v1.48.0 // indirect
|
||||||
google.golang.org/protobuf v1.28.1 // indirect
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
|
|
|
||||||
|
|
@ -575,6 +575,8 @@ github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg
|
||||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||||
github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||||
|
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||||
|
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||||
github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI=
|
github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI=
|
||||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||||
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||||
|
|
@ -1278,8 +1280,8 @@ github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3
|
||||||
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
|
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
|
||||||
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
|
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
|
||||||
github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0=
|
github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0=
|
||||||
github.com/onsi/ginkgo/v2 v2.3.1 h1:8SbseP7qM32WcvE6VaN6vfXxv698izmsJ1UQX9ve7T8=
|
github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs=
|
||||||
github.com/onsi/ginkgo/v2 v2.3.1/go.mod h1:Sv4yQXwG5VmF7tm3Q5Z+RWUpPo24LF1mpnz2crUb8Ys=
|
github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo=
|
||||||
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
|
|
@ -1296,7 +1298,6 @@ github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5h
|
||||||
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
|
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
|
||||||
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
|
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
|
||||||
github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
|
github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
|
||||||
github.com/onsi/gomega v1.22.0/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
|
|
||||||
github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI=
|
github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI=
|
||||||
github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM=
|
github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM=
|
||||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
||||||
|
|
@ -1783,6 +1784,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
|
||||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY=
|
golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY=
|
||||||
golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
|
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
|
||||||
|
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
|
|
@ -1822,6 +1825,7 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
|
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||||
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
|
@ -1900,8 +1904,9 @@ golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug
|
||||||
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||||
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI=
|
|
||||||
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||||
|
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
|
||||||
|
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
|
@ -2087,15 +2092,17 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc=
|
|
||||||
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||||
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
|
|
||||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=
|
||||||
|
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
|
@ -2104,8 +2111,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
|
||||||
|
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
|
@ -2234,6 +2242,7 @@ golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||||
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
|
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
|
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
|
||||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
run:
|
||||||
|
timeout: 1m
|
||||||
|
tests: true
|
||||||
|
|
||||||
|
linters:
|
||||||
|
disable-all: true
|
||||||
|
enable:
|
||||||
|
- asciicheck
|
||||||
|
- deadcode
|
||||||
|
- errcheck
|
||||||
|
- forcetypeassert
|
||||||
|
- gocritic
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
- gosimple
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
|
- misspell
|
||||||
|
- revive
|
||||||
|
- staticcheck
|
||||||
|
- structcheck
|
||||||
|
- typecheck
|
||||||
|
- unused
|
||||||
|
- varcheck
|
||||||
|
|
||||||
|
issues:
|
||||||
|
exclude-use-default: false
|
||||||
|
max-issues-per-linter: 0
|
||||||
|
max-same-issues: 10
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.0-rc1
|
||||||
|
|
||||||
|
This is the first logged release. Major changes (including breaking changes)
|
||||||
|
have occurred since earlier tags.
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Contributing
|
||||||
|
|
||||||
|
Logr is open to pull-requests, provided they fit within the intended scope of
|
||||||
|
the project. Specifically, this library aims to be VERY small and minimalist,
|
||||||
|
with no external dependencies.
|
||||||
|
|
||||||
|
## Compatibility
|
||||||
|
|
||||||
|
This project intends to follow [semantic versioning](http://semver.org) and
|
||||||
|
is very strict about compatibility. Any proposed changes MUST follow those
|
||||||
|
rules.
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
As a logging library, logr must be as light-weight as possible. Any proposed
|
||||||
|
code change must include results of running the [benchmark](./benchmark)
|
||||||
|
before and after the change.
|
||||||
|
|
@ -0,0 +1,201 @@
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"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.
|
||||||
|
|
@ -0,0 +1,282 @@
|
||||||
|
# A minimal logging API for Go
|
||||||
|
|
||||||
|
[](https://pkg.go.dev/github.com/go-logr/logr)
|
||||||
|
|
||||||
|
logr offers an(other) opinion on how Go programs and libraries can do logging
|
||||||
|
without becoming coupled to a particular logging implementation. This is not
|
||||||
|
an implementation of logging - it is an API. In fact it is two APIs with two
|
||||||
|
different sets of users.
|
||||||
|
|
||||||
|
The `Logger` type is intended for application and library authors. It provides
|
||||||
|
a relatively small API which can be used everywhere you want to emit logs. It
|
||||||
|
defers the actual act of writing logs (to files, to stdout, or whatever) to the
|
||||||
|
`LogSink` interface.
|
||||||
|
|
||||||
|
The `LogSink` interface is intended for logging library implementers. It is a
|
||||||
|
pure interface which can be implemented by logging frameworks to provide the actual logging
|
||||||
|
functionality.
|
||||||
|
|
||||||
|
This decoupling allows application and library developers to write code in
|
||||||
|
terms of `logr.Logger` (which has very low dependency fan-out) while the
|
||||||
|
implementation of logging is managed "up stack" (e.g. in or near `main()`.)
|
||||||
|
Application developers can then switch out implementations as necessary.
|
||||||
|
|
||||||
|
Many people assert that libraries should not be logging, and as such efforts
|
||||||
|
like this are pointless. Those people are welcome to convince the authors of
|
||||||
|
the tens-of-thousands of libraries that *DO* write logs that they are all
|
||||||
|
wrong. In the meantime, logr takes a more practical approach.
|
||||||
|
|
||||||
|
## Typical usage
|
||||||
|
|
||||||
|
Somewhere, early in an application's life, it will make a decision about which
|
||||||
|
logging library (implementation) it actually wants to use. Something like:
|
||||||
|
|
||||||
|
```
|
||||||
|
func main() {
|
||||||
|
// ... other setup code ...
|
||||||
|
|
||||||
|
// Create the "root" logger. We have chosen the "logimpl" implementation,
|
||||||
|
// which takes some initial parameters and returns a logr.Logger.
|
||||||
|
logger := logimpl.New(param1, param2)
|
||||||
|
|
||||||
|
// ... other setup code ...
|
||||||
|
```
|
||||||
|
|
||||||
|
Most apps will call into other libraries, create structures to govern the flow,
|
||||||
|
etc. The `logr.Logger` object can be passed to these other libraries, stored
|
||||||
|
in structs, or even used as a package-global variable, if needed. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
app := createTheAppObject(logger)
|
||||||
|
app.Run()
|
||||||
|
```
|
||||||
|
|
||||||
|
Outside of this early setup, no other packages need to know about the choice of
|
||||||
|
implementation. They write logs in terms of the `logr.Logger` that they
|
||||||
|
received:
|
||||||
|
|
||||||
|
```
|
||||||
|
type appObject struct {
|
||||||
|
// ... other fields ...
|
||||||
|
logger logr.Logger
|
||||||
|
// ... other fields ...
|
||||||
|
}
|
||||||
|
|
||||||
|
func (app *appObject) Run() {
|
||||||
|
app.logger.Info("starting up", "timestamp", time.Now())
|
||||||
|
|
||||||
|
// ... app code ...
|
||||||
|
```
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
If the Go standard library had defined an interface for logging, this project
|
||||||
|
probably would not be needed. Alas, here we are.
|
||||||
|
|
||||||
|
### Inspiration
|
||||||
|
|
||||||
|
Before you consider this package, please read [this blog post by the
|
||||||
|
inimitable Dave Cheney][warning-makes-no-sense]. We really appreciate what
|
||||||
|
he has to say, and it largely aligns with our own experiences.
|
||||||
|
|
||||||
|
### Differences from Dave's ideas
|
||||||
|
|
||||||
|
The main differences are:
|
||||||
|
|
||||||
|
1. Dave basically proposes doing away with the notion of a logging API in favor
|
||||||
|
of `fmt.Printf()`. We disagree, especially when you consider things like output
|
||||||
|
locations, timestamps, file and line decorations, and structured logging. This
|
||||||
|
package restricts the logging API to just 2 types of logs: info and error.
|
||||||
|
|
||||||
|
Info logs are things you want to tell the user which are not errors. Error
|
||||||
|
logs are, well, errors. If your code receives an `error` from a subordinate
|
||||||
|
function call and is logging that `error` *and not returning it*, use error
|
||||||
|
logs.
|
||||||
|
|
||||||
|
2. Verbosity-levels on info logs. This gives developers a chance to indicate
|
||||||
|
arbitrary grades of importance for info logs, without assigning names with
|
||||||
|
semantic meaning such as "warning", "trace", and "debug." Superficially this
|
||||||
|
may feel very similar, but the primary difference is the lack of semantics.
|
||||||
|
Because verbosity is a numerical value, it's safe to assume that an app running
|
||||||
|
with higher verbosity means more (and less important) logs will be generated.
|
||||||
|
|
||||||
|
## Implementations (non-exhaustive)
|
||||||
|
|
||||||
|
There are implementations for the following logging libraries:
|
||||||
|
|
||||||
|
- **a function** (can bridge to non-structured libraries): [funcr](https://github.com/go-logr/logr/tree/master/funcr)
|
||||||
|
- **a testing.T** (for use in Go tests, with JSON-like output): [testr](https://github.com/go-logr/logr/tree/master/testr)
|
||||||
|
- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr)
|
||||||
|
- **k8s.io/klog** (for Kubernetes): [klogr](https://git.k8s.io/klog/klogr)
|
||||||
|
- **a testing.T** (with klog-like text output): [ktesting](https://git.k8s.io/klog/ktesting)
|
||||||
|
- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr)
|
||||||
|
- **log** (the Go standard library logger): [stdr](https://github.com/go-logr/stdr)
|
||||||
|
- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr)
|
||||||
|
- **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend)
|
||||||
|
- **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr)
|
||||||
|
- **github.com/rs/zerolog**: [zerologr](https://github.com/go-logr/zerologr)
|
||||||
|
- **github.com/go-kit/log**: [gokitlogr](https://github.com/tonglil/gokitlogr) (also compatible with github.com/go-kit/kit/log since v0.12.0)
|
||||||
|
- **bytes.Buffer** (writing to a buffer): [bufrlogr](https://github.com/tonglil/buflogr) (useful for ensuring values were logged, like during testing)
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
### Conceptual
|
||||||
|
|
||||||
|
#### Why structured logging?
|
||||||
|
|
||||||
|
- **Structured logs are more easily queryable**: Since you've got
|
||||||
|
key-value pairs, it's much easier to query your structured logs for
|
||||||
|
particular values by filtering on the contents of a particular key --
|
||||||
|
think searching request logs for error codes, Kubernetes reconcilers for
|
||||||
|
the name and namespace of the reconciled object, etc.
|
||||||
|
|
||||||
|
- **Structured logging makes it easier to have cross-referenceable logs**:
|
||||||
|
Similarly to searchability, if you maintain conventions around your
|
||||||
|
keys, it becomes easy to gather all log lines related to a particular
|
||||||
|
concept.
|
||||||
|
|
||||||
|
- **Structured logs allow better dimensions of filtering**: if you have
|
||||||
|
structure to your logs, you've got more precise control over how much
|
||||||
|
information is logged -- you might choose in a particular configuration
|
||||||
|
to log certain keys but not others, only log lines where a certain key
|
||||||
|
matches a certain value, etc., instead of just having v-levels and names
|
||||||
|
to key off of.
|
||||||
|
|
||||||
|
- **Structured logs better represent structured data**: sometimes, the
|
||||||
|
data that you want to log is inherently structured (think tuple-link
|
||||||
|
objects.) Structured logs allow you to preserve that structure when
|
||||||
|
outputting.
|
||||||
|
|
||||||
|
#### Why V-levels?
|
||||||
|
|
||||||
|
**V-levels give operators an easy way to control the chattiness of log
|
||||||
|
operations**. V-levels provide a way for a given package to distinguish
|
||||||
|
the relative importance or verbosity of a given log message. Then, if
|
||||||
|
a particular logger or package is logging too many messages, the user
|
||||||
|
of the package can simply change the v-levels for that library.
|
||||||
|
|
||||||
|
#### Why not named levels, like Info/Warning/Error?
|
||||||
|
|
||||||
|
Read [Dave Cheney's post][warning-makes-no-sense]. Then read [Differences
|
||||||
|
from Dave's ideas](#differences-from-daves-ideas).
|
||||||
|
|
||||||
|
#### Why not allow format strings, too?
|
||||||
|
|
||||||
|
**Format strings negate many of the benefits of structured logs**:
|
||||||
|
|
||||||
|
- They're not easily searchable without resorting to fuzzy searching,
|
||||||
|
regular expressions, etc.
|
||||||
|
|
||||||
|
- They don't store structured data well, since contents are flattened into
|
||||||
|
a string.
|
||||||
|
|
||||||
|
- They're not cross-referenceable.
|
||||||
|
|
||||||
|
- They don't compress easily, since the message is not constant.
|
||||||
|
|
||||||
|
(Unless you turn positional parameters into key-value pairs with numerical
|
||||||
|
keys, at which point you've gotten key-value logging with meaningless
|
||||||
|
keys.)
|
||||||
|
|
||||||
|
### Practical
|
||||||
|
|
||||||
|
#### Why key-value pairs, and not a map?
|
||||||
|
|
||||||
|
Key-value pairs are *much* easier to optimize, especially around
|
||||||
|
allocations. Zap (a structured logger that inspired logr's interface) has
|
||||||
|
[performance measurements](https://github.com/uber-go/zap#performance)
|
||||||
|
that show this quite nicely.
|
||||||
|
|
||||||
|
While the interface ends up being a little less obvious, you get
|
||||||
|
potentially better performance, plus avoid making users type
|
||||||
|
`map[string]string{}` every time they want to log.
|
||||||
|
|
||||||
|
#### What if my V-levels differ between libraries?
|
||||||
|
|
||||||
|
That's fine. Control your V-levels on a per-logger basis, and use the
|
||||||
|
`WithName` method to pass different loggers to different libraries.
|
||||||
|
|
||||||
|
Generally, you should take care to ensure that you have relatively
|
||||||
|
consistent V-levels within a given logger, however, as this makes deciding
|
||||||
|
on what verbosity of logs to request easier.
|
||||||
|
|
||||||
|
#### But I really want to use a format string!
|
||||||
|
|
||||||
|
That's not actually a question. Assuming your question is "how do
|
||||||
|
I convert my mental model of logging with format strings to logging with
|
||||||
|
constant messages":
|
||||||
|
|
||||||
|
1. Figure out what the error actually is, as you'd write in a TL;DR style,
|
||||||
|
and use that as a message.
|
||||||
|
|
||||||
|
2. For every place you'd write a format specifier, look to the word before
|
||||||
|
it, and add that as a key value pair.
|
||||||
|
|
||||||
|
For instance, consider the following examples (all taken from spots in the
|
||||||
|
Kubernetes codebase):
|
||||||
|
|
||||||
|
- `klog.V(4).Infof("Client is returning errors: code %v, error %v",
|
||||||
|
responseCode, err)` becomes `logger.Error(err, "client returned an
|
||||||
|
error", "code", responseCode)`
|
||||||
|
|
||||||
|
- `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v",
|
||||||
|
seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after
|
||||||
|
response when requesting url", "attempt", retries, "after
|
||||||
|
seconds", seconds, "url", url)`
|
||||||
|
|
||||||
|
If you *really* must use a format string, use it in a key's value, and
|
||||||
|
call `fmt.Sprintf` yourself. For instance: `log.Printf("unable to
|
||||||
|
reflect over type %T")` becomes `logger.Info("unable to reflect over
|
||||||
|
type", "type", fmt.Sprintf("%T"))`. In general though, the cases where
|
||||||
|
this is necessary should be few and far between.
|
||||||
|
|
||||||
|
#### How do I choose my V-levels?
|
||||||
|
|
||||||
|
This is basically the only hard constraint: increase V-levels to denote
|
||||||
|
more verbose or more debug-y logs.
|
||||||
|
|
||||||
|
Otherwise, you can start out with `0` as "you always want to see this",
|
||||||
|
`1` as "common logging that you might *possibly* want to turn off", and
|
||||||
|
`10` as "I would like to performance-test your log collection stack."
|
||||||
|
|
||||||
|
Then gradually choose levels in between as you need them, working your way
|
||||||
|
down from 10 (for debug and trace style logs) and up from 1 (for chattier
|
||||||
|
info-type logs.)
|
||||||
|
|
||||||
|
#### How do I choose my keys?
|
||||||
|
|
||||||
|
Keys are fairly flexible, and can hold more or less any string
|
||||||
|
value. For best compatibility with implementations and consistency
|
||||||
|
with existing code in other projects, there are a few conventions you
|
||||||
|
should consider.
|
||||||
|
|
||||||
|
- Make your keys human-readable.
|
||||||
|
- Constant keys are generally a good idea.
|
||||||
|
- Be consistent across your codebase.
|
||||||
|
- Keys should naturally match parts of the message string.
|
||||||
|
- Use lower case for simple keys and
|
||||||
|
[lowerCamelCase](https://en.wiktionary.org/wiki/lowerCamelCase) for
|
||||||
|
more complex ones. Kubernetes is one example of a project that has
|
||||||
|
[adopted that
|
||||||
|
convention](https://github.com/kubernetes/community/blob/HEAD/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments).
|
||||||
|
|
||||||
|
While key names are mostly unrestricted (and spaces are acceptable),
|
||||||
|
it's generally a good idea to stick to printable ascii characters, or at
|
||||||
|
least match the general character set of your log lines.
|
||||||
|
|
||||||
|
#### Why should keys be constant values?
|
||||||
|
|
||||||
|
The point of structured logging is to make later log processing easier. Your
|
||||||
|
keys are, effectively, the schema of each log message. If you use different
|
||||||
|
keys across instances of the same log line, you will make your structured logs
|
||||||
|
much harder to use. `Sprintf()` is for values, not for keys!
|
||||||
|
|
||||||
|
#### Why is this not a pure interface?
|
||||||
|
|
||||||
|
The Logger type is implemented as a struct in order to allow the Go compiler to
|
||||||
|
optimize things like high-V `Info` logs that are not triggered. Not all of
|
||||||
|
these implementations are implemented yet, but this structure was suggested as
|
||||||
|
a way to ensure they *can* be implemented. All of the real work is behind the
|
||||||
|
`LogSink` interface.
|
||||||
|
|
||||||
|
[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 The logr Authors.
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package logr
|
||||||
|
|
||||||
|
// Discard returns a Logger that discards all messages logged to it. It can be
|
||||||
|
// used whenever the caller is not interested in the logs. Logger instances
|
||||||
|
// produced by this function always compare as equal.
|
||||||
|
func Discard() Logger {
|
||||||
|
return Logger{
|
||||||
|
level: 0,
|
||||||
|
sink: discardLogSink{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// discardLogSink is a LogSink that discards all messages.
|
||||||
|
type discardLogSink struct{}
|
||||||
|
|
||||||
|
// Verify that it actually implements the interface
|
||||||
|
var _ LogSink = discardLogSink{}
|
||||||
|
|
||||||
|
func (l discardLogSink) Init(RuntimeInfo) {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l discardLogSink) Enabled(int) bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l discardLogSink) Info(int, string, ...interface{}) {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l discardLogSink) Error(error, string, ...interface{}) {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l discardLogSink) WithValues(...interface{}) LogSink {
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l discardLogSink) WithName(string) LogSink {
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,787 @@
|
||||||
|
/*
|
||||||
|
Copyright 2021 The logr Authors.
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Package funcr implements formatting of structured log messages and
|
||||||
|
// optionally captures the call site and timestamp.
|
||||||
|
//
|
||||||
|
// The simplest way to use it is via its implementation of a
|
||||||
|
// github.com/go-logr/logr.LogSink with output through an arbitrary
|
||||||
|
// "write" function. See New and NewJSON for details.
|
||||||
|
//
|
||||||
|
// Custom LogSinks
|
||||||
|
//
|
||||||
|
// For users who need more control, a funcr.Formatter can be embedded inside
|
||||||
|
// your own custom LogSink implementation. This is useful when the LogSink
|
||||||
|
// needs to implement additional methods, for example.
|
||||||
|
//
|
||||||
|
// Formatting
|
||||||
|
//
|
||||||
|
// This will respect logr.Marshaler, fmt.Stringer, and error interfaces for
|
||||||
|
// values which are being logged. When rendering a struct, funcr will use Go's
|
||||||
|
// standard JSON tags (all except "string").
|
||||||
|
package funcr
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"encoding"
|
||||||
|
"fmt"
|
||||||
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
|
"runtime"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-logr/logr"
|
||||||
|
)
|
||||||
|
|
||||||
|
// New returns a logr.Logger which is implemented by an arbitrary function.
|
||||||
|
func New(fn func(prefix, args string), opts Options) logr.Logger {
|
||||||
|
return logr.New(newSink(fn, NewFormatter(opts)))
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewJSON returns a logr.Logger which is implemented by an arbitrary function
|
||||||
|
// and produces JSON output.
|
||||||
|
func NewJSON(fn func(obj string), opts Options) logr.Logger {
|
||||||
|
fnWrapper := func(_, obj string) {
|
||||||
|
fn(obj)
|
||||||
|
}
|
||||||
|
return logr.New(newSink(fnWrapper, NewFormatterJSON(opts)))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Underlier exposes access to the underlying logging function. Since
|
||||||
|
// callers only have a logr.Logger, they have to know which
|
||||||
|
// implementation is in use, so this interface is less of an
|
||||||
|
// abstraction and more of a way to test type conversion.
|
||||||
|
type Underlier interface {
|
||||||
|
GetUnderlying() func(prefix, args string)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink {
|
||||||
|
l := &fnlogger{
|
||||||
|
Formatter: formatter,
|
||||||
|
write: fn,
|
||||||
|
}
|
||||||
|
// For skipping fnlogger.Info and fnlogger.Error.
|
||||||
|
l.Formatter.AddCallDepth(1)
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
// Options carries parameters which influence the way logs are generated.
|
||||||
|
type Options struct {
|
||||||
|
// LogCaller tells funcr to add a "caller" key to some or all log lines.
|
||||||
|
// This has some overhead, so some users might not want it.
|
||||||
|
LogCaller MessageClass
|
||||||
|
|
||||||
|
// LogCallerFunc tells funcr to also log the calling function name. This
|
||||||
|
// has no effect if caller logging is not enabled (see Options.LogCaller).
|
||||||
|
LogCallerFunc bool
|
||||||
|
|
||||||
|
// LogTimestamp tells funcr to add a "ts" key to log lines. This has some
|
||||||
|
// overhead, so some users might not want it.
|
||||||
|
LogTimestamp bool
|
||||||
|
|
||||||
|
// TimestampFormat tells funcr how to render timestamps when LogTimestamp
|
||||||
|
// is enabled. If not specified, a default format will be used. For more
|
||||||
|
// details, see docs for Go's time.Layout.
|
||||||
|
TimestampFormat string
|
||||||
|
|
||||||
|
// Verbosity tells funcr which V logs to produce. Higher values enable
|
||||||
|
// more logs. Info logs at or below this level will be written, while logs
|
||||||
|
// above this level will be discarded.
|
||||||
|
Verbosity int
|
||||||
|
|
||||||
|
// RenderBuiltinsHook allows users to mutate the list of key-value pairs
|
||||||
|
// while a log line is being rendered. The kvList argument follows logr
|
||||||
|
// conventions - each pair of slice elements is comprised of a string key
|
||||||
|
// and an arbitrary value (verified and sanitized before calling this
|
||||||
|
// hook). The value returned must follow the same conventions. This hook
|
||||||
|
// can be used to audit or modify logged data. For example, you might want
|
||||||
|
// to prefix all of funcr's built-in keys with some string. This hook is
|
||||||
|
// only called for built-in (provided by funcr itself) key-value pairs.
|
||||||
|
// Equivalent hooks are offered for key-value pairs saved via
|
||||||
|
// logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and
|
||||||
|
// for user-provided pairs (see RenderArgsHook).
|
||||||
|
RenderBuiltinsHook func(kvList []interface{}) []interface{}
|
||||||
|
|
||||||
|
// RenderValuesHook is the same as RenderBuiltinsHook, except that it is
|
||||||
|
// only called for key-value pairs saved via logr.Logger.WithValues. See
|
||||||
|
// RenderBuiltinsHook for more details.
|
||||||
|
RenderValuesHook func(kvList []interface{}) []interface{}
|
||||||
|
|
||||||
|
// RenderArgsHook is the same as RenderBuiltinsHook, except that it is only
|
||||||
|
// called for key-value pairs passed directly to Info and Error. See
|
||||||
|
// RenderBuiltinsHook for more details.
|
||||||
|
RenderArgsHook func(kvList []interface{}) []interface{}
|
||||||
|
|
||||||
|
// MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct
|
||||||
|
// that contains a struct, etc.) it may log. Every time it finds a struct,
|
||||||
|
// slice, array, or map the depth is increased by one. When the maximum is
|
||||||
|
// reached, the value will be converted to a string indicating that the max
|
||||||
|
// depth has been exceeded. If this field is not specified, a default
|
||||||
|
// value will be used.
|
||||||
|
MaxLogDepth int
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageClass indicates which category or categories of messages to consider.
|
||||||
|
type MessageClass int
|
||||||
|
|
||||||
|
const (
|
||||||
|
// None ignores all message classes.
|
||||||
|
None MessageClass = iota
|
||||||
|
// All considers all message classes.
|
||||||
|
All
|
||||||
|
// Info only considers info messages.
|
||||||
|
Info
|
||||||
|
// Error only considers error messages.
|
||||||
|
Error
|
||||||
|
)
|
||||||
|
|
||||||
|
// fnlogger inherits some of its LogSink implementation from Formatter
|
||||||
|
// and just needs to add some glue code.
|
||||||
|
type fnlogger struct {
|
||||||
|
Formatter
|
||||||
|
write func(prefix, args string)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l fnlogger) WithName(name string) logr.LogSink {
|
||||||
|
l.Formatter.AddName(name)
|
||||||
|
return &l
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l fnlogger) WithValues(kvList ...interface{}) logr.LogSink {
|
||||||
|
l.Formatter.AddValues(kvList)
|
||||||
|
return &l
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l fnlogger) WithCallDepth(depth int) logr.LogSink {
|
||||||
|
l.Formatter.AddCallDepth(depth)
|
||||||
|
return &l
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l fnlogger) Info(level int, msg string, kvList ...interface{}) {
|
||||||
|
prefix, args := l.FormatInfo(level, msg, kvList)
|
||||||
|
l.write(prefix, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l fnlogger) Error(err error, msg string, kvList ...interface{}) {
|
||||||
|
prefix, args := l.FormatError(err, msg, kvList)
|
||||||
|
l.write(prefix, args)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l fnlogger) GetUnderlying() func(prefix, args string) {
|
||||||
|
return l.write
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assert conformance to the interfaces.
|
||||||
|
var _ logr.LogSink = &fnlogger{}
|
||||||
|
var _ logr.CallDepthLogSink = &fnlogger{}
|
||||||
|
var _ Underlier = &fnlogger{}
|
||||||
|
|
||||||
|
// NewFormatter constructs a Formatter which emits a JSON-like key=value format.
|
||||||
|
func NewFormatter(opts Options) Formatter {
|
||||||
|
return newFormatter(opts, outputKeyValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFormatterJSON constructs a Formatter which emits strict JSON.
|
||||||
|
func NewFormatterJSON(opts Options) Formatter {
|
||||||
|
return newFormatter(opts, outputJSON)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defaults for Options.
|
||||||
|
const defaultTimestampFormat = "2006-01-02 15:04:05.000000"
|
||||||
|
const defaultMaxLogDepth = 16
|
||||||
|
|
||||||
|
func newFormatter(opts Options, outfmt outputFormat) Formatter {
|
||||||
|
if opts.TimestampFormat == "" {
|
||||||
|
opts.TimestampFormat = defaultTimestampFormat
|
||||||
|
}
|
||||||
|
if opts.MaxLogDepth == 0 {
|
||||||
|
opts.MaxLogDepth = defaultMaxLogDepth
|
||||||
|
}
|
||||||
|
f := Formatter{
|
||||||
|
outputFormat: outfmt,
|
||||||
|
prefix: "",
|
||||||
|
values: nil,
|
||||||
|
depth: 0,
|
||||||
|
opts: opts,
|
||||||
|
}
|
||||||
|
return f
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatter is an opaque struct which can be embedded in a LogSink
|
||||||
|
// implementation. It should be constructed with NewFormatter. Some of
|
||||||
|
// its methods directly implement logr.LogSink.
|
||||||
|
type Formatter struct {
|
||||||
|
outputFormat outputFormat
|
||||||
|
prefix string
|
||||||
|
values []interface{}
|
||||||
|
valuesStr string
|
||||||
|
depth int
|
||||||
|
opts Options
|
||||||
|
}
|
||||||
|
|
||||||
|
// outputFormat indicates which outputFormat to use.
|
||||||
|
type outputFormat int
|
||||||
|
|
||||||
|
const (
|
||||||
|
// outputKeyValue emits a JSON-like key=value format, but not strict JSON.
|
||||||
|
outputKeyValue outputFormat = iota
|
||||||
|
// outputJSON emits strict JSON.
|
||||||
|
outputJSON
|
||||||
|
)
|
||||||
|
|
||||||
|
// PseudoStruct is a list of key-value pairs that gets logged as a struct.
|
||||||
|
type PseudoStruct []interface{}
|
||||||
|
|
||||||
|
// render produces a log line, ready to use.
|
||||||
|
func (f Formatter) render(builtins, args []interface{}) string {
|
||||||
|
// Empirically bytes.Buffer is faster than strings.Builder for this.
|
||||||
|
buf := bytes.NewBuffer(make([]byte, 0, 1024))
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
buf.WriteByte('{')
|
||||||
|
}
|
||||||
|
vals := builtins
|
||||||
|
if hook := f.opts.RenderBuiltinsHook; hook != nil {
|
||||||
|
vals = hook(f.sanitize(vals))
|
||||||
|
}
|
||||||
|
f.flatten(buf, vals, false, false) // keys are ours, no need to escape
|
||||||
|
continuing := len(builtins) > 0
|
||||||
|
if len(f.valuesStr) > 0 {
|
||||||
|
if continuing {
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
buf.WriteByte(',')
|
||||||
|
} else {
|
||||||
|
buf.WriteByte(' ')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continuing = true
|
||||||
|
buf.WriteString(f.valuesStr)
|
||||||
|
}
|
||||||
|
vals = args
|
||||||
|
if hook := f.opts.RenderArgsHook; hook != nil {
|
||||||
|
vals = hook(f.sanitize(vals))
|
||||||
|
}
|
||||||
|
f.flatten(buf, vals, continuing, true) // escape user-provided keys
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
buf.WriteByte('}')
|
||||||
|
}
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// flatten renders a list of key-value pairs into a buffer. If continuing is
|
||||||
|
// true, it assumes that the buffer has previous values and will emit a
|
||||||
|
// separator (which depends on the output format) before the first pair it
|
||||||
|
// writes. If escapeKeys is true, the keys are assumed to have
|
||||||
|
// non-JSON-compatible characters in them and must be evaluated for escapes.
|
||||||
|
//
|
||||||
|
// This function returns a potentially modified version of kvList, which
|
||||||
|
// ensures that there is a value for every key (adding a value if needed) and
|
||||||
|
// that each key is a string (substituting a key if needed).
|
||||||
|
func (f Formatter) flatten(buf *bytes.Buffer, kvList []interface{}, continuing bool, escapeKeys bool) []interface{} {
|
||||||
|
// This logic overlaps with sanitize() but saves one type-cast per key,
|
||||||
|
// which can be measurable.
|
||||||
|
if len(kvList)%2 != 0 {
|
||||||
|
kvList = append(kvList, noValue)
|
||||||
|
}
|
||||||
|
for i := 0; i < len(kvList); i += 2 {
|
||||||
|
k, ok := kvList[i].(string)
|
||||||
|
if !ok {
|
||||||
|
k = f.nonStringKey(kvList[i])
|
||||||
|
kvList[i] = k
|
||||||
|
}
|
||||||
|
v := kvList[i+1]
|
||||||
|
|
||||||
|
if i > 0 || continuing {
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
buf.WriteByte(',')
|
||||||
|
} else {
|
||||||
|
// In theory the format could be something we don't understand. In
|
||||||
|
// practice, we control it, so it won't be.
|
||||||
|
buf.WriteByte(' ')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if escapeKeys {
|
||||||
|
buf.WriteString(prettyString(k))
|
||||||
|
} else {
|
||||||
|
// this is faster
|
||||||
|
buf.WriteByte('"')
|
||||||
|
buf.WriteString(k)
|
||||||
|
buf.WriteByte('"')
|
||||||
|
}
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
buf.WriteByte(':')
|
||||||
|
} else {
|
||||||
|
buf.WriteByte('=')
|
||||||
|
}
|
||||||
|
buf.WriteString(f.pretty(v))
|
||||||
|
}
|
||||||
|
return kvList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f Formatter) pretty(value interface{}) string {
|
||||||
|
return f.prettyWithFlags(value, 0, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
flagRawStruct = 0x1 // do not print braces on structs
|
||||||
|
)
|
||||||
|
|
||||||
|
// TODO: This is not fast. Most of the overhead goes here.
|
||||||
|
func (f Formatter) prettyWithFlags(value interface{}, flags uint32, depth int) string {
|
||||||
|
if depth > f.opts.MaxLogDepth {
|
||||||
|
return `"<max-log-depth-exceeded>"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle types that take full control of logging.
|
||||||
|
if v, ok := value.(logr.Marshaler); ok {
|
||||||
|
// Replace the value with what the type wants to get logged.
|
||||||
|
// That then gets handled below via reflection.
|
||||||
|
value = invokeMarshaler(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle types that want to format themselves.
|
||||||
|
switch v := value.(type) {
|
||||||
|
case fmt.Stringer:
|
||||||
|
value = invokeStringer(v)
|
||||||
|
case error:
|
||||||
|
value = invokeError(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handling the most common types without reflect is a small perf win.
|
||||||
|
switch v := value.(type) {
|
||||||
|
case bool:
|
||||||
|
return strconv.FormatBool(v)
|
||||||
|
case string:
|
||||||
|
return prettyString(v)
|
||||||
|
case int:
|
||||||
|
return strconv.FormatInt(int64(v), 10)
|
||||||
|
case int8:
|
||||||
|
return strconv.FormatInt(int64(v), 10)
|
||||||
|
case int16:
|
||||||
|
return strconv.FormatInt(int64(v), 10)
|
||||||
|
case int32:
|
||||||
|
return strconv.FormatInt(int64(v), 10)
|
||||||
|
case int64:
|
||||||
|
return strconv.FormatInt(int64(v), 10)
|
||||||
|
case uint:
|
||||||
|
return strconv.FormatUint(uint64(v), 10)
|
||||||
|
case uint8:
|
||||||
|
return strconv.FormatUint(uint64(v), 10)
|
||||||
|
case uint16:
|
||||||
|
return strconv.FormatUint(uint64(v), 10)
|
||||||
|
case uint32:
|
||||||
|
return strconv.FormatUint(uint64(v), 10)
|
||||||
|
case uint64:
|
||||||
|
return strconv.FormatUint(v, 10)
|
||||||
|
case uintptr:
|
||||||
|
return strconv.FormatUint(uint64(v), 10)
|
||||||
|
case float32:
|
||||||
|
return strconv.FormatFloat(float64(v), 'f', -1, 32)
|
||||||
|
case float64:
|
||||||
|
return strconv.FormatFloat(v, 'f', -1, 64)
|
||||||
|
case complex64:
|
||||||
|
return `"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `"`
|
||||||
|
case complex128:
|
||||||
|
return `"` + strconv.FormatComplex(v, 'f', -1, 128) + `"`
|
||||||
|
case PseudoStruct:
|
||||||
|
buf := bytes.NewBuffer(make([]byte, 0, 1024))
|
||||||
|
v = f.sanitize(v)
|
||||||
|
if flags&flagRawStruct == 0 {
|
||||||
|
buf.WriteByte('{')
|
||||||
|
}
|
||||||
|
for i := 0; i < len(v); i += 2 {
|
||||||
|
if i > 0 {
|
||||||
|
buf.WriteByte(',')
|
||||||
|
}
|
||||||
|
k, _ := v[i].(string) // sanitize() above means no need to check success
|
||||||
|
// arbitrary keys might need escaping
|
||||||
|
buf.WriteString(prettyString(k))
|
||||||
|
buf.WriteByte(':')
|
||||||
|
buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1))
|
||||||
|
}
|
||||||
|
if flags&flagRawStruct == 0 {
|
||||||
|
buf.WriteByte('}')
|
||||||
|
}
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := bytes.NewBuffer(make([]byte, 0, 256))
|
||||||
|
t := reflect.TypeOf(value)
|
||||||
|
if t == nil {
|
||||||
|
return "null"
|
||||||
|
}
|
||||||
|
v := reflect.ValueOf(value)
|
||||||
|
switch t.Kind() {
|
||||||
|
case reflect.Bool:
|
||||||
|
return strconv.FormatBool(v.Bool())
|
||||||
|
case reflect.String:
|
||||||
|
return prettyString(v.String())
|
||||||
|
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||||
|
return strconv.FormatInt(int64(v.Int()), 10)
|
||||||
|
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||||
|
return strconv.FormatUint(uint64(v.Uint()), 10)
|
||||||
|
case reflect.Float32:
|
||||||
|
return strconv.FormatFloat(float64(v.Float()), 'f', -1, 32)
|
||||||
|
case reflect.Float64:
|
||||||
|
return strconv.FormatFloat(v.Float(), 'f', -1, 64)
|
||||||
|
case reflect.Complex64:
|
||||||
|
return `"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `"`
|
||||||
|
case reflect.Complex128:
|
||||||
|
return `"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `"`
|
||||||
|
case reflect.Struct:
|
||||||
|
if flags&flagRawStruct == 0 {
|
||||||
|
buf.WriteByte('{')
|
||||||
|
}
|
||||||
|
for i := 0; i < t.NumField(); i++ {
|
||||||
|
fld := t.Field(i)
|
||||||
|
if fld.PkgPath != "" {
|
||||||
|
// reflect says this field is only defined for non-exported fields.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !v.Field(i).CanInterface() {
|
||||||
|
// reflect isn't clear exactly what this means, but we can't use it.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
name := ""
|
||||||
|
omitempty := false
|
||||||
|
if tag, found := fld.Tag.Lookup("json"); found {
|
||||||
|
if tag == "-" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if comma := strings.Index(tag, ","); comma != -1 {
|
||||||
|
if n := tag[:comma]; n != "" {
|
||||||
|
name = n
|
||||||
|
}
|
||||||
|
rest := tag[comma:]
|
||||||
|
if strings.Contains(rest, ",omitempty,") || strings.HasSuffix(rest, ",omitempty") {
|
||||||
|
omitempty = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
name = tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if omitempty && isEmpty(v.Field(i)) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if i > 0 {
|
||||||
|
buf.WriteByte(',')
|
||||||
|
}
|
||||||
|
if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" {
|
||||||
|
buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if name == "" {
|
||||||
|
name = fld.Name
|
||||||
|
}
|
||||||
|
// field names can't contain characters which need escaping
|
||||||
|
buf.WriteByte('"')
|
||||||
|
buf.WriteString(name)
|
||||||
|
buf.WriteByte('"')
|
||||||
|
buf.WriteByte(':')
|
||||||
|
buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1))
|
||||||
|
}
|
||||||
|
if flags&flagRawStruct == 0 {
|
||||||
|
buf.WriteByte('}')
|
||||||
|
}
|
||||||
|
return buf.String()
|
||||||
|
case reflect.Slice, reflect.Array:
|
||||||
|
buf.WriteByte('[')
|
||||||
|
for i := 0; i < v.Len(); i++ {
|
||||||
|
if i > 0 {
|
||||||
|
buf.WriteByte(',')
|
||||||
|
}
|
||||||
|
e := v.Index(i)
|
||||||
|
buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1))
|
||||||
|
}
|
||||||
|
buf.WriteByte(']')
|
||||||
|
return buf.String()
|
||||||
|
case reflect.Map:
|
||||||
|
buf.WriteByte('{')
|
||||||
|
// This does not sort the map keys, for best perf.
|
||||||
|
it := v.MapRange()
|
||||||
|
i := 0
|
||||||
|
for it.Next() {
|
||||||
|
if i > 0 {
|
||||||
|
buf.WriteByte(',')
|
||||||
|
}
|
||||||
|
// If a map key supports TextMarshaler, use it.
|
||||||
|
keystr := ""
|
||||||
|
if m, ok := it.Key().Interface().(encoding.TextMarshaler); ok {
|
||||||
|
txt, err := m.MarshalText()
|
||||||
|
if err != nil {
|
||||||
|
keystr = fmt.Sprintf("<error-MarshalText: %s>", err.Error())
|
||||||
|
} else {
|
||||||
|
keystr = string(txt)
|
||||||
|
}
|
||||||
|
keystr = prettyString(keystr)
|
||||||
|
} else {
|
||||||
|
// prettyWithFlags will produce already-escaped values
|
||||||
|
keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1)
|
||||||
|
if t.Key().Kind() != reflect.String {
|
||||||
|
// JSON only does string keys. Unlike Go's standard JSON, we'll
|
||||||
|
// convert just about anything to a string.
|
||||||
|
keystr = prettyString(keystr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buf.WriteString(keystr)
|
||||||
|
buf.WriteByte(':')
|
||||||
|
buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1))
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
buf.WriteByte('}')
|
||||||
|
return buf.String()
|
||||||
|
case reflect.Ptr, reflect.Interface:
|
||||||
|
if v.IsNil() {
|
||||||
|
return "null"
|
||||||
|
}
|
||||||
|
return f.prettyWithFlags(v.Elem().Interface(), 0, depth)
|
||||||
|
}
|
||||||
|
return fmt.Sprintf(`"<unhandled-%s>"`, t.Kind().String())
|
||||||
|
}
|
||||||
|
|
||||||
|
func prettyString(s string) string {
|
||||||
|
// Avoid escaping (which does allocations) if we can.
|
||||||
|
if needsEscape(s) {
|
||||||
|
return strconv.Quote(s)
|
||||||
|
}
|
||||||
|
b := bytes.NewBuffer(make([]byte, 0, 1024))
|
||||||
|
b.WriteByte('"')
|
||||||
|
b.WriteString(s)
|
||||||
|
b.WriteByte('"')
|
||||||
|
return b.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// needsEscape determines whether the input string needs to be escaped or not,
|
||||||
|
// without doing any allocations.
|
||||||
|
func needsEscape(s string) bool {
|
||||||
|
for _, r := range s {
|
||||||
|
if !strconv.IsPrint(r) || r == '\\' || r == '"' {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func isEmpty(v reflect.Value) bool {
|
||||||
|
switch v.Kind() {
|
||||||
|
case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
|
||||||
|
return v.Len() == 0
|
||||||
|
case reflect.Bool:
|
||||||
|
return !v.Bool()
|
||||||
|
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||||
|
return v.Int() == 0
|
||||||
|
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||||
|
return v.Uint() == 0
|
||||||
|
case reflect.Float32, reflect.Float64:
|
||||||
|
return v.Float() == 0
|
||||||
|
case reflect.Complex64, reflect.Complex128:
|
||||||
|
return v.Complex() == 0
|
||||||
|
case reflect.Interface, reflect.Ptr:
|
||||||
|
return v.IsNil()
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func invokeMarshaler(m logr.Marshaler) (ret interface{}) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ret = fmt.Sprintf("<panic: %s>", r)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
return m.MarshalLog()
|
||||||
|
}
|
||||||
|
|
||||||
|
func invokeStringer(s fmt.Stringer) (ret string) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ret = fmt.Sprintf("<panic: %s>", r)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
return s.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
func invokeError(e error) (ret string) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ret = fmt.Sprintf("<panic: %s>", r)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
return e.Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Caller represents the original call site for a log line, after considering
|
||||||
|
// logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File and
|
||||||
|
// Line fields will always be provided, while the Func field is optional.
|
||||||
|
// Users can set the render hook fields in Options to examine logged key-value
|
||||||
|
// pairs, one of which will be {"caller", Caller} if the Options.LogCaller
|
||||||
|
// field is enabled for the given MessageClass.
|
||||||
|
type Caller struct {
|
||||||
|
// File is the basename of the file for this call site.
|
||||||
|
File string `json:"file"`
|
||||||
|
// Line is the line number in the file for this call site.
|
||||||
|
Line int `json:"line"`
|
||||||
|
// Func is the function name for this call site, or empty if
|
||||||
|
// Options.LogCallerFunc is not enabled.
|
||||||
|
Func string `json:"function,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f Formatter) caller() Caller {
|
||||||
|
// +1 for this frame, +1 for Info/Error.
|
||||||
|
pc, file, line, ok := runtime.Caller(f.depth + 2)
|
||||||
|
if !ok {
|
||||||
|
return Caller{"<unknown>", 0, ""}
|
||||||
|
}
|
||||||
|
fn := ""
|
||||||
|
if f.opts.LogCallerFunc {
|
||||||
|
if fp := runtime.FuncForPC(pc); fp != nil {
|
||||||
|
fn = fp.Name()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Caller{filepath.Base(file), line, fn}
|
||||||
|
}
|
||||||
|
|
||||||
|
const noValue = "<no-value>"
|
||||||
|
|
||||||
|
func (f Formatter) nonStringKey(v interface{}) string {
|
||||||
|
return fmt.Sprintf("<non-string-key: %s>", f.snippet(v))
|
||||||
|
}
|
||||||
|
|
||||||
|
// snippet produces a short snippet string of an arbitrary value.
|
||||||
|
func (f Formatter) snippet(v interface{}) string {
|
||||||
|
const snipLen = 16
|
||||||
|
|
||||||
|
snip := f.pretty(v)
|
||||||
|
if len(snip) > snipLen {
|
||||||
|
snip = snip[:snipLen]
|
||||||
|
}
|
||||||
|
return snip
|
||||||
|
}
|
||||||
|
|
||||||
|
// sanitize ensures that a list of key-value pairs has a value for every key
|
||||||
|
// (adding a value if needed) and that each key is a string (substituting a key
|
||||||
|
// if needed).
|
||||||
|
func (f Formatter) sanitize(kvList []interface{}) []interface{} {
|
||||||
|
if len(kvList)%2 != 0 {
|
||||||
|
kvList = append(kvList, noValue)
|
||||||
|
}
|
||||||
|
for i := 0; i < len(kvList); i += 2 {
|
||||||
|
_, ok := kvList[i].(string)
|
||||||
|
if !ok {
|
||||||
|
kvList[i] = f.nonStringKey(kvList[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return kvList
|
||||||
|
}
|
||||||
|
|
||||||
|
// Init configures this Formatter from runtime info, such as the call depth
|
||||||
|
// imposed by logr itself.
|
||||||
|
// Note that this receiver is a pointer, so depth can be saved.
|
||||||
|
func (f *Formatter) Init(info logr.RuntimeInfo) {
|
||||||
|
f.depth += info.CallDepth
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enabled checks whether an info message at the given level should be logged.
|
||||||
|
func (f Formatter) Enabled(level int) bool {
|
||||||
|
return level <= f.opts.Verbosity
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDepth returns the current depth of this Formatter. This is useful for
|
||||||
|
// implementations which do their own caller attribution.
|
||||||
|
func (f Formatter) GetDepth() int {
|
||||||
|
return f.depth
|
||||||
|
}
|
||||||
|
|
||||||
|
// FormatInfo renders an Info log message into strings. The prefix will be
|
||||||
|
// empty when no names were set (via AddNames), or when the output is
|
||||||
|
// configured for JSON.
|
||||||
|
func (f Formatter) FormatInfo(level int, msg string, kvList []interface{}) (prefix, argsStr string) {
|
||||||
|
args := make([]interface{}, 0, 64) // using a constant here impacts perf
|
||||||
|
prefix = f.prefix
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
args = append(args, "logger", prefix)
|
||||||
|
prefix = ""
|
||||||
|
}
|
||||||
|
if f.opts.LogTimestamp {
|
||||||
|
args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat))
|
||||||
|
}
|
||||||
|
if policy := f.opts.LogCaller; policy == All || policy == Info {
|
||||||
|
args = append(args, "caller", f.caller())
|
||||||
|
}
|
||||||
|
args = append(args, "level", level, "msg", msg)
|
||||||
|
return prefix, f.render(args, kvList)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FormatError renders an Error log message into strings. The prefix will be
|
||||||
|
// empty when no names were set (via AddNames), or when the output is
|
||||||
|
// configured for JSON.
|
||||||
|
func (f Formatter) FormatError(err error, msg string, kvList []interface{}) (prefix, argsStr string) {
|
||||||
|
args := make([]interface{}, 0, 64) // using a constant here impacts perf
|
||||||
|
prefix = f.prefix
|
||||||
|
if f.outputFormat == outputJSON {
|
||||||
|
args = append(args, "logger", prefix)
|
||||||
|
prefix = ""
|
||||||
|
}
|
||||||
|
if f.opts.LogTimestamp {
|
||||||
|
args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat))
|
||||||
|
}
|
||||||
|
if policy := f.opts.LogCaller; policy == All || policy == Error {
|
||||||
|
args = append(args, "caller", f.caller())
|
||||||
|
}
|
||||||
|
args = append(args, "msg", msg)
|
||||||
|
var loggableErr interface{}
|
||||||
|
if err != nil {
|
||||||
|
loggableErr = err.Error()
|
||||||
|
}
|
||||||
|
args = append(args, "error", loggableErr)
|
||||||
|
return f.prefix, f.render(args, kvList)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddName appends the specified name. funcr uses '/' characters to separate
|
||||||
|
// name elements. Callers should not pass '/' in the provided name string, but
|
||||||
|
// this library does not actually enforce that.
|
||||||
|
func (f *Formatter) AddName(name string) {
|
||||||
|
if len(f.prefix) > 0 {
|
||||||
|
f.prefix += "/"
|
||||||
|
}
|
||||||
|
f.prefix += name
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddValues adds key-value pairs to the set of saved values to be logged with
|
||||||
|
// each log line.
|
||||||
|
func (f *Formatter) AddValues(kvList []interface{}) {
|
||||||
|
// Three slice args forces a copy.
|
||||||
|
n := len(f.values)
|
||||||
|
f.values = append(f.values[:n:n], kvList...)
|
||||||
|
|
||||||
|
vals := f.values
|
||||||
|
if hook := f.opts.RenderValuesHook; hook != nil {
|
||||||
|
vals = hook(f.sanitize(vals))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pre-render values, so we don't have to do it on each Info/Error call.
|
||||||
|
buf := bytes.NewBuffer(make([]byte, 0, 1024))
|
||||||
|
f.flatten(buf, vals, false, true) // escape user-provided keys
|
||||||
|
f.valuesStr = buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddCallDepth increases the number of stack-frames to skip when attributing
|
||||||
|
// the log line to a file and line.
|
||||||
|
func (f *Formatter) AddCallDepth(depth int) {
|
||||||
|
f.depth += depth
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,510 @@
|
||||||
|
/*
|
||||||
|
Copyright 2019 The logr Authors.
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This design derives from Dave Cheney's blog:
|
||||||
|
// http://dave.cheney.net/2015/11/05/lets-talk-about-logging
|
||||||
|
|
||||||
|
// Package logr defines a general-purpose logging API and abstract interfaces
|
||||||
|
// to back that API. Packages in the Go ecosystem can depend on this package,
|
||||||
|
// while callers can implement logging with whatever backend is appropriate.
|
||||||
|
//
|
||||||
|
// Usage
|
||||||
|
//
|
||||||
|
// Logging is done using a Logger instance. Logger is a concrete type with
|
||||||
|
// methods, which defers the actual logging to a LogSink interface. The main
|
||||||
|
// methods of Logger are Info() and Error(). Arguments to Info() and Error()
|
||||||
|
// are key/value pairs rather than printf-style formatted strings, emphasizing
|
||||||
|
// "structured logging".
|
||||||
|
//
|
||||||
|
// With Go's standard log package, we might write:
|
||||||
|
// log.Printf("setting target value %s", targetValue)
|
||||||
|
//
|
||||||
|
// With logr's structured logging, we'd write:
|
||||||
|
// logger.Info("setting target", "value", targetValue)
|
||||||
|
//
|
||||||
|
// Errors are much the same. Instead of:
|
||||||
|
// log.Printf("failed to open the pod bay door for user %s: %v", user, err)
|
||||||
|
//
|
||||||
|
// We'd write:
|
||||||
|
// logger.Error(err, "failed to open the pod bay door", "user", user)
|
||||||
|
//
|
||||||
|
// Info() and Error() are very similar, but they are separate methods so that
|
||||||
|
// LogSink implementations can choose to do things like attach additional
|
||||||
|
// information (such as stack traces) on calls to Error(). Error() messages are
|
||||||
|
// always logged, regardless of the current verbosity. If there is no error
|
||||||
|
// instance available, passing nil is valid.
|
||||||
|
//
|
||||||
|
// Verbosity
|
||||||
|
//
|
||||||
|
// Often we want to log information only when the application in "verbose
|
||||||
|
// mode". To write log lines that are more verbose, Logger has a V() method.
|
||||||
|
// The higher the V-level of a log line, the less critical it is considered.
|
||||||
|
// Log-lines with V-levels that are not enabled (as per the LogSink) will not
|
||||||
|
// be written. Level V(0) is the default, and logger.V(0).Info() has the same
|
||||||
|
// meaning as logger.Info(). Negative V-levels have the same meaning as V(0).
|
||||||
|
// Error messages do not have a verbosity level and are always logged.
|
||||||
|
//
|
||||||
|
// Where we might have written:
|
||||||
|
// if flVerbose >= 2 {
|
||||||
|
// log.Printf("an unusual thing happened")
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// We can write:
|
||||||
|
// logger.V(2).Info("an unusual thing happened")
|
||||||
|
//
|
||||||
|
// Logger Names
|
||||||
|
//
|
||||||
|
// Logger instances can have name strings so that all messages logged through
|
||||||
|
// that instance have additional context. For example, you might want to add
|
||||||
|
// a subsystem name:
|
||||||
|
//
|
||||||
|
// logger.WithName("compactor").Info("started", "time", time.Now())
|
||||||
|
//
|
||||||
|
// The WithName() method returns a new Logger, which can be passed to
|
||||||
|
// constructors or other functions for further use. Repeated use of WithName()
|
||||||
|
// will accumulate name "segments". These name segments will be joined in some
|
||||||
|
// way by the LogSink implementation. It is strongly recommended that name
|
||||||
|
// segments contain simple identifiers (letters, digits, and hyphen), and do
|
||||||
|
// not contain characters that could muddle the log output or confuse the
|
||||||
|
// joining operation (e.g. whitespace, commas, periods, slashes, brackets,
|
||||||
|
// quotes, etc).
|
||||||
|
//
|
||||||
|
// Saved Values
|
||||||
|
//
|
||||||
|
// Logger instances can store any number of key/value pairs, which will be
|
||||||
|
// logged alongside all messages logged through that instance. For example,
|
||||||
|
// you might want to create a Logger instance per managed object:
|
||||||
|
//
|
||||||
|
// With the standard log package, we might write:
|
||||||
|
// log.Printf("decided to set field foo to value %q for object %s/%s",
|
||||||
|
// targetValue, object.Namespace, object.Name)
|
||||||
|
//
|
||||||
|
// With logr we'd write:
|
||||||
|
// // Elsewhere: set up the logger to log the object name.
|
||||||
|
// obj.logger = mainLogger.WithValues(
|
||||||
|
// "name", obj.name, "namespace", obj.namespace)
|
||||||
|
//
|
||||||
|
// // later on...
|
||||||
|
// obj.logger.Info("setting foo", "value", targetValue)
|
||||||
|
//
|
||||||
|
// Best Practices
|
||||||
|
//
|
||||||
|
// Logger has very few hard rules, with the goal that LogSink implementations
|
||||||
|
// might have a lot of freedom to differentiate. There are, however, some
|
||||||
|
// things to consider.
|
||||||
|
//
|
||||||
|
// The log message consists of a constant message attached to the log line.
|
||||||
|
// This should generally be a simple description of what's occurring, and should
|
||||||
|
// never be a format string. Variable information can then be attached using
|
||||||
|
// named values.
|
||||||
|
//
|
||||||
|
// Keys are arbitrary strings, but should generally be constant values. Values
|
||||||
|
// may be any Go value, but how the value is formatted is determined by the
|
||||||
|
// LogSink implementation.
|
||||||
|
//
|
||||||
|
// Logger instances are meant to be passed around by value. Code that receives
|
||||||
|
// such a value can call its methods without having to check whether the
|
||||||
|
// instance is ready for use.
|
||||||
|
//
|
||||||
|
// Calling methods with the null logger (Logger{}) as instance will crash
|
||||||
|
// because it has no LogSink. Therefore this null logger should never be passed
|
||||||
|
// around. For cases where passing a logger is optional, a pointer to Logger
|
||||||
|
// should be used.
|
||||||
|
//
|
||||||
|
// Key Naming Conventions
|
||||||
|
//
|
||||||
|
// Keys are not strictly required to conform to any specification or regex, but
|
||||||
|
// it is recommended that they:
|
||||||
|
// * be human-readable and meaningful (not auto-generated or simple ordinals)
|
||||||
|
// * be constant (not dependent on input data)
|
||||||
|
// * contain only printable characters
|
||||||
|
// * not contain whitespace or punctuation
|
||||||
|
// * use lower case for simple keys and lowerCamelCase for more complex ones
|
||||||
|
//
|
||||||
|
// These guidelines help ensure that log data is processed properly regardless
|
||||||
|
// of the log implementation. For example, log implementations will try to
|
||||||
|
// output JSON data or will store data for later database (e.g. SQL) queries.
|
||||||
|
//
|
||||||
|
// While users are generally free to use key names of their choice, it's
|
||||||
|
// generally best to avoid using the following keys, as they're frequently used
|
||||||
|
// by implementations:
|
||||||
|
// * "caller": the calling information (file/line) of a particular log line
|
||||||
|
// * "error": the underlying error value in the `Error` method
|
||||||
|
// * "level": the log level
|
||||||
|
// * "logger": the name of the associated logger
|
||||||
|
// * "msg": the log message
|
||||||
|
// * "stacktrace": the stack trace associated with a particular log line or
|
||||||
|
// error (often from the `Error` message)
|
||||||
|
// * "ts": the timestamp for a log line
|
||||||
|
//
|
||||||
|
// Implementations are encouraged to make use of these keys to represent the
|
||||||
|
// above concepts, when necessary (for example, in a pure-JSON output form, it
|
||||||
|
// would be necessary to represent at least message and timestamp as ordinary
|
||||||
|
// named values).
|
||||||
|
//
|
||||||
|
// Break Glass
|
||||||
|
//
|
||||||
|
// Implementations may choose to give callers access to the underlying
|
||||||
|
// logging implementation. The recommended pattern for this is:
|
||||||
|
// // Underlier exposes access to the underlying logging implementation.
|
||||||
|
// // Since callers only have a logr.Logger, they have to know which
|
||||||
|
// // implementation is in use, so this interface is less of an abstraction
|
||||||
|
// // and more of way to test type conversion.
|
||||||
|
// type Underlier interface {
|
||||||
|
// GetUnderlying() <underlying-type>
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Logger grants access to the sink to enable type assertions like this:
|
||||||
|
// func DoSomethingWithImpl(log logr.Logger) {
|
||||||
|
// if underlier, ok := log.GetSink()(impl.Underlier) {
|
||||||
|
// implLogger := underlier.GetUnderlying()
|
||||||
|
// ...
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Custom `With*` functions can be implemented by copying the complete
|
||||||
|
// Logger struct and replacing the sink in the copy:
|
||||||
|
// // WithFooBar changes the foobar parameter in the log sink and returns a
|
||||||
|
// // new logger with that modified sink. It does nothing for loggers where
|
||||||
|
// // the sink doesn't support that parameter.
|
||||||
|
// func WithFoobar(log logr.Logger, foobar int) logr.Logger {
|
||||||
|
// if foobarLogSink, ok := log.GetSink()(FoobarSink); ok {
|
||||||
|
// log = log.WithSink(foobarLogSink.WithFooBar(foobar))
|
||||||
|
// }
|
||||||
|
// return log
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Don't use New to construct a new Logger with a LogSink retrieved from an
|
||||||
|
// existing Logger. Source code attribution might not work correctly and
|
||||||
|
// unexported fields in Logger get lost.
|
||||||
|
//
|
||||||
|
// Beware that the same LogSink instance may be shared by different logger
|
||||||
|
// instances. Calling functions that modify the LogSink will affect all of
|
||||||
|
// those.
|
||||||
|
package logr
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
)
|
||||||
|
|
||||||
|
// New returns a new Logger instance. This is primarily used by libraries
|
||||||
|
// implementing LogSink, rather than end users.
|
||||||
|
func New(sink LogSink) Logger {
|
||||||
|
logger := Logger{}
|
||||||
|
logger.setSink(sink)
|
||||||
|
sink.Init(runtimeInfo)
|
||||||
|
return logger
|
||||||
|
}
|
||||||
|
|
||||||
|
// setSink stores the sink and updates any related fields. It mutates the
|
||||||
|
// logger and thus is only safe to use for loggers that are not currently being
|
||||||
|
// used concurrently.
|
||||||
|
func (l *Logger) setSink(sink LogSink) {
|
||||||
|
l.sink = sink
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSink returns the stored sink.
|
||||||
|
func (l Logger) GetSink() LogSink {
|
||||||
|
return l.sink
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithSink returns a copy of the logger with the new sink.
|
||||||
|
func (l Logger) WithSink(sink LogSink) Logger {
|
||||||
|
l.setSink(sink)
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
// Logger is an interface to an abstract logging implementation. This is a
|
||||||
|
// concrete type for performance reasons, but all the real work is passed on to
|
||||||
|
// a LogSink. Implementations of LogSink should provide their own constructors
|
||||||
|
// that return Logger, not LogSink.
|
||||||
|
//
|
||||||
|
// The underlying sink can be accessed through GetSink and be modified through
|
||||||
|
// WithSink. This enables the implementation of custom extensions (see "Break
|
||||||
|
// Glass" in the package documentation). Normally the sink should be used only
|
||||||
|
// indirectly.
|
||||||
|
type Logger struct {
|
||||||
|
sink LogSink
|
||||||
|
level int
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enabled tests whether this Logger is enabled. For example, commandline
|
||||||
|
// flags might be used to set the logging verbosity and disable some info logs.
|
||||||
|
func (l Logger) Enabled() bool {
|
||||||
|
return l.sink.Enabled(l.level)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Info logs a non-error message with the given key/value pairs as context.
|
||||||
|
//
|
||||||
|
// The msg argument should be used to add some constant description to the log
|
||||||
|
// line. The key/value pairs can then be used to add additional variable
|
||||||
|
// information. The key/value pairs must alternate string keys and arbitrary
|
||||||
|
// values.
|
||||||
|
func (l Logger) Info(msg string, keysAndValues ...interface{}) {
|
||||||
|
if l.Enabled() {
|
||||||
|
if withHelper, ok := l.sink.(CallStackHelperLogSink); ok {
|
||||||
|
withHelper.GetCallStackHelper()()
|
||||||
|
}
|
||||||
|
l.sink.Info(l.level, msg, keysAndValues...)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error logs an error, with the given message and key/value pairs as context.
|
||||||
|
// It functions similarly to Info, but may have unique behavior, and should be
|
||||||
|
// preferred for logging errors (see the package documentations for more
|
||||||
|
// information). The log message will always be emitted, regardless of
|
||||||
|
// verbosity level.
|
||||||
|
//
|
||||||
|
// The msg argument should be used to add context to any underlying error,
|
||||||
|
// while the err argument should be used to attach the actual error that
|
||||||
|
// triggered this log line, if present. The err parameter is optional
|
||||||
|
// and nil may be passed instead of an error instance.
|
||||||
|
func (l Logger) Error(err error, msg string, keysAndValues ...interface{}) {
|
||||||
|
if withHelper, ok := l.sink.(CallStackHelperLogSink); ok {
|
||||||
|
withHelper.GetCallStackHelper()()
|
||||||
|
}
|
||||||
|
l.sink.Error(err, msg, keysAndValues...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// V returns a new Logger instance for a specific verbosity level, relative to
|
||||||
|
// this Logger. In other words, V-levels are additive. A higher verbosity
|
||||||
|
// level means a log message is less important. Negative V-levels are treated
|
||||||
|
// as 0.
|
||||||
|
func (l Logger) V(level int) Logger {
|
||||||
|
if level < 0 {
|
||||||
|
level = 0
|
||||||
|
}
|
||||||
|
l.level += level
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithValues returns a new Logger instance with additional key/value pairs.
|
||||||
|
// See Info for documentation on how key/value pairs work.
|
||||||
|
func (l Logger) WithValues(keysAndValues ...interface{}) Logger {
|
||||||
|
l.setSink(l.sink.WithValues(keysAndValues...))
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithName returns a new Logger instance with the specified name element added
|
||||||
|
// to the Logger's name. Successive calls with WithName append additional
|
||||||
|
// suffixes to the Logger's name. It's strongly recommended that name segments
|
||||||
|
// contain only letters, digits, and hyphens (see the package documentation for
|
||||||
|
// more information).
|
||||||
|
func (l Logger) WithName(name string) Logger {
|
||||||
|
l.setSink(l.sink.WithName(name))
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCallDepth returns a Logger instance that offsets the call stack by the
|
||||||
|
// specified number of frames when logging call site information, if possible.
|
||||||
|
// This is useful for users who have helper functions between the "real" call
|
||||||
|
// site and the actual calls to Logger methods. If depth is 0 the attribution
|
||||||
|
// should be to the direct caller of this function. If depth is 1 the
|
||||||
|
// attribution should skip 1 call frame, and so on. Successive calls to this
|
||||||
|
// are additive.
|
||||||
|
//
|
||||||
|
// If the underlying log implementation supports a WithCallDepth(int) method,
|
||||||
|
// it will be called and the result returned. If the implementation does not
|
||||||
|
// support CallDepthLogSink, the original Logger will be returned.
|
||||||
|
//
|
||||||
|
// To skip one level, WithCallStackHelper() should be used instead of
|
||||||
|
// WithCallDepth(1) because it works with implementions that support the
|
||||||
|
// CallDepthLogSink and/or CallStackHelperLogSink interfaces.
|
||||||
|
func (l Logger) WithCallDepth(depth int) Logger {
|
||||||
|
if withCallDepth, ok := l.sink.(CallDepthLogSink); ok {
|
||||||
|
l.setSink(withCallDepth.WithCallDepth(depth))
|
||||||
|
}
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCallStackHelper returns a new Logger instance that skips the direct
|
||||||
|
// caller when logging call site information, if possible. This is useful for
|
||||||
|
// users who have helper functions between the "real" call site and the actual
|
||||||
|
// calls to Logger methods and want to support loggers which depend on marking
|
||||||
|
// each individual helper function, like loggers based on testing.T.
|
||||||
|
//
|
||||||
|
// In addition to using that new logger instance, callers also must call the
|
||||||
|
// returned function.
|
||||||
|
//
|
||||||
|
// If the underlying log implementation supports a WithCallDepth(int) method,
|
||||||
|
// WithCallDepth(1) will be called to produce a new logger. If it supports a
|
||||||
|
// WithCallStackHelper() method, that will be also called. If the
|
||||||
|
// implementation does not support either of these, the original Logger will be
|
||||||
|
// returned.
|
||||||
|
func (l Logger) WithCallStackHelper() (func(), Logger) {
|
||||||
|
var helper func()
|
||||||
|
if withCallDepth, ok := l.sink.(CallDepthLogSink); ok {
|
||||||
|
l.setSink(withCallDepth.WithCallDepth(1))
|
||||||
|
}
|
||||||
|
if withHelper, ok := l.sink.(CallStackHelperLogSink); ok {
|
||||||
|
helper = withHelper.GetCallStackHelper()
|
||||||
|
} else {
|
||||||
|
helper = func() {}
|
||||||
|
}
|
||||||
|
return helper, l
|
||||||
|
}
|
||||||
|
|
||||||
|
// contextKey is how we find Loggers in a context.Context.
|
||||||
|
type contextKey struct{}
|
||||||
|
|
||||||
|
// FromContext returns a Logger from ctx or an error if no Logger is found.
|
||||||
|
func FromContext(ctx context.Context) (Logger, error) {
|
||||||
|
if v, ok := ctx.Value(contextKey{}).(Logger); ok {
|
||||||
|
return v, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return Logger{}, notFoundError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// notFoundError exists to carry an IsNotFound method.
|
||||||
|
type notFoundError struct{}
|
||||||
|
|
||||||
|
func (notFoundError) Error() string {
|
||||||
|
return "no logr.Logger was present"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (notFoundError) IsNotFound() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this
|
||||||
|
// returns a Logger that discards all log messages.
|
||||||
|
func FromContextOrDiscard(ctx context.Context) Logger {
|
||||||
|
if v, ok := ctx.Value(contextKey{}).(Logger); ok {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
return Discard()
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewContext returns a new Context, derived from ctx, which carries the
|
||||||
|
// provided Logger.
|
||||||
|
func NewContext(ctx context.Context, logger Logger) context.Context {
|
||||||
|
return context.WithValue(ctx, contextKey{}, logger)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RuntimeInfo holds information that the logr "core" library knows which
|
||||||
|
// LogSinks might want to know.
|
||||||
|
type RuntimeInfo struct {
|
||||||
|
// CallDepth is the number of call frames the logr library adds between the
|
||||||
|
// end-user and the LogSink. LogSink implementations which choose to print
|
||||||
|
// the original logging site (e.g. file & line) should climb this many
|
||||||
|
// additional frames to find it.
|
||||||
|
CallDepth int
|
||||||
|
}
|
||||||
|
|
||||||
|
// runtimeInfo is a static global. It must not be changed at run time.
|
||||||
|
var runtimeInfo = RuntimeInfo{
|
||||||
|
CallDepth: 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
// LogSink represents a logging implementation. End-users will generally not
|
||||||
|
// interact with this type.
|
||||||
|
type LogSink interface {
|
||||||
|
// Init receives optional information about the logr library for LogSink
|
||||||
|
// implementations that need it.
|
||||||
|
Init(info RuntimeInfo)
|
||||||
|
|
||||||
|
// Enabled tests whether this LogSink is enabled at the specified V-level.
|
||||||
|
// For example, commandline flags might be used to set the logging
|
||||||
|
// verbosity and disable some info logs.
|
||||||
|
Enabled(level int) bool
|
||||||
|
|
||||||
|
// Info logs a non-error message with the given key/value pairs as context.
|
||||||
|
// The level argument is provided for optional logging. This method will
|
||||||
|
// only be called when Enabled(level) is true. See Logger.Info for more
|
||||||
|
// details.
|
||||||
|
Info(level int, msg string, keysAndValues ...interface{})
|
||||||
|
|
||||||
|
// Error logs an error, with the given message and key/value pairs as
|
||||||
|
// context. See Logger.Error for more details.
|
||||||
|
Error(err error, msg string, keysAndValues ...interface{})
|
||||||
|
|
||||||
|
// WithValues returns a new LogSink with additional key/value pairs. See
|
||||||
|
// Logger.WithValues for more details.
|
||||||
|
WithValues(keysAndValues ...interface{}) LogSink
|
||||||
|
|
||||||
|
// WithName returns a new LogSink with the specified name appended. See
|
||||||
|
// Logger.WithName for more details.
|
||||||
|
WithName(name string) LogSink
|
||||||
|
}
|
||||||
|
|
||||||
|
// CallDepthLogSink represents a Logger that knows how to climb the call stack
|
||||||
|
// to identify the original call site and can offset the depth by a specified
|
||||||
|
// number of frames. This is useful for users who have helper functions
|
||||||
|
// between the "real" call site and the actual calls to Logger methods.
|
||||||
|
// Implementations that log information about the call site (such as file,
|
||||||
|
// function, or line) would otherwise log information about the intermediate
|
||||||
|
// helper functions.
|
||||||
|
//
|
||||||
|
// This is an optional interface and implementations are not required to
|
||||||
|
// support it.
|
||||||
|
type CallDepthLogSink interface {
|
||||||
|
// WithCallDepth returns a LogSink that will offset the call
|
||||||
|
// stack by the specified number of frames when logging call
|
||||||
|
// site information.
|
||||||
|
//
|
||||||
|
// If depth is 0, the LogSink should skip exactly the number
|
||||||
|
// of call frames defined in RuntimeInfo.CallDepth when Info
|
||||||
|
// or Error are called, i.e. the attribution should be to the
|
||||||
|
// direct caller of Logger.Info or Logger.Error.
|
||||||
|
//
|
||||||
|
// If depth is 1 the attribution should skip 1 call frame, and so on.
|
||||||
|
// Successive calls to this are additive.
|
||||||
|
WithCallDepth(depth int) LogSink
|
||||||
|
}
|
||||||
|
|
||||||
|
// CallStackHelperLogSink represents a Logger that knows how to climb
|
||||||
|
// the call stack to identify the original call site and can skip
|
||||||
|
// intermediate helper functions if they mark themselves as
|
||||||
|
// helper. Go's testing package uses that approach.
|
||||||
|
//
|
||||||
|
// This is useful for users who have helper functions between the
|
||||||
|
// "real" call site and the actual calls to Logger methods.
|
||||||
|
// Implementations that log information about the call site (such as
|
||||||
|
// file, function, or line) would otherwise log information about the
|
||||||
|
// intermediate helper functions.
|
||||||
|
//
|
||||||
|
// This is an optional interface and implementations are not required
|
||||||
|
// to support it. Implementations that choose to support this must not
|
||||||
|
// simply implement it as WithCallDepth(1), because
|
||||||
|
// Logger.WithCallStackHelper will call both methods if they are
|
||||||
|
// present. This should only be implemented for LogSinks that actually
|
||||||
|
// need it, as with testing.T.
|
||||||
|
type CallStackHelperLogSink interface {
|
||||||
|
// GetCallStackHelper returns a function that must be called
|
||||||
|
// to mark the direct caller as helper function when logging
|
||||||
|
// call site information.
|
||||||
|
GetCallStackHelper() func()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Marshaler is an optional interface that logged values may choose to
|
||||||
|
// implement. Loggers with structured output, such as JSON, should
|
||||||
|
// log the object return by the MarshalLog method instead of the
|
||||||
|
// original value.
|
||||||
|
type Marshaler interface {
|
||||||
|
// MarshalLog can be used to:
|
||||||
|
// - ensure that structs are not logged as strings when the original
|
||||||
|
// value has a String method: return a different type without a
|
||||||
|
// String method
|
||||||
|
// - select which fields of a complex type should get logged:
|
||||||
|
// return a simpler struct with fewer fields
|
||||||
|
// - log unexported fields: return a different struct
|
||||||
|
// with exported fields
|
||||||
|
//
|
||||||
|
// It may return any value of any type.
|
||||||
|
MarshalLog() interface{}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,25 @@
|
||||||
|
## 2.4.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- DeferCleanup supports functions with multiple-return values [5e33c75]
|
||||||
|
- Add GinkgoLogr (#1067) [bf78c28]
|
||||||
|
- Introduction of 'MustPassRepeatedly' decorator (#1051) [047c02f]
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- correcting some typos (#1064) [1403d3c]
|
||||||
|
- fix flaky internal_integration interupt specs [2105ba3]
|
||||||
|
- Correct busted link in README [be6b5b9]
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
- Bump actions/checkout from 2 to 3 (#1062) [8a2f483]
|
||||||
|
- Bump golang.org/x/tools from 0.1.12 to 0.2.0 (#1065) [529c4e8]
|
||||||
|
- Bump github/codeql-action from 1 to 2 (#1061) [da09146]
|
||||||
|
- Bump actions/setup-go from 2 to 3 (#1060) [918040d]
|
||||||
|
- Bump github.com/onsi/gomega from 1.22.0 to 1.22.1 (#1053) [2098e4d]
|
||||||
|
- Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#1066) [1d74122]
|
||||||
|
- Add GHA to dependabot config [4442772]
|
||||||
|
|
||||||
## 2.3.1
|
## 2.3.1
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
@ -8,7 +30,7 @@ With this patch release, the ginkgo CLI can now identify a version mismatch and
|
||||||
- Ginkgo cli can identify version mismatches and emit a helpful error message [bc4ae2f]
|
- Ginkgo cli can identify version mismatches and emit a helpful error message [bc4ae2f]
|
||||||
- further emphasize that a version match is required when running Ginkgo on CI and/or locally [2691dd8]
|
- further emphasize that a version match is required when running Ginkgo on CI and/or locally [2691dd8]
|
||||||
|
|
||||||
## Maintenance
|
### Maintenance
|
||||||
- bump gomega to v1.22.0 [822a937]
|
- bump gomega to v1.22.0 [822a937]
|
||||||
|
|
||||||
## 2.3.0
|
## 2.3.0
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ If you have a question, comment, bug report, feature request, etc. please open a
|
||||||
|
|
||||||
## Capabilities
|
## Capabilities
|
||||||
|
|
||||||
Whether writing basic unit specs, complex integration specs, or even performance specs - Ginkgo gives you an expressive Domain-Specific Language (DSL) that will be familiar to users coming from frameworks such as [Quick](https://github.com/Quick/Quick), [RSpec](https://rspec.info), [Jasmine](https://jasmine.github.io), and [Busted](https://olivinelabs.com/busted/). This style of testing is sometimes referred to as "Behavior-Driven Development" (BDD) though Ginkgo's utility extends beyond acceptance-level testing.
|
Whether writing basic unit specs, complex integration specs, or even performance specs - Ginkgo gives you an expressive Domain-Specific Language (DSL) that will be familiar to users coming from frameworks such as [Quick](https://github.com/Quick/Quick), [RSpec](https://rspec.info), [Jasmine](https://jasmine.github.io), and [Busted](https://lunarmodules.github.io/busted/). This style of testing is sometimes referred to as "Behavior-Driven Development" (BDD) though Ginkgo's utility extends beyond acceptance-level testing.
|
||||||
|
|
||||||
With Ginkgo's DSL you can use nestable [`Describe`, `Context` and `When` container nodes](https://onsi.github.io/ginkgo/#organizing-specs-with-container-nodes) to help you organize your specs. [`BeforeEach` and `AfterEach` setup nodes](https://onsi.github.io/ginkgo/#extracting-common-setup-beforeeach) for setup and cleanup. [`It` and `Specify` subject nodes](https://onsi.github.io/ginkgo/#spec-subjects-it) that hold your assertions. [`BeforeSuite` and `AfterSuite` nodes](https://onsi.github.io/ginkgo/#suite-setup-and-cleanup-beforesuite-and-aftersuite) to prep for and cleanup after a suite... and [much more!](https://onsi.github.io/ginkgo/#writing-specs)
|
With Ginkgo's DSL you can use nestable [`Describe`, `Context` and `When` container nodes](https://onsi.github.io/ginkgo/#organizing-specs-with-container-nodes) to help you organize your specs. [`BeforeEach` and `AfterEach` setup nodes](https://onsi.github.io/ginkgo/#extracting-common-setup-beforeeach) for setup and cleanup. [`It` and `Specify` subject nodes](https://onsi.github.io/ginkgo/#spec-subjects-it) that hold your assertions. [`BeforeSuite` and `AfterSuite` nodes](https://onsi.github.io/ginkgo/#suite-setup-and-cleanup-beforesuite-and-aftersuite) to prep for and cleanup after a suite... and [much more!](https://onsi.github.io/ginkgo/#writing-specs)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ A Ginkgo release is a tagged git sha and a GitHub release. To cut a release:
|
||||||
```bash
|
```bash
|
||||||
LAST_VERSION=$(git tag --sort=version:refname | tail -n1)
|
LAST_VERSION=$(git tag --sort=version:refname | tail -n1)
|
||||||
CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION)
|
CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION)
|
||||||
echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n## Fixes\n\n## Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
|
echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n### Fixes\n\n### Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
|
||||||
```
|
```
|
||||||
to update the changelog
|
to update the changelog
|
||||||
- Categorize the changes into
|
- Categorize the changes into
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-logr/logr"
|
||||||
"github.com/onsi/ginkgo/v2/formatter"
|
"github.com/onsi/ginkgo/v2/formatter"
|
||||||
"github.com/onsi/ginkgo/v2/internal"
|
"github.com/onsi/ginkgo/v2/internal"
|
||||||
"github.com/onsi/ginkgo/v2/internal/global"
|
"github.com/onsi/ginkgo/v2/internal/global"
|
||||||
|
|
@ -46,7 +47,9 @@ func init() {
|
||||||
var err error
|
var err error
|
||||||
flagSet, err = types.BuildTestSuiteFlagSet(&suiteConfig, &reporterConfig)
|
flagSet, err = types.BuildTestSuiteFlagSet(&suiteConfig, &reporterConfig)
|
||||||
exitIfErr(err)
|
exitIfErr(err)
|
||||||
GinkgoWriter = internal.NewWriter(os.Stdout)
|
writer := internal.NewWriter(os.Stdout)
|
||||||
|
GinkgoWriter = writer
|
||||||
|
GinkgoLogr = internal.GinkgoLogrFunc(writer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func exitIfErr(err error) {
|
func exitIfErr(err error) {
|
||||||
|
|
@ -90,11 +93,11 @@ type GinkgoWriterInterface interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SpecContext is the context object passed into nodes that are subject to a timeout or need to be notified of an interrupt. It implements the standard context.Context interface but also contains additional helpers to provide an extensibility point for Ginkgo. (As an example, Gomega's Eventually can use the methods defined on SpecContext to provide deeper integratoin with Ginkgo).
|
SpecContext is the context object passed into nodes that are subject to a timeout or need to be notified of an interrupt. It implements the standard context.Context interface but also contains additional helpers to provide an extensibility point for Ginkgo. (As an example, Gomega's Eventually can use the methods defined on SpecContext to provide deeper integratoin with Ginkgo).
|
||||||
|
|
||||||
You can do anything with SpecContext that you do with a typical context.Context including wrapping it with any of the context.With* methods.
|
You can do anything with SpecContext that you do with a typical context.Context including wrapping it with any of the context.With* methods.
|
||||||
|
|
||||||
Ginkgo will cancel the SpecContext when a node is interrupted (e.g. by the user sending an interupt signal) or when a node has exceeded it's allowed run-time. Note, however, that even in cases where a node has a deadline, SpecContext will not return a deadline via .Deadline(). This is because Ginkgo does not use a WithDeadline() context to model node deadlines as Ginkgo needs control over the precise timing of the context cancellation to ensure it can provide an accurate progress report at the moment of cancellation.
|
Ginkgo will cancel the SpecContext when a node is interrupted (e.g. by the user sending an interupt signal) or when a node has exceeded it's allowed run-time. Note, however, that even in cases where a node has a deadline, SpecContext will not return a deadline via .Deadline(). This is because Ginkgo does not use a WithDeadline() context to model node deadlines as Ginkgo needs control over the precise timing of the context cancellation to ensure it can provide an accurate progress report at the moment of cancellation.
|
||||||
*/
|
*/
|
||||||
type SpecContext = internal.SpecContext
|
type SpecContext = internal.SpecContext
|
||||||
|
|
||||||
|
|
@ -112,6 +115,11 @@ You can learn more at https://onsi.github.io/ginkgo/#logging-output
|
||||||
*/
|
*/
|
||||||
var GinkgoWriter GinkgoWriterInterface
|
var GinkgoWriter GinkgoWriterInterface
|
||||||
|
|
||||||
|
/*
|
||||||
|
GinkgoLogr is a logr.Logger that writes to GinkgoWriter
|
||||||
|
*/
|
||||||
|
var GinkgoLogr logr.Logger
|
||||||
|
|
||||||
// The interface by which Ginkgo receives *testing.T
|
// The interface by which Ginkgo receives *testing.T
|
||||||
type GinkgoTestingT interface {
|
type GinkgoTestingT interface {
|
||||||
Fail()
|
Fail()
|
||||||
|
|
@ -686,7 +694,6 @@ Multiple BeforeAll nodes can be defined in a given Ordered container however the
|
||||||
|
|
||||||
BeforeAll can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body.
|
BeforeAll can take a func() body, or an interruptible func(SpecContext)/func(context.Context) body.
|
||||||
|
|
||||||
|
|
||||||
You cannot nest any other Ginkgo nodes within a BeforeAll node's closure.
|
You cannot nest any other Ginkgo nodes within a BeforeAll node's closure.
|
||||||
You can learn more about Ordered Containers at: https://onsi.github.io/ginkgo/#ordered-containers
|
You can learn more about Ordered Containers at: https://onsi.github.io/ginkgo/#ordered-containers
|
||||||
And you can learn more about BeforeAll at: https://onsi.github.io/ginkgo/#setup-in-ordered-containers-beforeall-and-afterall
|
And you can learn more about BeforeAll at: https://onsi.github.io/ginkgo/#setup-in-ordered-containers-beforeall-and-afterall
|
||||||
|
|
@ -717,10 +724,10 @@ DeferCleanup can be called within any Setup or Subject node to register a cleanu
|
||||||
|
|
||||||
DeferCleanup can be passed:
|
DeferCleanup can be passed:
|
||||||
1. A function that takes no arguments and returns no values.
|
1. A function that takes no arguments and returns no values.
|
||||||
2. A function that returns an error (in which case it will assert that the returned error was nil, or it will fail the spec).
|
2. A function that returns multiple values. `DeferCleanup` will ignore all these return values except for the last one. If this last return value is a non-nil error `DeferCleanup` will fail the spec).
|
||||||
3. A function that takes a context.Context or SpecContext (and optionally returns an error). The resulting cleanup node is deemed interruptible and the passed-in context will be cancelled in the event of a timeout or interrupt.
|
3. A function that takes a context.Context or SpecContext (and optionally returns multiple values). The resulting cleanup node is deemed interruptible and the passed-in context will be cancelled in the event of a timeout or interrupt.
|
||||||
4. A function that takes arguments (and optionally returns an error) followed by a list of arguments to pass to the function.
|
4. A function that takes arguments (and optionally returns multiple values) followed by a list of arguments to pass to the function.
|
||||||
5. A function that takes SpecContext and a list of arguments (and optionally returns an error) followed by a list of arguments to pass to the function.
|
5. A function that takes SpecContext and a list of arguments (and optionally returns multiple values) followed by a list of arguments to pass to the function.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,21 @@ You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorat
|
||||||
type Offset = internal.Offset
|
type Offset = internal.Offset
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FlakeAttempts(uint N) is a decorator that allows you to mark individual specs or spec containers as flaky. Ginkgo will run them up to `N` times until they pass.
|
FlakeAttempts(uint N) is a decorator that allows you to mark individual specs or spec containers as flaky. Ginkgo will run them up to `N` times until they pass.
|
||||||
|
|
||||||
You can learn more here: https://onsi.github.io/ginkgo/#repeating-spec-runs-and-managing-flaky-specs
|
You can learn more here: https://onsi.github.io/ginkgo/#the-flakeattempts-decorator
|
||||||
You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference
|
You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference
|
||||||
*/
|
*/
|
||||||
type FlakeAttempts = internal.FlakeAttempts
|
type FlakeAttempts = internal.FlakeAttempts
|
||||||
|
|
||||||
|
/*
|
||||||
|
MustPassRepeatedly(uint N) is a decorator that allows you to repeat the execution of individual specs or spec containers. Ginkgo will run them up to `N` times until they fail.
|
||||||
|
|
||||||
|
You can learn more here: https://onsi.github.io/ginkgo/#the-mustpassrepeatedly-decorator
|
||||||
|
You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference
|
||||||
|
*/
|
||||||
|
type MustPassRepeatedly = internal.MustPassRepeatedly
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Focus is a decorator that allows you to mark a spec or container as focused. Identical to FIt and FDescribe.
|
Focus is a decorator that allows you to mark a spec or container as focused. Identical to FIt and FDescribe.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,8 @@ func (g *group) initialReportForSpec(spec Spec) types.SpecReport {
|
||||||
ParallelProcess: g.suite.config.ParallelProcess,
|
ParallelProcess: g.suite.config.ParallelProcess,
|
||||||
IsSerial: spec.Nodes.HasNodeMarkedSerial(),
|
IsSerial: spec.Nodes.HasNodeMarkedSerial(),
|
||||||
IsInOrderedContainer: !spec.Nodes.FirstNodeMarkedOrdered().IsZero(),
|
IsInOrderedContainer: !spec.Nodes.FirstNodeMarkedOrdered().IsZero(),
|
||||||
|
MaxFlakeAttempts: spec.Nodes.GetMaxFlakeAttempts(),
|
||||||
|
MaxMustPassRepeatedly: spec.Nodes.GetMaxMustPassRepeatedly(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -299,16 +301,29 @@ func (g *group) run(specs Specs) {
|
||||||
|
|
||||||
g.suite.currentSpecReport.StartTime = time.Now()
|
g.suite.currentSpecReport.StartTime = time.Now()
|
||||||
if !skip {
|
if !skip {
|
||||||
maxAttempts := max(1, spec.FlakeAttempts())
|
|
||||||
if g.suite.config.FlakeAttempts > 0 {
|
var maxAttempts = 1
|
||||||
|
|
||||||
|
if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 {
|
||||||
|
maxAttempts = max(1, spec.MustPassRepeatedly())
|
||||||
|
} else if g.suite.config.FlakeAttempts > 0 {
|
||||||
maxAttempts = g.suite.config.FlakeAttempts
|
maxAttempts = g.suite.config.FlakeAttempts
|
||||||
|
g.suite.currentSpecReport.MaxFlakeAttempts = maxAttempts
|
||||||
|
} else if g.suite.currentSpecReport.MaxFlakeAttempts > 0 {
|
||||||
|
maxAttempts = max(1, spec.FlakeAttempts())
|
||||||
}
|
}
|
||||||
|
|
||||||
for attempt := 0; attempt < maxAttempts; attempt++ {
|
for attempt := 0; attempt < maxAttempts; attempt++ {
|
||||||
g.suite.currentSpecReport.NumAttempts = attempt + 1
|
g.suite.currentSpecReport.NumAttempts = attempt + 1
|
||||||
g.suite.writer.Truncate()
|
g.suite.writer.Truncate()
|
||||||
g.suite.outputInterceptor.StartInterceptingOutput()
|
g.suite.outputInterceptor.StartInterceptingOutput()
|
||||||
if attempt > 0 {
|
if attempt > 0 {
|
||||||
fmt.Fprintf(g.suite.writer, "\nGinkgo: Attempt #%d Failed. Retrying...\n", attempt)
|
if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 {
|
||||||
|
fmt.Fprintf(g.suite.writer, "\nGinkgo: Attempt #%d Passed. Repeating...\n", attempt)
|
||||||
|
}
|
||||||
|
if g.suite.currentSpecReport.MaxFlakeAttempts > 0 {
|
||||||
|
fmt.Fprintf(g.suite.writer, "\nGinkgo: Attempt #%d Failed. Retrying...\n", attempt)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g.attemptSpec(attempt == maxAttempts-1, spec)
|
g.attemptSpec(attempt == maxAttempts-1, spec)
|
||||||
|
|
@ -318,8 +333,15 @@ func (g *group) run(specs Specs) {
|
||||||
g.suite.currentSpecReport.CapturedGinkgoWriterOutput += string(g.suite.writer.Bytes())
|
g.suite.currentSpecReport.CapturedGinkgoWriterOutput += string(g.suite.writer.Bytes())
|
||||||
g.suite.currentSpecReport.CapturedStdOutErr += g.suite.outputInterceptor.StopInterceptingAndReturnOutput()
|
g.suite.currentSpecReport.CapturedStdOutErr += g.suite.outputInterceptor.StopInterceptingAndReturnOutput()
|
||||||
|
|
||||||
if g.suite.currentSpecReport.State.Is(types.SpecStatePassed | types.SpecStateSkipped | types.SpecStateAborted | types.SpecStateInterrupted) {
|
if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 {
|
||||||
break
|
if g.suite.currentSpecReport.State.Is(types.SpecStateFailureStates | types.SpecStateSkipped) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if g.suite.currentSpecReport.MaxFlakeAttempts > 0 {
|
||||||
|
if g.suite.currentSpecReport.State.Is(types.SpecStatePassed | types.SpecStateSkipped | types.SpecStateAborted | types.SpecStateInterrupted) {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ type Node struct {
|
||||||
MarkedOncePerOrdered bool
|
MarkedOncePerOrdered bool
|
||||||
MarkedSuppressProgressReporting bool
|
MarkedSuppressProgressReporting bool
|
||||||
FlakeAttempts int
|
FlakeAttempts int
|
||||||
|
MustPassRepeatedly int
|
||||||
Labels Labels
|
Labels Labels
|
||||||
PollProgressAfter time.Duration
|
PollProgressAfter time.Duration
|
||||||
PollProgressInterval time.Duration
|
PollProgressInterval time.Duration
|
||||||
|
|
@ -80,6 +81,7 @@ const OncePerOrdered = honorsOrderedType(true)
|
||||||
const SuppressProgressReporting = suppressProgressReporting(true)
|
const SuppressProgressReporting = suppressProgressReporting(true)
|
||||||
|
|
||||||
type FlakeAttempts uint
|
type FlakeAttempts uint
|
||||||
|
type MustPassRepeatedly uint
|
||||||
type Offset uint
|
type Offset uint
|
||||||
type Done chan<- interface{} // Deprecated Done Channel for asynchronous testing
|
type Done chan<- interface{} // Deprecated Done Channel for asynchronous testing
|
||||||
type Labels []string
|
type Labels []string
|
||||||
|
|
@ -138,6 +140,8 @@ func isDecoration(arg interface{}) bool {
|
||||||
return true
|
return true
|
||||||
case t == reflect.TypeOf(FlakeAttempts(0)):
|
case t == reflect.TypeOf(FlakeAttempts(0)):
|
||||||
return true
|
return true
|
||||||
|
case t == reflect.TypeOf(MustPassRepeatedly(0)):
|
||||||
|
return true
|
||||||
case t == reflect.TypeOf(Labels{}):
|
case t == reflect.TypeOf(Labels{}):
|
||||||
return true
|
return true
|
||||||
case t == reflect.TypeOf(PollProgressInterval(0)):
|
case t == reflect.TypeOf(PollProgressInterval(0)):
|
||||||
|
|
@ -253,6 +257,11 @@ func NewNode(deprecationTracker *types.DeprecationTracker, nodeType types.NodeTy
|
||||||
if !nodeType.Is(types.NodeTypesForContainerAndIt) {
|
if !nodeType.Is(types.NodeTypesForContainerAndIt) {
|
||||||
appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "FlakeAttempts"))
|
appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "FlakeAttempts"))
|
||||||
}
|
}
|
||||||
|
case t == reflect.TypeOf(MustPassRepeatedly(0)):
|
||||||
|
node.MustPassRepeatedly = int(arg.(MustPassRepeatedly))
|
||||||
|
if !nodeType.Is(types.NodeTypesForContainerAndIt) {
|
||||||
|
appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "MustPassRepeatedly"))
|
||||||
|
}
|
||||||
case t == reflect.TypeOf(PollProgressAfter(0)):
|
case t == reflect.TypeOf(PollProgressAfter(0)):
|
||||||
node.PollProgressAfter = time.Duration(arg.(PollProgressAfter))
|
node.PollProgressAfter = time.Duration(arg.(PollProgressAfter))
|
||||||
if nodeType.Is(types.NodeTypeContainer) {
|
if nodeType.Is(types.NodeTypeContainer) {
|
||||||
|
|
@ -403,6 +412,10 @@ func NewNode(deprecationTracker *types.DeprecationTracker, nodeType types.NodeTy
|
||||||
appendError(types.GinkgoErrors.UnknownDecorator(node.CodeLocation, nodeType, arg))
|
appendError(types.GinkgoErrors.UnknownDecorator(node.CodeLocation, nodeType, arg))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if node.FlakeAttempts > 0 && node.MustPassRepeatedly > 0 {
|
||||||
|
appendError(types.GinkgoErrors.InvalidDeclarationOfFlakeAttemptsAndMustPassRepeatedly(node.CodeLocation, nodeType))
|
||||||
|
}
|
||||||
|
|
||||||
if len(errors) > 0 {
|
if len(errors) > 0 {
|
||||||
return Node{}, errors
|
return Node{}, errors
|
||||||
}
|
}
|
||||||
|
|
@ -495,6 +508,8 @@ func extractSynchronizedBeforeSuiteAllProcsBody(arg interface{}) (func(SpecConte
|
||||||
}, hasContext
|
}, hasContext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var errInterface = reflect.TypeOf((*error)(nil)).Elem()
|
||||||
|
|
||||||
func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(string, types.CodeLocation), args ...interface{}) (Node, []error) {
|
func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(string, types.CodeLocation), args ...interface{}) (Node, []error) {
|
||||||
decorations, remainingArgs := PartitionDecorations(args...)
|
decorations, remainingArgs := PartitionDecorations(args...)
|
||||||
baseOffset := 2
|
baseOffset := 2
|
||||||
|
|
@ -517,7 +532,7 @@ func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(stri
|
||||||
}
|
}
|
||||||
|
|
||||||
callback := reflect.ValueOf(remainingArgs[0])
|
callback := reflect.ValueOf(remainingArgs[0])
|
||||||
if !(callback.Kind() == reflect.Func && callback.Type().NumOut() <= 1) {
|
if !(callback.Kind() == reflect.Func) {
|
||||||
return Node{}, []error{types.GinkgoErrors.DeferCleanupInvalidFunction(cl)}
|
return Node{}, []error{types.GinkgoErrors.DeferCleanupInvalidFunction(cl)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -537,8 +552,12 @@ func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(stri
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFailure := func(out []reflect.Value) {
|
handleFailure := func(out []reflect.Value) {
|
||||||
if len(out) == 1 && !out[0].IsNil() {
|
if len(out) == 0 {
|
||||||
fail(fmt.Sprintf("DeferCleanup callback returned error: %v", out[0]), cl)
|
return
|
||||||
|
}
|
||||||
|
last := out[len(out)-1]
|
||||||
|
if last.Type().Implements(errInterface) && !last.IsNil() {
|
||||||
|
fail(fmt.Sprintf("DeferCleanup callback returned error: %v", last), cl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -842,6 +861,26 @@ func (n Nodes) FirstNodeMarkedOrdered() Node {
|
||||||
return Node{}
|
return Node{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n Nodes) GetMaxFlakeAttempts() int {
|
||||||
|
maxFlakeAttempts := 0
|
||||||
|
for i := range n {
|
||||||
|
if n[i].FlakeAttempts > 0 {
|
||||||
|
maxFlakeAttempts = n[i].FlakeAttempts
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return maxFlakeAttempts
|
||||||
|
}
|
||||||
|
|
||||||
|
func (n Nodes) GetMaxMustPassRepeatedly() int {
|
||||||
|
maxMustPassRepeatedly := 0
|
||||||
|
for i := range n {
|
||||||
|
if n[i].MustPassRepeatedly > 0 {
|
||||||
|
maxMustPassRepeatedly = n[i].MustPassRepeatedly
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return maxMustPassRepeatedly
|
||||||
|
}
|
||||||
|
|
||||||
func unrollInterfaceSlice(args interface{}) []interface{} {
|
func unrollInterfaceSlice(args interface{}) []interface{} {
|
||||||
v := reflect.ValueOf(args)
|
v := reflect.ValueOf(args)
|
||||||
if v.Kind() != reflect.Slice {
|
if v.Kind() != reflect.Slice {
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,17 @@ func (s Spec) FlakeAttempts() int {
|
||||||
return flakeAttempts
|
return flakeAttempts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s Spec) MustPassRepeatedly() int {
|
||||||
|
mustPassRepeatedly := 0
|
||||||
|
for i := range s.Nodes {
|
||||||
|
if s.Nodes[i].MustPassRepeatedly > 0 {
|
||||||
|
mustPassRepeatedly = s.Nodes[i].MustPassRepeatedly
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return mustPassRepeatedly
|
||||||
|
}
|
||||||
|
|
||||||
func (s Spec) SpecTimeout() time.Duration {
|
func (s Spec) SpecTimeout() time.Duration {
|
||||||
return s.FirstNodeWithType(types.NodeTypeIt).SpecTimeout
|
return s.FirstNodeWithType(types.NodeTypeIt).SpecTimeout
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/go-logr/logr"
|
||||||
|
"github.com/go-logr/logr/funcr"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WriterMode uint
|
type WriterMode uint
|
||||||
|
|
@ -101,3 +104,9 @@ func (w *Writer) Printf(format string, a ...interface{}) {
|
||||||
func (w *Writer) Println(a ...interface{}) {
|
func (w *Writer) Println(a ...interface{}) {
|
||||||
fmt.Fprintln(w, a...)
|
fmt.Fprintln(w, a...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GinkgoLogrFunc(writer *Writer) logr.Logger {
|
||||||
|
return funcr.New(func(prefix, args string) {
|
||||||
|
writer.Printf("%s", args)
|
||||||
|
}, funcr.Options{})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
header, stream = denoter, true
|
header, stream = denoter, true
|
||||||
if report.NumAttempts > 1 {
|
if report.NumAttempts > 1 && report.MaxFlakeAttempts > 1 {
|
||||||
header, stream = fmt.Sprintf("%s [FLAKEY TEST - TOOK %d ATTEMPTS TO PASS]", r.retryDenoter, report.NumAttempts), false
|
header, stream = fmt.Sprintf("%s [FLAKEY TEST - TOOK %d ATTEMPTS TO PASS]", r.retryDenoter, report.NumAttempts), false
|
||||||
}
|
}
|
||||||
if report.RunTime > r.conf.SlowSpecThreshold {
|
if report.RunTime > r.conf.SlowSpecThreshold {
|
||||||
|
|
@ -184,6 +184,9 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) {
|
||||||
header = fmt.Sprintf("%s! [ABORTED]", denoter)
|
header = fmt.Sprintf("%s! [ABORTED]", denoter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if report.State.Is(types.SpecStateFailureStates) && report.MaxMustPassRepeatedly > 1 {
|
||||||
|
header, stream = fmt.Sprintf("%s DURING REPETITION #%d", header, report.NumAttempts), false
|
||||||
|
}
|
||||||
// Emit stream and return
|
// Emit stream and return
|
||||||
if stream {
|
if stream {
|
||||||
r.emit(r.f(highlightColor + header + "{{/}}"))
|
r.emit(r.f(highlightColor + header + "{{/}}"))
|
||||||
|
|
@ -376,6 +379,9 @@ func (r *DefaultReporter) SuiteDidEnd(report types.Report) {
|
||||||
if specs.CountOfFlakedSpecs() > 0 {
|
if specs.CountOfFlakedSpecs() > 0 {
|
||||||
r.emit(r.f("{{light-yellow}}{{bold}}%d Flaked{{/}} | ", specs.CountOfFlakedSpecs()))
|
r.emit(r.f("{{light-yellow}}{{bold}}%d Flaked{{/}} | ", specs.CountOfFlakedSpecs()))
|
||||||
}
|
}
|
||||||
|
if specs.CountOfRepeatedSpecs() > 0 {
|
||||||
|
r.emit(r.f("{{light-yellow}}{{bold}}%d Repeated{{/}} | ", specs.CountOfRepeatedSpecs()))
|
||||||
|
}
|
||||||
r.emit(r.f("{{yellow}}{{bold}}%d Pending{{/}} | ", specs.CountWithState(types.SpecStatePending)))
|
r.emit(r.f("{{yellow}}{{bold}}%d Pending{{/}} | ", specs.CountWithState(types.SpecStatePending)))
|
||||||
r.emit(r.f("{{cyan}}{{bold}}%d Skipped{{/}}\n", specs.CountWithState(types.SpecStateSkipped)))
|
r.emit(r.f("{{cyan}}{{bold}}%d Skipped{{/}}\n", specs.CountWithState(types.SpecStateSkipped)))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,15 @@ func (g ginkgoErrors) InvalidDeclarationOfFocusedAndPending(cl CodeLocation, nod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g ginkgoErrors) InvalidDeclarationOfFlakeAttemptsAndMustPassRepeatedly(cl CodeLocation, nodeType NodeType) error {
|
||||||
|
return GinkgoError{
|
||||||
|
Heading: "Invalid Combination of Decorators: FlakeAttempts and MustPassRepeatedly",
|
||||||
|
Message: formatter.F(`[%s] node was decorated with both FlakeAttempts and MustPassRepeatedly. At most one is allowed.`, nodeType),
|
||||||
|
CodeLocation: cl,
|
||||||
|
DocLink: "node-decorators-overview",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (g ginkgoErrors) UnknownDecorator(cl CodeLocation, nodeType NodeType, decorator interface{}) error {
|
func (g ginkgoErrors) UnknownDecorator(cl CodeLocation, nodeType NodeType, decorator interface{}) error {
|
||||||
return GinkgoError{
|
return GinkgoError{
|
||||||
Heading: "Unknown Decorator",
|
Heading: "Unknown Decorator",
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ type PreRunStats struct {
|
||||||
SpecsThatWillRun int
|
SpecsThatWillRun int
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add is ued by Ginkgo's parallel aggregation mechanisms to combine test run reports form individual parallel processes
|
//Add is used by Ginkgo's parallel aggregation mechanisms to combine test run reports form individual parallel processes
|
||||||
//to form a complete final report.
|
//to form a complete final report.
|
||||||
func (report Report) Add(other Report) Report {
|
func (report Report) Add(other Report) Report {
|
||||||
report.SuiteSucceeded = report.SuiteSucceeded && other.SuiteSucceeded
|
report.SuiteSucceeded = report.SuiteSucceeded && other.SuiteSucceeded
|
||||||
|
|
@ -151,10 +151,17 @@ type SpecReport struct {
|
||||||
//It includes detailed information about the Failure
|
//It includes detailed information about the Failure
|
||||||
Failure Failure
|
Failure Failure
|
||||||
|
|
||||||
// NumAttempts captures the number of times this Spec was run. Flakey specs can be retried with
|
// NumAttempts captures the number of times this Spec was run.
|
||||||
// ginkgo --flake-attempts=N
|
// Flakey specs can be retried with ginkgo --flake-attempts=N or the use of the FlakeAttempts decorator.
|
||||||
|
// Repeated specs can be retried with the use of the MustPassRepeatedly decorator
|
||||||
NumAttempts int
|
NumAttempts int
|
||||||
|
|
||||||
|
// MaxFlakeAttempts captures whether the spec has been retried with ginkgo --flake-attempts=N or the use of the FlakeAttempts decorator.
|
||||||
|
MaxFlakeAttempts int
|
||||||
|
|
||||||
|
// MaxMustPassRepeatedly captures whether the spec has the MustPassRepeatedly decorator
|
||||||
|
MaxMustPassRepeatedly int
|
||||||
|
|
||||||
// CapturedGinkgoWriterOutput contains text printed to the GinkgoWriter
|
// CapturedGinkgoWriterOutput contains text printed to the GinkgoWriter
|
||||||
CapturedGinkgoWriterOutput string
|
CapturedGinkgoWriterOutput string
|
||||||
|
|
||||||
|
|
@ -190,6 +197,8 @@ func (report SpecReport) MarshalJSON() ([]byte, error) {
|
||||||
ParallelProcess int
|
ParallelProcess int
|
||||||
Failure *Failure `json:",omitempty"`
|
Failure *Failure `json:",omitempty"`
|
||||||
NumAttempts int
|
NumAttempts int
|
||||||
|
MaxFlakeAttempts int
|
||||||
|
MaxMustPassRepeatedly int
|
||||||
CapturedGinkgoWriterOutput string `json:",omitempty"`
|
CapturedGinkgoWriterOutput string `json:",omitempty"`
|
||||||
CapturedStdOutErr string `json:",omitempty"`
|
CapturedStdOutErr string `json:",omitempty"`
|
||||||
ReportEntries ReportEntries `json:",omitempty"`
|
ReportEntries ReportEntries `json:",omitempty"`
|
||||||
|
|
@ -211,6 +220,8 @@ func (report SpecReport) MarshalJSON() ([]byte, error) {
|
||||||
Failure: nil,
|
Failure: nil,
|
||||||
ReportEntries: nil,
|
ReportEntries: nil,
|
||||||
NumAttempts: report.NumAttempts,
|
NumAttempts: report.NumAttempts,
|
||||||
|
MaxFlakeAttempts: report.MaxFlakeAttempts,
|
||||||
|
MaxMustPassRepeatedly: report.MaxMustPassRepeatedly,
|
||||||
CapturedGinkgoWriterOutput: report.CapturedGinkgoWriterOutput,
|
CapturedGinkgoWriterOutput: report.CapturedGinkgoWriterOutput,
|
||||||
CapturedStdOutErr: report.CapturedStdOutErr,
|
CapturedStdOutErr: report.CapturedStdOutErr,
|
||||||
}
|
}
|
||||||
|
|
@ -363,11 +374,22 @@ func (reports SpecReports) CountWithState(states SpecState) int {
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
//CountWithState returns the number of SpecReports that passed after multiple attempts
|
//If the Spec passes, CountOfFlakedSpecs returns the number of SpecReports that failed after multiple attempts.
|
||||||
func (reports SpecReports) CountOfFlakedSpecs() int {
|
func (reports SpecReports) CountOfFlakedSpecs() int {
|
||||||
n := 0
|
n := 0
|
||||||
for i := range reports {
|
for i := range reports {
|
||||||
if reports[i].State.Is(SpecStatePassed) && reports[i].NumAttempts > 1 {
|
if reports[i].MaxFlakeAttempts > 1 && reports[i].State.Is(SpecStatePassed) && reports[i].NumAttempts > 1 {
|
||||||
|
n += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
//If the Spec fails, CountOfRepeatedSpecs returns the number of SpecReports that passed after multiple attempts
|
||||||
|
func (reports SpecReports) CountOfRepeatedSpecs() int {
|
||||||
|
n := 0
|
||||||
|
for i := range reports {
|
||||||
|
if reports[i].MaxMustPassRepeatedly > 1 && reports[i].State.Is(SpecStateFailureStates) && reports[i].NumAttempts > 1 {
|
||||||
n += 1
|
n += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
package types
|
package types
|
||||||
|
|
||||||
const VERSION = "2.3.1"
|
const VERSION = "2.4.0"
|
||||||
|
|
|
||||||
|
|
@ -734,7 +734,7 @@ func inHeadIM(p *parser) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 12.2.6.4.5.
|
// Section 12.2.6.4.5.
|
||||||
func inHeadNoscriptIM(p *parser) bool {
|
func inHeadNoscriptIM(p *parser) bool {
|
||||||
switch p.tok.Type {
|
switch p.tok.Type {
|
||||||
case DoctypeToken:
|
case DoctypeToken:
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ type Server struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) initialConnRecvWindowSize() int32 {
|
func (s *Server) initialConnRecvWindowSize() int32 {
|
||||||
if s.MaxUploadBufferPerConnection > initialWindowSize {
|
if s.MaxUploadBufferPerConnection >= initialWindowSize {
|
||||||
return s.MaxUploadBufferPerConnection
|
return s.MaxUploadBufferPerConnection
|
||||||
}
|
}
|
||||||
return 1 << 20
|
return 1 << 20
|
||||||
|
|
@ -869,9 +869,7 @@ func (sc *serverConn) serve() {
|
||||||
|
|
||||||
// Each connection starts with initialWindowSize inflow tokens.
|
// Each connection starts with initialWindowSize inflow tokens.
|
||||||
// If a higher value is configured, we add more tokens.
|
// If a higher value is configured, we add more tokens.
|
||||||
if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 {
|
sc.sendWindowUpdate(nil)
|
||||||
sc.sendWindowUpdate(nil, int(diff))
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := sc.readPreface(); err != nil {
|
if err := sc.readPreface(); err != nil {
|
||||||
sc.condlogf(err, "http2: server: error reading preface from client %v: %v", sc.conn.RemoteAddr(), err)
|
sc.condlogf(err, "http2: server: error reading preface from client %v: %v", sc.conn.RemoteAddr(), err)
|
||||||
|
|
@ -1588,7 +1586,7 @@ func (sc *serverConn) closeStream(st *stream, err error) {
|
||||||
if p := st.body; p != nil {
|
if p := st.body; p != nil {
|
||||||
// Return any buffered unread bytes worth of conn-level flow control.
|
// Return any buffered unread bytes worth of conn-level flow control.
|
||||||
// See golang.org/issue/16481
|
// See golang.org/issue/16481
|
||||||
sc.sendWindowUpdate(nil, p.Len())
|
sc.sendWindowUpdate(nil)
|
||||||
|
|
||||||
p.CloseWithError(err)
|
p.CloseWithError(err)
|
||||||
}
|
}
|
||||||
|
|
@ -1736,7 +1734,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
||||||
// sendWindowUpdate, which also schedules sending the
|
// sendWindowUpdate, which also schedules sending the
|
||||||
// frames.
|
// frames.
|
||||||
sc.inflow.take(int32(f.Length))
|
sc.inflow.take(int32(f.Length))
|
||||||
sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
|
sc.sendWindowUpdate(nil) // conn-level
|
||||||
|
|
||||||
if st != nil && st.resetQueued {
|
if st != nil && st.resetQueued {
|
||||||
// Already have a stream error in flight. Don't send another.
|
// Already have a stream error in flight. Don't send another.
|
||||||
|
|
@ -1754,7 +1752,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
||||||
return sc.countError("data_flow", streamError(id, ErrCodeFlowControl))
|
return sc.countError("data_flow", streamError(id, ErrCodeFlowControl))
|
||||||
}
|
}
|
||||||
sc.inflow.take(int32(f.Length))
|
sc.inflow.take(int32(f.Length))
|
||||||
sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
|
sc.sendWindowUpdate(nil) // conn-level
|
||||||
|
|
||||||
st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes))
|
st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes))
|
||||||
// RFC 7540, sec 8.1.2.6: A request or response is also malformed if the
|
// RFC 7540, sec 8.1.2.6: A request or response is also malformed if the
|
||||||
|
|
@ -1772,7 +1770,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
wrote, err := st.body.Write(data)
|
wrote, err := st.body.Write(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
|
sc.sendWindowUpdate32(nil, int32(f.Length)-int32(wrote))
|
||||||
return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
|
return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
|
||||||
}
|
}
|
||||||
if wrote != len(data) {
|
if wrote != len(data) {
|
||||||
|
|
@ -2099,12 +2097,6 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
|
||||||
return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol))
|
return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol))
|
||||||
}
|
}
|
||||||
|
|
||||||
bodyOpen := !f.StreamEnded()
|
|
||||||
if rp.method == "HEAD" && bodyOpen {
|
|
||||||
// HEAD requests can't have bodies
|
|
||||||
return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol))
|
|
||||||
}
|
|
||||||
|
|
||||||
rp.header = make(http.Header)
|
rp.header = make(http.Header)
|
||||||
for _, hf := range f.RegularFields() {
|
for _, hf := range f.RegularFields() {
|
||||||
rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value)
|
rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value)
|
||||||
|
|
@ -2117,6 +2109,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
bodyOpen := !f.StreamEnded()
|
||||||
if bodyOpen {
|
if bodyOpen {
|
||||||
if vv, ok := rp.header["Content-Length"]; ok {
|
if vv, ok := rp.header["Content-Length"]; ok {
|
||||||
if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil {
|
if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil {
|
||||||
|
|
@ -2329,17 +2322,32 @@ func (sc *serverConn) noteBodyReadFromHandler(st *stream, n int, err error) {
|
||||||
|
|
||||||
func (sc *serverConn) noteBodyRead(st *stream, n int) {
|
func (sc *serverConn) noteBodyRead(st *stream, n int) {
|
||||||
sc.serveG.check()
|
sc.serveG.check()
|
||||||
sc.sendWindowUpdate(nil, n) // conn-level
|
sc.sendWindowUpdate(nil) // conn-level
|
||||||
if st.state != stateHalfClosedRemote && st.state != stateClosed {
|
if st.state != stateHalfClosedRemote && st.state != stateClosed {
|
||||||
// Don't send this WINDOW_UPDATE if the stream is closed
|
// Don't send this WINDOW_UPDATE if the stream is closed
|
||||||
// remotely.
|
// remotely.
|
||||||
sc.sendWindowUpdate(st, n)
|
sc.sendWindowUpdate(st)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// st may be nil for conn-level
|
// st may be nil for conn-level
|
||||||
func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
|
func (sc *serverConn) sendWindowUpdate(st *stream) {
|
||||||
sc.serveG.check()
|
sc.serveG.check()
|
||||||
|
|
||||||
|
var n int32
|
||||||
|
if st == nil {
|
||||||
|
if avail, windowSize := sc.inflow.available(), sc.srv.initialConnRecvWindowSize(); avail > windowSize/2 {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
n = windowSize - avail
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if avail, windowSize := st.inflow.available(), sc.srv.initialStreamRecvWindowSize(); avail > windowSize/2 {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
n = windowSize - avail
|
||||||
|
}
|
||||||
|
}
|
||||||
// "The legal range for the increment to the flow control
|
// "The legal range for the increment to the flow control
|
||||||
// window is 1 to 2^31-1 (2,147,483,647) octets."
|
// window is 1 to 2^31-1 (2,147,483,647) octets."
|
||||||
// A Go Read call on 64-bit machines could in theory read
|
// A Go Read call on 64-bit machines could in theory read
|
||||||
|
|
@ -2505,6 +2513,10 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
|
||||||
rws.writeHeader(200)
|
rws.writeHeader(200)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rws.handlerDone {
|
||||||
|
rws.promoteUndeclaredTrailers()
|
||||||
|
}
|
||||||
|
|
||||||
isHeadResp := rws.req.Method == "HEAD"
|
isHeadResp := rws.req.Method == "HEAD"
|
||||||
if !rws.sentHeader {
|
if !rws.sentHeader {
|
||||||
rws.sentHeader = true
|
rws.sentHeader = true
|
||||||
|
|
@ -2576,10 +2588,6 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if rws.handlerDone {
|
|
||||||
rws.promoteUndeclaredTrailers()
|
|
||||||
}
|
|
||||||
|
|
||||||
// only send trailers if they have actually been defined by the
|
// only send trailers if they have actually been defined by the
|
||||||
// server handler.
|
// server handler.
|
||||||
hasNonemptyTrailers := rws.hasNonemptyTrailers()
|
hasNonemptyTrailers := rws.hasNonemptyTrailers()
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,8 @@ func (t *Transport) initConnPool() {
|
||||||
// HTTP/2 server.
|
// HTTP/2 server.
|
||||||
type ClientConn struct {
|
type ClientConn struct {
|
||||||
t *Transport
|
t *Transport
|
||||||
tconn net.Conn // usually *tls.Conn, except specialized impls
|
tconn net.Conn // usually *tls.Conn, except specialized impls
|
||||||
|
tconnClosed bool
|
||||||
tlsState *tls.ConnectionState // nil only for specialized impls
|
tlsState *tls.ConnectionState // nil only for specialized impls
|
||||||
reused uint32 // whether conn is being reused; atomic
|
reused uint32 // whether conn is being reused; atomic
|
||||||
singleUse bool // whether being used for a single http.Request
|
singleUse bool // whether being used for a single http.Request
|
||||||
|
|
@ -344,8 +345,8 @@ type clientStream struct {
|
||||||
readErr error // sticky read error; owned by transportResponseBody.Read
|
readErr error // sticky read error; owned by transportResponseBody.Read
|
||||||
|
|
||||||
reqBody io.ReadCloser
|
reqBody io.ReadCloser
|
||||||
reqBodyContentLength int64 // -1 means unknown
|
reqBodyContentLength int64 // -1 means unknown
|
||||||
reqBodyClosed bool // body has been closed; guarded by cc.mu
|
reqBodyClosed chan struct{} // guarded by cc.mu; non-nil on Close, closed when done
|
||||||
|
|
||||||
// owned by writeRequest:
|
// owned by writeRequest:
|
||||||
sentEndStream bool // sent an END_STREAM flag to the peer
|
sentEndStream bool // sent an END_STREAM flag to the peer
|
||||||
|
|
@ -385,9 +386,8 @@ func (cs *clientStream) abortStreamLocked(err error) {
|
||||||
cs.abortErr = err
|
cs.abortErr = err
|
||||||
close(cs.abort)
|
close(cs.abort)
|
||||||
})
|
})
|
||||||
if cs.reqBody != nil && !cs.reqBodyClosed {
|
if cs.reqBody != nil {
|
||||||
cs.reqBody.Close()
|
cs.closeReqBodyLocked()
|
||||||
cs.reqBodyClosed = true
|
|
||||||
}
|
}
|
||||||
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
|
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
|
||||||
if cs.cc.cond != nil {
|
if cs.cc.cond != nil {
|
||||||
|
|
@ -400,13 +400,24 @@ func (cs *clientStream) abortRequestBodyWrite() {
|
||||||
cc := cs.cc
|
cc := cs.cc
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
defer cc.mu.Unlock()
|
defer cc.mu.Unlock()
|
||||||
if cs.reqBody != nil && !cs.reqBodyClosed {
|
if cs.reqBody != nil && cs.reqBodyClosed == nil {
|
||||||
cs.reqBody.Close()
|
cs.closeReqBodyLocked()
|
||||||
cs.reqBodyClosed = true
|
|
||||||
cc.cond.Broadcast()
|
cc.cond.Broadcast()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (cs *clientStream) closeReqBodyLocked() {
|
||||||
|
if cs.reqBodyClosed != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
cs.reqBodyClosed = make(chan struct{})
|
||||||
|
reqBodyClosed := cs.reqBodyClosed
|
||||||
|
go func() {
|
||||||
|
cs.reqBody.Close()
|
||||||
|
close(reqBodyClosed)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
type stickyErrWriter struct {
|
type stickyErrWriter struct {
|
||||||
conn net.Conn
|
conn net.Conn
|
||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
|
|
@ -921,10 +932,10 @@ func (cc *ClientConn) onIdleTimeout() {
|
||||||
cc.closeIfIdle()
|
cc.closeIfIdle()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cc *ClientConn) closeConn() error {
|
func (cc *ClientConn) closeConn() {
|
||||||
t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
|
t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
|
||||||
defer t.Stop()
|
defer t.Stop()
|
||||||
return cc.tconn.Close()
|
cc.tconn.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// A tls.Conn.Close can hang for a long time if the peer is unresponsive.
|
// A tls.Conn.Close can hang for a long time if the peer is unresponsive.
|
||||||
|
|
@ -990,7 +1001,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
||||||
shutdownEnterWaitStateHook()
|
shutdownEnterWaitStateHook()
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
return cc.closeConn()
|
cc.closeConn()
|
||||||
|
return nil
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
// Free the goroutine above
|
// Free the goroutine above
|
||||||
|
|
@ -1027,7 +1039,7 @@ func (cc *ClientConn) sendGoAway() error {
|
||||||
|
|
||||||
// closes the client connection immediately. In-flight requests are interrupted.
|
// closes the client connection immediately. In-flight requests are interrupted.
|
||||||
// err is sent to streams.
|
// err is sent to streams.
|
||||||
func (cc *ClientConn) closeForError(err error) error {
|
func (cc *ClientConn) closeForError(err error) {
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
cc.closed = true
|
cc.closed = true
|
||||||
for _, cs := range cc.streams {
|
for _, cs := range cc.streams {
|
||||||
|
|
@ -1035,7 +1047,7 @@ func (cc *ClientConn) closeForError(err error) error {
|
||||||
}
|
}
|
||||||
cc.cond.Broadcast()
|
cc.cond.Broadcast()
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
return cc.closeConn()
|
cc.closeConn()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close closes the client connection immediately.
|
// Close closes the client connection immediately.
|
||||||
|
|
@ -1043,16 +1055,17 @@ func (cc *ClientConn) closeForError(err error) error {
|
||||||
// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.
|
// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.
|
||||||
func (cc *ClientConn) Close() error {
|
func (cc *ClientConn) Close() error {
|
||||||
err := errors.New("http2: client connection force closed via ClientConn.Close")
|
err := errors.New("http2: client connection force closed via ClientConn.Close")
|
||||||
return cc.closeForError(err)
|
cc.closeForError(err)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// closes the client connection immediately. In-flight requests are interrupted.
|
// closes the client connection immediately. In-flight requests are interrupted.
|
||||||
func (cc *ClientConn) closeForLostPing() error {
|
func (cc *ClientConn) closeForLostPing() {
|
||||||
err := errors.New("http2: client connection lost")
|
err := errors.New("http2: client connection lost")
|
||||||
if f := cc.t.CountError; f != nil {
|
if f := cc.t.CountError; f != nil {
|
||||||
f("conn_close_lost_ping")
|
f("conn_close_lost_ping")
|
||||||
}
|
}
|
||||||
return cc.closeForError(err)
|
cc.closeForError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not
|
// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not
|
||||||
|
|
@ -1430,11 +1443,19 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
|
||||||
// and in multiple cases: server replies <=299 and >299
|
// and in multiple cases: server replies <=299 and >299
|
||||||
// while still writing request body
|
// while still writing request body
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
|
mustCloseBody := false
|
||||||
|
if cs.reqBody != nil && cs.reqBodyClosed == nil {
|
||||||
|
mustCloseBody = true
|
||||||
|
cs.reqBodyClosed = make(chan struct{})
|
||||||
|
}
|
||||||
bodyClosed := cs.reqBodyClosed
|
bodyClosed := cs.reqBodyClosed
|
||||||
cs.reqBodyClosed = true
|
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
if !bodyClosed && cs.reqBody != nil {
|
if mustCloseBody {
|
||||||
cs.reqBody.Close()
|
cs.reqBody.Close()
|
||||||
|
close(bodyClosed)
|
||||||
|
}
|
||||||
|
if bodyClosed != nil {
|
||||||
|
<-bodyClosed
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil && cs.sentEndStream {
|
if err != nil && cs.sentEndStream {
|
||||||
|
|
@ -1614,7 +1635,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
bodyClosed := cs.reqBodyClosed
|
bodyClosed := cs.reqBodyClosed != nil
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
switch {
|
switch {
|
||||||
case bodyClosed:
|
case bodyClosed:
|
||||||
|
|
@ -1709,7 +1730,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
|
||||||
if cc.closed {
|
if cc.closed {
|
||||||
return 0, errClientConnClosed
|
return 0, errClientConnClosed
|
||||||
}
|
}
|
||||||
if cs.reqBodyClosed {
|
if cs.reqBodyClosed != nil {
|
||||||
return 0, errStopReqBodyWrite
|
return 0, errStopReqBodyWrite
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
|
@ -2005,7 +2026,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
|
||||||
// wake up RoundTrip if there is a pending request.
|
// wake up RoundTrip if there is a pending request.
|
||||||
cc.cond.Broadcast()
|
cc.cond.Broadcast()
|
||||||
|
|
||||||
closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives()
|
closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil
|
||||||
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
|
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
|
||||||
if VerboseLogs {
|
if VerboseLogs {
|
||||||
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
|
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
|
||||||
|
|
@ -2081,6 +2102,7 @@ func (rl *clientConnReadLoop) cleanup() {
|
||||||
err = io.ErrUnexpectedEOF
|
err = io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
cc.closed = true
|
cc.closed = true
|
||||||
|
|
||||||
for _, cs := range cc.streams {
|
for _, cs := range cc.streams {
|
||||||
select {
|
select {
|
||||||
case <-cs.peerClosed:
|
case <-cs.peerClosed:
|
||||||
|
|
@ -2674,7 +2696,6 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
|
||||||
if fn := cc.t.CountError; fn != nil {
|
if fn := cc.t.CountError; fn != nil {
|
||||||
fn("recv_goaway_" + f.ErrCode.stringToken())
|
fn("recv_goaway_" + f.ErrCode.stringToken())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
cc.setGoAway(f)
|
cc.setGoAway(f)
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -3028,7 +3049,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) {
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
ci.WasIdle = len(cc.streams) == 0 && reused
|
ci.WasIdle = len(cc.streams) == 0 && reused
|
||||||
if ci.WasIdle && !cc.lastActive.IsZero() {
|
if ci.WasIdle && !cc.lastActive.IsZero() {
|
||||||
ci.IdleTime = time.Now().Sub(cc.lastActive)
|
ci.IdleTime = time.Since(cc.lastActive)
|
||||||
}
|
}
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ func New(family, title string) Trace {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tr *trace) Finish() {
|
func (tr *trace) Finish() {
|
||||||
elapsed := time.Now().Sub(tr.Start)
|
elapsed := time.Since(tr.Start)
|
||||||
tr.mu.Lock()
|
tr.mu.Lock()
|
||||||
tr.Elapsed = elapsed
|
tr.Elapsed = elapsed
|
||||||
tr.mu.Unlock()
|
tr.mu.Unlock()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !aix && !linux && (ppc64 || ppc64le)
|
||||||
|
// +build !aix
|
||||||
|
// +build !linux
|
||||||
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
|
package cpu
|
||||||
|
|
||||||
|
func archInit() {
|
||||||
|
PPC64.IsPOWER8 = true
|
||||||
|
Initialized = true
|
||||||
|
}
|
||||||
|
|
@ -126,7 +126,7 @@ errors=$(
|
||||||
signals=$(
|
signals=$(
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' |
|
||||||
sort
|
sort
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -136,7 +136,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
sort >_error.grep
|
sort >_error.grep
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
||||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' |
|
||||||
sort >_signal.grep
|
sort >_signal.grep
|
||||||
|
|
||||||
echo '// mkerrors.sh' "$@"
|
echo '// mkerrors.sh' "$@"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
||||||
|
// +build darwin freebsd netbsd openbsd
|
||||||
|
// +build gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for ppc64, BSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
|
||||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,24 @@ openbsd_mips64)
|
||||||
# API consistent across platforms.
|
# API consistent across platforms.
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||||
;;
|
;;
|
||||||
|
openbsd_ppc64)
|
||||||
|
mkasm="go run mkasm.go"
|
||||||
|
mkerrors="$mkerrors -m64"
|
||||||
|
mksyscall="go run mksyscall.go -openbsd -libc"
|
||||||
|
mksysctl="go run mksysctl_openbsd.go"
|
||||||
|
# Let the type of C char be signed for making the bare syscall
|
||||||
|
# API consistent across platforms.
|
||||||
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||||
|
;;
|
||||||
|
openbsd_riscv64)
|
||||||
|
mkasm="go run mkasm.go"
|
||||||
|
mkerrors="$mkerrors -m64"
|
||||||
|
mksyscall="go run mksyscall.go -openbsd -libc"
|
||||||
|
mksysctl="go run mksysctl_openbsd.go"
|
||||||
|
# Let the type of C char be signed for making the bare syscall
|
||||||
|
# API consistent across platforms.
|
||||||
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||||
|
;;
|
||||||
solaris_amd64)
|
solaris_amd64)
|
||||||
mksyscall="go run mksyscall_solaris.go"
|
mksyscall="go run mksyscall_solaris.go"
|
||||||
mkerrors="$mkerrors -m64"
|
mkerrors="$mkerrors -m64"
|
||||||
|
|
|
||||||
|
|
@ -642,7 +642,7 @@ errors=$(
|
||||||
signals=$(
|
signals=$(
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
||||||
sort
|
sort
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -652,7 +652,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
sort >_error.grep
|
sort >_error.grep
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
||||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
||||||
sort >_signal.grep
|
sort >_signal.grep
|
||||||
|
|
||||||
echo '// mkerrors.sh' "$@"
|
echo '// mkerrors.sh' "$@"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"runtime"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -79,107 +77,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
|
|
||||||
|
|
||||||
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
|
|
||||||
var clp, datap *strbuf
|
|
||||||
if len(cl) > 0 {
|
|
||||||
clp = &strbuf{
|
|
||||||
Len: int32(len(cl)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(data) > 0 {
|
|
||||||
datap = &strbuf{
|
|
||||||
Len: int32(len(data)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return putmsg(fd, clp, datap, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
|
|
||||||
|
|
||||||
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
|
|
||||||
var clp, datap *strbuf
|
|
||||||
if len(cl) > 0 {
|
|
||||||
clp = &strbuf{
|
|
||||||
Maxlen: int32(len(cl)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(data) > 0 {
|
|
||||||
datap = &strbuf{
|
|
||||||
Maxlen: int32(len(data)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if err = getmsg(fd, clp, datap, &flags); err != nil {
|
|
||||||
return nil, nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(cl) > 0 {
|
|
||||||
retCl = cl[:clp.Len]
|
|
||||||
}
|
|
||||||
if len(data) > 0 {
|
|
||||||
retData = data[:datap.Len]
|
|
||||||
}
|
|
||||||
return retCl, retData, flags, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
|
|
||||||
return ioctlRet(fd, req, uintptr(arg))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetString(fd int, req uint, val string) error {
|
|
||||||
bs := make([]byte, len(val)+1)
|
|
||||||
copy(bs[:len(bs)-1], val)
|
|
||||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
|
|
||||||
runtime.KeepAlive(&bs[0])
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lifreq Helpers
|
|
||||||
|
|
||||||
func (l *Lifreq) SetName(name string) error {
|
|
||||||
if len(name) >= len(l.Name) {
|
|
||||||
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
|
|
||||||
}
|
|
||||||
for i := range name {
|
|
||||||
l.Name[i] = int8(name[i])
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) SetLifruInt(d int) {
|
|
||||||
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) GetLifruInt() int {
|
|
||||||
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) SetLifruUint(d uint) {
|
|
||||||
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) GetLifruUint() uint {
|
|
||||||
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
|
||||||
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Strioctl Helpers
|
|
||||||
|
|
||||||
func (s *Strioctl) SetInt(i int) {
|
|
||||||
s.Len = int32(unsafe.Sizeof(i))
|
|
||||||
s.Dp = (*int8)(unsafe.Pointer(&i))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
|
|
||||||
return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -2252,7 +2252,7 @@ func (fh *FileHandle) Bytes() []byte {
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return (*[1 << 30]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type)) + 4))[:n:n]
|
return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
|
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
|
||||||
|
|
@ -2368,6 +2368,16 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
||||||
return prev, nil
|
return prev, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) = SYS_RT_SIGPROCMASK
|
||||||
|
|
||||||
|
func PthreadSigmask(how int, set, oldset *Sigset_t) error {
|
||||||
|
if oldset != nil {
|
||||||
|
// Explicitly clear in case Sigset_t is larger than _C__NSIG.
|
||||||
|
*oldset = Sigset_t{}
|
||||||
|
}
|
||||||
|
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unimplemented
|
* Unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
@ -2426,7 +2436,6 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
||||||
// RestartSyscall
|
// RestartSyscall
|
||||||
// RtSigaction
|
// RtSigaction
|
||||||
// RtSigpending
|
// RtSigpending
|
||||||
// RtSigprocmask
|
|
||||||
// RtSigqueueinfo
|
// RtSigqueueinfo
|
||||||
// RtSigreturn
|
// RtSigreturn
|
||||||
// RtSigsuspend
|
// RtSigsuspend
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (openbsd && 386) || (openbsd && amd64) || (openbsd && arm) || (openbsd && arm64)
|
//go:build openbsd && !mips64
|
||||||
// +build openbsd,386 openbsd,amd64 openbsd,arm openbsd,arm64
|
// +build openbsd,!mips64
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
// Copyright 2019 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build ppc64 && openbsd
|
||||||
|
// +build ppc64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
func setTimespec(sec, nsec int64) Timespec {
|
||||||
|
return Timespec{Sec: sec, Nsec: nsec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimeval(sec, usec int64) Timeval {
|
||||||
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
|
k.Ident = uint64(fd)
|
||||||
|
k.Filter = int16(mode)
|
||||||
|
k.Flags = uint16(flags)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (iov *Iovec) SetLen(length int) {
|
||||||
|
iov.Len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetControllen(length int) {
|
||||||
|
msghdr.Controllen = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||||
|
msghdr.Iovlen = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
|
cmsg.Len = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||||
|
// of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
|
||||||
|
const SYS___SYSCTL = SYS_SYSCTL
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
// Copyright 2019 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build riscv64 && openbsd
|
||||||
|
// +build riscv64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
func setTimespec(sec, nsec int64) Timespec {
|
||||||
|
return Timespec{Sec: sec, Nsec: nsec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimeval(sec, usec int64) Timeval {
|
||||||
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
|
k.Ident = uint64(fd)
|
||||||
|
k.Filter = int16(mode)
|
||||||
|
k.Flags = uint16(flags)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (iov *Iovec) SetLen(length int) {
|
||||||
|
iov.Len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetControllen(length int) {
|
||||||
|
msghdr.Controllen = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||||
|
msghdr.Iovlen = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
|
cmsg.Len = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||||
|
// of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
|
||||||
|
const SYS___SYSCTL = SYS_SYSCTL
|
||||||
|
|
@ -1026,3 +1026,107 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
||||||
}
|
}
|
||||||
return valid, err
|
return valid, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
|
||||||
|
|
||||||
|
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
|
||||||
|
var clp, datap *strbuf
|
||||||
|
if len(cl) > 0 {
|
||||||
|
clp = &strbuf{
|
||||||
|
Len: int32(len(cl)),
|
||||||
|
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(data) > 0 {
|
||||||
|
datap = &strbuf{
|
||||||
|
Len: int32(len(data)),
|
||||||
|
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return putmsg(fd, clp, datap, flags)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
|
||||||
|
|
||||||
|
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
|
||||||
|
var clp, datap *strbuf
|
||||||
|
if len(cl) > 0 {
|
||||||
|
clp = &strbuf{
|
||||||
|
Maxlen: int32(len(cl)),
|
||||||
|
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(data) > 0 {
|
||||||
|
datap = &strbuf{
|
||||||
|
Maxlen: int32(len(data)),
|
||||||
|
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = getmsg(fd, clp, datap, &flags); err != nil {
|
||||||
|
return nil, nil, 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(cl) > 0 {
|
||||||
|
retCl = cl[:clp.Len]
|
||||||
|
}
|
||||||
|
if len(data) > 0 {
|
||||||
|
retData = data[:datap.Len]
|
||||||
|
}
|
||||||
|
return retCl, retData, flags, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
|
||||||
|
return ioctlRet(fd, req, uintptr(arg))
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlSetString(fd int, req uint, val string) error {
|
||||||
|
bs := make([]byte, len(val)+1)
|
||||||
|
copy(bs[:len(bs)-1], val)
|
||||||
|
err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
|
||||||
|
runtime.KeepAlive(&bs[0])
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lifreq Helpers
|
||||||
|
|
||||||
|
func (l *Lifreq) SetName(name string) error {
|
||||||
|
if len(name) >= len(l.Name) {
|
||||||
|
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
|
||||||
|
}
|
||||||
|
for i := range name {
|
||||||
|
l.Name[i] = int8(name[i])
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *Lifreq) SetLifruInt(d int) {
|
||||||
|
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *Lifreq) GetLifruInt() int {
|
||||||
|
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *Lifreq) SetLifruUint(d uint) {
|
||||||
|
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *Lifreq) GetLifruUint() uint {
|
||||||
|
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
||||||
|
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Strioctl Helpers
|
||||||
|
|
||||||
|
func (s *Strioctl) SetInt(i int) {
|
||||||
|
s.Len = int32(unsafe.Sizeof(i))
|
||||||
|
s.Dp = (*int8)(unsafe.Pointer(&i))
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
|
||||||
|
return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -423,11 +423,15 @@ func Send(s int, buf []byte, flags int) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
|
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
|
||||||
ptr, n, err := to.sockaddr()
|
var ptr unsafe.Pointer
|
||||||
if err != nil {
|
var salen _Socklen
|
||||||
return err
|
if to != nil {
|
||||||
|
ptr, salen, err = to.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return sendto(fd, p, flags, ptr, n)
|
return sendto(fd, p, flags, ptr, salen)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetsockoptByte(fd, level, opt int, value byte) (err error) {
|
func SetsockoptByte(fd, level, opt int, value byte) (err error) {
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,9 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
|
//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
|
||||||
// +build gc
|
// +build gc
|
||||||
// +build !ppc64le
|
|
||||||
// +build !ppc64
|
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@ package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
@ -55,7 +57,13 @@ func (d *Dirent) NameString() string {
|
||||||
if d == nil {
|
if d == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return string(d.Name[:d.Namlen])
|
s := string(d.Name[:])
|
||||||
|
idx := strings.IndexByte(s, 0)
|
||||||
|
if idx == -1 {
|
||||||
|
return s
|
||||||
|
} else {
|
||||||
|
return s[:idx]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
|
|
@ -1230,6 +1238,14 @@ func Readdir(dir uintptr) (*Dirent, error) {
|
||||||
return &ent, err
|
return &ent, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||||
|
if int64(r0) == -1 {
|
||||||
|
err = errnoErr(Errno(e1))
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func Closedir(dir uintptr) error {
|
func Closedir(dir uintptr) error {
|
||||||
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
|
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
|
||||||
if e != 0 {
|
if e != 0 {
|
||||||
|
|
@ -1821,3 +1837,158 @@ func Unmount(name string, mtm int) (err error) {
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fdToPath(dirfd int) (path string, err error) {
|
||||||
|
var buffer [1024]byte
|
||||||
|
// w_ctrl()
|
||||||
|
ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4,
|
||||||
|
[]uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))})
|
||||||
|
if ret == 0 {
|
||||||
|
zb := bytes.IndexByte(buffer[:], 0)
|
||||||
|
if zb == -1 {
|
||||||
|
zb = len(buffer)
|
||||||
|
}
|
||||||
|
// __e2a_l()
|
||||||
|
runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4,
|
||||||
|
[]uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)})
|
||||||
|
return string(buffer[:zb]), nil
|
||||||
|
}
|
||||||
|
// __errno()
|
||||||
|
errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4,
|
||||||
|
[]uintptr{}))))
|
||||||
|
// __errno2()
|
||||||
|
errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4,
|
||||||
|
[]uintptr{}))
|
||||||
|
// strerror_r()
|
||||||
|
ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4,
|
||||||
|
[]uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024})
|
||||||
|
if ret == 0 {
|
||||||
|
zb := bytes.IndexByte(buffer[:], 0)
|
||||||
|
if zb == -1 {
|
||||||
|
zb = len(buffer)
|
||||||
|
}
|
||||||
|
return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2)
|
||||||
|
} else {
|
||||||
|
return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) {
|
||||||
|
var d Dirent
|
||||||
|
|
||||||
|
d.Ino = uint64(dirent.Ino)
|
||||||
|
offset, err := Telldir(dir)
|
||||||
|
if err != nil {
|
||||||
|
return d, err
|
||||||
|
}
|
||||||
|
|
||||||
|
d.Off = int64(offset)
|
||||||
|
s := string(bytes.Split(dirent.Name[:], []byte{0})[0])
|
||||||
|
copy(d.Name[:], s)
|
||||||
|
|
||||||
|
d.Reclen = uint16(24 + len(d.NameString()))
|
||||||
|
var st Stat_t
|
||||||
|
path = path + "/" + s
|
||||||
|
err = Lstat(path, &st)
|
||||||
|
if err != nil {
|
||||||
|
return d, err
|
||||||
|
}
|
||||||
|
|
||||||
|
d.Type = uint8(st.Mode >> 24)
|
||||||
|
return d, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||||
|
// Simulation of Getdirentries port from the Darwin implementation.
|
||||||
|
// COMMENTS FROM DARWIN:
|
||||||
|
// It's not the full required semantics, but should handle the case
|
||||||
|
// of calling Getdirentries or ReadDirent repeatedly.
|
||||||
|
// It won't handle assigning the results of lseek to *basep, or handle
|
||||||
|
// the directory being edited underfoot.
|
||||||
|
|
||||||
|
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get path from fd to avoid unavailable call (fdopendir)
|
||||||
|
path, err := fdToPath(fd)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
d, err := Opendir(path)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
defer Closedir(d)
|
||||||
|
|
||||||
|
var cnt int64
|
||||||
|
for {
|
||||||
|
var entryLE direntLE
|
||||||
|
var entrypLE *direntLE
|
||||||
|
e := readdir_r(d, &entryLE, &entrypLE)
|
||||||
|
if e != nil {
|
||||||
|
return n, e
|
||||||
|
}
|
||||||
|
if entrypLE == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if skip > 0 {
|
||||||
|
skip--
|
||||||
|
cnt++
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dirent on zos has a different structure
|
||||||
|
entry, e := direntLeToDirentUnix(&entryLE, d, path)
|
||||||
|
if e != nil {
|
||||||
|
return n, e
|
||||||
|
}
|
||||||
|
|
||||||
|
reclen := int(entry.Reclen)
|
||||||
|
if reclen > len(buf) {
|
||||||
|
// Not enough room. Return for now.
|
||||||
|
// The counter will let us know where we should start up again.
|
||||||
|
// Note: this strategy for suspending in the middle and
|
||||||
|
// restarting is O(n^2) in the length of the directory. Oh well.
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy entry into return buffer.
|
||||||
|
s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
|
||||||
|
copy(buf, s)
|
||||||
|
|
||||||
|
buf = buf[reclen:]
|
||||||
|
n += reclen
|
||||||
|
cnt++
|
||||||
|
}
|
||||||
|
// Set the seek offset of the input fd to record
|
||||||
|
// how many files we've already returned.
|
||||||
|
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return n, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||||
|
var base = (*uintptr)(unsafe.Pointer(new(uint64)))
|
||||||
|
return Getdirentries(fd, buf, base)
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -15,25 +15,19 @@ import (
|
||||||
//go:cgo_import_dynamic libc_writev writev "libc.so"
|
//go:cgo_import_dynamic libc_writev writev "libc.so"
|
||||||
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
|
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
|
||||||
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
|
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
|
||||||
//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
|
|
||||||
//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
|
|
||||||
|
|
||||||
//go:linkname procreadv libc_readv
|
//go:linkname procreadv libc_readv
|
||||||
//go:linkname procpreadv libc_preadv
|
//go:linkname procpreadv libc_preadv
|
||||||
//go:linkname procwritev libc_writev
|
//go:linkname procwritev libc_writev
|
||||||
//go:linkname procpwritev libc_pwritev
|
//go:linkname procpwritev libc_pwritev
|
||||||
//go:linkname procaccept4 libc_accept4
|
//go:linkname procaccept4 libc_accept4
|
||||||
//go:linkname procputmsg libc_putmsg
|
|
||||||
//go:linkname procgetmsg libc_getmsg
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
procreadv,
|
procreadv,
|
||||||
procpreadv,
|
procpreadv,
|
||||||
procwritev,
|
procwritev,
|
||||||
procpwritev,
|
procpwritev,
|
||||||
procaccept4,
|
procaccept4 syscallFunc
|
||||||
procputmsg,
|
|
||||||
procgetmsg syscallFunc
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
@ -106,23 +100,3 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
|
|
||||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = e1
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
|
|
||||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = e1
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -2151,3 +2151,13 @@ func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) {
|
||||||
|
_, _, e1 := RawSyscall6(SYS_RT_SIGPROCMASK, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oldset)), uintptr(sigsetsize), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,796 @@
|
||||||
|
// go run mkasm.go openbsd ppc64
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getgroups(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setgroups(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_wait4(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_accept(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_bind(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_connect(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_socket(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getsockopt(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setsockopt(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getpeername(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getsockname(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_shutdown(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_socketpair(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_recvfrom(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_sendto(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_recvmsg(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_sendmsg(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_kevent(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_utimes(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_futimes(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_poll(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_madvise(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mlock(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mlockall(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mprotect(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_msync(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_munlock(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_munlockall(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_pipe2(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getdents(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getcwd(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_ioctl(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_sysctl(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_ppoll(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_access(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_adjtime(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_chdir(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_chflags(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_chmod(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_chown(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_chroot(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_close(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_dup(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_dup2(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_dup3(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_exit(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_faccessat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fchdir(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fchflags(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fchmod(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fchmodat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fchown(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fchownat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_flock(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fpathconf(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fstat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fstatat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fstatfs(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_fsync(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_ftruncate(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getegid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_geteuid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getgid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getpgid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getpgrp(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getpid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getppid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getpriority(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getrlimit(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getrtable(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getrusage(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getsid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_gettimeofday(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_getuid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_issetugid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_kill(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_kqueue(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_lchown(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_link(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_linkat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_listen(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_lstat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mkdir(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mkdirat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mkfifo(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mkfifoat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mknod(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mknodat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_nanosleep(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_open(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_openat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_pathconf(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_pread(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_pwrite(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_read(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_readlink(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_readlinkat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_rename(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_renameat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_revoke(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_rmdir(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_lseek(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_select(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setegid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_seteuid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setgid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setlogin(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setpgid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setpriority(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setregid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setreuid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setresgid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setresuid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setrlimit(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setrtable(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setsid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_settimeofday(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_setuid(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_stat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_statfs(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_symlink(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_symlinkat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_sync(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_truncate(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_umask(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_unlink(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_unlinkat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_unmount(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_write(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mmap(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_munmap(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_utimensat(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,796 @@
|
||||||
|
// go run mkasm.go openbsd riscv64
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgroups(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgroups(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_wait4(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_accept(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_bind(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connect(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socket(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockopt(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsockopt(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpeername(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockname(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shutdown(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socketpair(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvfrom(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendto(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvmsg(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendmsg(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kevent(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_utimes(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_futimes(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_poll(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_madvise(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlock(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlockall(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mprotect(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_msync(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlock(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlockall(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pipe2(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getdents(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getcwd(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ioctl(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctl(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ppoll(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_access(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_adjtime(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chdir(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chflags(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chmod(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chown(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chroot(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_close(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup2(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup3(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exit(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_faccessat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchdir(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchflags(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmod(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmodat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchown(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchownat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flock(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fpathconf(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatfs(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsync(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ftruncate(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getegid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_geteuid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgrp(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getppid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpriority(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrlimit(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrtable(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrusage(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_gettimeofday(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getuid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_issetugid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kill(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kqueue(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lchown(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_link(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_linkat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listen(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lstat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdir(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdirat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkfifo(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkfifoat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mknod(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mknodat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_nanosleep(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_open(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_openat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pathconf(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pread(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pwrite(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_read(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlink(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlinkat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rename(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_revoke(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rmdir(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lseek(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_select(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setegid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_seteuid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setlogin(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpgid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpriority(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setregid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setreuid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setresgid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setresuid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setrlimit(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setrtable(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_settimeofday(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setuid(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_stat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_statfs(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlink(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlinkat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sync(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_truncate(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_umask(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlink(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlinkat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unmount(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_write(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mmap(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munmap(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_utimensat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
|
||||||
|
|
@ -147,6 +147,8 @@ import (
|
||||||
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
|
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
|
||||||
//go:cgo_import_dynamic libc_port_get port_get "libc.so"
|
//go:cgo_import_dynamic libc_port_get port_get "libc.so"
|
||||||
//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
|
//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
|
||||||
|
//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
|
||||||
|
//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
|
||||||
|
|
||||||
//go:linkname procpipe libc_pipe
|
//go:linkname procpipe libc_pipe
|
||||||
//go:linkname procpipe2 libc_pipe2
|
//go:linkname procpipe2 libc_pipe2
|
||||||
|
|
@ -284,6 +286,8 @@ import (
|
||||||
//go:linkname procport_dissociate libc_port_dissociate
|
//go:linkname procport_dissociate libc_port_dissociate
|
||||||
//go:linkname procport_get libc_port_get
|
//go:linkname procport_get libc_port_get
|
||||||
//go:linkname procport_getn libc_port_getn
|
//go:linkname procport_getn libc_port_getn
|
||||||
|
//go:linkname procputmsg libc_putmsg
|
||||||
|
//go:linkname procgetmsg libc_getmsg
|
||||||
|
|
||||||
var (
|
var (
|
||||||
procpipe,
|
procpipe,
|
||||||
|
|
@ -421,7 +425,9 @@ var (
|
||||||
procport_associate,
|
procport_associate,
|
||||||
procport_dissociate,
|
procport_dissociate,
|
||||||
procport_get,
|
procport_get,
|
||||||
procport_getn syscallFunc
|
procport_getn,
|
||||||
|
procputmsg,
|
||||||
|
procgetmsg syscallFunc
|
||||||
)
|
)
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
@ -2065,3 +2071,23 @@ func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Times
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
|
||||||
|
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
|
||||||
|
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,281 @@
|
||||||
|
// go run mksysctl_openbsd.go
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ppc64 && openbsd
|
||||||
|
// +build ppc64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
type mibentry struct {
|
||||||
|
ctlname string
|
||||||
|
ctloid []_C_int
|
||||||
|
}
|
||||||
|
|
||||||
|
var sysctlMib = []mibentry{
|
||||||
|
{"ddb.console", []_C_int{9, 6}},
|
||||||
|
{"ddb.log", []_C_int{9, 7}},
|
||||||
|
{"ddb.max_line", []_C_int{9, 3}},
|
||||||
|
{"ddb.max_width", []_C_int{9, 2}},
|
||||||
|
{"ddb.panic", []_C_int{9, 5}},
|
||||||
|
{"ddb.profile", []_C_int{9, 9}},
|
||||||
|
{"ddb.radix", []_C_int{9, 1}},
|
||||||
|
{"ddb.tab_stop_width", []_C_int{9, 4}},
|
||||||
|
{"ddb.trigger", []_C_int{9, 8}},
|
||||||
|
{"fs.posix.setuid", []_C_int{3, 1, 1}},
|
||||||
|
{"hw.allowpowerdown", []_C_int{6, 22}},
|
||||||
|
{"hw.byteorder", []_C_int{6, 4}},
|
||||||
|
{"hw.cpuspeed", []_C_int{6, 12}},
|
||||||
|
{"hw.diskcount", []_C_int{6, 10}},
|
||||||
|
{"hw.disknames", []_C_int{6, 8}},
|
||||||
|
{"hw.diskstats", []_C_int{6, 9}},
|
||||||
|
{"hw.machine", []_C_int{6, 1}},
|
||||||
|
{"hw.model", []_C_int{6, 2}},
|
||||||
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
|
{"hw.perfpolicy", []_C_int{6, 23}},
|
||||||
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
|
{"hw.power", []_C_int{6, 26}},
|
||||||
|
{"hw.product", []_C_int{6, 15}},
|
||||||
|
{"hw.serialno", []_C_int{6, 17}},
|
||||||
|
{"hw.setperf", []_C_int{6, 13}},
|
||||||
|
{"hw.smt", []_C_int{6, 24}},
|
||||||
|
{"hw.usermem", []_C_int{6, 20}},
|
||||||
|
{"hw.uuid", []_C_int{6, 18}},
|
||||||
|
{"hw.vendor", []_C_int{6, 14}},
|
||||||
|
{"hw.version", []_C_int{6, 16}},
|
||||||
|
{"kern.allowdt", []_C_int{1, 65}},
|
||||||
|
{"kern.allowkmem", []_C_int{1, 52}},
|
||||||
|
{"kern.argmax", []_C_int{1, 8}},
|
||||||
|
{"kern.audio", []_C_int{1, 84}},
|
||||||
|
{"kern.boottime", []_C_int{1, 21}},
|
||||||
|
{"kern.bufcachepercent", []_C_int{1, 72}},
|
||||||
|
{"kern.ccpu", []_C_int{1, 45}},
|
||||||
|
{"kern.clockrate", []_C_int{1, 12}},
|
||||||
|
{"kern.consbuf", []_C_int{1, 83}},
|
||||||
|
{"kern.consbufsize", []_C_int{1, 82}},
|
||||||
|
{"kern.consdev", []_C_int{1, 75}},
|
||||||
|
{"kern.cp_time", []_C_int{1, 40}},
|
||||||
|
{"kern.cp_time2", []_C_int{1, 71}},
|
||||||
|
{"kern.cpustats", []_C_int{1, 85}},
|
||||||
|
{"kern.domainname", []_C_int{1, 22}},
|
||||||
|
{"kern.file", []_C_int{1, 73}},
|
||||||
|
{"kern.forkstat", []_C_int{1, 42}},
|
||||||
|
{"kern.fscale", []_C_int{1, 46}},
|
||||||
|
{"kern.fsync", []_C_int{1, 33}},
|
||||||
|
{"kern.global_ptrace", []_C_int{1, 81}},
|
||||||
|
{"kern.hostid", []_C_int{1, 11}},
|
||||||
|
{"kern.hostname", []_C_int{1, 10}},
|
||||||
|
{"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
|
||||||
|
{"kern.job_control", []_C_int{1, 19}},
|
||||||
|
{"kern.malloc.buckets", []_C_int{1, 39, 1}},
|
||||||
|
{"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
|
||||||
|
{"kern.maxclusters", []_C_int{1, 67}},
|
||||||
|
{"kern.maxfiles", []_C_int{1, 7}},
|
||||||
|
{"kern.maxlocksperuid", []_C_int{1, 70}},
|
||||||
|
{"kern.maxpartitions", []_C_int{1, 23}},
|
||||||
|
{"kern.maxproc", []_C_int{1, 6}},
|
||||||
|
{"kern.maxthread", []_C_int{1, 25}},
|
||||||
|
{"kern.maxvnodes", []_C_int{1, 5}},
|
||||||
|
{"kern.mbstat", []_C_int{1, 59}},
|
||||||
|
{"kern.msgbuf", []_C_int{1, 48}},
|
||||||
|
{"kern.msgbufsize", []_C_int{1, 38}},
|
||||||
|
{"kern.nchstats", []_C_int{1, 41}},
|
||||||
|
{"kern.netlivelocks", []_C_int{1, 76}},
|
||||||
|
{"kern.nfiles", []_C_int{1, 56}},
|
||||||
|
{"kern.ngroups", []_C_int{1, 18}},
|
||||||
|
{"kern.nosuidcoredump", []_C_int{1, 32}},
|
||||||
|
{"kern.nprocs", []_C_int{1, 47}},
|
||||||
|
{"kern.nthreads", []_C_int{1, 26}},
|
||||||
|
{"kern.numvnodes", []_C_int{1, 58}},
|
||||||
|
{"kern.osrelease", []_C_int{1, 2}},
|
||||||
|
{"kern.osrevision", []_C_int{1, 3}},
|
||||||
|
{"kern.ostype", []_C_int{1, 1}},
|
||||||
|
{"kern.osversion", []_C_int{1, 27}},
|
||||||
|
{"kern.pfstatus", []_C_int{1, 86}},
|
||||||
|
{"kern.pool_debug", []_C_int{1, 77}},
|
||||||
|
{"kern.posix1version", []_C_int{1, 17}},
|
||||||
|
{"kern.proc", []_C_int{1, 66}},
|
||||||
|
{"kern.rawpartition", []_C_int{1, 24}},
|
||||||
|
{"kern.saved_ids", []_C_int{1, 20}},
|
||||||
|
{"kern.securelevel", []_C_int{1, 9}},
|
||||||
|
{"kern.seminfo", []_C_int{1, 61}},
|
||||||
|
{"kern.shminfo", []_C_int{1, 62}},
|
||||||
|
{"kern.somaxconn", []_C_int{1, 28}},
|
||||||
|
{"kern.sominconn", []_C_int{1, 29}},
|
||||||
|
{"kern.splassert", []_C_int{1, 54}},
|
||||||
|
{"kern.stackgap_random", []_C_int{1, 50}},
|
||||||
|
{"kern.sysvipc_info", []_C_int{1, 51}},
|
||||||
|
{"kern.sysvmsg", []_C_int{1, 34}},
|
||||||
|
{"kern.sysvsem", []_C_int{1, 35}},
|
||||||
|
{"kern.sysvshm", []_C_int{1, 36}},
|
||||||
|
{"kern.timecounter.choice", []_C_int{1, 69, 4}},
|
||||||
|
{"kern.timecounter.hardware", []_C_int{1, 69, 3}},
|
||||||
|
{"kern.timecounter.tick", []_C_int{1, 69, 1}},
|
||||||
|
{"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
|
||||||
|
{"kern.timeout_stats", []_C_int{1, 87}},
|
||||||
|
{"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
|
||||||
|
{"kern.tty.tk_nin", []_C_int{1, 44, 1}},
|
||||||
|
{"kern.tty.tk_nout", []_C_int{1, 44, 2}},
|
||||||
|
{"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
|
||||||
|
{"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
|
||||||
|
{"kern.ttycount", []_C_int{1, 57}},
|
||||||
|
{"kern.utc_offset", []_C_int{1, 88}},
|
||||||
|
{"kern.version", []_C_int{1, 4}},
|
||||||
|
{"kern.video", []_C_int{1, 89}},
|
||||||
|
{"kern.watchdog.auto", []_C_int{1, 64, 2}},
|
||||||
|
{"kern.watchdog.period", []_C_int{1, 64, 1}},
|
||||||
|
{"kern.witnesswatch", []_C_int{1, 53}},
|
||||||
|
{"kern.wxabort", []_C_int{1, 74}},
|
||||||
|
{"net.bpf.bufsize", []_C_int{4, 31, 1}},
|
||||||
|
{"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
|
||||||
|
{"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
|
||||||
|
{"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
|
||||||
|
{"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
|
||||||
|
{"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
|
||||||
|
{"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
|
||||||
|
{"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
|
||||||
|
{"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
|
||||||
|
{"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
|
||||||
|
{"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
|
||||||
|
{"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
|
||||||
|
{"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
|
||||||
|
{"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
|
||||||
|
{"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
|
||||||
|
{"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
|
||||||
|
{"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
|
||||||
|
{"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
|
||||||
|
{"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
|
||||||
|
{"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
|
||||||
|
{"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
|
||||||
|
{"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
|
||||||
|
{"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
|
||||||
|
{"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
|
||||||
|
{"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
|
||||||
|
{"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
|
||||||
|
{"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
|
||||||
|
{"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
|
||||||
|
{"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
|
||||||
|
{"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
|
||||||
|
{"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
|
||||||
|
{"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
|
||||||
|
{"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
|
||||||
|
{"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
|
||||||
|
{"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
|
||||||
|
{"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
|
||||||
|
{"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
|
||||||
|
{"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
|
||||||
|
{"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
|
||||||
|
{"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
|
||||||
|
{"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
|
||||||
|
{"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
|
||||||
|
{"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
|
||||||
|
{"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
|
||||||
|
{"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
|
||||||
|
{"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
|
||||||
|
{"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
|
||||||
|
{"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
|
||||||
|
{"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
|
||||||
|
{"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
|
||||||
|
{"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
|
||||||
|
{"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
|
||||||
|
{"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
|
||||||
|
{"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
|
||||||
|
{"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
|
||||||
|
{"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
|
||||||
|
{"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
|
||||||
|
{"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
|
||||||
|
{"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
|
||||||
|
{"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
|
||||||
|
{"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
|
||||||
|
{"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
|
||||||
|
{"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
|
||||||
|
{"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
|
||||||
|
{"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
|
||||||
|
{"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
|
||||||
|
{"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
|
||||||
|
{"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
|
||||||
|
{"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
|
||||||
|
{"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
|
||||||
|
{"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
|
||||||
|
{"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
|
||||||
|
{"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
|
||||||
|
{"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
|
||||||
|
{"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
|
||||||
|
{"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
|
||||||
|
{"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
|
||||||
|
{"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
|
||||||
|
{"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
|
||||||
|
{"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
|
||||||
|
{"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
|
||||||
|
{"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
|
||||||
|
{"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
|
||||||
|
{"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
|
||||||
|
{"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
|
||||||
|
{"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
|
||||||
|
{"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
|
||||||
|
{"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
|
||||||
|
{"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
|
||||||
|
{"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
|
||||||
|
{"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
|
||||||
|
{"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
|
||||||
|
{"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
|
||||||
|
{"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
|
||||||
|
{"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
|
||||||
|
{"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
|
||||||
|
{"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
|
||||||
|
{"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
|
||||||
|
{"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
|
||||||
|
{"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
|
||||||
|
{"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
|
||||||
|
{"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
|
||||||
|
{"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
|
||||||
|
{"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
|
||||||
|
{"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
|
||||||
|
{"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
|
||||||
|
{"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
|
||||||
|
{"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
|
||||||
|
{"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
|
||||||
|
{"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
|
||||||
|
{"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
|
||||||
|
{"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
|
||||||
|
{"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
|
||||||
|
{"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
|
||||||
|
{"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
|
||||||
|
{"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
|
||||||
|
{"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
|
||||||
|
{"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
|
||||||
|
{"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
|
||||||
|
{"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
|
||||||
|
{"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
|
||||||
|
{"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
|
||||||
|
{"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
|
||||||
|
{"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
|
||||||
|
{"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
|
||||||
|
{"net.key.sadb_dump", []_C_int{4, 30, 1}},
|
||||||
|
{"net.key.spd_dump", []_C_int{4, 30, 2}},
|
||||||
|
{"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
|
||||||
|
{"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
|
||||||
|
{"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
|
||||||
|
{"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
|
||||||
|
{"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
|
||||||
|
{"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
|
||||||
|
{"net.mpls.ttl", []_C_int{4, 33, 2}},
|
||||||
|
{"net.pflow.stats", []_C_int{4, 34, 1}},
|
||||||
|
{"net.pipex.enable", []_C_int{4, 35, 1}},
|
||||||
|
{"vm.anonmin", []_C_int{2, 7}},
|
||||||
|
{"vm.loadavg", []_C_int{2, 2}},
|
||||||
|
{"vm.malloc_conf", []_C_int{2, 12}},
|
||||||
|
{"vm.maxslp", []_C_int{2, 10}},
|
||||||
|
{"vm.nkmempages", []_C_int{2, 6}},
|
||||||
|
{"vm.psstrings", []_C_int{2, 3}},
|
||||||
|
{"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
|
||||||
|
{"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
|
||||||
|
{"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
|
||||||
|
{"vm.uspace", []_C_int{2, 11}},
|
||||||
|
{"vm.uvmexp", []_C_int{2, 4}},
|
||||||
|
{"vm.vmmeter", []_C_int{2, 1}},
|
||||||
|
{"vm.vnodemin", []_C_int{2, 9}},
|
||||||
|
{"vm.vtextmin", []_C_int{2, 8}},
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,282 @@
|
||||||
|
// go run mksysctl_openbsd.go
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build riscv64 && openbsd
|
||||||
|
// +build riscv64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
type mibentry struct {
|
||||||
|
ctlname string
|
||||||
|
ctloid []_C_int
|
||||||
|
}
|
||||||
|
|
||||||
|
var sysctlMib = []mibentry{
|
||||||
|
{"ddb.console", []_C_int{9, 6}},
|
||||||
|
{"ddb.log", []_C_int{9, 7}},
|
||||||
|
{"ddb.max_line", []_C_int{9, 3}},
|
||||||
|
{"ddb.max_width", []_C_int{9, 2}},
|
||||||
|
{"ddb.panic", []_C_int{9, 5}},
|
||||||
|
{"ddb.profile", []_C_int{9, 9}},
|
||||||
|
{"ddb.radix", []_C_int{9, 1}},
|
||||||
|
{"ddb.tab_stop_width", []_C_int{9, 4}},
|
||||||
|
{"ddb.trigger", []_C_int{9, 8}},
|
||||||
|
{"fs.posix.setuid", []_C_int{3, 1, 1}},
|
||||||
|
{"hw.allowpowerdown", []_C_int{6, 22}},
|
||||||
|
{"hw.byteorder", []_C_int{6, 4}},
|
||||||
|
{"hw.cpuspeed", []_C_int{6, 12}},
|
||||||
|
{"hw.diskcount", []_C_int{6, 10}},
|
||||||
|
{"hw.disknames", []_C_int{6, 8}},
|
||||||
|
{"hw.diskstats", []_C_int{6, 9}},
|
||||||
|
{"hw.machine", []_C_int{6, 1}},
|
||||||
|
{"hw.model", []_C_int{6, 2}},
|
||||||
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
|
{"hw.perfpolicy", []_C_int{6, 23}},
|
||||||
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
|
{"hw.power", []_C_int{6, 26}},
|
||||||
|
{"hw.product", []_C_int{6, 15}},
|
||||||
|
{"hw.serialno", []_C_int{6, 17}},
|
||||||
|
{"hw.setperf", []_C_int{6, 13}},
|
||||||
|
{"hw.smt", []_C_int{6, 24}},
|
||||||
|
{"hw.usermem", []_C_int{6, 20}},
|
||||||
|
{"hw.uuid", []_C_int{6, 18}},
|
||||||
|
{"hw.vendor", []_C_int{6, 14}},
|
||||||
|
{"hw.version", []_C_int{6, 16}},
|
||||||
|
{"kern.allowdt", []_C_int{1, 65}},
|
||||||
|
{"kern.allowkmem", []_C_int{1, 52}},
|
||||||
|
{"kern.argmax", []_C_int{1, 8}},
|
||||||
|
{"kern.audio", []_C_int{1, 84}},
|
||||||
|
{"kern.boottime", []_C_int{1, 21}},
|
||||||
|
{"kern.bufcachepercent", []_C_int{1, 72}},
|
||||||
|
{"kern.ccpu", []_C_int{1, 45}},
|
||||||
|
{"kern.clockrate", []_C_int{1, 12}},
|
||||||
|
{"kern.consbuf", []_C_int{1, 83}},
|
||||||
|
{"kern.consbufsize", []_C_int{1, 82}},
|
||||||
|
{"kern.consdev", []_C_int{1, 75}},
|
||||||
|
{"kern.cp_time", []_C_int{1, 40}},
|
||||||
|
{"kern.cp_time2", []_C_int{1, 71}},
|
||||||
|
{"kern.cpustats", []_C_int{1, 85}},
|
||||||
|
{"kern.domainname", []_C_int{1, 22}},
|
||||||
|
{"kern.file", []_C_int{1, 73}},
|
||||||
|
{"kern.forkstat", []_C_int{1, 42}},
|
||||||
|
{"kern.fscale", []_C_int{1, 46}},
|
||||||
|
{"kern.fsync", []_C_int{1, 33}},
|
||||||
|
{"kern.global_ptrace", []_C_int{1, 81}},
|
||||||
|
{"kern.hostid", []_C_int{1, 11}},
|
||||||
|
{"kern.hostname", []_C_int{1, 10}},
|
||||||
|
{"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
|
||||||
|
{"kern.job_control", []_C_int{1, 19}},
|
||||||
|
{"kern.malloc.buckets", []_C_int{1, 39, 1}},
|
||||||
|
{"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
|
||||||
|
{"kern.maxclusters", []_C_int{1, 67}},
|
||||||
|
{"kern.maxfiles", []_C_int{1, 7}},
|
||||||
|
{"kern.maxlocksperuid", []_C_int{1, 70}},
|
||||||
|
{"kern.maxpartitions", []_C_int{1, 23}},
|
||||||
|
{"kern.maxproc", []_C_int{1, 6}},
|
||||||
|
{"kern.maxthread", []_C_int{1, 25}},
|
||||||
|
{"kern.maxvnodes", []_C_int{1, 5}},
|
||||||
|
{"kern.mbstat", []_C_int{1, 59}},
|
||||||
|
{"kern.msgbuf", []_C_int{1, 48}},
|
||||||
|
{"kern.msgbufsize", []_C_int{1, 38}},
|
||||||
|
{"kern.nchstats", []_C_int{1, 41}},
|
||||||
|
{"kern.netlivelocks", []_C_int{1, 76}},
|
||||||
|
{"kern.nfiles", []_C_int{1, 56}},
|
||||||
|
{"kern.ngroups", []_C_int{1, 18}},
|
||||||
|
{"kern.nosuidcoredump", []_C_int{1, 32}},
|
||||||
|
{"kern.nprocs", []_C_int{1, 47}},
|
||||||
|
{"kern.nselcoll", []_C_int{1, 43}},
|
||||||
|
{"kern.nthreads", []_C_int{1, 26}},
|
||||||
|
{"kern.numvnodes", []_C_int{1, 58}},
|
||||||
|
{"kern.osrelease", []_C_int{1, 2}},
|
||||||
|
{"kern.osrevision", []_C_int{1, 3}},
|
||||||
|
{"kern.ostype", []_C_int{1, 1}},
|
||||||
|
{"kern.osversion", []_C_int{1, 27}},
|
||||||
|
{"kern.pfstatus", []_C_int{1, 86}},
|
||||||
|
{"kern.pool_debug", []_C_int{1, 77}},
|
||||||
|
{"kern.posix1version", []_C_int{1, 17}},
|
||||||
|
{"kern.proc", []_C_int{1, 66}},
|
||||||
|
{"kern.rawpartition", []_C_int{1, 24}},
|
||||||
|
{"kern.saved_ids", []_C_int{1, 20}},
|
||||||
|
{"kern.securelevel", []_C_int{1, 9}},
|
||||||
|
{"kern.seminfo", []_C_int{1, 61}},
|
||||||
|
{"kern.shminfo", []_C_int{1, 62}},
|
||||||
|
{"kern.somaxconn", []_C_int{1, 28}},
|
||||||
|
{"kern.sominconn", []_C_int{1, 29}},
|
||||||
|
{"kern.splassert", []_C_int{1, 54}},
|
||||||
|
{"kern.stackgap_random", []_C_int{1, 50}},
|
||||||
|
{"kern.sysvipc_info", []_C_int{1, 51}},
|
||||||
|
{"kern.sysvmsg", []_C_int{1, 34}},
|
||||||
|
{"kern.sysvsem", []_C_int{1, 35}},
|
||||||
|
{"kern.sysvshm", []_C_int{1, 36}},
|
||||||
|
{"kern.timecounter.choice", []_C_int{1, 69, 4}},
|
||||||
|
{"kern.timecounter.hardware", []_C_int{1, 69, 3}},
|
||||||
|
{"kern.timecounter.tick", []_C_int{1, 69, 1}},
|
||||||
|
{"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
|
||||||
|
{"kern.timeout_stats", []_C_int{1, 87}},
|
||||||
|
{"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
|
||||||
|
{"kern.tty.tk_nin", []_C_int{1, 44, 1}},
|
||||||
|
{"kern.tty.tk_nout", []_C_int{1, 44, 2}},
|
||||||
|
{"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
|
||||||
|
{"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
|
||||||
|
{"kern.ttycount", []_C_int{1, 57}},
|
||||||
|
{"kern.utc_offset", []_C_int{1, 88}},
|
||||||
|
{"kern.version", []_C_int{1, 4}},
|
||||||
|
{"kern.video", []_C_int{1, 89}},
|
||||||
|
{"kern.watchdog.auto", []_C_int{1, 64, 2}},
|
||||||
|
{"kern.watchdog.period", []_C_int{1, 64, 1}},
|
||||||
|
{"kern.witnesswatch", []_C_int{1, 53}},
|
||||||
|
{"kern.wxabort", []_C_int{1, 74}},
|
||||||
|
{"net.bpf.bufsize", []_C_int{4, 31, 1}},
|
||||||
|
{"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
|
||||||
|
{"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
|
||||||
|
{"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
|
||||||
|
{"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
|
||||||
|
{"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
|
||||||
|
{"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
|
||||||
|
{"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
|
||||||
|
{"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
|
||||||
|
{"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
|
||||||
|
{"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
|
||||||
|
{"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
|
||||||
|
{"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
|
||||||
|
{"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
|
||||||
|
{"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
|
||||||
|
{"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
|
||||||
|
{"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
|
||||||
|
{"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
|
||||||
|
{"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
|
||||||
|
{"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
|
||||||
|
{"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
|
||||||
|
{"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
|
||||||
|
{"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
|
||||||
|
{"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
|
||||||
|
{"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
|
||||||
|
{"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
|
||||||
|
{"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
|
||||||
|
{"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
|
||||||
|
{"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
|
||||||
|
{"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
|
||||||
|
{"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
|
||||||
|
{"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
|
||||||
|
{"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
|
||||||
|
{"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
|
||||||
|
{"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
|
||||||
|
{"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
|
||||||
|
{"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
|
||||||
|
{"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
|
||||||
|
{"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
|
||||||
|
{"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
|
||||||
|
{"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
|
||||||
|
{"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
|
||||||
|
{"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
|
||||||
|
{"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
|
||||||
|
{"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
|
||||||
|
{"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
|
||||||
|
{"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
|
||||||
|
{"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
|
||||||
|
{"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
|
||||||
|
{"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
|
||||||
|
{"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
|
||||||
|
{"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
|
||||||
|
{"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
|
||||||
|
{"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
|
||||||
|
{"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
|
||||||
|
{"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
|
||||||
|
{"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
|
||||||
|
{"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
|
||||||
|
{"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
|
||||||
|
{"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
|
||||||
|
{"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
|
||||||
|
{"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
|
||||||
|
{"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
|
||||||
|
{"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
|
||||||
|
{"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
|
||||||
|
{"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
|
||||||
|
{"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
|
||||||
|
{"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
|
||||||
|
{"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
|
||||||
|
{"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
|
||||||
|
{"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
|
||||||
|
{"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
|
||||||
|
{"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
|
||||||
|
{"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
|
||||||
|
{"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
|
||||||
|
{"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
|
||||||
|
{"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
|
||||||
|
{"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
|
||||||
|
{"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
|
||||||
|
{"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
|
||||||
|
{"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
|
||||||
|
{"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
|
||||||
|
{"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
|
||||||
|
{"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
|
||||||
|
{"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
|
||||||
|
{"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
|
||||||
|
{"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
|
||||||
|
{"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
|
||||||
|
{"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
|
||||||
|
{"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
|
||||||
|
{"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
|
||||||
|
{"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
|
||||||
|
{"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
|
||||||
|
{"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
|
||||||
|
{"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
|
||||||
|
{"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
|
||||||
|
{"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
|
||||||
|
{"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
|
||||||
|
{"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
|
||||||
|
{"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
|
||||||
|
{"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
|
||||||
|
{"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
|
||||||
|
{"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
|
||||||
|
{"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
|
||||||
|
{"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
|
||||||
|
{"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
|
||||||
|
{"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
|
||||||
|
{"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
|
||||||
|
{"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
|
||||||
|
{"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
|
||||||
|
{"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
|
||||||
|
{"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
|
||||||
|
{"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
|
||||||
|
{"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
|
||||||
|
{"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
|
||||||
|
{"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
|
||||||
|
{"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
|
||||||
|
{"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
|
||||||
|
{"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
|
||||||
|
{"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
|
||||||
|
{"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
|
||||||
|
{"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
|
||||||
|
{"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
|
||||||
|
{"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
|
||||||
|
{"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
|
||||||
|
{"net.key.sadb_dump", []_C_int{4, 30, 1}},
|
||||||
|
{"net.key.spd_dump", []_C_int{4, 30, 2}},
|
||||||
|
{"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
|
||||||
|
{"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
|
||||||
|
{"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
|
||||||
|
{"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
|
||||||
|
{"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
|
||||||
|
{"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
|
||||||
|
{"net.mpls.ttl", []_C_int{4, 33, 2}},
|
||||||
|
{"net.pflow.stats", []_C_int{4, 34, 1}},
|
||||||
|
{"net.pipex.enable", []_C_int{4, 35, 1}},
|
||||||
|
{"vm.anonmin", []_C_int{2, 7}},
|
||||||
|
{"vm.loadavg", []_C_int{2, 2}},
|
||||||
|
{"vm.malloc_conf", []_C_int{2, 12}},
|
||||||
|
{"vm.maxslp", []_C_int{2, 10}},
|
||||||
|
{"vm.nkmempages", []_C_int{2, 6}},
|
||||||
|
{"vm.psstrings", []_C_int{2, 3}},
|
||||||
|
{"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
|
||||||
|
{"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
|
||||||
|
{"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
|
||||||
|
{"vm.uspace", []_C_int{2, 11}},
|
||||||
|
{"vm.uvmexp", []_C_int{2, 4}},
|
||||||
|
{"vm.vmmeter", []_C_int{2, 1}},
|
||||||
|
{"vm.vnodemin", []_C_int{2, 9}},
|
||||||
|
{"vm.vtextmin", []_C_int{2, 8}},
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,218 @@
|
||||||
|
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ppc64 && openbsd
|
||||||
|
// +build ppc64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
const (
|
||||||
|
SYS_EXIT = 1 // { void sys_exit(int rval); }
|
||||||
|
SYS_FORK = 2 // { int sys_fork(void); }
|
||||||
|
SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
|
||||||
|
SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
|
||||||
|
SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
|
||||||
|
SYS_CLOSE = 6 // { int sys_close(int fd); }
|
||||||
|
SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
|
||||||
|
SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
|
||||||
|
SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
|
||||||
|
SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
|
||||||
|
SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
|
||||||
|
SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
|
||||||
|
SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
|
||||||
|
SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
|
||||||
|
SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
|
||||||
|
SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
|
||||||
|
SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
|
||||||
|
SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
|
||||||
|
SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
|
||||||
|
SYS_GETPID = 20 // { pid_t sys_getpid(void); }
|
||||||
|
SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
|
||||||
|
SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
|
||||||
|
SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
|
||||||
|
SYS_GETUID = 24 // { uid_t sys_getuid(void); }
|
||||||
|
SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
|
||||||
|
SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
|
||||||
|
SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
|
||||||
|
SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
|
||||||
|
SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
|
||||||
|
SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
|
||||||
|
SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||||
|
SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||||
|
SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
|
||||||
|
SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
|
||||||
|
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
|
||||||
|
SYS_SYNC = 36 // { void sys_sync(void); }
|
||||||
|
SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
|
||||||
|
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
|
||||||
|
SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
|
||||||
|
SYS_DUP = 41 // { int sys_dup(int fd); }
|
||||||
|
SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
|
||||||
|
SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
|
||||||
|
SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
|
||||||
|
SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
|
||||||
|
SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
|
||||||
|
SYS_GETGID = 47 // { gid_t sys_getgid(void); }
|
||||||
|
SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
|
||||||
|
SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
|
||||||
|
SYS_ACCT = 51 // { int sys_acct(const char *path); }
|
||||||
|
SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
|
||||||
|
SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
|
||||||
|
SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
|
||||||
|
SYS_REBOOT = 55 // { int sys_reboot(int opt); }
|
||||||
|
SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
|
||||||
|
SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
|
||||||
|
SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
|
||||||
|
SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
|
||||||
|
SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
|
||||||
|
SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
|
||||||
|
SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
|
||||||
|
SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
|
||||||
|
SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
|
||||||
|
SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
|
||||||
|
SYS_VFORK = 66 // { int sys_vfork(void); }
|
||||||
|
SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
|
||||||
|
SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
|
||||||
|
SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
|
||||||
|
SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
|
||||||
|
SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
|
||||||
|
SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||||
|
SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
|
||||||
|
SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
|
||||||
|
SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
|
||||||
|
SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
|
||||||
|
SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
|
||||||
|
SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
|
||||||
|
SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
|
||||||
|
SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
|
||||||
|
SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
|
||||||
|
SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
|
||||||
|
SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
|
||||||
|
SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
|
||||||
|
SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
|
||||||
|
SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||||
|
SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||||
|
SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||||
|
SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
|
||||||
|
SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||||
|
SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
|
||||||
|
SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
|
||||||
|
SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
|
||||||
|
SYS_FSYNC = 95 // { int sys_fsync(int fd); }
|
||||||
|
SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
|
||||||
|
SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
|
||||||
|
SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||||
|
SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
|
||||||
|
SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
|
||||||
|
SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
|
||||||
|
SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
|
||||||
|
SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
|
||||||
|
SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||||
|
SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
|
||||||
|
SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
|
||||||
|
SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
|
||||||
|
SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
|
||||||
|
SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
|
||||||
|
SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
|
||||||
|
SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
|
||||||
|
SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
|
||||||
|
SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
|
||||||
|
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
|
||||||
|
SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
|
||||||
|
SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
|
||||||
|
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
|
||||||
|
SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
|
||||||
|
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
|
||||||
|
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
|
||||||
|
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
|
||||||
|
SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
|
||||||
|
SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
|
||||||
|
SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
|
||||||
|
SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
|
||||||
|
SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
|
||||||
|
SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
|
||||||
|
SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
|
||||||
|
SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
|
||||||
|
SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
|
||||||
|
SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
|
||||||
|
SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
|
||||||
|
SYS_SETSID = 147 // { int sys_setsid(void); }
|
||||||
|
SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
|
||||||
|
SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
|
||||||
|
SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
|
||||||
|
SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
|
||||||
|
SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
|
||||||
|
SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
|
||||||
|
SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
|
||||||
|
SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
|
||||||
|
SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
|
||||||
|
SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
|
||||||
|
SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
|
||||||
|
SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
|
||||||
|
SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
|
||||||
|
SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
|
||||||
|
SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
|
||||||
|
SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
|
||||||
|
SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
|
||||||
|
SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
|
||||||
|
SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
|
||||||
|
SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
|
||||||
|
SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
|
||||||
|
SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
|
||||||
|
SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
|
||||||
|
SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
|
||||||
|
SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
|
||||||
|
SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
|
||||||
|
SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||||
|
SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||||
|
SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
|
||||||
|
SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
|
||||||
|
SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||||
|
SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
|
||||||
|
SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||||
|
SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
|
||||||
|
SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
|
||||||
|
SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
|
||||||
|
SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
|
||||||
|
SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
|
||||||
|
SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
|
||||||
|
SYS_KQUEUE = 269 // { int sys_kqueue(void); }
|
||||||
|
SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
|
||||||
|
SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
|
||||||
|
SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||||
|
SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||||
|
SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||||
|
SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||||
|
SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
|
||||||
|
SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
|
||||||
|
SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
|
||||||
|
SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
|
||||||
|
SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||||
|
SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
|
||||||
|
SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
|
||||||
|
SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
|
||||||
|
SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
|
||||||
|
SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
|
||||||
|
SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
|
||||||
|
SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
|
||||||
|
SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
|
||||||
|
SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
|
||||||
|
SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
|
||||||
|
SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
|
||||||
|
SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
|
||||||
|
SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
|
||||||
|
SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
|
||||||
|
SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
|
||||||
|
SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
|
||||||
|
SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
|
||||||
|
SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
|
||||||
|
SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
|
||||||
|
SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
|
||||||
|
SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
|
||||||
|
SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
|
||||||
|
SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
|
||||||
|
SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
|
||||||
|
SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
|
||||||
|
SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
|
||||||
|
SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,219 @@
|
||||||
|
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build riscv64 && openbsd
|
||||||
|
// +build riscv64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
// Deprecated: Use libc wrappers instead of direct syscalls.
|
||||||
|
const (
|
||||||
|
SYS_EXIT = 1 // { void sys_exit(int rval); }
|
||||||
|
SYS_FORK = 2 // { int sys_fork(void); }
|
||||||
|
SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
|
||||||
|
SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
|
||||||
|
SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
|
||||||
|
SYS_CLOSE = 6 // { int sys_close(int fd); }
|
||||||
|
SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
|
||||||
|
SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
|
||||||
|
SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
|
||||||
|
SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
|
||||||
|
SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
|
||||||
|
SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
|
||||||
|
SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
|
||||||
|
SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
|
||||||
|
SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
|
||||||
|
SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
|
||||||
|
SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
|
||||||
|
SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
|
||||||
|
SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
|
||||||
|
SYS_GETPID = 20 // { pid_t sys_getpid(void); }
|
||||||
|
SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
|
||||||
|
SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
|
||||||
|
SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
|
||||||
|
SYS_GETUID = 24 // { uid_t sys_getuid(void); }
|
||||||
|
SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
|
||||||
|
SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
|
||||||
|
SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
|
||||||
|
SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
|
||||||
|
SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
|
||||||
|
SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
|
||||||
|
SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||||
|
SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||||
|
SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
|
||||||
|
SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
|
||||||
|
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
|
||||||
|
SYS_SYNC = 36 // { void sys_sync(void); }
|
||||||
|
SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
|
||||||
|
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
|
||||||
|
SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
|
||||||
|
SYS_DUP = 41 // { int sys_dup(int fd); }
|
||||||
|
SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
|
||||||
|
SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
|
||||||
|
SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
|
||||||
|
SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
|
||||||
|
SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
|
||||||
|
SYS_GETGID = 47 // { gid_t sys_getgid(void); }
|
||||||
|
SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
|
||||||
|
SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
|
||||||
|
SYS_ACCT = 51 // { int sys_acct(const char *path); }
|
||||||
|
SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
|
||||||
|
SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
|
||||||
|
SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
|
||||||
|
SYS_REBOOT = 55 // { int sys_reboot(int opt); }
|
||||||
|
SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
|
||||||
|
SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
|
||||||
|
SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
|
||||||
|
SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
|
||||||
|
SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
|
||||||
|
SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
|
||||||
|
SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
|
||||||
|
SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
|
||||||
|
SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
|
||||||
|
SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
|
||||||
|
SYS_VFORK = 66 // { int sys_vfork(void); }
|
||||||
|
SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
|
||||||
|
SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
|
||||||
|
SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
|
||||||
|
SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
|
||||||
|
SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
|
||||||
|
SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||||
|
SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
|
||||||
|
SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
|
||||||
|
SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
|
||||||
|
SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
|
||||||
|
SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
|
||||||
|
SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
|
||||||
|
SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
|
||||||
|
SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
|
||||||
|
SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
|
||||||
|
SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
|
||||||
|
SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
|
||||||
|
SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
|
||||||
|
SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
|
||||||
|
SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||||
|
SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||||
|
SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||||
|
SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
|
||||||
|
SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||||
|
SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
|
||||||
|
SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
|
||||||
|
SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
|
||||||
|
SYS_FSYNC = 95 // { int sys_fsync(int fd); }
|
||||||
|
SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
|
||||||
|
SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
|
||||||
|
SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||||
|
SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
|
||||||
|
SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
|
||||||
|
SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
|
||||||
|
SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
|
||||||
|
SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
|
||||||
|
SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||||
|
SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
|
||||||
|
SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
|
||||||
|
SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
|
||||||
|
SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
|
||||||
|
SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
|
||||||
|
SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
|
||||||
|
SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
|
||||||
|
SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
|
||||||
|
SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
|
||||||
|
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
|
||||||
|
SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
|
||||||
|
SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
|
||||||
|
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
|
||||||
|
SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
|
||||||
|
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
|
||||||
|
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
|
||||||
|
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
|
||||||
|
SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
|
||||||
|
SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
|
||||||
|
SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
|
||||||
|
SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
|
||||||
|
SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
|
||||||
|
SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
|
||||||
|
SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
|
||||||
|
SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
|
||||||
|
SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
|
||||||
|
SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
|
||||||
|
SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
|
||||||
|
SYS_SETSID = 147 // { int sys_setsid(void); }
|
||||||
|
SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
|
||||||
|
SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
|
||||||
|
SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
|
||||||
|
SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
|
||||||
|
SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
|
||||||
|
SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
|
||||||
|
SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
|
||||||
|
SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
|
||||||
|
SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
|
||||||
|
SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
|
||||||
|
SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
|
||||||
|
SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
|
||||||
|
SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
|
||||||
|
SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
|
||||||
|
SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
|
||||||
|
SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
|
||||||
|
SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
|
||||||
|
SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
|
||||||
|
SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
|
||||||
|
SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
|
||||||
|
SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
|
||||||
|
SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
|
||||||
|
SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
|
||||||
|
SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
|
||||||
|
SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
|
||||||
|
SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
|
||||||
|
SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||||
|
SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||||
|
SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
|
||||||
|
SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
|
||||||
|
SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||||
|
SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
|
||||||
|
SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||||
|
SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
|
||||||
|
SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
|
||||||
|
SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
|
||||||
|
SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
|
||||||
|
SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
|
||||||
|
SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
|
||||||
|
SYS_KQUEUE = 269 // { int sys_kqueue(void); }
|
||||||
|
SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
|
||||||
|
SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
|
||||||
|
SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||||
|
SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||||
|
SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||||
|
SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||||
|
SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
|
||||||
|
SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
|
||||||
|
SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
|
||||||
|
SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
|
||||||
|
SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||||
|
SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
|
||||||
|
SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
|
||||||
|
SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
|
||||||
|
SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
|
||||||
|
SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
|
||||||
|
SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
|
||||||
|
SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
|
||||||
|
SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
|
||||||
|
SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
|
||||||
|
SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
|
||||||
|
SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
|
||||||
|
SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
|
||||||
|
SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
|
||||||
|
SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
|
||||||
|
SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
|
||||||
|
SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
|
||||||
|
SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
|
||||||
|
SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
|
||||||
|
SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
|
||||||
|
SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
|
||||||
|
SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
|
||||||
|
SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
|
||||||
|
SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
|
||||||
|
SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
|
||||||
|
SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
|
||||||
|
SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
|
||||||
|
SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
|
||||||
|
)
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
// cgo -godefs types_illumos.go | go run mkpost.go
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
//go:build amd64 && illumos
|
|
||||||
// +build amd64,illumos
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
TUNNEWPPA = 0x540001
|
|
||||||
TUNSETPPA = 0x540002
|
|
||||||
|
|
||||||
I_STR = 0x5308
|
|
||||||
I_POP = 0x5303
|
|
||||||
I_PUSH = 0x5302
|
|
||||||
I_LINK = 0x530c
|
|
||||||
I_UNLINK = 0x530d
|
|
||||||
I_PLINK = 0x5316
|
|
||||||
I_PUNLINK = 0x5317
|
|
||||||
|
|
||||||
IF_UNITSEL = -0x7ffb8cca
|
|
||||||
)
|
|
||||||
|
|
||||||
type strbuf struct {
|
|
||||||
Maxlen int32
|
|
||||||
Len int32
|
|
||||||
Buf *int8
|
|
||||||
}
|
|
||||||
|
|
||||||
type Strioctl struct {
|
|
||||||
Cmd int32
|
|
||||||
Timout int32
|
|
||||||
Len int32
|
|
||||||
Dp *int8
|
|
||||||
}
|
|
||||||
|
|
||||||
type Lifreq struct {
|
|
||||||
Name [32]int8
|
|
||||||
Lifru1 [4]byte
|
|
||||||
Type uint32
|
|
||||||
Lifru [336]byte
|
|
||||||
}
|
|
||||||
|
|
@ -254,6 +254,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -249,6 +249,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x1
|
||||||
|
SIG_UNBLOCK = 0x2
|
||||||
|
SIG_SETMASK = 0x3
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Code int32
|
Code int32
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x1
|
||||||
|
SIG_UNBLOCK = 0x2
|
||||||
|
SIG_SETMASK = 0x3
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Code int32
|
Code int32
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x1
|
||||||
|
SIG_UNBLOCK = 0x2
|
||||||
|
SIG_SETMASK = 0x3
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Code int32
|
Code int32
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x80
|
const _C__NSIG = 0x80
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x1
|
||||||
|
SIG_UNBLOCK = 0x2
|
||||||
|
SIG_SETMASK = 0x3
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Code int32
|
Code int32
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x0
|
||||||
|
SIG_UNBLOCK = 0x1
|
||||||
|
SIG_SETMASK = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,12 @@ type Sigset_t struct {
|
||||||
|
|
||||||
const _C__NSIG = 0x41
|
const _C__NSIG = 0x41
|
||||||
|
|
||||||
|
const (
|
||||||
|
SIG_BLOCK = 0x1
|
||||||
|
SIG_UNBLOCK = 0x2
|
||||||
|
SIG_SETMASK = 0x4
|
||||||
|
)
|
||||||
|
|
||||||
type Siginfo struct {
|
type Siginfo struct {
|
||||||
Signo int32
|
Signo int32
|
||||||
Errno int32
|
Errno int32
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,571 @@
|
||||||
|
// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ppc64 && openbsd
|
||||||
|
// +build ppc64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofPtr = 0x8
|
||||||
|
SizeofShort = 0x2
|
||||||
|
SizeofInt = 0x4
|
||||||
|
SizeofLong = 0x8
|
||||||
|
SizeofLongLong = 0x8
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
_C_short int16
|
||||||
|
_C_int int32
|
||||||
|
_C_long int64
|
||||||
|
_C_long_long int64
|
||||||
|
)
|
||||||
|
|
||||||
|
type Timespec struct {
|
||||||
|
Sec int64
|
||||||
|
Nsec int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Timeval struct {
|
||||||
|
Sec int64
|
||||||
|
Usec int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Rusage struct {
|
||||||
|
Utime Timeval
|
||||||
|
Stime Timeval
|
||||||
|
Maxrss int64
|
||||||
|
Ixrss int64
|
||||||
|
Idrss int64
|
||||||
|
Isrss int64
|
||||||
|
Minflt int64
|
||||||
|
Majflt int64
|
||||||
|
Nswap int64
|
||||||
|
Inblock int64
|
||||||
|
Oublock int64
|
||||||
|
Msgsnd int64
|
||||||
|
Msgrcv int64
|
||||||
|
Nsignals int64
|
||||||
|
Nvcsw int64
|
||||||
|
Nivcsw int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Rlimit struct {
|
||||||
|
Cur uint64
|
||||||
|
Max uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
type _Gid_t uint32
|
||||||
|
|
||||||
|
type Stat_t struct {
|
||||||
|
Mode uint32
|
||||||
|
Dev int32
|
||||||
|
Ino uint64
|
||||||
|
Nlink uint32
|
||||||
|
Uid uint32
|
||||||
|
Gid uint32
|
||||||
|
Rdev int32
|
||||||
|
Atim Timespec
|
||||||
|
Mtim Timespec
|
||||||
|
Ctim Timespec
|
||||||
|
Size int64
|
||||||
|
Blocks int64
|
||||||
|
Blksize int32
|
||||||
|
Flags uint32
|
||||||
|
Gen uint32
|
||||||
|
_ Timespec
|
||||||
|
}
|
||||||
|
|
||||||
|
type Statfs_t struct {
|
||||||
|
F_flags uint32
|
||||||
|
F_bsize uint32
|
||||||
|
F_iosize uint32
|
||||||
|
F_blocks uint64
|
||||||
|
F_bfree uint64
|
||||||
|
F_bavail int64
|
||||||
|
F_files uint64
|
||||||
|
F_ffree uint64
|
||||||
|
F_favail int64
|
||||||
|
F_syncwrites uint64
|
||||||
|
F_syncreads uint64
|
||||||
|
F_asyncwrites uint64
|
||||||
|
F_asyncreads uint64
|
||||||
|
F_fsid Fsid
|
||||||
|
F_namemax uint32
|
||||||
|
F_owner uint32
|
||||||
|
F_ctime uint64
|
||||||
|
F_fstypename [16]byte
|
||||||
|
F_mntonname [90]byte
|
||||||
|
F_mntfromname [90]byte
|
||||||
|
F_mntfromspec [90]byte
|
||||||
|
_ [2]byte
|
||||||
|
Mount_info [160]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type Flock_t struct {
|
||||||
|
Start int64
|
||||||
|
Len int64
|
||||||
|
Pid int32
|
||||||
|
Type int16
|
||||||
|
Whence int16
|
||||||
|
}
|
||||||
|
|
||||||
|
type Dirent struct {
|
||||||
|
Fileno uint64
|
||||||
|
Off int64
|
||||||
|
Reclen uint16
|
||||||
|
Type uint8
|
||||||
|
Namlen uint8
|
||||||
|
_ [4]uint8
|
||||||
|
Name [256]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type Fsid struct {
|
||||||
|
Val [2]int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
PathMax = 0x400
|
||||||
|
)
|
||||||
|
|
||||||
|
type RawSockaddrInet4 struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Port uint16
|
||||||
|
Addr [4]byte /* in_addr */
|
||||||
|
Zero [8]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrInet6 struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Port uint16
|
||||||
|
Flowinfo uint32
|
||||||
|
Addr [16]byte /* in6_addr */
|
||||||
|
Scope_id uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrUnix struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Path [104]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrDatalink struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Index uint16
|
||||||
|
Type uint8
|
||||||
|
Nlen uint8
|
||||||
|
Alen uint8
|
||||||
|
Slen uint8
|
||||||
|
Data [24]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddr struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Data [14]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrAny struct {
|
||||||
|
Addr RawSockaddr
|
||||||
|
Pad [92]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type _Socklen uint32
|
||||||
|
|
||||||
|
type Linger struct {
|
||||||
|
Onoff int32
|
||||||
|
Linger int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Iovec struct {
|
||||||
|
Base *byte
|
||||||
|
Len uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
type IPMreq struct {
|
||||||
|
Multiaddr [4]byte /* in_addr */
|
||||||
|
Interface [4]byte /* in_addr */
|
||||||
|
}
|
||||||
|
|
||||||
|
type IPv6Mreq struct {
|
||||||
|
Multiaddr [16]byte /* in6_addr */
|
||||||
|
Interface uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Msghdr struct {
|
||||||
|
Name *byte
|
||||||
|
Namelen uint32
|
||||||
|
Iov *Iovec
|
||||||
|
Iovlen uint32
|
||||||
|
Control *byte
|
||||||
|
Controllen uint32
|
||||||
|
Flags int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Cmsghdr struct {
|
||||||
|
Len uint32
|
||||||
|
Level int32
|
||||||
|
Type int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Inet6Pktinfo struct {
|
||||||
|
Addr [16]byte /* in6_addr */
|
||||||
|
Ifindex uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type IPv6MTUInfo struct {
|
||||||
|
Addr RawSockaddrInet6
|
||||||
|
Mtu uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type ICMPv6Filter struct {
|
||||||
|
Filt [8]uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofSockaddrInet4 = 0x10
|
||||||
|
SizeofSockaddrInet6 = 0x1c
|
||||||
|
SizeofSockaddrAny = 0x6c
|
||||||
|
SizeofSockaddrUnix = 0x6a
|
||||||
|
SizeofSockaddrDatalink = 0x20
|
||||||
|
SizeofLinger = 0x8
|
||||||
|
SizeofIovec = 0x10
|
||||||
|
SizeofIPMreq = 0x8
|
||||||
|
SizeofIPv6Mreq = 0x14
|
||||||
|
SizeofMsghdr = 0x30
|
||||||
|
SizeofCmsghdr = 0xc
|
||||||
|
SizeofInet6Pktinfo = 0x14
|
||||||
|
SizeofIPv6MTUInfo = 0x20
|
||||||
|
SizeofICMPv6Filter = 0x20
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
PTRACE_TRACEME = 0x0
|
||||||
|
PTRACE_CONT = 0x7
|
||||||
|
PTRACE_KILL = 0x8
|
||||||
|
)
|
||||||
|
|
||||||
|
type Kevent_t struct {
|
||||||
|
Ident uint64
|
||||||
|
Filter int16
|
||||||
|
Flags uint16
|
||||||
|
Fflags uint32
|
||||||
|
Data int64
|
||||||
|
Udata *byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type FdSet struct {
|
||||||
|
Bits [32]uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofIfMsghdr = 0xa8
|
||||||
|
SizeofIfData = 0x90
|
||||||
|
SizeofIfaMsghdr = 0x18
|
||||||
|
SizeofIfAnnounceMsghdr = 0x1a
|
||||||
|
SizeofRtMsghdr = 0x60
|
||||||
|
SizeofRtMetrics = 0x38
|
||||||
|
)
|
||||||
|
|
||||||
|
type IfMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
Tableid uint16
|
||||||
|
Pad1 uint8
|
||||||
|
Pad2 uint8
|
||||||
|
Addrs int32
|
||||||
|
Flags int32
|
||||||
|
Xflags int32
|
||||||
|
Data IfData
|
||||||
|
}
|
||||||
|
|
||||||
|
type IfData struct {
|
||||||
|
Type uint8
|
||||||
|
Addrlen uint8
|
||||||
|
Hdrlen uint8
|
||||||
|
Link_state uint8
|
||||||
|
Mtu uint32
|
||||||
|
Metric uint32
|
||||||
|
Rdomain uint32
|
||||||
|
Baudrate uint64
|
||||||
|
Ipackets uint64
|
||||||
|
Ierrors uint64
|
||||||
|
Opackets uint64
|
||||||
|
Oerrors uint64
|
||||||
|
Collisions uint64
|
||||||
|
Ibytes uint64
|
||||||
|
Obytes uint64
|
||||||
|
Imcasts uint64
|
||||||
|
Omcasts uint64
|
||||||
|
Iqdrops uint64
|
||||||
|
Oqdrops uint64
|
||||||
|
Noproto uint64
|
||||||
|
Capabilities uint32
|
||||||
|
Lastchange Timeval
|
||||||
|
}
|
||||||
|
|
||||||
|
type IfaMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
Tableid uint16
|
||||||
|
Pad1 uint8
|
||||||
|
Pad2 uint8
|
||||||
|
Addrs int32
|
||||||
|
Flags int32
|
||||||
|
Metric int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type IfAnnounceMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
What uint16
|
||||||
|
Name [16]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RtMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
Tableid uint16
|
||||||
|
Priority uint8
|
||||||
|
Mpls uint8
|
||||||
|
Addrs int32
|
||||||
|
Flags int32
|
||||||
|
Fmask int32
|
||||||
|
Pid int32
|
||||||
|
Seq int32
|
||||||
|
Errno int32
|
||||||
|
Inits uint32
|
||||||
|
Rmx RtMetrics
|
||||||
|
}
|
||||||
|
|
||||||
|
type RtMetrics struct {
|
||||||
|
Pksent uint64
|
||||||
|
Expire int64
|
||||||
|
Locks uint32
|
||||||
|
Mtu uint32
|
||||||
|
Refcnt uint32
|
||||||
|
Hopcount uint32
|
||||||
|
Recvpipe uint32
|
||||||
|
Sendpipe uint32
|
||||||
|
Ssthresh uint32
|
||||||
|
Rtt uint32
|
||||||
|
Rttvar uint32
|
||||||
|
Pad uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Mclpool struct{}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofBpfVersion = 0x4
|
||||||
|
SizeofBpfStat = 0x8
|
||||||
|
SizeofBpfProgram = 0x10
|
||||||
|
SizeofBpfInsn = 0x8
|
||||||
|
SizeofBpfHdr = 0x18
|
||||||
|
)
|
||||||
|
|
||||||
|
type BpfVersion struct {
|
||||||
|
Major uint16
|
||||||
|
Minor uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfStat struct {
|
||||||
|
Recv uint32
|
||||||
|
Drop uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfProgram struct {
|
||||||
|
Len uint32
|
||||||
|
Insns *BpfInsn
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfInsn struct {
|
||||||
|
Code uint16
|
||||||
|
Jt uint8
|
||||||
|
Jf uint8
|
||||||
|
K uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfHdr struct {
|
||||||
|
Tstamp BpfTimeval
|
||||||
|
Caplen uint32
|
||||||
|
Datalen uint32
|
||||||
|
Hdrlen uint16
|
||||||
|
Ifidx uint16
|
||||||
|
Flowid uint16
|
||||||
|
Flags uint8
|
||||||
|
Drops uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfTimeval struct {
|
||||||
|
Sec uint32
|
||||||
|
Usec uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Termios struct {
|
||||||
|
Iflag uint32
|
||||||
|
Oflag uint32
|
||||||
|
Cflag uint32
|
||||||
|
Lflag uint32
|
||||||
|
Cc [20]uint8
|
||||||
|
Ispeed int32
|
||||||
|
Ospeed int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Winsize struct {
|
||||||
|
Row uint16
|
||||||
|
Col uint16
|
||||||
|
Xpixel uint16
|
||||||
|
Ypixel uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
AT_FDCWD = -0x64
|
||||||
|
AT_EACCESS = 0x1
|
||||||
|
AT_SYMLINK_NOFOLLOW = 0x2
|
||||||
|
AT_SYMLINK_FOLLOW = 0x4
|
||||||
|
AT_REMOVEDIR = 0x8
|
||||||
|
)
|
||||||
|
|
||||||
|
type PollFd struct {
|
||||||
|
Fd int32
|
||||||
|
Events int16
|
||||||
|
Revents int16
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
POLLERR = 0x8
|
||||||
|
POLLHUP = 0x10
|
||||||
|
POLLIN = 0x1
|
||||||
|
POLLNVAL = 0x20
|
||||||
|
POLLOUT = 0x4
|
||||||
|
POLLPRI = 0x2
|
||||||
|
POLLRDBAND = 0x80
|
||||||
|
POLLRDNORM = 0x40
|
||||||
|
POLLWRBAND = 0x100
|
||||||
|
POLLWRNORM = 0x4
|
||||||
|
)
|
||||||
|
|
||||||
|
type Sigset_t uint32
|
||||||
|
|
||||||
|
type Utsname struct {
|
||||||
|
Sysname [256]byte
|
||||||
|
Nodename [256]byte
|
||||||
|
Release [256]byte
|
||||||
|
Version [256]byte
|
||||||
|
Machine [256]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
const SizeofUvmexp = 0x158
|
||||||
|
|
||||||
|
type Uvmexp struct {
|
||||||
|
Pagesize int32
|
||||||
|
Pagemask int32
|
||||||
|
Pageshift int32
|
||||||
|
Npages int32
|
||||||
|
Free int32
|
||||||
|
Active int32
|
||||||
|
Inactive int32
|
||||||
|
Paging int32
|
||||||
|
Wired int32
|
||||||
|
Zeropages int32
|
||||||
|
Reserve_pagedaemon int32
|
||||||
|
Reserve_kernel int32
|
||||||
|
Unused01 int32
|
||||||
|
Vnodepages int32
|
||||||
|
Vtextpages int32
|
||||||
|
Freemin int32
|
||||||
|
Freetarg int32
|
||||||
|
Inactarg int32
|
||||||
|
Wiredmax int32
|
||||||
|
Anonmin int32
|
||||||
|
Vtextmin int32
|
||||||
|
Vnodemin int32
|
||||||
|
Anonminpct int32
|
||||||
|
Vtextminpct int32
|
||||||
|
Vnodeminpct int32
|
||||||
|
Nswapdev int32
|
||||||
|
Swpages int32
|
||||||
|
Swpginuse int32
|
||||||
|
Swpgonly int32
|
||||||
|
Nswget int32
|
||||||
|
Nanon int32
|
||||||
|
Unused05 int32
|
||||||
|
Unused06 int32
|
||||||
|
Faults int32
|
||||||
|
Traps int32
|
||||||
|
Intrs int32
|
||||||
|
Swtch int32
|
||||||
|
Softs int32
|
||||||
|
Syscalls int32
|
||||||
|
Pageins int32
|
||||||
|
Unused07 int32
|
||||||
|
Unused08 int32
|
||||||
|
Pgswapin int32
|
||||||
|
Pgswapout int32
|
||||||
|
Forks int32
|
||||||
|
Forks_ppwait int32
|
||||||
|
Forks_sharevm int32
|
||||||
|
Pga_zerohit int32
|
||||||
|
Pga_zeromiss int32
|
||||||
|
Unused09 int32
|
||||||
|
Fltnoram int32
|
||||||
|
Fltnoanon int32
|
||||||
|
Fltnoamap int32
|
||||||
|
Fltpgwait int32
|
||||||
|
Fltpgrele int32
|
||||||
|
Fltrelck int32
|
||||||
|
Fltrelckok int32
|
||||||
|
Fltanget int32
|
||||||
|
Fltanretry int32
|
||||||
|
Fltamcopy int32
|
||||||
|
Fltnamap int32
|
||||||
|
Fltnomap int32
|
||||||
|
Fltlget int32
|
||||||
|
Fltget int32
|
||||||
|
Flt_anon int32
|
||||||
|
Flt_acow int32
|
||||||
|
Flt_obj int32
|
||||||
|
Flt_prcopy int32
|
||||||
|
Flt_przero int32
|
||||||
|
Pdwoke int32
|
||||||
|
Pdrevs int32
|
||||||
|
Pdswout int32
|
||||||
|
Pdfreed int32
|
||||||
|
Pdscans int32
|
||||||
|
Pdanscan int32
|
||||||
|
Pdobscan int32
|
||||||
|
Pdreact int32
|
||||||
|
Pdbusy int32
|
||||||
|
Pdpageouts int32
|
||||||
|
Pdpending int32
|
||||||
|
Pddeact int32
|
||||||
|
Unused11 int32
|
||||||
|
Unused12 int32
|
||||||
|
Unused13 int32
|
||||||
|
Fpswtch int32
|
||||||
|
Kmapent int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const SizeofClockinfo = 0x10
|
||||||
|
|
||||||
|
type Clockinfo struct {
|
||||||
|
Hz int32
|
||||||
|
Tick int32
|
||||||
|
Stathz int32
|
||||||
|
Profhz int32
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,571 @@
|
||||||
|
// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build riscv64 && openbsd
|
||||||
|
// +build riscv64,openbsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofPtr = 0x8
|
||||||
|
SizeofShort = 0x2
|
||||||
|
SizeofInt = 0x4
|
||||||
|
SizeofLong = 0x8
|
||||||
|
SizeofLongLong = 0x8
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
_C_short int16
|
||||||
|
_C_int int32
|
||||||
|
_C_long int64
|
||||||
|
_C_long_long int64
|
||||||
|
)
|
||||||
|
|
||||||
|
type Timespec struct {
|
||||||
|
Sec int64
|
||||||
|
Nsec int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Timeval struct {
|
||||||
|
Sec int64
|
||||||
|
Usec int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Rusage struct {
|
||||||
|
Utime Timeval
|
||||||
|
Stime Timeval
|
||||||
|
Maxrss int64
|
||||||
|
Ixrss int64
|
||||||
|
Idrss int64
|
||||||
|
Isrss int64
|
||||||
|
Minflt int64
|
||||||
|
Majflt int64
|
||||||
|
Nswap int64
|
||||||
|
Inblock int64
|
||||||
|
Oublock int64
|
||||||
|
Msgsnd int64
|
||||||
|
Msgrcv int64
|
||||||
|
Nsignals int64
|
||||||
|
Nvcsw int64
|
||||||
|
Nivcsw int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Rlimit struct {
|
||||||
|
Cur uint64
|
||||||
|
Max uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
type _Gid_t uint32
|
||||||
|
|
||||||
|
type Stat_t struct {
|
||||||
|
Mode uint32
|
||||||
|
Dev int32
|
||||||
|
Ino uint64
|
||||||
|
Nlink uint32
|
||||||
|
Uid uint32
|
||||||
|
Gid uint32
|
||||||
|
Rdev int32
|
||||||
|
Atim Timespec
|
||||||
|
Mtim Timespec
|
||||||
|
Ctim Timespec
|
||||||
|
Size int64
|
||||||
|
Blocks int64
|
||||||
|
Blksize int32
|
||||||
|
Flags uint32
|
||||||
|
Gen uint32
|
||||||
|
_ Timespec
|
||||||
|
}
|
||||||
|
|
||||||
|
type Statfs_t struct {
|
||||||
|
F_flags uint32
|
||||||
|
F_bsize uint32
|
||||||
|
F_iosize uint32
|
||||||
|
F_blocks uint64
|
||||||
|
F_bfree uint64
|
||||||
|
F_bavail int64
|
||||||
|
F_files uint64
|
||||||
|
F_ffree uint64
|
||||||
|
F_favail int64
|
||||||
|
F_syncwrites uint64
|
||||||
|
F_syncreads uint64
|
||||||
|
F_asyncwrites uint64
|
||||||
|
F_asyncreads uint64
|
||||||
|
F_fsid Fsid
|
||||||
|
F_namemax uint32
|
||||||
|
F_owner uint32
|
||||||
|
F_ctime uint64
|
||||||
|
F_fstypename [16]byte
|
||||||
|
F_mntonname [90]byte
|
||||||
|
F_mntfromname [90]byte
|
||||||
|
F_mntfromspec [90]byte
|
||||||
|
_ [2]byte
|
||||||
|
Mount_info [160]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type Flock_t struct {
|
||||||
|
Start int64
|
||||||
|
Len int64
|
||||||
|
Pid int32
|
||||||
|
Type int16
|
||||||
|
Whence int16
|
||||||
|
}
|
||||||
|
|
||||||
|
type Dirent struct {
|
||||||
|
Fileno uint64
|
||||||
|
Off int64
|
||||||
|
Reclen uint16
|
||||||
|
Type uint8
|
||||||
|
Namlen uint8
|
||||||
|
_ [4]uint8
|
||||||
|
Name [256]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type Fsid struct {
|
||||||
|
Val [2]int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
PathMax = 0x400
|
||||||
|
)
|
||||||
|
|
||||||
|
type RawSockaddrInet4 struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Port uint16
|
||||||
|
Addr [4]byte /* in_addr */
|
||||||
|
Zero [8]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrInet6 struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Port uint16
|
||||||
|
Flowinfo uint32
|
||||||
|
Addr [16]byte /* in6_addr */
|
||||||
|
Scope_id uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrUnix struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Path [104]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrDatalink struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Index uint16
|
||||||
|
Type uint8
|
||||||
|
Nlen uint8
|
||||||
|
Alen uint8
|
||||||
|
Slen uint8
|
||||||
|
Data [24]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddr struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Data [14]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrAny struct {
|
||||||
|
Addr RawSockaddr
|
||||||
|
Pad [92]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type _Socklen uint32
|
||||||
|
|
||||||
|
type Linger struct {
|
||||||
|
Onoff int32
|
||||||
|
Linger int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Iovec struct {
|
||||||
|
Base *byte
|
||||||
|
Len uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
type IPMreq struct {
|
||||||
|
Multiaddr [4]byte /* in_addr */
|
||||||
|
Interface [4]byte /* in_addr */
|
||||||
|
}
|
||||||
|
|
||||||
|
type IPv6Mreq struct {
|
||||||
|
Multiaddr [16]byte /* in6_addr */
|
||||||
|
Interface uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Msghdr struct {
|
||||||
|
Name *byte
|
||||||
|
Namelen uint32
|
||||||
|
Iov *Iovec
|
||||||
|
Iovlen uint32
|
||||||
|
Control *byte
|
||||||
|
Controllen uint32
|
||||||
|
Flags int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Cmsghdr struct {
|
||||||
|
Len uint32
|
||||||
|
Level int32
|
||||||
|
Type int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Inet6Pktinfo struct {
|
||||||
|
Addr [16]byte /* in6_addr */
|
||||||
|
Ifindex uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type IPv6MTUInfo struct {
|
||||||
|
Addr RawSockaddrInet6
|
||||||
|
Mtu uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type ICMPv6Filter struct {
|
||||||
|
Filt [8]uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofSockaddrInet4 = 0x10
|
||||||
|
SizeofSockaddrInet6 = 0x1c
|
||||||
|
SizeofSockaddrAny = 0x6c
|
||||||
|
SizeofSockaddrUnix = 0x6a
|
||||||
|
SizeofSockaddrDatalink = 0x20
|
||||||
|
SizeofLinger = 0x8
|
||||||
|
SizeofIovec = 0x10
|
||||||
|
SizeofIPMreq = 0x8
|
||||||
|
SizeofIPv6Mreq = 0x14
|
||||||
|
SizeofMsghdr = 0x30
|
||||||
|
SizeofCmsghdr = 0xc
|
||||||
|
SizeofInet6Pktinfo = 0x14
|
||||||
|
SizeofIPv6MTUInfo = 0x20
|
||||||
|
SizeofICMPv6Filter = 0x20
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
PTRACE_TRACEME = 0x0
|
||||||
|
PTRACE_CONT = 0x7
|
||||||
|
PTRACE_KILL = 0x8
|
||||||
|
)
|
||||||
|
|
||||||
|
type Kevent_t struct {
|
||||||
|
Ident uint64
|
||||||
|
Filter int16
|
||||||
|
Flags uint16
|
||||||
|
Fflags uint32
|
||||||
|
Data int64
|
||||||
|
Udata *byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type FdSet struct {
|
||||||
|
Bits [32]uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofIfMsghdr = 0xa8
|
||||||
|
SizeofIfData = 0x90
|
||||||
|
SizeofIfaMsghdr = 0x18
|
||||||
|
SizeofIfAnnounceMsghdr = 0x1a
|
||||||
|
SizeofRtMsghdr = 0x60
|
||||||
|
SizeofRtMetrics = 0x38
|
||||||
|
)
|
||||||
|
|
||||||
|
type IfMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
Tableid uint16
|
||||||
|
Pad1 uint8
|
||||||
|
Pad2 uint8
|
||||||
|
Addrs int32
|
||||||
|
Flags int32
|
||||||
|
Xflags int32
|
||||||
|
Data IfData
|
||||||
|
}
|
||||||
|
|
||||||
|
type IfData struct {
|
||||||
|
Type uint8
|
||||||
|
Addrlen uint8
|
||||||
|
Hdrlen uint8
|
||||||
|
Link_state uint8
|
||||||
|
Mtu uint32
|
||||||
|
Metric uint32
|
||||||
|
Rdomain uint32
|
||||||
|
Baudrate uint64
|
||||||
|
Ipackets uint64
|
||||||
|
Ierrors uint64
|
||||||
|
Opackets uint64
|
||||||
|
Oerrors uint64
|
||||||
|
Collisions uint64
|
||||||
|
Ibytes uint64
|
||||||
|
Obytes uint64
|
||||||
|
Imcasts uint64
|
||||||
|
Omcasts uint64
|
||||||
|
Iqdrops uint64
|
||||||
|
Oqdrops uint64
|
||||||
|
Noproto uint64
|
||||||
|
Capabilities uint32
|
||||||
|
Lastchange Timeval
|
||||||
|
}
|
||||||
|
|
||||||
|
type IfaMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
Tableid uint16
|
||||||
|
Pad1 uint8
|
||||||
|
Pad2 uint8
|
||||||
|
Addrs int32
|
||||||
|
Flags int32
|
||||||
|
Metric int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type IfAnnounceMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
What uint16
|
||||||
|
Name [16]int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RtMsghdr struct {
|
||||||
|
Msglen uint16
|
||||||
|
Version uint8
|
||||||
|
Type uint8
|
||||||
|
Hdrlen uint16
|
||||||
|
Index uint16
|
||||||
|
Tableid uint16
|
||||||
|
Priority uint8
|
||||||
|
Mpls uint8
|
||||||
|
Addrs int32
|
||||||
|
Flags int32
|
||||||
|
Fmask int32
|
||||||
|
Pid int32
|
||||||
|
Seq int32
|
||||||
|
Errno int32
|
||||||
|
Inits uint32
|
||||||
|
Rmx RtMetrics
|
||||||
|
}
|
||||||
|
|
||||||
|
type RtMetrics struct {
|
||||||
|
Pksent uint64
|
||||||
|
Expire int64
|
||||||
|
Locks uint32
|
||||||
|
Mtu uint32
|
||||||
|
Refcnt uint32
|
||||||
|
Hopcount uint32
|
||||||
|
Recvpipe uint32
|
||||||
|
Sendpipe uint32
|
||||||
|
Ssthresh uint32
|
||||||
|
Rtt uint32
|
||||||
|
Rttvar uint32
|
||||||
|
Pad uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Mclpool struct{}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SizeofBpfVersion = 0x4
|
||||||
|
SizeofBpfStat = 0x8
|
||||||
|
SizeofBpfProgram = 0x10
|
||||||
|
SizeofBpfInsn = 0x8
|
||||||
|
SizeofBpfHdr = 0x18
|
||||||
|
)
|
||||||
|
|
||||||
|
type BpfVersion struct {
|
||||||
|
Major uint16
|
||||||
|
Minor uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfStat struct {
|
||||||
|
Recv uint32
|
||||||
|
Drop uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfProgram struct {
|
||||||
|
Len uint32
|
||||||
|
Insns *BpfInsn
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfInsn struct {
|
||||||
|
Code uint16
|
||||||
|
Jt uint8
|
||||||
|
Jf uint8
|
||||||
|
K uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfHdr struct {
|
||||||
|
Tstamp BpfTimeval
|
||||||
|
Caplen uint32
|
||||||
|
Datalen uint32
|
||||||
|
Hdrlen uint16
|
||||||
|
Ifidx uint16
|
||||||
|
Flowid uint16
|
||||||
|
Flags uint8
|
||||||
|
Drops uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpfTimeval struct {
|
||||||
|
Sec uint32
|
||||||
|
Usec uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Termios struct {
|
||||||
|
Iflag uint32
|
||||||
|
Oflag uint32
|
||||||
|
Cflag uint32
|
||||||
|
Lflag uint32
|
||||||
|
Cc [20]uint8
|
||||||
|
Ispeed int32
|
||||||
|
Ospeed int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type Winsize struct {
|
||||||
|
Row uint16
|
||||||
|
Col uint16
|
||||||
|
Xpixel uint16
|
||||||
|
Ypixel uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
AT_FDCWD = -0x64
|
||||||
|
AT_EACCESS = 0x1
|
||||||
|
AT_SYMLINK_NOFOLLOW = 0x2
|
||||||
|
AT_SYMLINK_FOLLOW = 0x4
|
||||||
|
AT_REMOVEDIR = 0x8
|
||||||
|
)
|
||||||
|
|
||||||
|
type PollFd struct {
|
||||||
|
Fd int32
|
||||||
|
Events int16
|
||||||
|
Revents int16
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
POLLERR = 0x8
|
||||||
|
POLLHUP = 0x10
|
||||||
|
POLLIN = 0x1
|
||||||
|
POLLNVAL = 0x20
|
||||||
|
POLLOUT = 0x4
|
||||||
|
POLLPRI = 0x2
|
||||||
|
POLLRDBAND = 0x80
|
||||||
|
POLLRDNORM = 0x40
|
||||||
|
POLLWRBAND = 0x100
|
||||||
|
POLLWRNORM = 0x4
|
||||||
|
)
|
||||||
|
|
||||||
|
type Sigset_t uint32
|
||||||
|
|
||||||
|
type Utsname struct {
|
||||||
|
Sysname [256]byte
|
||||||
|
Nodename [256]byte
|
||||||
|
Release [256]byte
|
||||||
|
Version [256]byte
|
||||||
|
Machine [256]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
const SizeofUvmexp = 0x158
|
||||||
|
|
||||||
|
type Uvmexp struct {
|
||||||
|
Pagesize int32
|
||||||
|
Pagemask int32
|
||||||
|
Pageshift int32
|
||||||
|
Npages int32
|
||||||
|
Free int32
|
||||||
|
Active int32
|
||||||
|
Inactive int32
|
||||||
|
Paging int32
|
||||||
|
Wired int32
|
||||||
|
Zeropages int32
|
||||||
|
Reserve_pagedaemon int32
|
||||||
|
Reserve_kernel int32
|
||||||
|
Unused01 int32
|
||||||
|
Vnodepages int32
|
||||||
|
Vtextpages int32
|
||||||
|
Freemin int32
|
||||||
|
Freetarg int32
|
||||||
|
Inactarg int32
|
||||||
|
Wiredmax int32
|
||||||
|
Anonmin int32
|
||||||
|
Vtextmin int32
|
||||||
|
Vnodemin int32
|
||||||
|
Anonminpct int32
|
||||||
|
Vtextminpct int32
|
||||||
|
Vnodeminpct int32
|
||||||
|
Nswapdev int32
|
||||||
|
Swpages int32
|
||||||
|
Swpginuse int32
|
||||||
|
Swpgonly int32
|
||||||
|
Nswget int32
|
||||||
|
Nanon int32
|
||||||
|
Unused05 int32
|
||||||
|
Unused06 int32
|
||||||
|
Faults int32
|
||||||
|
Traps int32
|
||||||
|
Intrs int32
|
||||||
|
Swtch int32
|
||||||
|
Softs int32
|
||||||
|
Syscalls int32
|
||||||
|
Pageins int32
|
||||||
|
Unused07 int32
|
||||||
|
Unused08 int32
|
||||||
|
Pgswapin int32
|
||||||
|
Pgswapout int32
|
||||||
|
Forks int32
|
||||||
|
Forks_ppwait int32
|
||||||
|
Forks_sharevm int32
|
||||||
|
Pga_zerohit int32
|
||||||
|
Pga_zeromiss int32
|
||||||
|
Unused09 int32
|
||||||
|
Fltnoram int32
|
||||||
|
Fltnoanon int32
|
||||||
|
Fltnoamap int32
|
||||||
|
Fltpgwait int32
|
||||||
|
Fltpgrele int32
|
||||||
|
Fltrelck int32
|
||||||
|
Fltrelckok int32
|
||||||
|
Fltanget int32
|
||||||
|
Fltanretry int32
|
||||||
|
Fltamcopy int32
|
||||||
|
Fltnamap int32
|
||||||
|
Fltnomap int32
|
||||||
|
Fltlget int32
|
||||||
|
Fltget int32
|
||||||
|
Flt_anon int32
|
||||||
|
Flt_acow int32
|
||||||
|
Flt_obj int32
|
||||||
|
Flt_prcopy int32
|
||||||
|
Flt_przero int32
|
||||||
|
Pdwoke int32
|
||||||
|
Pdrevs int32
|
||||||
|
Pdswout int32
|
||||||
|
Pdfreed int32
|
||||||
|
Pdscans int32
|
||||||
|
Pdanscan int32
|
||||||
|
Pdobscan int32
|
||||||
|
Pdreact int32
|
||||||
|
Pdbusy int32
|
||||||
|
Pdpageouts int32
|
||||||
|
Pdpending int32
|
||||||
|
Pddeact int32
|
||||||
|
Unused11 int32
|
||||||
|
Unused12 int32
|
||||||
|
Unused13 int32
|
||||||
|
Fpswtch int32
|
||||||
|
Kmapent int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const SizeofClockinfo = 0x10
|
||||||
|
|
||||||
|
type Clockinfo struct {
|
||||||
|
Hz int32
|
||||||
|
Tick int32
|
||||||
|
Stathz int32
|
||||||
|
Profhz int32
|
||||||
|
}
|
||||||
|
|
@ -480,3 +480,38 @@ const (
|
||||||
MOUNTEDOVER = 0x40000000
|
MOUNTEDOVER = 0x40000000
|
||||||
FILE_EXCEPTION = 0x60000070
|
FILE_EXCEPTION = 0x60000070
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
TUNNEWPPA = 0x540001
|
||||||
|
TUNSETPPA = 0x540002
|
||||||
|
|
||||||
|
I_STR = 0x5308
|
||||||
|
I_POP = 0x5303
|
||||||
|
I_PUSH = 0x5302
|
||||||
|
I_LINK = 0x530c
|
||||||
|
I_UNLINK = 0x530d
|
||||||
|
I_PLINK = 0x5316
|
||||||
|
I_PUNLINK = 0x5317
|
||||||
|
|
||||||
|
IF_UNITSEL = -0x7ffb8cca
|
||||||
|
)
|
||||||
|
|
||||||
|
type strbuf struct {
|
||||||
|
Maxlen int32
|
||||||
|
Len int32
|
||||||
|
Buf *int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type Strioctl struct {
|
||||||
|
Cmd int32
|
||||||
|
Timout int32
|
||||||
|
Len int32
|
||||||
|
Dp *int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type Lifreq struct {
|
||||||
|
Name [32]int8
|
||||||
|
Lifru1 [4]byte
|
||||||
|
Type uint32
|
||||||
|
Lifru [336]byte
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ type Statfs_t struct {
|
||||||
Flags uint64
|
Flags uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type Dirent struct {
|
type direntLE struct {
|
||||||
Reclen uint16
|
Reclen uint16
|
||||||
Namlen uint16
|
Namlen uint16
|
||||||
Ino uint32
|
Ino uint32
|
||||||
|
|
@ -347,6 +347,15 @@ type Dirent struct {
|
||||||
Name [256]byte
|
Name [256]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Dirent struct {
|
||||||
|
Ino uint64
|
||||||
|
Off int64
|
||||||
|
Reclen uint16
|
||||||
|
Type uint8
|
||||||
|
Name [256]uint8
|
||||||
|
_ [5]byte
|
||||||
|
}
|
||||||
|
|
||||||
type FdSet struct {
|
type FdSet struct {
|
||||||
Bits [64]int32
|
Bits [64]int32
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -755,7 +755,7 @@ func Utimes(path string, tv []Timeval) (err error) {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
defer Close(h)
|
defer CloseHandle(h)
|
||||||
a := NsecToFiletime(tv[0].Nanoseconds())
|
a := NsecToFiletime(tv[0].Nanoseconds())
|
||||||
w := NsecToFiletime(tv[1].Nanoseconds())
|
w := NsecToFiletime(tv[1].Nanoseconds())
|
||||||
return SetFileTime(h, nil, &a, &w)
|
return SetFileTime(h, nil, &a, &w)
|
||||||
|
|
@ -775,7 +775,7 @@ func UtimesNano(path string, ts []Timespec) (err error) {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
defer Close(h)
|
defer CloseHandle(h)
|
||||||
a := NsecToFiletime(TimespecToNsec(ts[0]))
|
a := NsecToFiletime(TimespecToNsec(ts[0]))
|
||||||
w := NsecToFiletime(TimespecToNsec(ts[1]))
|
w := NsecToFiletime(TimespecToNsec(ts[1]))
|
||||||
return SetFileTime(h, nil, &a, &w)
|
return SetFileTime(h, nil, &a, &w)
|
||||||
|
|
@ -1115,9 +1115,13 @@ func Shutdown(fd Handle, how int) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {
|
func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {
|
||||||
rsa, l, err := to.sockaddr()
|
var rsa unsafe.Pointer
|
||||||
if err != nil {
|
var l int32
|
||||||
return err
|
if to != nil {
|
||||||
|
rsa, l, err = to.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)
|
return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# This source code refers to The Go Authors for copyright purposes.
|
|
||||||
# The master list of authors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/AUTHORS.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# This source code was written by the Go contributors.
|
|
||||||
# The master list of contributors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# This source code refers to The Go Authors for copyright purposes.
|
|
||||||
# The master list of authors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/AUTHORS.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# This source code was written by the Go contributors.
|
|
||||||
# The master list of contributors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
||||||
|
|
@ -93,8 +93,11 @@ var canonical = [numEncodings]string{
|
||||||
|
|
||||||
var nameMap = map[string]htmlEncoding{
|
var nameMap = map[string]htmlEncoding{
|
||||||
"unicode-1-1-utf-8": utf8,
|
"unicode-1-1-utf-8": utf8,
|
||||||
|
"unicode11utf8": utf8,
|
||||||
|
"unicode20utf8": utf8,
|
||||||
"utf-8": utf8,
|
"utf-8": utf8,
|
||||||
"utf8": utf8,
|
"utf8": utf8,
|
||||||
|
"x-unicode20utf8": utf8,
|
||||||
"866": ibm866,
|
"866": ibm866,
|
||||||
"cp866": ibm866,
|
"cp866": ibm866,
|
||||||
"csibm866": ibm866,
|
"csibm866": ibm866,
|
||||||
|
|
@ -307,7 +310,13 @@ var nameMap = map[string]htmlEncoding{
|
||||||
"iso-2022-cn-ext": replacement,
|
"iso-2022-cn-ext": replacement,
|
||||||
"iso-2022-kr": replacement,
|
"iso-2022-kr": replacement,
|
||||||
"replacement": replacement,
|
"replacement": replacement,
|
||||||
|
"unicodefffe": utf16be,
|
||||||
"utf-16be": utf16be,
|
"utf-16be": utf16be,
|
||||||
|
"csunicode": utf16le,
|
||||||
|
"iso-10646-ucs-2": utf16le,
|
||||||
|
"ucs-2": utf16le,
|
||||||
|
"unicode": utf16le,
|
||||||
|
"unicodefeff": utf16le,
|
||||||
"utf-16": utf16le,
|
"utf-16": utf16le,
|
||||||
"utf-16le": utf16le,
|
"utf-16le": utf16le,
|
||||||
"x-user-defined": xUserDefined,
|
"x-user-defined": xUserDefined,
|
||||||
|
|
|
||||||
|
|
@ -905,6 +905,14 @@ const (
|
||||||
// https://www.unicode.org/notes/tn6/
|
// https://www.unicode.org/notes/tn6/
|
||||||
BOCU1 MIB = 1020
|
BOCU1 MIB = 1020
|
||||||
|
|
||||||
|
// UTF7IMAP is the MIB identifier with IANA name UTF-7-IMAP.
|
||||||
|
//
|
||||||
|
// Note: This charset is used to encode Unicode in IMAP mailbox names;
|
||||||
|
// see section 5.1.3 of rfc3501 . It should never be used
|
||||||
|
// outside this context. A name has been assigned so that charset processing
|
||||||
|
// implementations can refer to it in a consistent way.
|
||||||
|
UTF7IMAP MIB = 1021
|
||||||
|
|
||||||
// Windows30Latin1 is the MIB identifier with IANA name ISO-8859-1-Windows-3.0-Latin-1.
|
// Windows30Latin1 is the MIB identifier with IANA name ISO-8859-1-Windows-3.0-Latin-1.
|
||||||
//
|
//
|
||||||
// Extended ISO 8859-1 Latin-1 for Windows 3.0.
|
// Extended ISO 8859-1 Latin-1 for Windows 3.0.
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ loop:
|
||||||
// Microsoft's Code Page 936 extends GBK 1.0 to encode the euro sign U+20AC
|
// Microsoft's Code Page 936 extends GBK 1.0 to encode the euro sign U+20AC
|
||||||
// as 0x80. The HTML5 specification at http://encoding.spec.whatwg.org/#gbk
|
// as 0x80. The HTML5 specification at http://encoding.spec.whatwg.org/#gbk
|
||||||
// says to treat "gbk" as Code Page 936.
|
// says to treat "gbk" as Code Page 936.
|
||||||
|
// GBK’s decoder is gb18030’s decoder. https://encoding.spec.whatwg.org/#gbk-decoder
|
||||||
|
// If byte is 0x80, return code point U+20AC. https://encoding.spec.whatwg.org/#gb18030-decoder
|
||||||
case c0 == 0x80:
|
case c0 == 0x80:
|
||||||
r, size = '€', 1
|
r, size = '€', 1
|
||||||
|
|
||||||
|
|
@ -180,7 +182,9 @@ func (e gbkEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err
|
||||||
// Microsoft's Code Page 936 extends GBK 1.0 to encode the euro sign U+20AC
|
// Microsoft's Code Page 936 extends GBK 1.0 to encode the euro sign U+20AC
|
||||||
// as 0x80. The HTML5 specification at http://encoding.spec.whatwg.org/#gbk
|
// as 0x80. The HTML5 specification at http://encoding.spec.whatwg.org/#gbk
|
||||||
// says to treat "gbk" as Code Page 936.
|
// says to treat "gbk" as Code Page 936.
|
||||||
if r == '€' {
|
// GBK’s encoder is gb18030’s encoder with its _is GBK_ set to true. https://encoding.spec.whatwg.org/#gbk-encoder
|
||||||
|
// If _is GBK_ is true and code point is U+20AC, return byte 0x80. https://encoding.spec.whatwg.org/#gb18030-encoder
|
||||||
|
if !e.gb18030 && r == '€' {
|
||||||
r = 0x80
|
r = 0x80
|
||||||
goto write1
|
goto write1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -966,7 +966,7 @@ var coreTags = []language.CompactCoreInfo{ // 773 elements
|
||||||
0x3fd00000, 0x3fd00072, 0x3fd000da, 0x3fd0010c,
|
0x3fd00000, 0x3fd00072, 0x3fd000da, 0x3fd0010c,
|
||||||
0x3ff00000, 0x3ff000d1, 0x40100000, 0x401000c3,
|
0x3ff00000, 0x3ff000d1, 0x40100000, 0x401000c3,
|
||||||
0x40200000, 0x4020004c, 0x40700000, 0x40800000,
|
0x40200000, 0x4020004c, 0x40700000, 0x40800000,
|
||||||
0x4085a000, 0x4085a0ba, 0x408e3000, 0x408e30ba,
|
0x4085a000, 0x4085a0ba, 0x408e8000, 0x408e80ba,
|
||||||
0x40c00000, 0x40c000b3, 0x41200000, 0x41200111,
|
0x40c00000, 0x40c000b3, 0x41200000, 0x41200111,
|
||||||
0x41600000, 0x4160010f, 0x41c00000, 0x41d00000,
|
0x41600000, 0x4160010f, 0x41c00000, 0x41d00000,
|
||||||
// Entry 280 - 29F
|
// Entry 280 - 29F
|
||||||
|
|
@ -994,7 +994,7 @@ var coreTags = []language.CompactCoreInfo{ // 773 elements
|
||||||
0x4ae00130, 0x4b400000, 0x4b400099, 0x4b4000e8,
|
0x4ae00130, 0x4b400000, 0x4b400099, 0x4b4000e8,
|
||||||
0x4bc00000, 0x4bc05000, 0x4bc05024, 0x4bc20000,
|
0x4bc00000, 0x4bc05000, 0x4bc05024, 0x4bc20000,
|
||||||
0x4bc20137, 0x4bc5a000, 0x4bc5a137, 0x4be00000,
|
0x4bc20137, 0x4bc5a000, 0x4bc5a137, 0x4be00000,
|
||||||
0x4be5a000, 0x4be5a0b4, 0x4beeb000, 0x4beeb0b4,
|
0x4be5a000, 0x4be5a0b4, 0x4bef1000, 0x4bef10b4,
|
||||||
0x4c000000, 0x4c300000, 0x4c30013e, 0x4c900000,
|
0x4c000000, 0x4c300000, 0x4c30013e, 0x4c900000,
|
||||||
// Entry 2E0 - 2FF
|
// Entry 2E0 - 2FF
|
||||||
0x4c900001, 0x4cc00000, 0x4cc0012f, 0x4ce00000,
|
0x4c900001, 0x4cc00000, 0x4cc0012f, 0x4ce00000,
|
||||||
|
|
@ -1012,4 +1012,4 @@ var coreTags = []language.CompactCoreInfo{ // 773 elements
|
||||||
|
|
||||||
const specialTagsStr string = "ca-ES-valencia en-US-u-va-posix"
|
const specialTagsStr string = "ca-ES-valencia en-US-u-va-posix"
|
||||||
|
|
||||||
// Total table size 3147 bytes (3KiB); checksum: BE816D44
|
// Total table size 3147 bytes (3KiB); checksum: 6772C83C
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ func (id Language) Canonicalize() (Language, AliasType) {
|
||||||
return normLang(id)
|
return normLang(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapLang returns the mapped langID of id according to mapping m.
|
// normLang returns the mapped langID of id according to mapping m.
|
||||||
func normLang(id Language) (Language, AliasType) {
|
func normLang(id Language) (Language, AliasType) {
|
||||||
k := sort.Search(len(AliasMap), func(i int) bool {
|
k := sort.Search(len(AliasMap), func(i int) bool {
|
||||||
return AliasMap[i].From >= uint16(id)
|
return AliasMap[i].From >= uint16(id)
|
||||||
|
|
@ -328,7 +328,7 @@ func (r Region) IsPrivateUse() bool {
|
||||||
return r.typ()&iso3166UserAssigned != 0
|
return r.typ()&iso3166UserAssigned != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type Script uint8
|
type Script uint16
|
||||||
|
|
||||||
// getScriptID returns the script id for string s. It assumes that s
|
// getScriptID returns the script id for string s. It assumes that s
|
||||||
// is of the format [A-Z][a-z]{3}.
|
// is of the format [A-Z][a-z]{3}.
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ func parse(scan *scanner, s string) (t Tag, err error) {
|
||||||
} else if n >= 4 {
|
} else if n >= 4 {
|
||||||
return Und, ErrSyntax
|
return Und, ErrSyntax
|
||||||
} else { // the usual case
|
} else { // the usual case
|
||||||
t, end = parseTag(scan)
|
t, end = parseTag(scan, true)
|
||||||
if n := len(scan.token); n == 1 {
|
if n := len(scan.token); n == 1 {
|
||||||
t.pExt = uint16(end)
|
t.pExt = uint16(end)
|
||||||
end = parseExtensions(scan)
|
end = parseExtensions(scan)
|
||||||
|
|
@ -296,7 +296,8 @@ func parse(scan *scanner, s string) (t Tag, err error) {
|
||||||
|
|
||||||
// parseTag parses language, script, region and variants.
|
// parseTag parses language, script, region and variants.
|
||||||
// It returns a Tag and the end position in the input that was parsed.
|
// It returns a Tag and the end position in the input that was parsed.
|
||||||
func parseTag(scan *scanner) (t Tag, end int) {
|
// If doNorm is true, then <lang>-<extlang> will be normalized to <extlang>.
|
||||||
|
func parseTag(scan *scanner, doNorm bool) (t Tag, end int) {
|
||||||
var e error
|
var e error
|
||||||
// TODO: set an error if an unknown lang, script or region is encountered.
|
// TODO: set an error if an unknown lang, script or region is encountered.
|
||||||
t.LangID, e = getLangID(scan.token)
|
t.LangID, e = getLangID(scan.token)
|
||||||
|
|
@ -307,14 +308,17 @@ func parseTag(scan *scanner) (t Tag, end int) {
|
||||||
for len(scan.token) == 3 && isAlpha(scan.token[0]) {
|
for len(scan.token) == 3 && isAlpha(scan.token[0]) {
|
||||||
// From http://tools.ietf.org/html/bcp47, <lang>-<extlang> tags are equivalent
|
// From http://tools.ietf.org/html/bcp47, <lang>-<extlang> tags are equivalent
|
||||||
// to a tag of the form <extlang>.
|
// to a tag of the form <extlang>.
|
||||||
lang, e := getLangID(scan.token)
|
if doNorm {
|
||||||
if lang != 0 {
|
lang, e := getLangID(scan.token)
|
||||||
t.LangID = lang
|
if lang != 0 {
|
||||||
copy(scan.b[langStart:], lang.String())
|
t.LangID = lang
|
||||||
scan.b[langStart+3] = '-'
|
langStr := lang.String()
|
||||||
scan.start = langStart + 4
|
copy(scan.b[langStart:], langStr)
|
||||||
|
scan.b[langStart+len(langStr)] = '-'
|
||||||
|
scan.start = langStart + len(langStr) + 1
|
||||||
|
}
|
||||||
|
scan.gobble(e)
|
||||||
}
|
}
|
||||||
scan.gobble(e)
|
|
||||||
end = scan.scan()
|
end = scan.scan()
|
||||||
}
|
}
|
||||||
if len(scan.token) == 4 && isAlpha(scan.token[0]) {
|
if len(scan.token) == 4 && isAlpha(scan.token[0]) {
|
||||||
|
|
@ -559,7 +563,7 @@ func parseExtension(scan *scanner) int {
|
||||||
case 't': // https://www.ietf.org/rfc/rfc6497.txt
|
case 't': // https://www.ietf.org/rfc/rfc6497.txt
|
||||||
scan.scan()
|
scan.scan()
|
||||||
if n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) {
|
if n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) {
|
||||||
_, end = parseTag(scan)
|
_, end = parseTag(scan, false)
|
||||||
scan.toLower(start, end)
|
scan.toLower(start, end)
|
||||||
}
|
}
|
||||||
for len(scan.token) == 2 && !isAlpha(scan.token[1]) {
|
for len(scan.token) == 2 && !isAlpha(scan.token[1]) {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -74,7 +74,7 @@ type AcceptRange struct {
|
||||||
|
|
||||||
// AcceptRanges is a slice of AcceptRange values. For a given byte sequence b
|
// AcceptRanges is a slice of AcceptRange values. For a given byte sequence b
|
||||||
//
|
//
|
||||||
// AcceptRanges[First[b[0]]>>AcceptShift]
|
// AcceptRanges[First[b[0]]>>AcceptShift]
|
||||||
//
|
//
|
||||||
// will give the value of AcceptRange for the multi-byte UTF-8 sequence starting
|
// will give the value of AcceptRange for the multi-byte UTF-8 sequence starting
|
||||||
// at b[0].
|
// at b[0].
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,17 @@
|
||||||
// and provides the user with the best experience
|
// and provides the user with the best experience
|
||||||
// (see https://blog.golang.org/matchlang).
|
// (see https://blog.golang.org/matchlang).
|
||||||
//
|
//
|
||||||
//
|
// # Matching preferred against supported languages
|
||||||
// Matching preferred against supported languages
|
|
||||||
//
|
//
|
||||||
// A Matcher for an application that supports English, Australian English,
|
// A Matcher for an application that supports English, Australian English,
|
||||||
// Danish, and standard Mandarin can be created as follows:
|
// Danish, and standard Mandarin can be created as follows:
|
||||||
//
|
//
|
||||||
// var matcher = language.NewMatcher([]language.Tag{
|
// var matcher = language.NewMatcher([]language.Tag{
|
||||||
// language.English, // The first language is used as fallback.
|
// language.English, // The first language is used as fallback.
|
||||||
// language.MustParse("en-AU"),
|
// language.MustParse("en-AU"),
|
||||||
// language.Danish,
|
// language.Danish,
|
||||||
// language.Chinese,
|
// language.Chinese,
|
||||||
// })
|
// })
|
||||||
//
|
//
|
||||||
// This list of supported languages is typically implied by the languages for
|
// This list of supported languages is typically implied by the languages for
|
||||||
// which there exists translations of the user interface.
|
// which there exists translations of the user interface.
|
||||||
|
|
@ -30,14 +29,14 @@
|
||||||
// language tags.
|
// language tags.
|
||||||
// The MatchString finds best matches for such strings:
|
// The MatchString finds best matches for such strings:
|
||||||
//
|
//
|
||||||
// handler(w http.ResponseWriter, r *http.Request) {
|
// handler(w http.ResponseWriter, r *http.Request) {
|
||||||
// lang, _ := r.Cookie("lang")
|
// lang, _ := r.Cookie("lang")
|
||||||
// accept := r.Header.Get("Accept-Language")
|
// accept := r.Header.Get("Accept-Language")
|
||||||
// tag, _ := language.MatchStrings(matcher, lang.String(), accept)
|
// tag, _ := language.MatchStrings(matcher, lang.String(), accept)
|
||||||
//
|
//
|
||||||
// // tag should now be used for the initialization of any
|
// // tag should now be used for the initialization of any
|
||||||
// // locale-specific service.
|
// // locale-specific service.
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// The Matcher's Match method can be used to match Tags directly.
|
// The Matcher's Match method can be used to match Tags directly.
|
||||||
//
|
//
|
||||||
|
|
@ -48,8 +47,7 @@
|
||||||
// For instance, it will know that a reader of Bokmål Danish can read Norwegian
|
// For instance, it will know that a reader of Bokmål Danish can read Norwegian
|
||||||
// and will know that Cantonese ("yue") is a good match for "zh-HK".
|
// and will know that Cantonese ("yue") is a good match for "zh-HK".
|
||||||
//
|
//
|
||||||
//
|
// # Using match results
|
||||||
// Using match results
|
|
||||||
//
|
//
|
||||||
// To guarantee a consistent user experience to the user it is important to
|
// To guarantee a consistent user experience to the user it is important to
|
||||||
// use the same language tag for the selection of any locale-specific services.
|
// use the same language tag for the selection of any locale-specific services.
|
||||||
|
|
@ -58,9 +56,9 @@
|
||||||
// More subtly confusing is using the wrong sorting order or casing
|
// More subtly confusing is using the wrong sorting order or casing
|
||||||
// algorithm for a certain language.
|
// algorithm for a certain language.
|
||||||
//
|
//
|
||||||
// All the packages in x/text that provide locale-specific services
|
// All the packages in x/text that provide locale-specific services
|
||||||
// (e.g. collate, cases) should be initialized with the tag that was
|
// (e.g. collate, cases) should be initialized with the tag that was
|
||||||
// obtained at the start of an interaction with the user.
|
// obtained at the start of an interaction with the user.
|
||||||
//
|
//
|
||||||
// Note that Tag that is returned by Match and MatchString may differ from any
|
// Note that Tag that is returned by Match and MatchString may differ from any
|
||||||
// of the supported languages, as it may contain carried over settings from
|
// of the supported languages, as it may contain carried over settings from
|
||||||
|
|
@ -70,8 +68,7 @@
|
||||||
// Match and MatchString both return the index of the matched supported tag
|
// Match and MatchString both return the index of the matched supported tag
|
||||||
// to simplify associating such data with the matched tag.
|
// to simplify associating such data with the matched tag.
|
||||||
//
|
//
|
||||||
//
|
// # Canonicalization
|
||||||
// Canonicalization
|
|
||||||
//
|
//
|
||||||
// If one uses the Matcher to compare languages one does not need to
|
// If one uses the Matcher to compare languages one does not need to
|
||||||
// worry about canonicalization.
|
// worry about canonicalization.
|
||||||
|
|
@ -92,10 +89,9 @@
|
||||||
// equivalence relations. The CanonType type can be used to alter the
|
// equivalence relations. The CanonType type can be used to alter the
|
||||||
// canonicalization form.
|
// canonicalization form.
|
||||||
//
|
//
|
||||||
// References
|
// # References
|
||||||
//
|
//
|
||||||
// BCP 47 - Tags for Identifying Languages http://tools.ietf.org/html/bcp47
|
// BCP 47 - Tags for Identifying Languages http://tools.ietf.org/html/bcp47
|
||||||
//
|
|
||||||
package language // import "golang.org/x/text/language"
|
package language // import "golang.org/x/text/language"
|
||||||
|
|
||||||
// TODO: explanation on how to match languages for your own locale-specific
|
// TODO: explanation on how to match languages for your own locale-specific
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
// 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.
|
|
||||||
|
|
||||||
//go:build !go1.2
|
|
||||||
// +build !go1.2
|
|
||||||
|
|
||||||
package language
|
|
||||||
|
|
||||||
import "sort"
|
|
||||||
|
|
||||||
func sortStable(s sort.Interface) {
|
|
||||||
ss := stableSort{
|
|
||||||
s: s,
|
|
||||||
pos: make([]int, s.Len()),
|
|
||||||
}
|
|
||||||
for i := range ss.pos {
|
|
||||||
ss.pos[i] = i
|
|
||||||
}
|
|
||||||
sort.Sort(&ss)
|
|
||||||
}
|
|
||||||
|
|
||||||
type stableSort struct {
|
|
||||||
s sort.Interface
|
|
||||||
pos []int
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *stableSort) Len() int {
|
|
||||||
return len(s.pos)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *stableSort) Less(i, j int) bool {
|
|
||||||
return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *stableSort) Swap(i, j int) {
|
|
||||||
s.s.Swap(i, j)
|
|
||||||
s.pos[i], s.pos[j] = s.pos[j], s.pos[i]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
// 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.
|
|
||||||
|
|
||||||
//go:build go1.2
|
|
||||||
// +build go1.2
|
|
||||||
|
|
||||||
package language
|
|
||||||
|
|
||||||
import "sort"
|
|
||||||
|
|
||||||
var sortStable = sort.Stable
|
|
||||||
|
|
@ -545,7 +545,7 @@ type bestMatch struct {
|
||||||
// match as the preferred match.
|
// match as the preferred match.
|
||||||
//
|
//
|
||||||
// If pin is true and have and tag are a strong match, it will henceforth only
|
// If pin is true and have and tag are a strong match, it will henceforth only
|
||||||
// consider matches for this language. This corresponds to the nothing that most
|
// consider matches for this language. This corresponds to the idea that most
|
||||||
// users have a strong preference for the first defined language. A user can
|
// users have a strong preference for the first defined language. A user can
|
||||||
// still prefer a second language over a dialect of the preferred language by
|
// still prefer a second language over a dialect of the preferred language by
|
||||||
// explicitly specifying dialects, e.g. "en, nl, en-GB". In this case pin should
|
// explicitly specifying dialects, e.g. "en, nl, en-GB". In this case pin should
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ package language
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
|
@ -147,6 +148,7 @@ func update(b *language.Builder, part ...interface{}) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var errInvalidWeight = errors.New("ParseAcceptLanguage: invalid weight")
|
var errInvalidWeight = errors.New("ParseAcceptLanguage: invalid weight")
|
||||||
|
var errTagListTooLarge = errors.New("tag list exceeds max length")
|
||||||
|
|
||||||
// ParseAcceptLanguage parses the contents of an Accept-Language header as
|
// ParseAcceptLanguage parses the contents of an Accept-Language header as
|
||||||
// defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and
|
// defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and
|
||||||
|
|
@ -164,6 +166,10 @@ func ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if strings.Count(s, "-") > 1000 {
|
||||||
|
return nil, nil, errTagListTooLarge
|
||||||
|
}
|
||||||
|
|
||||||
var entry string
|
var entry string
|
||||||
for s != "" {
|
for s != "" {
|
||||||
if entry, s = split(s, ','); entry == "" {
|
if entry, s = split(s, ','); entry == "" {
|
||||||
|
|
@ -201,7 +207,7 @@ func ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) {
|
||||||
tag = append(tag, t)
|
tag = append(tag, t)
|
||||||
q = append(q, float32(w))
|
q = append(q, float32(w))
|
||||||
}
|
}
|
||||||
sortStable(&tagSort{tag, q})
|
sort.Stable(&tagSort{tag, q})
|
||||||
return tag, q, nil
|
return tag, q, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,12 @@ const (
|
||||||
_Hani = 57
|
_Hani = 57
|
||||||
_Hans = 59
|
_Hans = 59
|
||||||
_Hant = 60
|
_Hant = 60
|
||||||
_Qaaa = 143
|
_Qaaa = 147
|
||||||
_Qaai = 151
|
_Qaai = 155
|
||||||
_Qabx = 192
|
_Qabx = 196
|
||||||
_Zinh = 245
|
_Zinh = 252
|
||||||
_Zyyy = 250
|
_Zyyy = 257
|
||||||
_Zzzz = 251
|
_Zzzz = 258
|
||||||
)
|
)
|
||||||
|
|
||||||
var regionToGroups = []uint8{ // 358 elements
|
var regionToGroups = []uint8{ // 358 elements
|
||||||
|
|
@ -265,9 +265,9 @@ var matchScript = []scriptIntelligibility{ // 26 elements
|
||||||
13: {wantLang: 0x39d, haveLang: 0x139, wantScript: 0x36, haveScript: 0x5a, distance: 0xa},
|
13: {wantLang: 0x39d, haveLang: 0x139, wantScript: 0x36, haveScript: 0x5a, distance: 0xa},
|
||||||
14: {wantLang: 0x3be, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
14: {wantLang: 0x3be, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
||||||
15: {wantLang: 0x3fa, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
15: {wantLang: 0x3fa, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
||||||
16: {wantLang: 0x40c, haveLang: 0x139, wantScript: 0xcf, haveScript: 0x5a, distance: 0xa},
|
16: {wantLang: 0x40c, haveLang: 0x139, wantScript: 0xd4, haveScript: 0x5a, distance: 0xa},
|
||||||
17: {wantLang: 0x450, haveLang: 0x139, wantScript: 0xde, haveScript: 0x5a, distance: 0xa},
|
17: {wantLang: 0x450, haveLang: 0x139, wantScript: 0xe3, haveScript: 0x5a, distance: 0xa},
|
||||||
18: {wantLang: 0x461, haveLang: 0x139, wantScript: 0xe1, haveScript: 0x5a, distance: 0xa},
|
18: {wantLang: 0x461, haveLang: 0x139, wantScript: 0xe6, haveScript: 0x5a, distance: 0xa},
|
||||||
19: {wantLang: 0x46f, haveLang: 0x139, wantScript: 0x2c, haveScript: 0x5a, distance: 0xa},
|
19: {wantLang: 0x46f, haveLang: 0x139, wantScript: 0x2c, haveScript: 0x5a, distance: 0xa},
|
||||||
20: {wantLang: 0x476, haveLang: 0x3e2, wantScript: 0x5a, haveScript: 0x20, distance: 0xa},
|
20: {wantLang: 0x476, haveLang: 0x3e2, wantScript: 0x5a, haveScript: 0x20, distance: 0xa},
|
||||||
21: {wantLang: 0x4b4, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
21: {wantLang: 0x4b4, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ func In(rt *unicode.RangeTable) Set {
|
||||||
return setFunc(func(r rune) bool { return unicode.Is(rt, r) })
|
return setFunc(func(r rune) bool { return unicode.Is(rt, r) })
|
||||||
}
|
}
|
||||||
|
|
||||||
// In creates a Set with a Contains method that returns true for all runes not
|
// NotIn creates a Set with a Contains method that returns true for all runes not
|
||||||
// in the given RangeTable.
|
// in the given RangeTable.
|
||||||
func NotIn(rt *unicode.RangeTable) Set {
|
func NotIn(rt *unicode.RangeTable) Set {
|
||||||
return setFunc(func(r rune) bool { return !unicode.Is(rt, r) })
|
return setFunc(func(r rune) bool { return !unicode.Is(rt, r) })
|
||||||
|
|
|
||||||
|
|
@ -193,14 +193,14 @@ func (p *paragraph) run() {
|
||||||
//
|
//
|
||||||
// At the end of this function:
|
// At the end of this function:
|
||||||
//
|
//
|
||||||
// - The member variable matchingPDI is set to point to the index of the
|
// - The member variable matchingPDI is set to point to the index of the
|
||||||
// matching PDI character for each isolate initiator character. If there is
|
// matching PDI character for each isolate initiator character. If there is
|
||||||
// no matching PDI, it is set to the length of the input text. For other
|
// no matching PDI, it is set to the length of the input text. For other
|
||||||
// characters, it is set to -1.
|
// characters, it is set to -1.
|
||||||
// - The member variable matchingIsolateInitiator is set to point to the
|
// - The member variable matchingIsolateInitiator is set to point to the
|
||||||
// index of the matching isolate initiator character for each PDI character.
|
// index of the matching isolate initiator character for each PDI character.
|
||||||
// If there is no matching isolate initiator, or the character is not a PDI,
|
// If there is no matching isolate initiator, or the character is not a PDI,
|
||||||
// it is set to -1.
|
// it is set to -1.
|
||||||
func (p *paragraph) determineMatchingIsolates() {
|
func (p *paragraph) determineMatchingIsolates() {
|
||||||
p.matchingPDI = make([]int, p.Len())
|
p.matchingPDI = make([]int, p.Len())
|
||||||
p.matchingIsolateInitiator = make([]int, p.Len())
|
p.matchingIsolateInitiator = make([]int, p.Len())
|
||||||
|
|
@ -435,7 +435,7 @@ func maxLevel(a, b level) level {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rule X10, second bullet: Determine the start-of-sequence (sos) and end-of-sequence (eos) types,
|
// Rule X10, second bullet: Determine the start-of-sequence (sos) and end-of-sequence (eos) types,
|
||||||
// either L or R, for each isolating run sequence.
|
// either L or R, for each isolating run sequence.
|
||||||
func (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {
|
func (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {
|
||||||
length := len(indexes)
|
length := len(indexes)
|
||||||
types := make([]Class, length)
|
types := make([]Class, length)
|
||||||
|
|
@ -495,9 +495,9 @@ func (s *isolatingRunSequence) resolveWeakTypes() {
|
||||||
if t == NSM {
|
if t == NSM {
|
||||||
s.types[i] = precedingCharacterType
|
s.types[i] = precedingCharacterType
|
||||||
} else {
|
} else {
|
||||||
if t.in(LRI, RLI, FSI, PDI) {
|
// if t.in(LRI, RLI, FSI, PDI) {
|
||||||
precedingCharacterType = ON
|
// precedingCharacterType = ON
|
||||||
}
|
// }
|
||||||
precedingCharacterType = t
|
precedingCharacterType = t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -905,7 +905,7 @@ func (p *paragraph) getLevels(linebreaks []int) []level {
|
||||||
// Lines are concatenated from left to right. So for example, the fifth
|
// Lines are concatenated from left to right. So for example, the fifth
|
||||||
// character from the left on the third line is
|
// character from the left on the third line is
|
||||||
//
|
//
|
||||||
// getReordering(linebreaks)[linebreaks[1] + 4]
|
// getReordering(linebreaks)[linebreaks[1] + 4]
|
||||||
//
|
//
|
||||||
// (linebreaks[1] is the position after the last character of the second
|
// (linebreaks[1] is the position after the last character of the second
|
||||||
// line, which is also the index of the first character on the third line,
|
// line, which is also the index of the first character on the third line,
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,11 @@ func (p Properties) BoundaryAfter() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We pack quick check data in 4 bits:
|
// We pack quick check data in 4 bits:
|
||||||
// 5: Combines forward (0 == false, 1 == true)
|
//
|
||||||
// 4..3: NFC_QC Yes(00), No (10), or Maybe (11)
|
// 5: Combines forward (0 == false, 1 == true)
|
||||||
// 2: NFD_QC Yes (0) or No (1). No also means there is a decomposition.
|
// 4..3: NFC_QC Yes(00), No (10), or Maybe (11)
|
||||||
// 1..0: Number of trailing non-starters.
|
// 2: NFD_QC Yes (0) or No (1). No also means there is a decomposition.
|
||||||
|
// 1..0: Number of trailing non-starters.
|
||||||
//
|
//
|
||||||
// When all 4 bits are zero, the character is inert, meaning it is never
|
// When all 4 bits are zero, the character is inert, meaning it is never
|
||||||
// influenced by normalization.
|
// influenced by normalization.
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,17 @@ import (
|
||||||
// A Form denotes a canonical representation of Unicode code points.
|
// A Form denotes a canonical representation of Unicode code points.
|
||||||
// The Unicode-defined normalization and equivalence forms are:
|
// The Unicode-defined normalization and equivalence forms are:
|
||||||
//
|
//
|
||||||
// NFC Unicode Normalization Form C
|
// NFC Unicode Normalization Form C
|
||||||
// NFD Unicode Normalization Form D
|
// NFD Unicode Normalization Form D
|
||||||
// NFKC Unicode Normalization Form KC
|
// NFKC Unicode Normalization Form KC
|
||||||
// NFKD Unicode Normalization Form KD
|
// NFKD Unicode Normalization Form KD
|
||||||
//
|
//
|
||||||
// For a Form f, this documentation uses the notation f(x) to mean
|
// For a Form f, this documentation uses the notation f(x) to mean
|
||||||
// the bytes or string x converted to the given form.
|
// the bytes or string x converted to the given form.
|
||||||
// A position n in x is called a boundary if conversion to the form can
|
// A position n in x is called a boundary if conversion to the form can
|
||||||
// proceed independently on both sides:
|
// proceed independently on both sides:
|
||||||
// f(x) == append(f(x[0:n]), f(x[n:])...)
|
//
|
||||||
|
// f(x) == append(f(x[0:n]), f(x[n:])...)
|
||||||
//
|
//
|
||||||
// References: https://unicode.org/reports/tr15/ and
|
// References: https://unicode.org/reports/tr15/ and
|
||||||
// https://unicode.org/notes/tn5/.
|
// https://unicode.org/notes/tn5/.
|
||||||
|
|
|
||||||
|
|
@ -7315,7 +7315,7 @@ const recompMapPacked = "" +
|
||||||
"\x00V\x03\x03\x00\x00\x1e|" + // 0x00560303: 0x00001E7C
|
"\x00V\x03\x03\x00\x00\x1e|" + // 0x00560303: 0x00001E7C
|
||||||
"\x00v\x03\x03\x00\x00\x1e}" + // 0x00760303: 0x00001E7D
|
"\x00v\x03\x03\x00\x00\x1e}" + // 0x00760303: 0x00001E7D
|
||||||
"\x00V\x03#\x00\x00\x1e~" + // 0x00560323: 0x00001E7E
|
"\x00V\x03#\x00\x00\x1e~" + // 0x00560323: 0x00001E7E
|
||||||
"\x00v\x03#\x00\x00\x1e\u007f" + // 0x00760323: 0x00001E7F
|
"\x00v\x03#\x00\x00\x1e\x7f" + // 0x00760323: 0x00001E7F
|
||||||
"\x00W\x03\x00\x00\x00\x1e\x80" + // 0x00570300: 0x00001E80
|
"\x00W\x03\x00\x00\x00\x1e\x80" + // 0x00570300: 0x00001E80
|
||||||
"\x00w\x03\x00\x00\x00\x1e\x81" + // 0x00770300: 0x00001E81
|
"\x00w\x03\x00\x00\x00\x1e\x81" + // 0x00770300: 0x00001E81
|
||||||
"\x00W\x03\x01\x00\x00\x1e\x82" + // 0x00570301: 0x00001E82
|
"\x00W\x03\x01\x00\x00\x1e\x82" + // 0x00570301: 0x00001E82
|
||||||
|
|
@ -7342,7 +7342,7 @@ const recompMapPacked = "" +
|
||||||
"\x00t\x03\b\x00\x00\x1e\x97" + // 0x00740308: 0x00001E97
|
"\x00t\x03\b\x00\x00\x1e\x97" + // 0x00740308: 0x00001E97
|
||||||
"\x00w\x03\n\x00\x00\x1e\x98" + // 0x0077030A: 0x00001E98
|
"\x00w\x03\n\x00\x00\x1e\x98" + // 0x0077030A: 0x00001E98
|
||||||
"\x00y\x03\n\x00\x00\x1e\x99" + // 0x0079030A: 0x00001E99
|
"\x00y\x03\n\x00\x00\x1e\x99" + // 0x0079030A: 0x00001E99
|
||||||
"\x01\u007f\x03\a\x00\x00\x1e\x9b" + // 0x017F0307: 0x00001E9B
|
"\x01\x7f\x03\a\x00\x00\x1e\x9b" + // 0x017F0307: 0x00001E9B
|
||||||
"\x00A\x03#\x00\x00\x1e\xa0" + // 0x00410323: 0x00001EA0
|
"\x00A\x03#\x00\x00\x1e\xa0" + // 0x00410323: 0x00001EA0
|
||||||
"\x00a\x03#\x00\x00\x1e\xa1" + // 0x00610323: 0x00001EA1
|
"\x00a\x03#\x00\x00\x1e\xa1" + // 0x00610323: 0x00001EA1
|
||||||
"\x00A\x03\t\x00\x00\x1e\xa2" + // 0x00410309: 0x00001EA2
|
"\x00A\x03\t\x00\x00\x1e\xa2" + // 0x00410309: 0x00001EA2
|
||||||
|
|
|
||||||
|
|
@ -255,6 +255,10 @@ github.com/fsnotify/fsnotify
|
||||||
# github.com/ghodss/yaml v1.0.0
|
# github.com/ghodss/yaml v1.0.0
|
||||||
## explicit
|
## explicit
|
||||||
github.com/ghodss/yaml
|
github.com/ghodss/yaml
|
||||||
|
# github.com/go-logr/logr v1.2.3
|
||||||
|
## explicit; go 1.16
|
||||||
|
github.com/go-logr/logr
|
||||||
|
github.com/go-logr/logr/funcr
|
||||||
# github.com/godbus/dbus/v5 v5.1.0
|
# github.com/godbus/dbus/v5 v5.1.0
|
||||||
## explicit; go 1.12
|
## explicit; go 1.12
|
||||||
github.com/godbus/dbus/v5
|
github.com/godbus/dbus/v5
|
||||||
|
|
@ -364,7 +368,7 @@ github.com/modern-go/concurrent
|
||||||
# github.com/modern-go/reflect2 v1.0.2
|
# github.com/modern-go/reflect2 v1.0.2
|
||||||
## explicit; go 1.12
|
## explicit; go 1.12
|
||||||
github.com/modern-go/reflect2
|
github.com/modern-go/reflect2
|
||||||
# github.com/onsi/ginkgo/v2 v2.3.1
|
# github.com/onsi/ginkgo/v2 v2.4.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/onsi/ginkgo/v2
|
github.com/onsi/ginkgo/v2
|
||||||
github.com/onsi/ginkgo/v2/config
|
github.com/onsi/ginkgo/v2/config
|
||||||
|
|
@ -556,7 +560,7 @@ golang.org/x/crypto/ssh
|
||||||
golang.org/x/crypto/ssh/agent
|
golang.org/x/crypto/ssh/agent
|
||||||
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
|
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
|
||||||
golang.org/x/crypto/ssh/knownhosts
|
golang.org/x/crypto/ssh/knownhosts
|
||||||
# golang.org/x/net v0.0.0-20220909164309-bea034e7d591
|
# golang.org/x/net v0.1.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/net/context
|
golang.org/x/net/context
|
||||||
golang.org/x/net/html
|
golang.org/x/net/html
|
||||||
|
|
@ -574,7 +578,7 @@ golang.org/x/net/trace
|
||||||
## explicit
|
## explicit
|
||||||
golang.org/x/sync/errgroup
|
golang.org/x/sync/errgroup
|
||||||
golang.org/x/sync/semaphore
|
golang.org/x/sync/semaphore
|
||||||
# golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
|
# golang.org/x/sys v0.1.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/sys/cpu
|
golang.org/x/sys/cpu
|
||||||
golang.org/x/sys/execabs
|
golang.org/x/sys/execabs
|
||||||
|
|
@ -582,10 +586,10 @@ golang.org/x/sys/internal/unsafeheader
|
||||||
golang.org/x/sys/plan9
|
golang.org/x/sys/plan9
|
||||||
golang.org/x/sys/unix
|
golang.org/x/sys/unix
|
||||||
golang.org/x/sys/windows
|
golang.org/x/sys/windows
|
||||||
# golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
|
# golang.org/x/term v0.1.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/term
|
golang.org/x/term
|
||||||
# golang.org/x/text v0.3.7
|
# golang.org/x/text v0.4.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/text/encoding
|
golang.org/x/text/encoding
|
||||||
golang.org/x/text/encoding/charmap
|
golang.org/x/text/encoding/charmap
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue