mirror of https://github.com/docker/cli.git
Merge pull request #3865 from thaJeztah/update_engine
vendor: docker d15be0c54de92a4d868ebd66dbb1065e264554f2 / v22.06-dev
This commit is contained in:
commit
2b7d10cf93
30
vendor.mod
30
vendor.mod
|
@ -7,10 +7,10 @@ module github.com/docker/cli
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/containerd/containerd v1.6.8
|
||||
github.com/containerd/containerd v1.6.10
|
||||
github.com/creack/pty v1.1.11
|
||||
github.com/docker/distribution v2.8.1+incompatible
|
||||
github.com/docker/docker v20.10.20+incompatible // v22.06.x - see "replace" for the actual version
|
||||
github.com/docker/docker v20.10.21+incompatible // v22.06.x - see "replace" for the actual version
|
||||
github.com/docker/docker-credential-helpers v0.7.0
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/docker/go-units v0.5.0
|
||||
|
@ -21,9 +21,9 @@ require (
|
|||
github.com/imdario/mergo v0.3.12
|
||||
github.com/mattn/go-runewidth v0.0.13
|
||||
github.com/mitchellh/mapstructure v1.3.2
|
||||
github.com/moby/buildkit v0.10.5
|
||||
github.com/moby/buildkit v0.10.6
|
||||
github.com/moby/patternmatcher v0.5.0
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20221102165002-6341884e5fc9
|
||||
github.com/moby/sys/sequential v0.5.0
|
||||
github.com/moby/sys/signal v0.7.0
|
||||
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
|
||||
|
@ -31,15 +31,15 @@ require (
|
|||
github.com/opencontainers/go-digest v1.0.0
|
||||
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a
|
||||
github.com/tonistiigi/go-rosetta v0.0.0-20200727161949-f79598599c5d
|
||||
github.com/xeipuuv/gojsonschema v1.2.0
|
||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
|
||||
golang.org/x/text v0.3.7
|
||||
golang.org/x/sys v0.2.0
|
||||
golang.org/x/term v0.1.0
|
||||
golang.org/x/text v0.4.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gotest.tools/v3 v3.4.0
|
||||
)
|
||||
|
@ -68,16 +68,16 @@ require (
|
|||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
go.etcd.io/etcd/raft/v3 v3.5.2 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
|
||||
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect; updated for CVE-2022-27664
|
||||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
|
||||
google.golang.org/grpc v1.45.0 // indirect
|
||||
google.golang.org/protobuf v1.27.1 // indirect
|
||||
golang.org/x/crypto v0.1.0 // indirect
|
||||
golang.org/x/net v0.1.0 // indirect
|
||||
golang.org/x/time v0.1.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
|
||||
google.golang.org/grpc v1.47.0 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221021173910-5aac513617f0+incompatible // 22.06 branch (v22.06-dev)
|
||||
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible // 22.06 branch (v22.06-dev)
|
||||
|
||||
// Resolve dependency hell with github.com/cloudflare/cfssl (transitive via
|
||||
// swarmkit) by pinning the certificate-transparency-go version. Remove once
|
||||
|
|
71
vendor.sum
71
vendor.sum
|
@ -38,8 +38,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
|
|||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/Microsoft/hcsshim v0.9.5 h1:AbV+VPfTrIVffukazHcpxmz/sRiE6YaMDzHWR9BXZHo=
|
||||
github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d h1:hi6J4K6DKrR4/ljxn6SF6nURyu785wKMuQcjt7H3VCQ=
|
||||
github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
|
@ -64,7 +63,6 @@ github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3k
|
|||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
|
@ -79,17 +77,16 @@ github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5 h1:PqZ3bA4yzwywiv
|
|||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
|
||||
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
|
||||
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
|
||||
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
|
||||
github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs=
|
||||
github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0=
|
||||
github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8 h1:yGFEcFNMhze29DxAAB33v/1OMRYF/cM9iwwgV2P0ZrE=
|
||||
github.com/containerd/containerd v1.6.10 h1:8aiav7I2ZyQLbTlNMcBXyAU1FtFvp6VuyuW13qSd6Hk=
|
||||
github.com/containerd/containerd v1.6.10/go.mod h1:CVqfxdJ95PDgORwA219AwwLrREZgrTFybXu2HfMKRG0=
|
||||
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
|
@ -104,8 +101,8 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xb
|
|||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
|
||||
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v20.10.3-0.20221021173910-5aac513617f0+incompatible h1:s5C/kGjAucPHfx9nwIKZOCNvKOEiRUgJxQpwSmr2+RU=
|
||||
github.com/docker/docker v20.10.3-0.20221021173910-5aac513617f0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible h1:148CEtil9pdujrgsujs9P1PglhnefnHjp7BqoDB6sF4=
|
||||
github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
|
||||
github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||
|
@ -127,8 +124,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
|||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
|
||||
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
||||
|
@ -198,6 +194,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
|
@ -277,12 +274,12 @@ github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT
|
|||
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg=
|
||||
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/moby/buildkit v0.10.5 h1:d9krS/lG3dn6N7y+R8o9PTgIixlYAaDk35f3/B4jZOw=
|
||||
github.com/moby/buildkit v0.10.5/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug=
|
||||
github.com/moby/buildkit v0.10.6 h1:DJlEuLIgnu34HQKF4n9Eg6q2YqQVC0eOpMb4p2eRS2w=
|
||||
github.com/moby/buildkit v0.10.6/go.mod h1:tQuuyTWtOb9D+RE425cwOCUkX0/oZ+5iBZ+uWpWQ9bU=
|
||||
github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo=
|
||||
github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a h1:gLcTxHH4egYVhMVFWRxvWsb79Ok4kfTt1/irZNyovUY=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a/go.mod h1:/so6Lct4y1x14UprW/loFsOe6xoXVTlvh25V36ULXNQ=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20221102165002-6341884e5fc9 h1:d/XCmjx1zKZdzlBX90kSGDex7V2GE2jdGDr9nXYZg/Q=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20221102165002-6341884e5fc9/go.mod h1:/so6Lct4y1x14UprW/loFsOe6xoXVTlvh25V36ULXNQ=
|
||||
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
|
||||
github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=
|
||||
github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo=
|
||||
|
@ -368,9 +365,9 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
|||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94 h1:JmfC365KywYwHB946TTiQWEb8kqPY+pybPLoGE9GgVk=
|
||||
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
||||
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
|
@ -433,8 +430,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/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-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -498,8 +495,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
|
|||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c h1:yKufUcDwucU5urd+50/Opbt4AYpqthk7wHpHok8f1lo=
|
||||
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/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-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -567,12 +564,13 @@ golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 h1:UiNENfZ8gDvpiWw7IpOMQ27spWmThO1RwwdQVbJahJM=
|
||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
|
||||
golang.org/x/sys v0.2.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-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/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.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -580,13 +578,13 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|||
golang.org/x/text v0.3.3/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.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
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-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-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs=
|
||||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA=
|
||||
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
@ -688,8 +686,8 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
|
|||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0=
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I=
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
|
@ -705,9 +703,9 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
|
|||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
|
||||
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=
|
||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@ -720,8 +718,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII=
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
//
|
||||
// More details of the specifier syntax and platform spec follow.
|
||||
//
|
||||
// Declaring Platform Support
|
||||
// # Declaring Platform Support
|
||||
//
|
||||
// Components that have strict platform requirements should use the OCI
|
||||
// platform specification to declare their support. Typically, this will be
|
||||
|
@ -60,7 +60,7 @@
|
|||
// specification when in doubt). ARM should set variant under certain
|
||||
// discussions, which are outlined below.
|
||||
//
|
||||
// Platform Specifiers
|
||||
// # Platform Specifiers
|
||||
//
|
||||
// While the OCI platform specifications provide a tool for components to
|
||||
// specify structured information, user input typically doesn't need the full
|
||||
|
@ -77,7 +77,7 @@
|
|||
// where the architecture may be known but a runtime may support images from
|
||||
// different operating systems.
|
||||
//
|
||||
// Normalization
|
||||
// # Normalization
|
||||
//
|
||||
// Because not all users are familiar with the way the Go runtime represents
|
||||
// platforms, several normalizations have been provided to make this package
|
||||
|
@ -95,7 +95,7 @@
|
|||
//
|
||||
// We also normalize the operating system `macos` to `darwin`.
|
||||
//
|
||||
// ARM Support
|
||||
// # ARM Support
|
||||
//
|
||||
// To qualify ARM architecture, the Variant field is used to qualify the arm
|
||||
// version. The most common arm version, v7, is represented without the variant
|
||||
|
|
|
@ -229,13 +229,8 @@ func applyLayerHandler(dest string, layer io.Reader, options *TarOptions, decomp
|
|||
dest = filepath.Clean(dest)
|
||||
|
||||
// We need to be able to set any perms
|
||||
if runtime.GOOS != "windows" {
|
||||
oldmask, err := system.Umask(0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer system.Umask(oldmask)
|
||||
}
|
||||
restore := overrideUmask(0)
|
||||
defer restore()
|
||||
|
||||
if decompress {
|
||||
decompLayer, err := DecompressStream(layer)
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package archive
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// overrideUmask sets current process's file mode creation mask to newmask
|
||||
// and returns a function to restore it.
|
||||
//
|
||||
// WARNING for readers stumbling upon this code. Changing umask in a multi-
|
||||
// threaded environment isn't safe. Don't use this without understanding the
|
||||
// risks, and don't export this function for others to use (we shouldn't even
|
||||
// be using this ourself).
|
||||
//
|
||||
// FIXME(thaJeztah): we should get rid of these hacks if possible.
|
||||
func overrideUmask(newMask int) func() {
|
||||
oldMask := unix.Umask(newMask)
|
||||
return func() {
|
||||
unix.Umask(oldMask)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package archive
|
||||
|
||||
// overrideUmask is a no-op on windows.
|
||||
func overrideUmask(newmask int) func() {
|
||||
return func() {}
|
||||
}
|
|
@ -8,6 +8,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"sync"
|
||||
|
@ -199,7 +200,7 @@ func callGetent(database, key string) (io.Reader, error) {
|
|||
}
|
||||
out, err := execCmd(getentCmd, database, key)
|
||||
if err != nil {
|
||||
exitCode, errC := system.GetExitCode(err)
|
||||
exitCode, errC := getExitCode(err)
|
||||
if errC != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -217,6 +218,18 @@ func callGetent(database, key string) (io.Reader, error) {
|
|||
return bytes.NewReader(out), nil
|
||||
}
|
||||
|
||||
// getExitCode returns the ExitStatus of the specified error if its type is
|
||||
// exec.ExitError, returns 0 and an error otherwise.
|
||||
func getExitCode(err error) (int, error) {
|
||||
exitCode := 0
|
||||
if exiterr, ok := err.(*exec.ExitError); ok {
|
||||
if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok {
|
||||
return procExit.ExitStatus(), nil
|
||||
}
|
||||
}
|
||||
return exitCode, fmt.Errorf("failed to get exit code")
|
||||
}
|
||||
|
||||
// setPermissions performs a chown/chmod only if the uid/gid don't match what's requested
|
||||
// Normally a Chown is a no-op if uid/gid match, but in some cases this can still cause an error, e.g. if the
|
||||
// dir is on an NFS share, so don't call chown unless we absolutely must.
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// GetExitCode returns the ExitStatus of the specified error if its type is
|
||||
// exec.ExitError, returns 0 and an error otherwise.
|
||||
func GetExitCode(err error) (int, error) {
|
||||
exitCode := 0
|
||||
if exiterr, ok := err.(*exec.ExitError); ok {
|
||||
if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok {
|
||||
return procExit.ExitStatus(), nil
|
||||
}
|
||||
}
|
||||
return exitCode, fmt.Errorf("failed to get exit code")
|
||||
}
|
|
@ -20,12 +20,12 @@ func (s StatT) Size() int64 {
|
|||
|
||||
// Mode returns file's permission mode.
|
||||
func (s StatT) Mode() os.FileMode {
|
||||
return os.FileMode(s.mode)
|
||||
return s.mode
|
||||
}
|
||||
|
||||
// Mtim returns file's last modification time.
|
||||
func (s StatT) Mtim() time.Time {
|
||||
return time.Time(s.mtim)
|
||||
return s.mtim
|
||||
}
|
||||
|
||||
// Stat takes a path to a file and returns
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// Umask sets current process's file mode creation mask to newmask
|
||||
// and returns oldmask.
|
||||
func Umask(newmask int) (oldmask int, err error) {
|
||||
return unix.Umask(newmask), nil
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
// Umask is not supported on the windows platform.
|
||||
func Umask(newmask int) (oldmask int, err error) {
|
||||
// should not be called on cli code path
|
||||
return 0, ErrNotSupportedPlatform
|
||||
}
|
|
@ -0,0 +1,524 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package jsonpb
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
protoV2 "google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
)
|
||||
|
||||
const wrapJSONUnmarshalV2 = false
|
||||
|
||||
// UnmarshalNext unmarshals the next JSON object from d into m.
|
||||
func UnmarshalNext(d *json.Decoder, m proto.Message) error {
|
||||
return new(Unmarshaler).UnmarshalNext(d, m)
|
||||
}
|
||||
|
||||
// Unmarshal unmarshals a JSON object from r into m.
|
||||
func Unmarshal(r io.Reader, m proto.Message) error {
|
||||
return new(Unmarshaler).Unmarshal(r, m)
|
||||
}
|
||||
|
||||
// UnmarshalString unmarshals a JSON object from s into m.
|
||||
func UnmarshalString(s string, m proto.Message) error {
|
||||
return new(Unmarshaler).Unmarshal(strings.NewReader(s), m)
|
||||
}
|
||||
|
||||
// Unmarshaler is a configurable object for converting from a JSON
|
||||
// representation to a protocol buffer object.
|
||||
type Unmarshaler struct {
|
||||
// AllowUnknownFields specifies whether to allow messages to contain
|
||||
// unknown JSON fields, as opposed to failing to unmarshal.
|
||||
AllowUnknownFields bool
|
||||
|
||||
// AnyResolver is used to resolve the google.protobuf.Any well-known type.
|
||||
// If unset, the global registry is used by default.
|
||||
AnyResolver AnyResolver
|
||||
}
|
||||
|
||||
// JSONPBUnmarshaler is implemented by protobuf messages that customize the way
|
||||
// they are unmarshaled from JSON. Messages that implement this should also
|
||||
// implement JSONPBMarshaler so that the custom format can be produced.
|
||||
//
|
||||
// The JSON unmarshaling must follow the JSON to proto specification:
|
||||
// https://developers.google.com/protocol-buffers/docs/proto3#json
|
||||
//
|
||||
// Deprecated: Custom types should implement protobuf reflection instead.
|
||||
type JSONPBUnmarshaler interface {
|
||||
UnmarshalJSONPB(*Unmarshaler, []byte) error
|
||||
}
|
||||
|
||||
// Unmarshal unmarshals a JSON object from r into m.
|
||||
func (u *Unmarshaler) Unmarshal(r io.Reader, m proto.Message) error {
|
||||
return u.UnmarshalNext(json.NewDecoder(r), m)
|
||||
}
|
||||
|
||||
// UnmarshalNext unmarshals the next JSON object from d into m.
|
||||
func (u *Unmarshaler) UnmarshalNext(d *json.Decoder, m proto.Message) error {
|
||||
if m == nil {
|
||||
return errors.New("invalid nil message")
|
||||
}
|
||||
|
||||
// Parse the next JSON object from the stream.
|
||||
raw := json.RawMessage{}
|
||||
if err := d.Decode(&raw); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Check for custom unmarshalers first since they may not properly
|
||||
// implement protobuf reflection that the logic below relies on.
|
||||
if jsu, ok := m.(JSONPBUnmarshaler); ok {
|
||||
return jsu.UnmarshalJSONPB(u, raw)
|
||||
}
|
||||
|
||||
mr := proto.MessageReflect(m)
|
||||
|
||||
// NOTE: For historical reasons, a top-level null is treated as a noop.
|
||||
// This is incorrect, but kept for compatibility.
|
||||
if string(raw) == "null" && mr.Descriptor().FullName() != "google.protobuf.Value" {
|
||||
return nil
|
||||
}
|
||||
|
||||
if wrapJSONUnmarshalV2 {
|
||||
// NOTE: If input message is non-empty, we need to preserve merge semantics
|
||||
// of the old jsonpb implementation. These semantics are not supported by
|
||||
// the protobuf JSON specification.
|
||||
isEmpty := true
|
||||
mr.Range(func(protoreflect.FieldDescriptor, protoreflect.Value) bool {
|
||||
isEmpty = false // at least one iteration implies non-empty
|
||||
return false
|
||||
})
|
||||
if !isEmpty {
|
||||
// Perform unmarshaling into a newly allocated, empty message.
|
||||
mr = mr.New()
|
||||
|
||||
// Use a defer to copy all unmarshaled fields into the original message.
|
||||
dst := proto.MessageReflect(m)
|
||||
defer mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
|
||||
dst.Set(fd, v)
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// Unmarshal using the v2 JSON unmarshaler.
|
||||
opts := protojson.UnmarshalOptions{
|
||||
DiscardUnknown: u.AllowUnknownFields,
|
||||
}
|
||||
if u.AnyResolver != nil {
|
||||
opts.Resolver = anyResolver{u.AnyResolver}
|
||||
}
|
||||
return opts.Unmarshal(raw, mr.Interface())
|
||||
} else {
|
||||
if err := u.unmarshalMessage(mr, raw); err != nil {
|
||||
return err
|
||||
}
|
||||
return protoV2.CheckInitialized(mr.Interface())
|
||||
}
|
||||
}
|
||||
|
||||
func (u *Unmarshaler) unmarshalMessage(m protoreflect.Message, in []byte) error {
|
||||
md := m.Descriptor()
|
||||
fds := md.Fields()
|
||||
|
||||
if jsu, ok := proto.MessageV1(m.Interface()).(JSONPBUnmarshaler); ok {
|
||||
return jsu.UnmarshalJSONPB(u, in)
|
||||
}
|
||||
|
||||
if string(in) == "null" && md.FullName() != "google.protobuf.Value" {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch wellKnownType(md.FullName()) {
|
||||
case "Any":
|
||||
var jsonObject map[string]json.RawMessage
|
||||
if err := json.Unmarshal(in, &jsonObject); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rawTypeURL, ok := jsonObject["@type"]
|
||||
if !ok {
|
||||
return errors.New("Any JSON doesn't have '@type'")
|
||||
}
|
||||
typeURL, err := unquoteString(string(rawTypeURL))
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't unmarshal Any's '@type': %q", rawTypeURL)
|
||||
}
|
||||
m.Set(fds.ByNumber(1), protoreflect.ValueOfString(typeURL))
|
||||
|
||||
var m2 protoreflect.Message
|
||||
if u.AnyResolver != nil {
|
||||
mi, err := u.AnyResolver.Resolve(typeURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m2 = proto.MessageReflect(mi)
|
||||
} else {
|
||||
mt, err := protoregistry.GlobalTypes.FindMessageByURL(typeURL)
|
||||
if err != nil {
|
||||
if err == protoregistry.NotFound {
|
||||
return fmt.Errorf("could not resolve Any message type: %v", typeURL)
|
||||
}
|
||||
return err
|
||||
}
|
||||
m2 = mt.New()
|
||||
}
|
||||
|
||||
if wellKnownType(m2.Descriptor().FullName()) != "" {
|
||||
rawValue, ok := jsonObject["value"]
|
||||
if !ok {
|
||||
return errors.New("Any JSON doesn't have 'value'")
|
||||
}
|
||||
if err := u.unmarshalMessage(m2, rawValue); err != nil {
|
||||
return fmt.Errorf("can't unmarshal Any nested proto %v: %v", typeURL, err)
|
||||
}
|
||||
} else {
|
||||
delete(jsonObject, "@type")
|
||||
rawJSON, err := json.Marshal(jsonObject)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", err)
|
||||
}
|
||||
if err = u.unmarshalMessage(m2, rawJSON); err != nil {
|
||||
return fmt.Errorf("can't unmarshal Any nested proto %v: %v", typeURL, err)
|
||||
}
|
||||
}
|
||||
|
||||
rawWire, err := protoV2.Marshal(m2.Interface())
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't marshal proto %v into Any.Value: %v", typeURL, err)
|
||||
}
|
||||
m.Set(fds.ByNumber(2), protoreflect.ValueOfBytes(rawWire))
|
||||
return nil
|
||||
case "BoolValue", "BytesValue", "StringValue",
|
||||
"Int32Value", "UInt32Value", "FloatValue",
|
||||
"Int64Value", "UInt64Value", "DoubleValue":
|
||||
fd := fds.ByNumber(1)
|
||||
v, err := u.unmarshalValue(m.NewField(fd), in, fd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Set(fd, v)
|
||||
return nil
|
||||
case "Duration":
|
||||
v, err := unquoteString(string(in))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
d, err := time.ParseDuration(v)
|
||||
if err != nil {
|
||||
return fmt.Errorf("bad Duration: %v", err)
|
||||
}
|
||||
|
||||
sec := d.Nanoseconds() / 1e9
|
||||
nsec := d.Nanoseconds() % 1e9
|
||||
m.Set(fds.ByNumber(1), protoreflect.ValueOfInt64(int64(sec)))
|
||||
m.Set(fds.ByNumber(2), protoreflect.ValueOfInt32(int32(nsec)))
|
||||
return nil
|
||||
case "Timestamp":
|
||||
v, err := unquoteString(string(in))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
t, err := time.Parse(time.RFC3339Nano, v)
|
||||
if err != nil {
|
||||
return fmt.Errorf("bad Timestamp: %v", err)
|
||||
}
|
||||
|
||||
sec := t.Unix()
|
||||
nsec := t.Nanosecond()
|
||||
m.Set(fds.ByNumber(1), protoreflect.ValueOfInt64(int64(sec)))
|
||||
m.Set(fds.ByNumber(2), protoreflect.ValueOfInt32(int32(nsec)))
|
||||
return nil
|
||||
case "Value":
|
||||
switch {
|
||||
case string(in) == "null":
|
||||
m.Set(fds.ByNumber(1), protoreflect.ValueOfEnum(0))
|
||||
case string(in) == "true":
|
||||
m.Set(fds.ByNumber(4), protoreflect.ValueOfBool(true))
|
||||
case string(in) == "false":
|
||||
m.Set(fds.ByNumber(4), protoreflect.ValueOfBool(false))
|
||||
case hasPrefixAndSuffix('"', in, '"'):
|
||||
s, err := unquoteString(string(in))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unrecognized type for Value %q", in)
|
||||
}
|
||||
m.Set(fds.ByNumber(3), protoreflect.ValueOfString(s))
|
||||
case hasPrefixAndSuffix('[', in, ']'):
|
||||
v := m.Mutable(fds.ByNumber(6))
|
||||
return u.unmarshalMessage(v.Message(), in)
|
||||
case hasPrefixAndSuffix('{', in, '}'):
|
||||
v := m.Mutable(fds.ByNumber(5))
|
||||
return u.unmarshalMessage(v.Message(), in)
|
||||
default:
|
||||
f, err := strconv.ParseFloat(string(in), 0)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unrecognized type for Value %q", in)
|
||||
}
|
||||
m.Set(fds.ByNumber(2), protoreflect.ValueOfFloat64(f))
|
||||
}
|
||||
return nil
|
||||
case "ListValue":
|
||||
var jsonArray []json.RawMessage
|
||||
if err := json.Unmarshal(in, &jsonArray); err != nil {
|
||||
return fmt.Errorf("bad ListValue: %v", err)
|
||||
}
|
||||
|
||||
lv := m.Mutable(fds.ByNumber(1)).List()
|
||||
for _, raw := range jsonArray {
|
||||
ve := lv.NewElement()
|
||||
if err := u.unmarshalMessage(ve.Message(), raw); err != nil {
|
||||
return err
|
||||
}
|
||||
lv.Append(ve)
|
||||
}
|
||||
return nil
|
||||
case "Struct":
|
||||
var jsonObject map[string]json.RawMessage
|
||||
if err := json.Unmarshal(in, &jsonObject); err != nil {
|
||||
return fmt.Errorf("bad StructValue: %v", err)
|
||||
}
|
||||
|
||||
mv := m.Mutable(fds.ByNumber(1)).Map()
|
||||
for key, raw := range jsonObject {
|
||||
kv := protoreflect.ValueOf(key).MapKey()
|
||||
vv := mv.NewValue()
|
||||
if err := u.unmarshalMessage(vv.Message(), raw); err != nil {
|
||||
return fmt.Errorf("bad value in StructValue for key %q: %v", key, err)
|
||||
}
|
||||
mv.Set(kv, vv)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var jsonObject map[string]json.RawMessage
|
||||
if err := json.Unmarshal(in, &jsonObject); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Handle known fields.
|
||||
for i := 0; i < fds.Len(); i++ {
|
||||
fd := fds.Get(i)
|
||||
if fd.IsWeak() && fd.Message().IsPlaceholder() {
|
||||
continue // weak reference is not linked in
|
||||
}
|
||||
|
||||
// Search for any raw JSON value associated with this field.
|
||||
var raw json.RawMessage
|
||||
name := string(fd.Name())
|
||||
if fd.Kind() == protoreflect.GroupKind {
|
||||
name = string(fd.Message().Name())
|
||||
}
|
||||
if v, ok := jsonObject[name]; ok {
|
||||
delete(jsonObject, name)
|
||||
raw = v
|
||||
}
|
||||
name = string(fd.JSONName())
|
||||
if v, ok := jsonObject[name]; ok {
|
||||
delete(jsonObject, name)
|
||||
raw = v
|
||||
}
|
||||
|
||||
field := m.NewField(fd)
|
||||
// Unmarshal the field value.
|
||||
if raw == nil || (string(raw) == "null" && !isSingularWellKnownValue(fd) && !isSingularJSONPBUnmarshaler(field, fd)) {
|
||||
continue
|
||||
}
|
||||
v, err := u.unmarshalValue(field, raw, fd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Set(fd, v)
|
||||
}
|
||||
|
||||
// Handle extension fields.
|
||||
for name, raw := range jsonObject {
|
||||
if !strings.HasPrefix(name, "[") || !strings.HasSuffix(name, "]") {
|
||||
continue
|
||||
}
|
||||
|
||||
// Resolve the extension field by name.
|
||||
xname := protoreflect.FullName(name[len("[") : len(name)-len("]")])
|
||||
xt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname)
|
||||
if xt == nil && isMessageSet(md) {
|
||||
xt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append("message_set_extension"))
|
||||
}
|
||||
if xt == nil {
|
||||
continue
|
||||
}
|
||||
delete(jsonObject, name)
|
||||
fd := xt.TypeDescriptor()
|
||||
if fd.ContainingMessage().FullName() != m.Descriptor().FullName() {
|
||||
return fmt.Errorf("extension field %q does not extend message %q", xname, m.Descriptor().FullName())
|
||||
}
|
||||
|
||||
field := m.NewField(fd)
|
||||
// Unmarshal the field value.
|
||||
if raw == nil || (string(raw) == "null" && !isSingularWellKnownValue(fd) && !isSingularJSONPBUnmarshaler(field, fd)) {
|
||||
continue
|
||||
}
|
||||
v, err := u.unmarshalValue(field, raw, fd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Set(fd, v)
|
||||
}
|
||||
|
||||
if !u.AllowUnknownFields && len(jsonObject) > 0 {
|
||||
for name := range jsonObject {
|
||||
return fmt.Errorf("unknown field %q in %v", name, md.FullName())
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func isSingularWellKnownValue(fd protoreflect.FieldDescriptor) bool {
|
||||
if md := fd.Message(); md != nil {
|
||||
return md.FullName() == "google.protobuf.Value" && fd.Cardinality() != protoreflect.Repeated
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func isSingularJSONPBUnmarshaler(v protoreflect.Value, fd protoreflect.FieldDescriptor) bool {
|
||||
if fd.Message() != nil && fd.Cardinality() != protoreflect.Repeated {
|
||||
_, ok := proto.MessageV1(v.Interface()).(JSONPBUnmarshaler)
|
||||
return ok
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (u *Unmarshaler) unmarshalValue(v protoreflect.Value, in []byte, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
|
||||
switch {
|
||||
case fd.IsList():
|
||||
var jsonArray []json.RawMessage
|
||||
if err := json.Unmarshal(in, &jsonArray); err != nil {
|
||||
return v, err
|
||||
}
|
||||
lv := v.List()
|
||||
for _, raw := range jsonArray {
|
||||
ve, err := u.unmarshalSingularValue(lv.NewElement(), raw, fd)
|
||||
if err != nil {
|
||||
return v, err
|
||||
}
|
||||
lv.Append(ve)
|
||||
}
|
||||
return v, nil
|
||||
case fd.IsMap():
|
||||
var jsonObject map[string]json.RawMessage
|
||||
if err := json.Unmarshal(in, &jsonObject); err != nil {
|
||||
return v, err
|
||||
}
|
||||
kfd := fd.MapKey()
|
||||
vfd := fd.MapValue()
|
||||
mv := v.Map()
|
||||
for key, raw := range jsonObject {
|
||||
var kv protoreflect.MapKey
|
||||
if kfd.Kind() == protoreflect.StringKind {
|
||||
kv = protoreflect.ValueOf(key).MapKey()
|
||||
} else {
|
||||
v, err := u.unmarshalSingularValue(kfd.Default(), []byte(key), kfd)
|
||||
if err != nil {
|
||||
return v, err
|
||||
}
|
||||
kv = v.MapKey()
|
||||
}
|
||||
|
||||
vv, err := u.unmarshalSingularValue(mv.NewValue(), raw, vfd)
|
||||
if err != nil {
|
||||
return v, err
|
||||
}
|
||||
mv.Set(kv, vv)
|
||||
}
|
||||
return v, nil
|
||||
default:
|
||||
return u.unmarshalSingularValue(v, in, fd)
|
||||
}
|
||||
}
|
||||
|
||||
var nonFinite = map[string]float64{
|
||||
`"NaN"`: math.NaN(),
|
||||
`"Infinity"`: math.Inf(+1),
|
||||
`"-Infinity"`: math.Inf(-1),
|
||||
}
|
||||
|
||||
func (u *Unmarshaler) unmarshalSingularValue(v protoreflect.Value, in []byte, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {
|
||||
switch fd.Kind() {
|
||||
case protoreflect.BoolKind:
|
||||
return unmarshalValue(in, new(bool))
|
||||
case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
|
||||
return unmarshalValue(trimQuote(in), new(int32))
|
||||
case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
|
||||
return unmarshalValue(trimQuote(in), new(int64))
|
||||
case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
|
||||
return unmarshalValue(trimQuote(in), new(uint32))
|
||||
case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
|
||||
return unmarshalValue(trimQuote(in), new(uint64))
|
||||
case protoreflect.FloatKind:
|
||||
if f, ok := nonFinite[string(in)]; ok {
|
||||
return protoreflect.ValueOfFloat32(float32(f)), nil
|
||||
}
|
||||
return unmarshalValue(trimQuote(in), new(float32))
|
||||
case protoreflect.DoubleKind:
|
||||
if f, ok := nonFinite[string(in)]; ok {
|
||||
return protoreflect.ValueOfFloat64(float64(f)), nil
|
||||
}
|
||||
return unmarshalValue(trimQuote(in), new(float64))
|
||||
case protoreflect.StringKind:
|
||||
return unmarshalValue(in, new(string))
|
||||
case protoreflect.BytesKind:
|
||||
return unmarshalValue(in, new([]byte))
|
||||
case protoreflect.EnumKind:
|
||||
if hasPrefixAndSuffix('"', in, '"') {
|
||||
vd := fd.Enum().Values().ByName(protoreflect.Name(trimQuote(in)))
|
||||
if vd == nil {
|
||||
return v, fmt.Errorf("unknown value %q for enum %s", in, fd.Enum().FullName())
|
||||
}
|
||||
return protoreflect.ValueOfEnum(vd.Number()), nil
|
||||
}
|
||||
return unmarshalValue(in, new(protoreflect.EnumNumber))
|
||||
case protoreflect.MessageKind, protoreflect.GroupKind:
|
||||
err := u.unmarshalMessage(v.Message(), in)
|
||||
return v, err
|
||||
default:
|
||||
panic(fmt.Sprintf("invalid kind %v", fd.Kind()))
|
||||
}
|
||||
}
|
||||
|
||||
func unmarshalValue(in []byte, v interface{}) (protoreflect.Value, error) {
|
||||
err := json.Unmarshal(in, v)
|
||||
return protoreflect.ValueOf(reflect.ValueOf(v).Elem().Interface()), err
|
||||
}
|
||||
|
||||
func unquoteString(in string) (out string, err error) {
|
||||
err = json.Unmarshal([]byte(in), &out)
|
||||
return out, err
|
||||
}
|
||||
|
||||
func hasPrefixAndSuffix(prefix byte, in []byte, suffix byte) bool {
|
||||
if len(in) >= 2 && in[0] == prefix && in[len(in)-1] == suffix {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// trimQuote is like unquoteString but simply strips surrounding quotes.
|
||||
// This is incorrect, but is behavior done by the legacy implementation.
|
||||
func trimQuote(in []byte) []byte {
|
||||
if len(in) >= 2 && in[0] == '"' && in[len(in)-1] == '"' {
|
||||
in = in[1 : len(in)-1]
|
||||
}
|
||||
return in
|
||||
}
|
|
@ -0,0 +1,559 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package jsonpb
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
protoV2 "google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
)
|
||||
|
||||
const wrapJSONMarshalV2 = false
|
||||
|
||||
// Marshaler is a configurable object for marshaling protocol buffer messages
|
||||
// to the specified JSON representation.
|
||||
type Marshaler struct {
|
||||
// OrigName specifies whether to use the original protobuf name for fields.
|
||||
OrigName bool
|
||||
|
||||
// EnumsAsInts specifies whether to render enum values as integers,
|
||||
// as opposed to string values.
|
||||
EnumsAsInts bool
|
||||
|
||||
// EmitDefaults specifies whether to render fields with zero values.
|
||||
EmitDefaults bool
|
||||
|
||||
// Indent controls whether the output is compact or not.
|
||||
// If empty, the output is compact JSON. Otherwise, every JSON object
|
||||
// entry and JSON array value will be on its own line.
|
||||
// Each line will be preceded by repeated copies of Indent, where the
|
||||
// number of copies is the current indentation depth.
|
||||
Indent string
|
||||
|
||||
// AnyResolver is used to resolve the google.protobuf.Any well-known type.
|
||||
// If unset, the global registry is used by default.
|
||||
AnyResolver AnyResolver
|
||||
}
|
||||
|
||||
// JSONPBMarshaler is implemented by protobuf messages that customize the
|
||||
// way they are marshaled to JSON. Messages that implement this should also
|
||||
// implement JSONPBUnmarshaler so that the custom format can be parsed.
|
||||
//
|
||||
// The JSON marshaling must follow the proto to JSON specification:
|
||||
// https://developers.google.com/protocol-buffers/docs/proto3#json
|
||||
//
|
||||
// Deprecated: Custom types should implement protobuf reflection instead.
|
||||
type JSONPBMarshaler interface {
|
||||
MarshalJSONPB(*Marshaler) ([]byte, error)
|
||||
}
|
||||
|
||||
// Marshal serializes a protobuf message as JSON into w.
|
||||
func (jm *Marshaler) Marshal(w io.Writer, m proto.Message) error {
|
||||
b, err := jm.marshal(m)
|
||||
if len(b) > 0 {
|
||||
if _, err := w.Write(b); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// MarshalToString serializes a protobuf message as JSON in string form.
|
||||
func (jm *Marshaler) MarshalToString(m proto.Message) (string, error) {
|
||||
b, err := jm.marshal(m)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(b), nil
|
||||
}
|
||||
|
||||
func (jm *Marshaler) marshal(m proto.Message) ([]byte, error) {
|
||||
v := reflect.ValueOf(m)
|
||||
if m == nil || (v.Kind() == reflect.Ptr && v.IsNil()) {
|
||||
return nil, errors.New("Marshal called with nil")
|
||||
}
|
||||
|
||||
// Check for custom marshalers first since they may not properly
|
||||
// implement protobuf reflection that the logic below relies on.
|
||||
if jsm, ok := m.(JSONPBMarshaler); ok {
|
||||
return jsm.MarshalJSONPB(jm)
|
||||
}
|
||||
|
||||
if wrapJSONMarshalV2 {
|
||||
opts := protojson.MarshalOptions{
|
||||
UseProtoNames: jm.OrigName,
|
||||
UseEnumNumbers: jm.EnumsAsInts,
|
||||
EmitUnpopulated: jm.EmitDefaults,
|
||||
Indent: jm.Indent,
|
||||
}
|
||||
if jm.AnyResolver != nil {
|
||||
opts.Resolver = anyResolver{jm.AnyResolver}
|
||||
}
|
||||
return opts.Marshal(proto.MessageReflect(m).Interface())
|
||||
} else {
|
||||
// Check for unpopulated required fields first.
|
||||
m2 := proto.MessageReflect(m)
|
||||
if err := protoV2.CheckInitialized(m2.Interface()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
w := jsonWriter{Marshaler: jm}
|
||||
err := w.marshalMessage(m2, "", "")
|
||||
return w.buf, err
|
||||
}
|
||||
}
|
||||
|
||||
type jsonWriter struct {
|
||||
*Marshaler
|
||||
buf []byte
|
||||
}
|
||||
|
||||
func (w *jsonWriter) write(s string) {
|
||||
w.buf = append(w.buf, s...)
|
||||
}
|
||||
|
||||
func (w *jsonWriter) marshalMessage(m protoreflect.Message, indent, typeURL string) error {
|
||||
if jsm, ok := proto.MessageV1(m.Interface()).(JSONPBMarshaler); ok {
|
||||
b, err := jsm.MarshalJSONPB(w.Marshaler)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if typeURL != "" {
|
||||
// we are marshaling this object to an Any type
|
||||
var js map[string]*json.RawMessage
|
||||
if err = json.Unmarshal(b, &js); err != nil {
|
||||
return fmt.Errorf("type %T produced invalid JSON: %v", m.Interface(), err)
|
||||
}
|
||||
turl, err := json.Marshal(typeURL)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err)
|
||||
}
|
||||
js["@type"] = (*json.RawMessage)(&turl)
|
||||
if b, err = json.Marshal(js); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
w.write(string(b))
|
||||
return nil
|
||||
}
|
||||
|
||||
md := m.Descriptor()
|
||||
fds := md.Fields()
|
||||
|
||||
// Handle well-known types.
|
||||
const secondInNanos = int64(time.Second / time.Nanosecond)
|
||||
switch wellKnownType(md.FullName()) {
|
||||
case "Any":
|
||||
return w.marshalAny(m, indent)
|
||||
case "BoolValue", "BytesValue", "StringValue",
|
||||
"Int32Value", "UInt32Value", "FloatValue",
|
||||
"Int64Value", "UInt64Value", "DoubleValue":
|
||||
fd := fds.ByNumber(1)
|
||||
return w.marshalValue(fd, m.Get(fd), indent)
|
||||
case "Duration":
|
||||
const maxSecondsInDuration = 315576000000
|
||||
// "Generated output always contains 0, 3, 6, or 9 fractional digits,
|
||||
// depending on required precision."
|
||||
s := m.Get(fds.ByNumber(1)).Int()
|
||||
ns := m.Get(fds.ByNumber(2)).Int()
|
||||
if s < -maxSecondsInDuration || s > maxSecondsInDuration {
|
||||
return fmt.Errorf("seconds out of range %v", s)
|
||||
}
|
||||
if ns <= -secondInNanos || ns >= secondInNanos {
|
||||
return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos)
|
||||
}
|
||||
if (s > 0 && ns < 0) || (s < 0 && ns > 0) {
|
||||
return errors.New("signs of seconds and nanos do not match")
|
||||
}
|
||||
var sign string
|
||||
if s < 0 || ns < 0 {
|
||||
sign, s, ns = "-", -1*s, -1*ns
|
||||
}
|
||||
x := fmt.Sprintf("%s%d.%09d", sign, s, ns)
|
||||
x = strings.TrimSuffix(x, "000")
|
||||
x = strings.TrimSuffix(x, "000")
|
||||
x = strings.TrimSuffix(x, ".000")
|
||||
w.write(fmt.Sprintf(`"%vs"`, x))
|
||||
return nil
|
||||
case "Timestamp":
|
||||
// "RFC 3339, where generated output will always be Z-normalized
|
||||
// and uses 0, 3, 6 or 9 fractional digits."
|
||||
s := m.Get(fds.ByNumber(1)).Int()
|
||||
ns := m.Get(fds.ByNumber(2)).Int()
|
||||
if ns < 0 || ns >= secondInNanos {
|
||||
return fmt.Errorf("ns out of range [0, %v)", secondInNanos)
|
||||
}
|
||||
t := time.Unix(s, ns).UTC()
|
||||
// time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits).
|
||||
x := t.Format("2006-01-02T15:04:05.000000000")
|
||||
x = strings.TrimSuffix(x, "000")
|
||||
x = strings.TrimSuffix(x, "000")
|
||||
x = strings.TrimSuffix(x, ".000")
|
||||
w.write(fmt.Sprintf(`"%vZ"`, x))
|
||||
return nil
|
||||
case "Value":
|
||||
// JSON value; which is a null, number, string, bool, object, or array.
|
||||
od := md.Oneofs().Get(0)
|
||||
fd := m.WhichOneof(od)
|
||||
if fd == nil {
|
||||
return errors.New("nil Value")
|
||||
}
|
||||
return w.marshalValue(fd, m.Get(fd), indent)
|
||||
case "Struct", "ListValue":
|
||||
// JSON object or array.
|
||||
fd := fds.ByNumber(1)
|
||||
return w.marshalValue(fd, m.Get(fd), indent)
|
||||
}
|
||||
|
||||
w.write("{")
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
}
|
||||
|
||||
firstField := true
|
||||
if typeURL != "" {
|
||||
if err := w.marshalTypeURL(indent, typeURL); err != nil {
|
||||
return err
|
||||
}
|
||||
firstField = false
|
||||
}
|
||||
|
||||
for i := 0; i < fds.Len(); {
|
||||
fd := fds.Get(i)
|
||||
if od := fd.ContainingOneof(); od != nil {
|
||||
fd = m.WhichOneof(od)
|
||||
i += od.Fields().Len()
|
||||
if fd == nil {
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
i++
|
||||
}
|
||||
|
||||
v := m.Get(fd)
|
||||
|
||||
if !m.Has(fd) {
|
||||
if !w.EmitDefaults || fd.ContainingOneof() != nil {
|
||||
continue
|
||||
}
|
||||
if fd.Cardinality() != protoreflect.Repeated && (fd.Message() != nil || fd.Syntax() == protoreflect.Proto2) {
|
||||
v = protoreflect.Value{} // use "null" for singular messages or proto2 scalars
|
||||
}
|
||||
}
|
||||
|
||||
if !firstField {
|
||||
w.writeComma()
|
||||
}
|
||||
if err := w.marshalField(fd, v, indent); err != nil {
|
||||
return err
|
||||
}
|
||||
firstField = false
|
||||
}
|
||||
|
||||
// Handle proto2 extensions.
|
||||
if md.ExtensionRanges().Len() > 0 {
|
||||
// Collect a sorted list of all extension descriptor and values.
|
||||
type ext struct {
|
||||
desc protoreflect.FieldDescriptor
|
||||
val protoreflect.Value
|
||||
}
|
||||
var exts []ext
|
||||
m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
|
||||
if fd.IsExtension() {
|
||||
exts = append(exts, ext{fd, v})
|
||||
}
|
||||
return true
|
||||
})
|
||||
sort.Slice(exts, func(i, j int) bool {
|
||||
return exts[i].desc.Number() < exts[j].desc.Number()
|
||||
})
|
||||
|
||||
for _, ext := range exts {
|
||||
if !firstField {
|
||||
w.writeComma()
|
||||
}
|
||||
if err := w.marshalField(ext.desc, ext.val, indent); err != nil {
|
||||
return err
|
||||
}
|
||||
firstField = false
|
||||
}
|
||||
}
|
||||
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
w.write(indent)
|
||||
}
|
||||
w.write("}")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *jsonWriter) writeComma() {
|
||||
if w.Indent != "" {
|
||||
w.write(",\n")
|
||||
} else {
|
||||
w.write(",")
|
||||
}
|
||||
}
|
||||
|
||||
func (w *jsonWriter) marshalAny(m protoreflect.Message, indent string) error {
|
||||
// "If the Any contains a value that has a special JSON mapping,
|
||||
// it will be converted as follows: {"@type": xxx, "value": yyy}.
|
||||
// Otherwise, the value will be converted into a JSON object,
|
||||
// and the "@type" field will be inserted to indicate the actual data type."
|
||||
md := m.Descriptor()
|
||||
typeURL := m.Get(md.Fields().ByNumber(1)).String()
|
||||
rawVal := m.Get(md.Fields().ByNumber(2)).Bytes()
|
||||
|
||||
var m2 protoreflect.Message
|
||||
if w.AnyResolver != nil {
|
||||
mi, err := w.AnyResolver.Resolve(typeURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m2 = proto.MessageReflect(mi)
|
||||
} else {
|
||||
mt, err := protoregistry.GlobalTypes.FindMessageByURL(typeURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m2 = mt.New()
|
||||
}
|
||||
|
||||
if err := protoV2.Unmarshal(rawVal, m2.Interface()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if wellKnownType(m2.Descriptor().FullName()) == "" {
|
||||
return w.marshalMessage(m2, indent, typeURL)
|
||||
}
|
||||
|
||||
w.write("{")
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
}
|
||||
if err := w.marshalTypeURL(indent, typeURL); err != nil {
|
||||
return err
|
||||
}
|
||||
w.writeComma()
|
||||
if w.Indent != "" {
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
w.write(`"value": `)
|
||||
} else {
|
||||
w.write(`"value":`)
|
||||
}
|
||||
if err := w.marshalMessage(m2, indent+w.Indent, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
w.write(indent)
|
||||
}
|
||||
w.write("}")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *jsonWriter) marshalTypeURL(indent, typeURL string) error {
|
||||
if w.Indent != "" {
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
}
|
||||
w.write(`"@type":`)
|
||||
if w.Indent != "" {
|
||||
w.write(" ")
|
||||
}
|
||||
b, err := json.Marshal(typeURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.write(string(b))
|
||||
return nil
|
||||
}
|
||||
|
||||
// marshalField writes field description and value to the Writer.
|
||||
func (w *jsonWriter) marshalField(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string) error {
|
||||
if w.Indent != "" {
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
}
|
||||
w.write(`"`)
|
||||
switch {
|
||||
case fd.IsExtension():
|
||||
// For message set, use the fname of the message as the extension name.
|
||||
name := string(fd.FullName())
|
||||
if isMessageSet(fd.ContainingMessage()) {
|
||||
name = strings.TrimSuffix(name, ".message_set_extension")
|
||||
}
|
||||
|
||||
w.write("[" + name + "]")
|
||||
case w.OrigName:
|
||||
name := string(fd.Name())
|
||||
if fd.Kind() == protoreflect.GroupKind {
|
||||
name = string(fd.Message().Name())
|
||||
}
|
||||
w.write(name)
|
||||
default:
|
||||
w.write(string(fd.JSONName()))
|
||||
}
|
||||
w.write(`":`)
|
||||
if w.Indent != "" {
|
||||
w.write(" ")
|
||||
}
|
||||
return w.marshalValue(fd, v, indent)
|
||||
}
|
||||
|
||||
func (w *jsonWriter) marshalValue(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string) error {
|
||||
switch {
|
||||
case fd.IsList():
|
||||
w.write("[")
|
||||
comma := ""
|
||||
lv := v.List()
|
||||
for i := 0; i < lv.Len(); i++ {
|
||||
w.write(comma)
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
w.write(w.Indent)
|
||||
}
|
||||
if err := w.marshalSingularValue(fd, lv.Get(i), indent+w.Indent); err != nil {
|
||||
return err
|
||||
}
|
||||
comma = ","
|
||||
}
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
}
|
||||
w.write("]")
|
||||
return nil
|
||||
case fd.IsMap():
|
||||
kfd := fd.MapKey()
|
||||
vfd := fd.MapValue()
|
||||
mv := v.Map()
|
||||
|
||||
// Collect a sorted list of all map keys and values.
|
||||
type entry struct{ key, val protoreflect.Value }
|
||||
var entries []entry
|
||||
mv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {
|
||||
entries = append(entries, entry{k.Value(), v})
|
||||
return true
|
||||
})
|
||||
sort.Slice(entries, func(i, j int) bool {
|
||||
switch kfd.Kind() {
|
||||
case protoreflect.BoolKind:
|
||||
return !entries[i].key.Bool() && entries[j].key.Bool()
|
||||
case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
|
||||
return entries[i].key.Int() < entries[j].key.Int()
|
||||
case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
|
||||
return entries[i].key.Uint() < entries[j].key.Uint()
|
||||
case protoreflect.StringKind:
|
||||
return entries[i].key.String() < entries[j].key.String()
|
||||
default:
|
||||
panic("invalid kind")
|
||||
}
|
||||
})
|
||||
|
||||
w.write(`{`)
|
||||
comma := ""
|
||||
for _, entry := range entries {
|
||||
w.write(comma)
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
w.write(w.Indent)
|
||||
}
|
||||
|
||||
s := fmt.Sprint(entry.key.Interface())
|
||||
b, err := json.Marshal(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.write(string(b))
|
||||
|
||||
w.write(`:`)
|
||||
if w.Indent != "" {
|
||||
w.write(` `)
|
||||
}
|
||||
|
||||
if err := w.marshalSingularValue(vfd, entry.val, indent+w.Indent); err != nil {
|
||||
return err
|
||||
}
|
||||
comma = ","
|
||||
}
|
||||
if w.Indent != "" {
|
||||
w.write("\n")
|
||||
w.write(indent)
|
||||
w.write(w.Indent)
|
||||
}
|
||||
w.write(`}`)
|
||||
return nil
|
||||
default:
|
||||
return w.marshalSingularValue(fd, v, indent)
|
||||
}
|
||||
}
|
||||
|
||||
func (w *jsonWriter) marshalSingularValue(fd protoreflect.FieldDescriptor, v protoreflect.Value, indent string) error {
|
||||
switch {
|
||||
case !v.IsValid():
|
||||
w.write("null")
|
||||
return nil
|
||||
case fd.Message() != nil:
|
||||
return w.marshalMessage(v.Message(), indent+w.Indent, "")
|
||||
case fd.Enum() != nil:
|
||||
if fd.Enum().FullName() == "google.protobuf.NullValue" {
|
||||
w.write("null")
|
||||
return nil
|
||||
}
|
||||
|
||||
vd := fd.Enum().Values().ByNumber(v.Enum())
|
||||
if vd == nil || w.EnumsAsInts {
|
||||
w.write(strconv.Itoa(int(v.Enum())))
|
||||
} else {
|
||||
w.write(`"` + string(vd.Name()) + `"`)
|
||||
}
|
||||
return nil
|
||||
default:
|
||||
switch v.Interface().(type) {
|
||||
case float32, float64:
|
||||
switch {
|
||||
case math.IsInf(v.Float(), +1):
|
||||
w.write(`"Infinity"`)
|
||||
return nil
|
||||
case math.IsInf(v.Float(), -1):
|
||||
w.write(`"-Infinity"`)
|
||||
return nil
|
||||
case math.IsNaN(v.Float()):
|
||||
w.write(`"NaN"`)
|
||||
return nil
|
||||
}
|
||||
case int64, uint64:
|
||||
w.write(fmt.Sprintf(`"%d"`, v.Interface()))
|
||||
return nil
|
||||
}
|
||||
|
||||
b, err := json.Marshal(v.Interface())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.write(string(b))
|
||||
return nil
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package jsonpb provides functionality to marshal and unmarshal between a
|
||||
// protocol buffer message and JSON. It follows the specification at
|
||||
// https://developers.google.com/protocol-buffers/docs/proto3#json.
|
||||
//
|
||||
// Do not rely on the default behavior of the standard encoding/json package
|
||||
// when called on generated message types as it does not operate correctly.
|
||||
//
|
||||
// Deprecated: Use the "google.golang.org/protobuf/encoding/protojson"
|
||||
// package instead.
|
||||
package jsonpb
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
"google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
// AnyResolver takes a type URL, present in an Any message,
|
||||
// and resolves it into an instance of the associated message.
|
||||
type AnyResolver interface {
|
||||
Resolve(typeURL string) (proto.Message, error)
|
||||
}
|
||||
|
||||
type anyResolver struct{ AnyResolver }
|
||||
|
||||
func (r anyResolver) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
|
||||
return r.FindMessageByURL(string(message))
|
||||
}
|
||||
|
||||
func (r anyResolver) FindMessageByURL(url string) (protoreflect.MessageType, error) {
|
||||
m, err := r.Resolve(url)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return protoimpl.X.MessageTypeOf(m), nil
|
||||
}
|
||||
|
||||
func (r anyResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
|
||||
return protoregistry.GlobalTypes.FindExtensionByName(field)
|
||||
}
|
||||
|
||||
func (r anyResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
|
||||
return protoregistry.GlobalTypes.FindExtensionByNumber(message, field)
|
||||
}
|
||||
|
||||
func wellKnownType(s protoreflect.FullName) string {
|
||||
if s.Parent() == "google.protobuf" {
|
||||
switch s.Name() {
|
||||
case "Empty", "Any",
|
||||
"BoolValue", "BytesValue", "StringValue",
|
||||
"Int32Value", "UInt32Value", "FloatValue",
|
||||
"Int64Value", "UInt64Value", "DoubleValue",
|
||||
"Duration", "Timestamp",
|
||||
"NullValue", "Struct", "Value", "ListValue":
|
||||
return string(s.Name())
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func isMessageSet(md protoreflect.MessageDescriptor) bool {
|
||||
ms, ok := md.(interface{ IsMessageSet() bool })
|
||||
return ok && ms.IsMessageSet()
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus)
|
||||
# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> [![Build Status](https://github.com/sirupsen/logrus/workflows/CI/badge.svg)](https://github.com/sirupsen/logrus/actions?query=workflow%3ACI) [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![Go Reference](https://pkg.go.dev/badge/github.com/sirupsen/logrus.svg)](https://pkg.go.dev/github.com/sirupsen/logrus)
|
||||
|
||||
Logrus is a structured logger for Go (golang), completely API compatible with
|
||||
the standard library logger.
|
||||
|
@ -341,7 +341,7 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
init() {
|
||||
func init() {
|
||||
// do something here to set environment depending on an environment variable
|
||||
// or command-line flag
|
||||
if Environment == "production" {
|
||||
|
|
|
@ -26,15 +26,6 @@ func (p *defaultPool) Get() *bytes.Buffer {
|
|||
return p.pool.Get().(*bytes.Buffer)
|
||||
}
|
||||
|
||||
func getBuffer() *bytes.Buffer {
|
||||
return bufferPool.Get()
|
||||
}
|
||||
|
||||
func putBuffer(buf *bytes.Buffer) {
|
||||
buf.Reset()
|
||||
bufferPool.Put(buf)
|
||||
}
|
||||
|
||||
// SetBufferPool allows to replace the default logrus buffer pool
|
||||
// to better meets the specific needs of an application.
|
||||
func SetBufferPool(bp BufferPool) {
|
||||
|
|
|
@ -232,6 +232,7 @@ func (entry *Entry) log(level Level, msg string) {
|
|||
|
||||
newEntry.Logger.mu.Lock()
|
||||
reportCaller := newEntry.Logger.ReportCaller
|
||||
bufPool := newEntry.getBufferPool()
|
||||
newEntry.Logger.mu.Unlock()
|
||||
|
||||
if reportCaller {
|
||||
|
@ -239,11 +240,11 @@ func (entry *Entry) log(level Level, msg string) {
|
|||
}
|
||||
|
||||
newEntry.fireHooks()
|
||||
|
||||
buffer = getBuffer()
|
||||
buffer = bufPool.Get()
|
||||
defer func() {
|
||||
newEntry.Buffer = nil
|
||||
putBuffer(buffer)
|
||||
buffer.Reset()
|
||||
bufPool.Put(buffer)
|
||||
}()
|
||||
buffer.Reset()
|
||||
newEntry.Buffer = buffer
|
||||
|
@ -260,6 +261,13 @@ func (entry *Entry) log(level Level, msg string) {
|
|||
}
|
||||
}
|
||||
|
||||
func (entry *Entry) getBufferPool() (pool BufferPool) {
|
||||
if entry.Logger.BufferPool != nil {
|
||||
return entry.Logger.BufferPool
|
||||
}
|
||||
return bufferPool
|
||||
}
|
||||
|
||||
func (entry *Entry) fireHooks() {
|
||||
var tmpHooks LevelHooks
|
||||
entry.Logger.mu.Lock()
|
||||
|
@ -276,18 +284,21 @@ func (entry *Entry) fireHooks() {
|
|||
}
|
||||
|
||||
func (entry *Entry) write() {
|
||||
entry.Logger.mu.Lock()
|
||||
defer entry.Logger.mu.Unlock()
|
||||
serialized, err := entry.Logger.Formatter.Format(entry)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
|
||||
return
|
||||
}
|
||||
entry.Logger.mu.Lock()
|
||||
defer entry.Logger.mu.Unlock()
|
||||
if _, err := entry.Logger.Out.Write(serialized); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Log will log a message at the level given as parameter.
|
||||
// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit.
|
||||
// For this behaviour Entry.Panic or Entry.Fatal should be used instead.
|
||||
func (entry *Entry) Log(level Level, args ...interface{}) {
|
||||
if entry.Logger.IsLevelEnabled(level) {
|
||||
entry.log(level, fmt.Sprint(args...))
|
||||
|
|
|
@ -44,6 +44,9 @@ type Logger struct {
|
|||
entryPool sync.Pool
|
||||
// Function to exit the application, defaults to `os.Exit()`
|
||||
ExitFunc exitFunc
|
||||
// The buffer pool used to format the log. If it is nil, the default global
|
||||
// buffer pool will be used.
|
||||
BufferPool BufferPool
|
||||
}
|
||||
|
||||
type exitFunc func(int)
|
||||
|
@ -192,6 +195,9 @@ func (logger *Logger) Panicf(format string, args ...interface{}) {
|
|||
logger.Logf(PanicLevel, format, args...)
|
||||
}
|
||||
|
||||
// Log will log a message at the level given as parameter.
|
||||
// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit.
|
||||
// For this behaviour Logger.Panic or Logger.Fatal should be used instead.
|
||||
func (logger *Logger) Log(level Level, args ...interface{}) {
|
||||
if logger.IsLevelEnabled(level) {
|
||||
entry := logger.newEntry()
|
||||
|
@ -402,3 +408,10 @@ func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks {
|
|||
logger.mu.Unlock()
|
||||
return oldHooks
|
||||
}
|
||||
|
||||
// SetBufferPool sets the logger buffer pool.
|
||||
func (logger *Logger) SetBufferPool(pool BufferPool) {
|
||||
logger.mu.Lock()
|
||||
defer logger.mu.Unlock()
|
||||
logger.BufferPool = pool
|
||||
}
|
||||
|
|
|
@ -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 https://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 https://tip.golang.org/CONTRIBUTORS.
|
|
@ -143,7 +143,7 @@ type Server struct {
|
|||
}
|
||||
|
||||
func (s *Server) initialConnRecvWindowSize() int32 {
|
||||
if s.MaxUploadBufferPerConnection > initialWindowSize {
|
||||
if s.MaxUploadBufferPerConnection >= initialWindowSize {
|
||||
return s.MaxUploadBufferPerConnection
|
||||
}
|
||||
return 1 << 20
|
||||
|
@ -869,9 +869,7 @@ func (sc *serverConn) serve() {
|
|||
|
||||
// Each connection starts with initialWindowSize inflow tokens.
|
||||
// If a higher value is configured, we add more tokens.
|
||||
if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 {
|
||||
sc.sendWindowUpdate(nil, int(diff))
|
||||
}
|
||||
sc.sendWindowUpdate(nil)
|
||||
|
||||
if err := sc.readPreface(); err != nil {
|
||||
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 {
|
||||
// Return any buffered unread bytes worth of conn-level flow control.
|
||||
// See golang.org/issue/16481
|
||||
sc.sendWindowUpdate(nil, p.Len())
|
||||
sc.sendWindowUpdate(nil)
|
||||
|
||||
p.CloseWithError(err)
|
||||
}
|
||||
|
@ -1736,7 +1734,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
|||
// sendWindowUpdate, which also schedules sending the
|
||||
// frames.
|
||||
sc.inflow.take(int32(f.Length))
|
||||
sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
|
||||
sc.sendWindowUpdate(nil) // conn-level
|
||||
|
||||
if st != nil && st.resetQueued {
|
||||
// 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))
|
||||
}
|
||||
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))
|
||||
// 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 {
|
||||
wrote, err := st.body.Write(data)
|
||||
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))
|
||||
}
|
||||
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))
|
||||
}
|
||||
|
||||
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)
|
||||
for _, hf := range f.RegularFields() {
|
||||
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 {
|
||||
return nil, nil, err
|
||||
}
|
||||
bodyOpen := !f.StreamEnded()
|
||||
if bodyOpen {
|
||||
if vv, ok := rp.header["Content-Length"]; ok {
|
||||
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) {
|
||||
sc.serveG.check()
|
||||
sc.sendWindowUpdate(nil, n) // conn-level
|
||||
sc.sendWindowUpdate(nil) // conn-level
|
||||
if st.state != stateHalfClosedRemote && st.state != stateClosed {
|
||||
// Don't send this WINDOW_UPDATE if the stream is closed
|
||||
// remotely.
|
||||
sc.sendWindowUpdate(st, n)
|
||||
sc.sendWindowUpdate(st)
|
||||
}
|
||||
}
|
||||
|
||||
// st may be nil for conn-level
|
||||
func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
|
||||
func (sc *serverConn) sendWindowUpdate(st *stream) {
|
||||
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
|
||||
// window is 1 to 2^31-1 (2,147,483,647) octets."
|
||||
// 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)
|
||||
}
|
||||
|
||||
if rws.handlerDone {
|
||||
rws.promoteUndeclaredTrailers()
|
||||
}
|
||||
|
||||
isHeadResp := rws.req.Method == "HEAD"
|
||||
if !rws.sentHeader {
|
||||
rws.sentHeader = true
|
||||
|
@ -2576,10 +2588,6 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
|
|||
return 0, nil
|
||||
}
|
||||
|
||||
if rws.handlerDone {
|
||||
rws.promoteUndeclaredTrailers()
|
||||
}
|
||||
|
||||
// only send trailers if they have actually been defined by the
|
||||
// server handler.
|
||||
hasNonemptyTrailers := rws.hasNonemptyTrailers()
|
||||
|
|
|
@ -259,6 +259,7 @@ func (t *Transport) initConnPool() {
|
|||
type ClientConn struct {
|
||||
t *Transport
|
||||
tconn net.Conn // usually *tls.Conn, except specialized impls
|
||||
tconnClosed bool
|
||||
tlsState *tls.ConnectionState // nil only for specialized impls
|
||||
reused uint32 // whether conn is being reused; atomic
|
||||
singleUse bool // whether being used for a single http.Request
|
||||
|
@ -345,7 +346,7 @@ type clientStream struct {
|
|||
|
||||
reqBody io.ReadCloser
|
||||
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:
|
||||
sentEndStream bool // sent an END_STREAM flag to the peer
|
||||
|
@ -385,9 +386,8 @@ func (cs *clientStream) abortStreamLocked(err error) {
|
|||
cs.abortErr = err
|
||||
close(cs.abort)
|
||||
})
|
||||
if cs.reqBody != nil && !cs.reqBodyClosed {
|
||||
cs.reqBody.Close()
|
||||
cs.reqBodyClosed = true
|
||||
if cs.reqBody != nil {
|
||||
cs.closeReqBodyLocked()
|
||||
}
|
||||
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
|
||||
if cs.cc.cond != nil {
|
||||
|
@ -400,13 +400,24 @@ func (cs *clientStream) abortRequestBodyWrite() {
|
|||
cc := cs.cc
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
if cs.reqBody != nil && !cs.reqBodyClosed {
|
||||
cs.reqBody.Close()
|
||||
cs.reqBodyClosed = true
|
||||
if cs.reqBody != nil && cs.reqBodyClosed == nil {
|
||||
cs.closeReqBodyLocked()
|
||||
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 {
|
||||
conn net.Conn
|
||||
timeout time.Duration
|
||||
|
@ -921,10 +932,10 @@ func (cc *ClientConn) onIdleTimeout() {
|
|||
cc.closeIfIdle()
|
||||
}
|
||||
|
||||
func (cc *ClientConn) closeConn() error {
|
||||
func (cc *ClientConn) closeConn() {
|
||||
t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
|
||||
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.
|
||||
|
@ -990,7 +1001,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||
shutdownEnterWaitStateHook()
|
||||
select {
|
||||
case <-done:
|
||||
return cc.closeConn()
|
||||
cc.closeConn()
|
||||
return nil
|
||||
case <-ctx.Done():
|
||||
cc.mu.Lock()
|
||||
// Free the goroutine above
|
||||
|
@ -1027,7 +1039,7 @@ func (cc *ClientConn) sendGoAway() error {
|
|||
|
||||
// closes the client connection immediately. In-flight requests are interrupted.
|
||||
// err is sent to streams.
|
||||
func (cc *ClientConn) closeForError(err error) error {
|
||||
func (cc *ClientConn) closeForError(err error) {
|
||||
cc.mu.Lock()
|
||||
cc.closed = true
|
||||
for _, cs := range cc.streams {
|
||||
|
@ -1035,7 +1047,7 @@ func (cc *ClientConn) closeForError(err error) error {
|
|||
}
|
||||
cc.cond.Broadcast()
|
||||
cc.mu.Unlock()
|
||||
return cc.closeConn()
|
||||
cc.closeConn()
|
||||
}
|
||||
|
||||
// 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.
|
||||
func (cc *ClientConn) Close() error {
|
||||
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.
|
||||
func (cc *ClientConn) closeForLostPing() error {
|
||||
func (cc *ClientConn) closeForLostPing() {
|
||||
err := errors.New("http2: client connection lost")
|
||||
if f := cc.t.CountError; f != nil {
|
||||
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
|
||||
|
@ -1430,11 +1443,19 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
|
|||
// and in multiple cases: server replies <=299 and >299
|
||||
// while still writing request body
|
||||
cc.mu.Lock()
|
||||
mustCloseBody := false
|
||||
if cs.reqBody != nil && cs.reqBodyClosed == nil {
|
||||
mustCloseBody = true
|
||||
cs.reqBodyClosed = make(chan struct{})
|
||||
}
|
||||
bodyClosed := cs.reqBodyClosed
|
||||
cs.reqBodyClosed = true
|
||||
cc.mu.Unlock()
|
||||
if !bodyClosed && cs.reqBody != nil {
|
||||
if mustCloseBody {
|
||||
cs.reqBody.Close()
|
||||
close(bodyClosed)
|
||||
}
|
||||
if bodyClosed != nil {
|
||||
<-bodyClosed
|
||||
}
|
||||
|
||||
if err != nil && cs.sentEndStream {
|
||||
|
@ -1614,7 +1635,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
|
|||
}
|
||||
if err != nil {
|
||||
cc.mu.Lock()
|
||||
bodyClosed := cs.reqBodyClosed
|
||||
bodyClosed := cs.reqBodyClosed != nil
|
||||
cc.mu.Unlock()
|
||||
switch {
|
||||
case bodyClosed:
|
||||
|
@ -1709,7 +1730,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
|
|||
if cc.closed {
|
||||
return 0, errClientConnClosed
|
||||
}
|
||||
if cs.reqBodyClosed {
|
||||
if cs.reqBodyClosed != nil {
|
||||
return 0, errStopReqBodyWrite
|
||||
}
|
||||
select {
|
||||
|
@ -2005,7 +2026,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
|
|||
// wake up RoundTrip if there is a pending request.
|
||||
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 VerboseLogs {
|
||||
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
|
||||
}
|
||||
cc.closed = true
|
||||
|
||||
for _, cs := range cc.streams {
|
||||
select {
|
||||
case <-cs.peerClosed:
|
||||
|
@ -2674,7 +2696,6 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
|
|||
if fn := cc.t.CountError; fn != nil {
|
||||
fn("recv_goaway_" + f.ErrCode.stringToken())
|
||||
}
|
||||
|
||||
}
|
||||
cc.setGoAway(f)
|
||||
return nil
|
||||
|
@ -3028,7 +3049,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) {
|
|||
cc.mu.Lock()
|
||||
ci.WasIdle = len(cc.streams) == 0 && reused
|
||||
if ci.WasIdle && !cc.lastActive.IsZero() {
|
||||
ci.IdleTime = time.Now().Sub(cc.lastActive)
|
||||
ci.IdleTime = time.Since(cc.lastActive)
|
||||
}
|
||||
cc.mu.Unlock()
|
||||
|
||||
|
|
|
@ -395,7 +395,7 @@ func New(family, title string) Trace {
|
|||
}
|
||||
|
||||
func (tr *trace) Finish() {
|
||||
elapsed := time.Now().Sub(tr.Start)
|
||||
elapsed := time.Since(tr.Start)
|
||||
tr.mu.Lock()
|
||||
tr.Elapsed = elapsed
|
||||
tr.mu.Unlock()
|
||||
|
|
|
@ -126,7 +126,7 @@ errors=$(
|
|||
signals=$(
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' |
|
||||
sort
|
||||
)
|
||||
|
||||
|
@ -136,7 +136,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
|||
sort >_error.grep
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
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
|
||||
|
||||
echo '// mkerrors.sh' "$@"
|
||||
|
|
|
@ -29,8 +29,6 @@ import (
|
|||
"bytes"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// ByteSliceFromString returns a NUL-terminated slice of bytes
|
||||
|
@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
|
|||
ptr = unsafe.Pointer(uintptr(ptr) + 1)
|
||||
}
|
||||
|
||||
var s []byte
|
||||
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
h.Data = unsafe.Pointer(p)
|
||||
h.Len = n
|
||||
h.Cap = n
|
||||
|
||||
return string(s)
|
||||
return string(unsafe.Slice(p, n))
|
||||
}
|
||||
|
||||
// Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||
|
|
|
@ -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
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
// +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 zos
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
import "unsafe"
|
||||
|
||||
// IoctlRetInt performs an ioctl operation specified by req on a device
|
||||
// associated with opened file descriptor fd, and returns a non-negative
|
||||
|
@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error {
|
|||
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
|
||||
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
|
||||
}
|
||||
|
||||
// IoctlLoopGetStatus64 gets the status of the loop device associated with the
|
||||
// file descriptor fd using the LOOP_GET_STATUS64 operation.
|
||||
func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {
|
||||
var value LoopInfo64
|
||||
if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &value, nil
|
||||
}
|
||||
|
||||
// IoctlLoopSetStatus64 sets the status of the loop device associated with the
|
||||
// file descriptor fd using the LOOP_SET_STATUS64 operation.
|
||||
func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
|
||||
return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))
|
||||
}
|
||||
|
|
|
@ -182,6 +182,24 @@ openbsd_mips64)
|
|||
# API consistent across platforms.
|
||||
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)
|
||||
mksyscall="go run mksyscall_solaris.go"
|
||||
mkerrors="$mkerrors -m64"
|
||||
|
@ -214,11 +232,6 @@ esac
|
|||
if [ "$GOOSARCH" == "aix_ppc64" ]; then
|
||||
# aix/ppc64 script generates files instead of writing to stdin.
|
||||
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
|
||||
elif [ "$GOOS" == "darwin" ]; then
|
||||
# 1.12 and later, syscalls via libSystem
|
||||
echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
|
||||
# 1.13 and later, syscalls via libSystem (including syscallPtr)
|
||||
echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
|
||||
elif [ "$GOOS" == "illumos" ]; then
|
||||
# illumos code generation requires a --illumos switch
|
||||
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
|
||||
|
|
|
@ -642,7 +642,7 @@ errors=$(
|
|||
signals=$(
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
||||
sort
|
||||
)
|
||||
|
||||
|
@ -652,7 +652,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
|||
sort >_error.grep
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
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
|
||||
|
||||
echo '// mkerrors.sh' "$@"
|
||||
|
|
|
@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
|
|||
return msgs, nil
|
||||
}
|
||||
|
||||
// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,
|
||||
// message data (a slice of b), and the remainder of b after that single message.
|
||||
// When there are no remaining messages, len(remainder) == 0.
|
||||
func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {
|
||||
h, dbuf, err := socketControlMessageHeaderAndData(b)
|
||||
if err != nil {
|
||||
return Cmsghdr{}, nil, nil, err
|
||||
}
|
||||
if i := cmsgAlignOf(int(h.Len)); i < len(b) {
|
||||
remainder = b[i:]
|
||||
}
|
||||
return *h, dbuf, remainder, nil
|
||||
}
|
||||
|
||||
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
|
||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
||||
if val < 0 {
|
||||
return "-" + uitoa(uint(-val))
|
||||
}
|
||||
return uitoa(uint(val))
|
||||
}
|
||||
|
||||
func uitoa(val uint) string {
|
||||
var buf [32]byte // big enough for int64
|
||||
i := len(buf) - 1
|
||||
for val >= 10 {
|
||||
buf[i] = byte(val%10 + '0')
|
||||
i--
|
||||
val /= 10
|
||||
}
|
||||
buf[i] = byte(val + '0')
|
||||
return string(buf[i:])
|
||||
}
|
|
@ -29,8 +29,6 @@ import (
|
|||
"bytes"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// ByteSliceFromString returns a NUL-terminated slice of bytes
|
||||
|
@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
|
|||
ptr = unsafe.Pointer(uintptr(ptr) + 1)
|
||||
}
|
||||
|
||||
var s []byte
|
||||
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
h.Data = unsafe.Pointer(p)
|
||||
h.Len = n
|
||||
h.Cap = n
|
||||
|
||||
return string(s)
|
||||
return string(unsafe.Slice(p, n))
|
||||
}
|
||||
|
||||
// Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
// 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 darwin && go1.12 && !go1.13
|
||||
// +build darwin,go1.12,!go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const _SYS_GETDIRENTRIES64 = 344
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// To implement this using libSystem we'd need syscall_syscallPtr for
|
||||
// fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
|
||||
// back to raw syscalls for this func on Go 1.12.
|
||||
var p unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
p = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
p = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
return n, errnoErr(e1)
|
||||
}
|
||||
return n, nil
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
// 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 darwin && go1.13
|
||||
// +build darwin,go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
//sys closedir(dir uintptr) (err error)
|
||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||
|
||||
func fdopendir(fd int) (dir uintptr, err error) {
|
||||
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
|
||||
dir = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_fdopendir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
|
||||
// We store the number of entries to skip in the seek
|
||||
// offset of fd. See issue #31368.
|
||||
// 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
|
||||
}
|
||||
|
||||
// We need to duplicate the incoming file descriptor
|
||||
// because the caller expects to retain control of it, but
|
||||
// fdopendir expects to take control of its argument.
|
||||
// Just Dup'ing the file descriptor is not enough, as the
|
||||
// result shares underlying state. Use Openat to make a really
|
||||
// new file descriptor referring to the same directory.
|
||||
fd2, err := Openat(fd, ".", O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
d, err := fdopendir(fd2)
|
||||
if err != nil {
|
||||
Close(fd2)
|
||||
return 0, err
|
||||
}
|
||||
defer closedir(d)
|
||||
|
||||
var cnt int64
|
||||
for {
|
||||
var entry Dirent
|
||||
var entryp *Dirent
|
||||
e := readdir_r(d, &entry, &entryp)
|
||||
if e != 0 {
|
||||
return n, errnoErr(e)
|
||||
}
|
||||
if entryp == nil {
|
||||
break
|
||||
}
|
||||
if skip > 0 {
|
||||
skip--
|
||||
cnt++
|
||||
continue
|
||||
}
|
||||
|
||||
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.
|
||||
var s []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||
hdr.Data = unsafe.Pointer(&entry)
|
||||
hdr.Cap = reclen
|
||||
hdr.Len = 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
|
||||
}
|
|
@ -19,6 +19,96 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
//sys closedir(dir uintptr) (err error)
|
||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||
|
||||
func fdopendir(fd int) (dir uintptr, err error) {
|
||||
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
|
||||
dir = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_fdopendir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
|
||||
// We store the number of entries to skip in the seek
|
||||
// offset of fd. See issue #31368.
|
||||
// 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
|
||||
}
|
||||
|
||||
// We need to duplicate the incoming file descriptor
|
||||
// because the caller expects to retain control of it, but
|
||||
// fdopendir expects to take control of its argument.
|
||||
// Just Dup'ing the file descriptor is not enough, as the
|
||||
// result shares underlying state. Use Openat to make a really
|
||||
// new file descriptor referring to the same directory.
|
||||
fd2, err := Openat(fd, ".", O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
d, err := fdopendir(fd2)
|
||||
if err != nil {
|
||||
Close(fd2)
|
||||
return 0, err
|
||||
}
|
||||
defer closedir(d)
|
||||
|
||||
var cnt int64
|
||||
for {
|
||||
var entry Dirent
|
||||
var entryp *Dirent
|
||||
e := readdir_r(d, &entry, &entryp)
|
||||
if e != 0 {
|
||||
return n, errnoErr(e)
|
||||
}
|
||||
if entryp == nil {
|
||||
break
|
||||
}
|
||||
if skip > 0 {
|
||||
skip--
|
||||
cnt++
|
||||
continue
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
|
|
|
@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
|||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
|||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
package unix
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -79,107 +77,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
|
|||
}
|
||||
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)))
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ package unix
|
|||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"strconv"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
@ -233,7 +234,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
|
|||
func Futimes(fd int, tv []Timeval) (err error) {
|
||||
// Believe it or not, this is the best we can do on Linux
|
||||
// (and is what glibc does).
|
||||
return Utimes("/proc/self/fd/"+itoa(fd), tv)
|
||||
return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv)
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
@ -1553,6 +1554,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
|
|||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
|
@ -1891,17 +1893,28 @@ func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uint
|
|||
return int(ret), nil
|
||||
}
|
||||
|
||||
// issue 1435.
|
||||
// On linux Setuid and Setgid only affects the current thread, not the process.
|
||||
// This does not match what most callers expect so we must return an error
|
||||
// here rather than letting the caller think that the call succeeded.
|
||||
|
||||
func Setuid(uid int) (err error) {
|
||||
return EOPNOTSUPP
|
||||
return syscall.Setuid(uid)
|
||||
}
|
||||
|
||||
func Setgid(uid int) (err error) {
|
||||
return EOPNOTSUPP
|
||||
func Setgid(gid int) (err error) {
|
||||
return syscall.Setgid(gid)
|
||||
}
|
||||
|
||||
func Setreuid(ruid, euid int) (err error) {
|
||||
return syscall.Setreuid(ruid, euid)
|
||||
}
|
||||
|
||||
func Setregid(rgid, egid int) (err error) {
|
||||
return syscall.Setregid(rgid, egid)
|
||||
}
|
||||
|
||||
func Setresuid(ruid, euid, suid int) (err error) {
|
||||
return syscall.Setresuid(ruid, euid, suid)
|
||||
}
|
||||
|
||||
func Setresgid(rgid, egid, sgid int) (err error) {
|
||||
return syscall.Setresgid(rgid, egid, sgid)
|
||||
}
|
||||
|
||||
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.
|
||||
|
@ -2240,7 +2253,7 @@ func (fh *FileHandle) Bytes() []byte {
|
|||
if n == 0 {
|
||||
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
|
||||
|
@ -2356,6 +2369,16 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
|||
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
|
||||
*/
|
||||
|
@ -2414,7 +2437,6 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
|||
// RestartSyscall
|
||||
// RtSigaction
|
||||
// RtSigpending
|
||||
// RtSigprocmask
|
||||
// RtSigqueueinfo
|
||||
// RtSigreturn
|
||||
// RtSigsuspend
|
||||
|
|
|
@ -41,10 +41,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
|
|
|
@ -46,11 +46,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
|
|
@ -62,10 +62,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
|
|
@ -39,11 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
|
|
@ -34,10 +34,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
|
|
@ -37,11 +37,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
|
|
|
@ -32,10 +32,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
|
|
|
@ -34,10 +34,6 @@ import (
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
|
|
@ -34,11 +34,7 @@ package unix
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
|
|
|
@ -38,11 +38,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
|
||||
|
|
|
@ -34,11 +34,7 @@ import (
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
|
|
|
@ -31,11 +31,7 @@ package unix
|
|||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (openbsd && 386) || (openbsd && amd64) || (openbsd && arm) || (openbsd && arm64)
|
||||
// +build openbsd,386 openbsd,amd64 openbsd,arm openbsd,arm64
|
||||
//go:build openbsd && !mips64
|
||||
// +build openbsd,!mips64
|
||||
|
||||
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
|
|
@ -750,8 +750,8 @@ type EventPort struct {
|
|||
// we should handle things gracefully. To do so, we need to keep an extra
|
||||
// reference to the cookie around until the event is processed
|
||||
// thus the otherwise seemingly extraneous "cookies" map
|
||||
// The key of this map is a pointer to the corresponding &fCookie.cookie
|
||||
cookies map[*interface{}]*fileObjCookie
|
||||
// The key of this map is a pointer to the corresponding fCookie
|
||||
cookies map[*fileObjCookie]struct{}
|
||||
}
|
||||
|
||||
// PortEvent is an abstraction of the port_event C struct.
|
||||
|
@ -778,7 +778,7 @@ func NewEventPort() (*EventPort, error) {
|
|||
port: port,
|
||||
fds: make(map[uintptr]*fileObjCookie),
|
||||
paths: make(map[string]*fileObjCookie),
|
||||
cookies: make(map[*interface{}]*fileObjCookie),
|
||||
cookies: make(map[*fileObjCookie]struct{}),
|
||||
}
|
||||
return e, nil
|
||||
}
|
||||
|
@ -799,6 +799,7 @@ func (e *EventPort) Close() error {
|
|||
}
|
||||
e.fds = nil
|
||||
e.paths = nil
|
||||
e.cookies = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -826,17 +827,16 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
|
|||
if _, found := e.paths[path]; found {
|
||||
return fmt.Errorf("%v is already associated with this Event Port", path)
|
||||
}
|
||||
fobj, err := createFileObj(path, stat)
|
||||
fCookie, err := createFileObjCookie(path, stat, cookie)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fCookie := &fileObjCookie{fobj, cookie}
|
||||
_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
|
||||
_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
e.paths[path] = fCookie
|
||||
e.cookies[&fCookie.cookie] = fCookie
|
||||
e.cookies[fCookie] = struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -858,7 +858,7 @@ func (e *EventPort) DissociatePath(path string) error {
|
|||
if err == nil {
|
||||
// dissociate was successful, safe to delete the cookie
|
||||
fCookie := e.paths[path]
|
||||
delete(e.cookies, &fCookie.cookie)
|
||||
delete(e.cookies, fCookie)
|
||||
}
|
||||
delete(e.paths, path)
|
||||
return err
|
||||
|
@ -871,13 +871,16 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
|
|||
if _, found := e.fds[fd]; found {
|
||||
return fmt.Errorf("%v is already associated with this Event Port", fd)
|
||||
}
|
||||
fCookie := &fileObjCookie{nil, cookie}
|
||||
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
|
||||
fCookie, err := createFileObjCookie("", nil, cookie)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
e.fds[fd] = fCookie
|
||||
e.cookies[&fCookie.cookie] = fCookie
|
||||
e.cookies[fCookie] = struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -896,27 +899,31 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
|
|||
if err == nil {
|
||||
// dissociate was successful, safe to delete the cookie
|
||||
fCookie := e.fds[fd]
|
||||
delete(e.cookies, &fCookie.cookie)
|
||||
delete(e.cookies, fCookie)
|
||||
}
|
||||
delete(e.fds, fd)
|
||||
return err
|
||||
}
|
||||
|
||||
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
|
||||
fobj := new(fileObj)
|
||||
func createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) {
|
||||
fCookie := new(fileObjCookie)
|
||||
fCookie.cookie = cookie
|
||||
if name != "" && stat != nil {
|
||||
fCookie.fobj = new(fileObj)
|
||||
bs, err := ByteSliceFromString(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
|
||||
fCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
|
||||
s := stat.Sys().(*syscall.Stat_t)
|
||||
fobj.Atim.Sec = s.Atim.Sec
|
||||
fobj.Atim.Nsec = s.Atim.Nsec
|
||||
fobj.Mtim.Sec = s.Mtim.Sec
|
||||
fobj.Mtim.Nsec = s.Mtim.Nsec
|
||||
fobj.Ctim.Sec = s.Ctim.Sec
|
||||
fobj.Ctim.Nsec = s.Ctim.Nsec
|
||||
return fobj, nil
|
||||
fCookie.fobj.Atim.Sec = s.Atim.Sec
|
||||
fCookie.fobj.Atim.Nsec = s.Atim.Nsec
|
||||
fCookie.fobj.Mtim.Sec = s.Mtim.Sec
|
||||
fCookie.fobj.Mtim.Nsec = s.Mtim.Nsec
|
||||
fCookie.fobj.Ctim.Sec = s.Ctim.Sec
|
||||
fCookie.fobj.Ctim.Nsec = s.Ctim.Nsec
|
||||
}
|
||||
return fCookie, nil
|
||||
}
|
||||
|
||||
// GetOne wraps port_get(3c) and returns a single PortEvent.
|
||||
|
@ -929,44 +936,50 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
|
|||
p := new(PortEvent)
|
||||
e.mu.Lock()
|
||||
defer e.mu.Unlock()
|
||||
e.peIntToExt(pe, p)
|
||||
err = e.peIntToExt(pe, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
|
||||
// NOTE: Always call this function while holding the e.mu mutex
|
||||
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
|
||||
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error {
|
||||
if e.cookies == nil {
|
||||
return fmt.Errorf("this EventPort is already closed")
|
||||
}
|
||||
peExt.Events = peInt.Events
|
||||
peExt.Source = peInt.Source
|
||||
cookie := (*interface{})(unsafe.Pointer(peInt.User))
|
||||
peExt.Cookie = *cookie
|
||||
fCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User))
|
||||
_, found := e.cookies[fCookie]
|
||||
|
||||
if !found {
|
||||
panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254")
|
||||
}
|
||||
peExt.Cookie = fCookie.cookie
|
||||
delete(e.cookies, fCookie)
|
||||
|
||||
switch peInt.Source {
|
||||
case PORT_SOURCE_FD:
|
||||
delete(e.cookies, cookie)
|
||||
peExt.Fd = uintptr(peInt.Object)
|
||||
// Only remove the fds entry if it exists and this cookie matches
|
||||
if fobj, ok := e.fds[peExt.Fd]; ok {
|
||||
if &fobj.cookie == cookie {
|
||||
if fobj == fCookie {
|
||||
delete(e.fds, peExt.Fd)
|
||||
}
|
||||
}
|
||||
case PORT_SOURCE_FILE:
|
||||
if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
|
||||
// Use our stashed reference rather than using unsafe on what we got back
|
||||
// the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
|
||||
peExt.fobj = fCookie.fobj
|
||||
} else {
|
||||
panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254")
|
||||
}
|
||||
delete(e.cookies, cookie)
|
||||
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
|
||||
// Only remove the paths entry if it exists and this cookie matches
|
||||
if fobj, ok := e.paths[peExt.Path]; ok {
|
||||
if &fobj.cookie == cookie {
|
||||
if fobj == fCookie {
|
||||
delete(e.paths, peExt.Path)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Pending wraps port_getn(3c) and returns how many events are pending.
|
||||
|
@ -990,7 +1003,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
|||
got := uint32(min)
|
||||
max := uint32(len(s))
|
||||
var err error
|
||||
ps := make([]portEvent, max, max)
|
||||
ps := make([]portEvent, max)
|
||||
_, err = port_getn(e.port, &ps[0], max, &got, timeout)
|
||||
// got will be trustworthy with ETIME, but not any other error.
|
||||
if err != nil && err != ETIME {
|
||||
|
@ -998,8 +1011,122 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
|||
}
|
||||
e.mu.Lock()
|
||||
defer e.mu.Unlock()
|
||||
valid := 0
|
||||
for i := 0; i < int(got); i++ {
|
||||
e.peIntToExt(&ps[i], &s[i])
|
||||
err2 := e.peIntToExt(&ps[i], &s[i])
|
||||
if err2 != nil {
|
||||
if valid == 0 && err == nil {
|
||||
// If err2 is the only error and there are no valid events
|
||||
// to return, return it to the caller.
|
||||
err = err2
|
||||
}
|
||||
return int(got), err
|
||||
break
|
||||
}
|
||||
valid = i + 1
|
||||
}
|
||||
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)))
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ import (
|
|||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -117,11 +115,7 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
|
|||
}
|
||||
|
||||
// Use unsafe to convert addr into a []byte.
|
||||
var b []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||
hdr.Data = unsafe.Pointer(addr)
|
||||
hdr.Cap = length
|
||||
hdr.Len = length
|
||||
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
|
||||
|
||||
// Register mapping in m and return it.
|
||||
p := &b[cap(b)-1]
|
||||
|
@ -429,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) {
|
||||
ptr, n, err := to.sockaddr()
|
||||
var ptr unsafe.Pointer
|
||||
var salen _Socklen
|
||||
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) {
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
|
||||
// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
|
||||
// +build gc
|
||||
// +build !ppc64le
|
||||
// +build !ppc64
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -9,8 +9,10 @@ package unix
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
@ -55,7 +57,13 @@ func (d *Dirent) NameString() string {
|
|||
if d == nil {
|
||||
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) {
|
||||
|
@ -1230,6 +1238,14 @@ func Readdir(dir uintptr) (*Dirent, error) {
|
|||
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 {
|
||||
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
|
||||
if e != 0 {
|
||||
|
@ -1821,3 +1837,158 @@ func Unmount(name string, mtm int) (err error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -7,11 +7,7 @@
|
|||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
import "unsafe"
|
||||
|
||||
// SysvShmAttach attaches the Sysv shared memory segment associated with the
|
||||
// shared memory identifier id.
|
||||
|
@ -34,12 +30,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
|
|||
}
|
||||
|
||||
// Use unsafe to convert addr into a []byte.
|
||||
// TODO: convert to unsafe.Slice once we can assume Go 1.17
|
||||
var b []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||
hdr.Data = unsafe.Pointer(addr)
|
||||
hdr.Cap = int(info.Segsz)
|
||||
hdr.Len = int(info.Segsz)
|
||||
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
|
||||
return b, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -160,13 +160,12 @@ func Lremovexattr(link string, attr string) (err error) {
|
|||
}
|
||||
|
||||
func Listxattr(file string, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
// FreeBSD won't allow you to list xattrs from multiple namespaces
|
||||
s := 0
|
||||
s, pos := 0, 0
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
|
||||
stmp, e := ListxattrNS(file, nsid, dest[pos:])
|
||||
|
||||
/* Errors accessing system attrs are ignored so that
|
||||
* we can implement the Linux-like behavior of omitting errors that
|
||||
|
@ -175,66 +174,102 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
|
|||
* Linux will still error if we ask for user attributes on a file that
|
||||
* we don't have read permissions on, so don't ignore those errors
|
||||
*/
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
if e != nil {
|
||||
if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
} else if e != nil {
|
||||
}
|
||||
return s, e
|
||||
}
|
||||
|
||||
s += stmp
|
||||
destsiz -= s
|
||||
if destsiz < 0 {
|
||||
destsiz = 0
|
||||
pos = s
|
||||
if pos > destsiz {
|
||||
pos = destsiz
|
||||
}
|
||||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
|
||||
if e != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s := 0
|
||||
s, pos := 0, 0
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
stmp, e := FlistxattrNS(fd, nsid, dest[pos:])
|
||||
|
||||
if e != nil {
|
||||
if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
} else if e != nil {
|
||||
}
|
||||
return s, e
|
||||
}
|
||||
|
||||
s += stmp
|
||||
destsiz -= s
|
||||
if destsiz < 0 {
|
||||
destsiz = 0
|
||||
pos = s
|
||||
if pos > destsiz {
|
||||
pos = destsiz
|
||||
}
|
||||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
|
||||
if e != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func Llistxattr(link string, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s := 0
|
||||
s, pos := 0, 0
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
stmp, e := LlistxattrNS(link, nsid, dest[pos:])
|
||||
|
||||
if e != nil {
|
||||
if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
continue
|
||||
} else if e != nil {
|
||||
}
|
||||
return s, e
|
||||
}
|
||||
|
||||
s += stmp
|
||||
destsiz -= s
|
||||
if destsiz < 0 {
|
||||
destsiz = 0
|
||||
pos = s
|
||||
if pos > destsiz {
|
||||
pos = destsiz
|
||||
}
|
||||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {
|
||||
d := initxattrdest(dest, 0)
|
||||
destsiz := len(dest)
|
||||
|
||||
s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
|
||||
if e != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,40 +0,0 @@
|
|||
// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && amd64 && go1.13
|
||||
// +build darwin,amd64,go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
|
@ -1,25 +0,0 @@
|
|||
// go run mkasm.go darwin amd64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
|
@ -1,8 +1,8 @@
|
|||
// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && amd64 && go1.12
|
||||
// +build darwin,amd64,go1.12
|
||||
//go:build darwin && amd64
|
||||
// +build darwin,amd64
|
||||
|
||||
package unix
|
||||
|
||||
|
@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]int32) (err error) {
|
||||
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
// go run mkasm.go darwin amd64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.12
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
|
||||
|
@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && arm64 && go1.13
|
||||
// +build darwin,arm64,go1.13
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
|
@ -1,25 +0,0 @@
|
|||
// go run mkasm.go darwin arm64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
|
@ -1,8 +1,8 @@
|
|||
// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build darwin && arm64 && go1.12
|
||||
// +build darwin,arm64,go1.12
|
||||
//go:build darwin && arm64
|
||||
// +build darwin,arm64
|
||||
|
||||
package unix
|
||||
|
||||
|
@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_closedir_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
|
||||
r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
res = Errno(r0)
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readdir_r_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe(p *[2]int32) (err error) {
|
||||
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
// go run mkasm.go darwin arm64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build go1.12
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fdopendir(SB)
|
||||
|
||||
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
|
||||
|
@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_closedir(SB)
|
||||
|
||||
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readdir_r(SB)
|
||||
|
||||
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
|
||||
|
|
|
@ -15,25 +15,19 @@ import (
|
|||
//go:cgo_import_dynamic libc_writev writev "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_putmsg putmsg "libc.so"
|
||||
//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
|
||||
|
||||
//go:linkname procreadv libc_readv
|
||||
//go:linkname procpreadv libc_preadv
|
||||
//go:linkname procwritev libc_writev
|
||||
//go:linkname procpwritev libc_pwritev
|
||||
//go:linkname procaccept4 libc_accept4
|
||||
//go:linkname procputmsg libc_putmsg
|
||||
//go:linkname procgetmsg libc_getmsg
|
||||
|
||||
var (
|
||||
procreadv,
|
||||
procpreadv,
|
||||
procwritev,
|
||||
procpwritev,
|
||||
procaccept4,
|
||||
procputmsg,
|
||||
procgetmsg syscallFunc
|
||||
procaccept4 syscallFunc
|
||||
)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
|
|
@ -287,46 +287,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
||||
n = int(r0)
|
||||
|
|
|
@ -334,36 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -374,16 +344,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -412,46 +412,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -289,36 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -329,16 +299,6 @@ func setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -223,46 +223,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -308,46 +308,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -269,36 +269,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -309,16 +279,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -319,36 +319,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -359,16 +329,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
||||
n = int64(r0)
|
||||
|
|
|
@ -329,36 +329,6 @@ func setfsuid(uid int) (prev int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setregid(rgid int, egid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -369,16 +339,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setreuid(ruid int, euid int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Shutdown(fd int, how int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
|
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_get port_get "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 procpipe2 libc_pipe2
|
||||
|
@ -284,6 +286,8 @@ import (
|
|||
//go:linkname procport_dissociate libc_port_dissociate
|
||||
//go:linkname procport_get libc_port_get
|
||||
//go:linkname procport_getn libc_port_getn
|
||||
//go:linkname procputmsg libc_putmsg
|
||||
//go:linkname procgetmsg libc_getmsg
|
||||
|
||||
var (
|
||||
procpipe,
|
||||
|
@ -421,7 +425,9 @@ var (
|
|||
procport_associate,
|
||||
procport_dissociate,
|
||||
procport_get,
|
||||
procport_getn syscallFunc
|
||||
procport_getn,
|
||||
procputmsg,
|
||||
procgetmsg syscallFunc
|
||||
)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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); }
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue