chore: bump periph.io dependencies
This commit is contained in:
@@ -9,9 +9,9 @@ require (
|
|||||||
github.com/golang/protobuf v1.5.2
|
github.com/golang/protobuf v1.5.2
|
||||||
github.com/sirupsen/logrus v1.8.1
|
github.com/sirupsen/logrus v1.8.1
|
||||||
go.uber.org/zap v1.19.1
|
go.uber.org/zap v1.19.1
|
||||||
periph.io/x/conn/v3 v3.6.8
|
periph.io/x/conn/v3 v3.6.10
|
||||||
periph.io/x/devices/v3 v3.6.11
|
periph.io/x/devices/v3 v3.6.13
|
||||||
periph.io/x/host/v3 v3.7.0
|
periph.io/x/host/v3 v3.7.2
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -19,7 +19,6 @@ require (
|
|||||||
go.uber.org/atomic v1.7.0 // indirect
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
go.uber.org/multierr v1.6.0 // indirect
|
go.uber.org/multierr v1.6.0 // indirect
|
||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
|
||||||
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea // indirect
|
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
|
||||||
google.golang.org/protobuf v1.26.0 // indirect
|
google.golang.org/protobuf v1.26.0 // indirect
|
||||||
periph.io/x/d2xx v0.0.3 // indirect
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh
|
|||||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||||
github.com/eclipse/paho.mqtt.golang v1.3.5 h1:sWtmgNxYM9P2sP+xEItMozsR3w0cqZFlqnNN1bdl41Y=
|
github.com/eclipse/paho.mqtt.golang v1.3.5 h1:sWtmgNxYM9P2sP+xEItMozsR3w0cqZFlqnNN1bdl41Y=
|
||||||
github.com/eclipse/paho.mqtt.golang v1.3.5/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc=
|
github.com/eclipse/paho.mqtt.golang v1.3.5/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc=
|
||||||
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||||
@@ -32,7 +31,6 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO
|
|||||||
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
@@ -50,6 +48,8 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z
|
|||||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
|
github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ=
|
||||||
|
github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
|
||||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
@@ -58,9 +58,9 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||||
github.com/maruel/ansi256 v1.0.2/go.mod h1:x7uow2KFkUgjdzvYHyfZuMEOTGKvCYLyVUHIVg1vYic=
|
github.com/maruel/ansi256 v1.0.2/go.mod h1:x7uow2KFkUgjdzvYHyfZuMEOTGKvCYLyVUHIVg1vYic=
|
||||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||||
@@ -103,7 +103,7 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
|||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
@@ -126,17 +126,19 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
|||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea h1:+WiDlPBBaO+h9vPNZi8uJ3k4BkKQB7Iow3aqwHVA5hI=
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJRph7l9XkNveoExlrKYk=
|
||||||
|
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
@@ -169,12 +171,10 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoAAAebUdzjvbmQsuB7Ykd90=
|
gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoAAAebUdzjvbmQsuB7Ykd90=
|
||||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
periph.io/x/conn/v3 v3.6.8 h1:fnNSwSoKPzpoLOSxml70EInaP6YrrqcucP3KDfNxpmU=
|
periph.io/x/conn/v3 v3.6.10 h1:gwU4ssmZkq1D/uz8hU91i/COo2c9DrRaS4PJZBbCd+c=
|
||||||
periph.io/x/conn/v3 v3.6.8/go.mod h1:3OD27w9YVa5DS97VsUxsPGzD9Qrm5Ny7cF5b6xMMIWg=
|
periph.io/x/conn/v3 v3.6.10/go.mod h1:UqWNaPMosWmNCwtufoTSTTYhB2wXWsMRAJyo1PlxO4Q=
|
||||||
periph.io/x/d2xx v0.0.1/go.mod h1:38Euaaj+s6l0faIRHh32a+PrjXvxFTFkPBEQI0TKg34=
|
periph.io/x/d2xx v0.0.4/go.mod h1:38Euaaj+s6l0faIRHh32a+PrjXvxFTFkPBEQI0TKg34=
|
||||||
periph.io/x/d2xx v0.0.3 h1:BE8XcIdxabu9ZzAr1UXxSz88T9Txki6Xyo8aJ1qZvks=
|
periph.io/x/devices/v3 v3.6.13 h1:SMdPDMsgEjEEZMRcDjrxrteC5l98YoOrrGMkXQdnzC4=
|
||||||
periph.io/x/d2xx v0.0.3/go.mod h1:38Euaaj+s6l0faIRHh32a+PrjXvxFTFkPBEQI0TKg34=
|
periph.io/x/devices/v3 v3.6.13/go.mod h1:XRnz/hPiDuDnFBzvuBr6c+yKzmnmVjQQjoSJCHDCLFc=
|
||||||
periph.io/x/devices/v3 v3.6.11 h1:1BtnoM1tP6tWdJc0nSwMnTg33HXoSn6MX3bUycGyV/A=
|
periph.io/x/host/v3 v3.7.2 h1:rCAUxkzy2xrzh18HP2AoVwTL/fEKqmcJ1icsZQGM58Q=
|
||||||
periph.io/x/devices/v3 v3.6.11/go.mod h1:IMAwLNCAspcOhWed1siiZYlFlj2btxp9XIPBzzgNIvQ=
|
periph.io/x/host/v3 v3.7.2/go.mod h1:nHMlzkPwmnHyP9Tn0I8FV+e0N3K7TjFXLZkIWzAicog=
|
||||||
periph.io/x/host/v3 v3.7.0 h1:9CP/j0FcJmR+PRHlNzAmhV6Mt3GXoWnPmRhknJlQhnE=
|
|
||||||
periph.io/x/host/v3 v3.7.0/go.mod h1:okb5m0yUYLTM/dnMYWMBX47w4owTzyCPLpZUQb35nhs=
|
|
||||||
|
|||||||
+4
-4
@@ -76,7 +76,7 @@ arguments can be passed to the kernel. The third is for low-level use by the
|
|||||||
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
|
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
|
||||||
let it know that a system call is running.
|
let it know that a system call is running.
|
||||||
|
|
||||||
When porting Go to an new architecture/OS, this file must be implemented for
|
When porting Go to a new architecture/OS, this file must be implemented for
|
||||||
each GOOS/GOARCH pair.
|
each GOOS/GOARCH pair.
|
||||||
|
|
||||||
### mksysnum
|
### mksysnum
|
||||||
@@ -107,7 +107,7 @@ prototype can be exported (capitalized) or not.
|
|||||||
Adding a new syscall often just requires adding a new `//sys` function prototype
|
Adding a new syscall often just requires adding a new `//sys` function prototype
|
||||||
with the desired arguments and a capitalized name so it is exported. However, if
|
with the desired arguments and a capitalized name so it is exported. However, if
|
||||||
you want the interface to the syscall to be different, often one will make an
|
you want the interface to the syscall to be different, often one will make an
|
||||||
unexported `//sys` prototype, an then write a custom wrapper in
|
unexported `//sys` prototype, and then write a custom wrapper in
|
||||||
`syscall_${GOOS}.go`.
|
`syscall_${GOOS}.go`.
|
||||||
|
|
||||||
### types files
|
### types files
|
||||||
@@ -137,7 +137,7 @@ some `#if/#elif` macros in your include statements.
|
|||||||
|
|
||||||
This script is used to generate the system's various constants. This doesn't
|
This script is used to generate the system's various constants. This doesn't
|
||||||
just include the error numbers and error strings, but also the signal numbers
|
just include the error numbers and error strings, but also the signal numbers
|
||||||
an a wide variety of miscellaneous constants. The constants come from the list
|
and a wide variety of miscellaneous constants. The constants come from the list
|
||||||
of include files in the `includes_${uname}` variable. A regex then picks out
|
of include files in the `includes_${uname}` variable. A regex then picks out
|
||||||
the desired `#define` statements, and generates the corresponding Go constants.
|
the desired `#define` statements, and generates the corresponding Go constants.
|
||||||
The error numbers and strings are generated from `#include <errno.h>`, and the
|
The error numbers and strings are generated from `#include <errno.h>`, and the
|
||||||
@@ -149,7 +149,7 @@ To add a constant, add the header that includes it to the appropriate variable.
|
|||||||
Then, edit the regex (if necessary) to match the desired constant. Avoid making
|
Then, edit the regex (if necessary) to match the desired constant. Avoid making
|
||||||
the regex too broad to avoid matching unintended constants.
|
the regex too broad to avoid matching unintended constants.
|
||||||
|
|
||||||
### mkmerge.go
|
### internal/mkmerge
|
||||||
|
|
||||||
This program is used to extract duplicate const, func, and type declarations
|
This program is used to extract duplicate const, func, and type declarations
|
||||||
from the generated architecture-specific files listed below, and merge these
|
from the generated architecture-specific files listed below, and merge these
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
//go:build (freebsd || netbsd || openbsd) && gc
|
||||||
// +build darwin freebsd netbsd openbsd
|
// +build freebsd netbsd openbsd
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
//go:build (freebsd || netbsd || openbsd) && gc
|
||||||
// +build darwin freebsd netbsd openbsd
|
// +build freebsd netbsd openbsd
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|||||||
+149
@@ -0,0 +1,149 @@
|
|||||||
|
// Copyright 2021 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 linux
|
||||||
|
// +build linux
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Helpers for dealing with ifreq since it contains a union and thus requires a
|
||||||
|
// lot of unsafe.Pointer casts to use properly.
|
||||||
|
|
||||||
|
// An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq
|
||||||
|
// contains an interface name and a union of arbitrary data which can be
|
||||||
|
// accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq
|
||||||
|
// function.
|
||||||
|
//
|
||||||
|
// Use the Name method to access the stored interface name. The union data
|
||||||
|
// fields can be get and set using the following methods:
|
||||||
|
// - Uint16/SetUint16: flags
|
||||||
|
// - Uint32/SetUint32: ifindex, metric, mtu
|
||||||
|
type Ifreq struct{ raw ifreq }
|
||||||
|
|
||||||
|
// NewIfreq creates an Ifreq with the input network interface name after
|
||||||
|
// validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)
|
||||||
|
// bytes.
|
||||||
|
func NewIfreq(name string) (*Ifreq, error) {
|
||||||
|
// Leave room for terminating NULL byte.
|
||||||
|
if len(name) >= IFNAMSIZ {
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
var ifr ifreq
|
||||||
|
copy(ifr.Ifrn[:], name)
|
||||||
|
|
||||||
|
return &Ifreq{raw: ifr}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc.
|
||||||
|
|
||||||
|
// Name returns the interface name associated with the Ifreq.
|
||||||
|
func (ifr *Ifreq) Name() string {
|
||||||
|
// BytePtrToString requires a NULL terminator or the program may crash. If
|
||||||
|
// one is not present, just return the empty string.
|
||||||
|
if !bytes.Contains(ifr.raw.Ifrn[:], []byte{0x00}) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return BytePtrToString(&ifr.raw.Ifrn[0])
|
||||||
|
}
|
||||||
|
|
||||||
|
// According to netdevice(7), only AF_INET addresses are returned for numerous
|
||||||
|
// sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port
|
||||||
|
// field and other data is always empty.
|
||||||
|
|
||||||
|
// Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C
|
||||||
|
// in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not
|
||||||
|
// AF_INET, an error is returned.
|
||||||
|
func (ifr *Ifreq) Inet4Addr() ([]byte, error) {
|
||||||
|
raw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]))
|
||||||
|
if raw.Family != AF_INET {
|
||||||
|
// Cannot safely interpret raw.Addr bytes as an IPv4 address.
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
return raw.Addr[:], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an
|
||||||
|
// embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length
|
||||||
|
// or an error will be returned.
|
||||||
|
func (ifr *Ifreq) SetInet4Addr(v []byte) error {
|
||||||
|
if len(v) != 4 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
var addr [4]byte
|
||||||
|
copy(addr[:], v)
|
||||||
|
|
||||||
|
ifr.clear()
|
||||||
|
*(*RawSockaddrInet4)(
|
||||||
|
unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]),
|
||||||
|
) = RawSockaddrInet4{
|
||||||
|
// Always set IP family as ioctls would require it anyway.
|
||||||
|
Family: AF_INET,
|
||||||
|
Addr: addr,
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uint16 returns the Ifreq union data as a C short/Go uint16 value.
|
||||||
|
func (ifr *Ifreq) Uint16() uint16 {
|
||||||
|
return *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0]))
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUint16 sets a C short/Go uint16 value as the Ifreq's union data.
|
||||||
|
func (ifr *Ifreq) SetUint16(v uint16) {
|
||||||
|
ifr.clear()
|
||||||
|
*(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uint32 returns the Ifreq union data as a C int/Go uint32 value.
|
||||||
|
func (ifr *Ifreq) Uint32() uint32 {
|
||||||
|
return *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0]))
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUint32 sets a C int/Go uint32 value as the Ifreq's union data.
|
||||||
|
func (ifr *Ifreq) SetUint32(v uint32) {
|
||||||
|
ifr.clear()
|
||||||
|
*(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v
|
||||||
|
}
|
||||||
|
|
||||||
|
// clear zeroes the ifreq's union field to prevent trailing garbage data from
|
||||||
|
// being sent to the kernel if an ifreq is reused.
|
||||||
|
func (ifr *Ifreq) clear() {
|
||||||
|
for i := range ifr.raw.Ifru {
|
||||||
|
ifr.raw.Ifru[i] = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
|
||||||
|
// IoctlGetEthtoolDrvinfo which use these APIs under the hood.
|
||||||
|
|
||||||
|
// An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData,
|
||||||
|
// use the Ifreq.withData method.
|
||||||
|
type ifreqData struct {
|
||||||
|
name [IFNAMSIZ]byte
|
||||||
|
// A type separate from ifreq is required in order to comply with the
|
||||||
|
// unsafe.Pointer rules since the "pointer-ness" of data would not be
|
||||||
|
// preserved if it were cast into the byte array of a raw ifreq.
|
||||||
|
data unsafe.Pointer
|
||||||
|
// Pad to the same size as ifreq.
|
||||||
|
_ [len(ifreq{}.Ifru) - SizeofPtr]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
// withData produces an ifreqData with the pointer p set for ioctls which require
|
||||||
|
// arbitrary pointer data.
|
||||||
|
func (ifr Ifreq) withData(p unsafe.Pointer) ifreqData {
|
||||||
|
return ifreqData{
|
||||||
|
name: ifr.raw.Ifrn,
|
||||||
|
data: p,
|
||||||
|
}
|
||||||
|
}
|
||||||
+39
-39
@@ -5,7 +5,6 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"runtime"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,56 +21,42 @@ func IoctlRetInt(fd int, req uint) (int, error) {
|
|||||||
|
|
||||||
func IoctlGetUint32(fd int, req uint) (uint32, error) {
|
func IoctlGetUint32(fd int, req uint) (uint32, error) {
|
||||||
var value uint32
|
var value uint32
|
||||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
||||||
return value, err
|
return value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
||||||
var value RTCTime
|
var value RTCTime
|
||||||
err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
|
err := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value))
|
||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
||||||
err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
|
return ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value))
|
||||||
runtime.KeepAlive(value)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
|
func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
|
||||||
var value RTCWkAlrm
|
var value RTCWkAlrm
|
||||||
err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
|
err := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value))
|
||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
|
func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
|
||||||
err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value)))
|
return ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value))
|
||||||
runtime.KeepAlive(value)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
type ifreqEthtool struct {
|
|
||||||
name [IFNAMSIZ]byte
|
|
||||||
data unsafe.Pointer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
|
// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
|
||||||
// device specified by ifname.
|
// device specified by ifname.
|
||||||
func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
|
func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
|
||||||
// Leave room for terminating NULL byte.
|
ifr, err := NewIfreq(ifname)
|
||||||
if len(ifname) >= IFNAMSIZ {
|
if err != nil {
|
||||||
return nil, EINVAL
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
value := EthtoolDrvinfo{
|
value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}
|
||||||
Cmd: ETHTOOL_GDRVINFO,
|
ifrd := ifr.withData(unsafe.Pointer(&value))
|
||||||
}
|
|
||||||
ifreq := ifreqEthtool{
|
err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
|
||||||
data: unsafe.Pointer(&value),
|
|
||||||
}
|
|
||||||
copy(ifreq.name[:], ifname)
|
|
||||||
err := ioctl(fd, SIOCETHTOOL, uintptr(unsafe.Pointer(&ifreq)))
|
|
||||||
runtime.KeepAlive(ifreq)
|
|
||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +65,7 @@ func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
|
|||||||
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
||||||
func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
|
func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
|
||||||
var value WatchdogInfo
|
var value WatchdogInfo
|
||||||
err := ioctl(fd, WDIOC_GETSUPPORT, uintptr(unsafe.Pointer(&value)))
|
err := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value))
|
||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +73,7 @@ func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
|
|||||||
// more information, see:
|
// more information, see:
|
||||||
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
||||||
func IoctlWatchdogKeepalive(fd int) error {
|
func IoctlWatchdogKeepalive(fd int) error {
|
||||||
|
// arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr.
|
||||||
return ioctl(fd, WDIOC_KEEPALIVE, 0)
|
return ioctl(fd, WDIOC_KEEPALIVE, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,9 +81,7 @@ func IoctlWatchdogKeepalive(fd int) error {
|
|||||||
// range of data conveyed in value to the file associated with the file
|
// range of data conveyed in value to the file associated with the file
|
||||||
// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
|
// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
|
||||||
func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
|
func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
|
||||||
err := ioctl(destFd, FICLONERANGE, uintptr(unsafe.Pointer(value)))
|
return ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value))
|
||||||
runtime.KeepAlive(value)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
|
// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
|
||||||
@@ -148,7 +132,7 @@ func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
|
|||||||
rawinfo.Reserved = value.Info[i].Reserved
|
rawinfo.Reserved = value.Info[i].Reserved
|
||||||
}
|
}
|
||||||
|
|
||||||
err := ioctl(srcFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(&buf[0])))
|
err := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0]))
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
for i := range value.Info {
|
for i := range value.Info {
|
||||||
@@ -166,31 +150,47 @@ func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
|
func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
|
||||||
err := ioctl(fd, HIDIOCGRDESC, uintptr(unsafe.Pointer(value)))
|
return ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value))
|
||||||
runtime.KeepAlive(value)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
|
func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
|
||||||
var value HIDRawDevInfo
|
var value HIDRawDevInfo
|
||||||
err := ioctl(fd, HIDIOCGRAWINFO, uintptr(unsafe.Pointer(&value)))
|
err := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value))
|
||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlHIDGetRawName(fd int) (string, error) {
|
func IoctlHIDGetRawName(fd int) (string, error) {
|
||||||
var value [_HIDIOCGRAWNAME_LEN]byte
|
var value [_HIDIOCGRAWNAME_LEN]byte
|
||||||
err := ioctl(fd, _HIDIOCGRAWNAME, uintptr(unsafe.Pointer(&value[0])))
|
err := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0]))
|
||||||
return ByteSliceToString(value[:]), err
|
return ByteSliceToString(value[:]), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlHIDGetRawPhys(fd int) (string, error) {
|
func IoctlHIDGetRawPhys(fd int) (string, error) {
|
||||||
var value [_HIDIOCGRAWPHYS_LEN]byte
|
var value [_HIDIOCGRAWPHYS_LEN]byte
|
||||||
err := ioctl(fd, _HIDIOCGRAWPHYS, uintptr(unsafe.Pointer(&value[0])))
|
err := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0]))
|
||||||
return ByteSliceToString(value[:]), err
|
return ByteSliceToString(value[:]), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlHIDGetRawUniq(fd int) (string, error) {
|
func IoctlHIDGetRawUniq(fd int) (string, error) {
|
||||||
var value [_HIDIOCGRAWUNIQ_LEN]byte
|
var value [_HIDIOCGRAWUNIQ_LEN]byte
|
||||||
err := ioctl(fd, _HIDIOCGRAWUNIQ, uintptr(unsafe.Pointer(&value[0])))
|
err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))
|
||||||
return ByteSliceToString(value[:]), err
|
return ByteSliceToString(value[:]), err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IoctlIfreq performs an ioctl using an Ifreq structure for input and/or
|
||||||
|
// output. See the netdevice(7) man page for details.
|
||||||
|
func IoctlIfreq(fd int, req uint, value *Ifreq) error {
|
||||||
|
// It is possible we will add more fields to *Ifreq itself later to prevent
|
||||||
|
// misuse, so pass the raw *ifreq directly.
|
||||||
|
return ioctlPtr(fd, req, unsafe.Pointer(&value.raw))
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(mdlayher): export if and when IfreqData is exported.
|
||||||
|
|
||||||
|
// ioctlIfreqData performs an ioctl using an ifreqData structure for input
|
||||||
|
// and/or output. See the netdevice(7) man page for details.
|
||||||
|
func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
|
||||||
|
// The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are
|
||||||
|
// identical so pass *IfreqData directly.
|
||||||
|
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
|
|||||||
# Use the Docker-based build system
|
# Use the Docker-based build system
|
||||||
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
||||||
$cmd docker build --tag generate:$GOOS $GOOS
|
$cmd docker build --tag generate:$GOOS $GOOS
|
||||||
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
|
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+16
-7
@@ -54,7 +54,7 @@ includes_AIX='
|
|||||||
|
|
||||||
includes_Darwin='
|
includes_Darwin='
|
||||||
#define _DARWIN_C_SOURCE
|
#define _DARWIN_C_SOURCE
|
||||||
#define KERNEL
|
#define KERNEL 1
|
||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#define __APPLE_USE_RFC_3542
|
#define __APPLE_USE_RFC_3542
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -75,6 +75,7 @@ includes_Darwin='
|
|||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
|
#include <sys/vsock.h>
|
||||||
#include <net/bpf.h>
|
#include <net/bpf.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/if_types.h>
|
#include <net/if_types.h>
|
||||||
@@ -82,6 +83,9 @@ includes_Darwin='
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
|
||||||
|
#define TIOCREMOTE 0x80047469
|
||||||
'
|
'
|
||||||
|
|
||||||
includes_DragonFly='
|
includes_DragonFly='
|
||||||
@@ -217,8 +221,6 @@ struct ltchars {
|
|||||||
#include <linux/genetlink.h>
|
#include <linux/genetlink.h>
|
||||||
#include <linux/hdreg.h>
|
#include <linux/hdreg.h>
|
||||||
#include <linux/hidraw.h>
|
#include <linux/hidraw.h>
|
||||||
#include <linux/icmp.h>
|
|
||||||
#include <linux/icmpv6.h>
|
|
||||||
#include <linux/if.h>
|
#include <linux/if.h>
|
||||||
#include <linux/if_addr.h>
|
#include <linux/if_addr.h>
|
||||||
#include <linux/if_alg.h>
|
#include <linux/if_alg.h>
|
||||||
@@ -231,14 +233,17 @@ struct ltchars {
|
|||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/kexec.h>
|
#include <linux/kexec.h>
|
||||||
#include <linux/keyctl.h>
|
#include <linux/keyctl.h>
|
||||||
|
#include <linux/landlock.h>
|
||||||
#include <linux/loop.h>
|
#include <linux/loop.h>
|
||||||
#include <linux/lwtunnel.h>
|
#include <linux/lwtunnel.h>
|
||||||
#include <linux/magic.h>
|
#include <linux/magic.h>
|
||||||
#include <linux/memfd.h>
|
#include <linux/memfd.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/mount.h>
|
||||||
#include <linux/netfilter/nfnetlink.h>
|
#include <linux/netfilter/nfnetlink.h>
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
#include <linux/net_namespace.h>
|
#include <linux/net_namespace.h>
|
||||||
|
#include <linux/nfc.h>
|
||||||
#include <linux/nsfs.h>
|
#include <linux/nsfs.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
#include <linux/pps.h>
|
#include <linux/pps.h>
|
||||||
@@ -466,7 +471,6 @@ ccflags="$@"
|
|||||||
$2 !~ /^EQUIV_/ &&
|
$2 !~ /^EQUIV_/ &&
|
||||||
$2 !~ /^EXPR_/ &&
|
$2 !~ /^EXPR_/ &&
|
||||||
$2 !~ /^EVIOC/ &&
|
$2 !~ /^EVIOC/ &&
|
||||||
$2 !~ /^EV_/ &&
|
|
||||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
$2 ~ /^E[A-Z0-9_]+$/ ||
|
||||||
$2 ~ /^B[0-9_]+$/ ||
|
$2 ~ /^B[0-9_]+$/ ||
|
||||||
$2 ~ /^(OLD|NEW)DEV$/ ||
|
$2 ~ /^(OLD|NEW)DEV$/ ||
|
||||||
@@ -498,10 +502,14 @@ ccflags="$@"
|
|||||||
$2 ~ /^O?XTABS$/ ||
|
$2 ~ /^O?XTABS$/ ||
|
||||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||||
$2 ~ /^IN_/ ||
|
$2 ~ /^IN_/ ||
|
||||||
|
$2 ~ /^LANDLOCK_/ ||
|
||||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
||||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
|
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
|
||||||
|
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
||||||
|
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
||||||
|
$2 ~ /^RAW_PAYLOAD_/ ||
|
||||||
$2 ~ /^TP_STATUS_/ ||
|
$2 ~ /^TP_STATUS_/ ||
|
||||||
$2 ~ /^FALLOC_/ ||
|
$2 ~ /^FALLOC_/ ||
|
||||||
$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
|
$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
|
||||||
@@ -513,7 +521,7 @@ ccflags="$@"
|
|||||||
$2 ~ /^HW_MACHINE$/ ||
|
$2 ~ /^HW_MACHINE$/ ||
|
||||||
$2 ~ /^SYSCTL_VERS/ ||
|
$2 ~ /^SYSCTL_VERS/ ||
|
||||||
$2 !~ "MNT_BITS" &&
|
$2 !~ "MNT_BITS" &&
|
||||||
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
|
$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
|
||||||
$2 ~ /^NS_GET_/ ||
|
$2 ~ /^NS_GET_/ ||
|
||||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
||||||
@@ -559,6 +567,7 @@ ccflags="$@"
|
|||||||
$2 ~ /^KEYCTL_/ ||
|
$2 ~ /^KEYCTL_/ ||
|
||||||
$2 ~ /^PERF_/ ||
|
$2 ~ /^PERF_/ ||
|
||||||
$2 ~ /^SECCOMP_MODE_/ ||
|
$2 ~ /^SECCOMP_MODE_/ ||
|
||||||
|
$2 ~ /^SEEK_/ ||
|
||||||
$2 ~ /^SPLICE_/ ||
|
$2 ~ /^SPLICE_/ ||
|
||||||
$2 ~ /^SYNC_FILE_RANGE_/ ||
|
$2 ~ /^SYNC_FILE_RANGE_/ ||
|
||||||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
||||||
@@ -594,7 +603,7 @@ ccflags="$@"
|
|||||||
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
|
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
|
||||||
$2 ~ /^_?HIDIOC/ ||
|
$2 ~ /^_?HIDIOC/ ||
|
||||||
$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
|
$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
|
||||||
$2 ~ /^MTD_/ ||
|
$2 ~ /^MTD/ ||
|
||||||
$2 ~ /^OTP/ ||
|
$2 ~ /^OTP/ ||
|
||||||
$2 ~ /^MEM/ ||
|
$2 ~ /^MEM/ ||
|
||||||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
||||||
|
|||||||
+49
@@ -34,3 +34,52 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
|
|||||||
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
|
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
|
||||||
return &ucred, nil
|
return &ucred, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
|
||||||
|
func PktInfo4(info *Inet4Pktinfo) []byte {
|
||||||
|
b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
|
||||||
|
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||||
|
h.Level = SOL_IP
|
||||||
|
h.Type = IP_PKTINFO
|
||||||
|
h.SetLen(CmsgLen(SizeofInet4Pktinfo))
|
||||||
|
*(*Inet4Pktinfo)(h.data(0)) = *info
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
|
||||||
|
func PktInfo6(info *Inet6Pktinfo) []byte {
|
||||||
|
b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
|
||||||
|
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||||
|
h.Level = SOL_IPV6
|
||||||
|
h.Type = IPV6_PKTINFO
|
||||||
|
h.SetLen(CmsgLen(SizeofInet6Pktinfo))
|
||||||
|
*(*Inet6Pktinfo)(h.data(0)) = *info
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// ParseOrigDstAddr decodes a socket control message containing the original
|
||||||
|
// destination address. To receive such a message the IP_RECVORIGDSTADDR or
|
||||||
|
// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
|
||||||
|
func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
|
||||||
|
switch {
|
||||||
|
case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
|
||||||
|
pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
|
||||||
|
sa := new(SockaddrInet4)
|
||||||
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
|
sa.Addr = pp.Addr
|
||||||
|
return sa, nil
|
||||||
|
|
||||||
|
case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
|
||||||
|
pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
|
||||||
|
sa := new(SockaddrInet6)
|
||||||
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
|
sa.ZoneId = pp.Scope_id
|
||||||
|
sa.Addr = pp.Addr
|
||||||
|
return sa, nil
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+11
-13
@@ -70,9 +70,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,9 +83,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,9 +257,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
@@ -272,9 +266,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
@@ -385,6 +377,11 @@ func (w WaitStatus) TrapCause() int { return -1 }
|
|||||||
|
|
||||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||||
|
|
||||||
|
//sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
|
||||||
|
func Fsync(fd int) error {
|
||||||
|
return fsyncRange(fd, O_SYNC, 0, 0)
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Direct access
|
* Direct access
|
||||||
*/
|
*/
|
||||||
@@ -401,7 +398,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
|
|||||||
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
|
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
|
||||||
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||||
//sys Fdatasync(fd int) (err error)
|
//sys Fdatasync(fd int) (err error)
|
||||||
//sys Fsync(fd int) (err error)
|
|
||||||
// readdir_r
|
// readdir_r
|
||||||
//sysnb Getpgid(pid int) (pgid int, err error)
|
//sysnb Getpgid(pid int) (pgid int, err error)
|
||||||
|
|
||||||
@@ -523,8 +519,10 @@ func Pipe(p []int) (err error) {
|
|||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err = pipe(&pp)
|
err = pipe(&pp)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-18
@@ -163,9 +163,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,9 +177,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,9 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
sa.raw.Nlen = sa.Nlen
|
sa.raw.Nlen = sa.Nlen
|
||||||
sa.raw.Alen = sa.Alen
|
sa.raw.Alen = sa.Alen
|
||||||
sa.raw.Slen = sa.Slen
|
sa.raw.Slen = sa.Slen
|
||||||
for i := 0; i < len(sa.raw.Data); i++ {
|
sa.raw.Data = sa.Data
|
||||||
sa.raw.Data[i] = sa.Data[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,9 +222,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa.Nlen = pp.Nlen
|
sa.Nlen = pp.Nlen
|
||||||
sa.Alen = pp.Alen
|
sa.Alen = pp.Alen
|
||||||
sa.Slen = pp.Slen
|
sa.Slen = pp.Slen
|
||||||
for i := 0; i < len(sa.Data); i++ {
|
sa.Data = pp.Data
|
||||||
sa.Data[i] = pp.Data[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_UNIX:
|
case AF_UNIX:
|
||||||
@@ -262,9 +254,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
@@ -273,9 +263,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return anyToSockaddrGOOS(fd, rsa)
|
return anyToSockaddrGOOS(fd, rsa)
|
||||||
|
|||||||
+88
-4
@@ -13,6 +13,7 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
@@ -47,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
|
||||||
|
// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
|
||||||
|
// bidirectional communication between a hypervisor and its guest virtual
|
||||||
|
// machines.
|
||||||
|
type SockaddrVM struct {
|
||||||
|
// CID and Port specify a context ID and port address for a VM socket.
|
||||||
|
// Guests have a unique CID, and hosts may have a well-known CID of:
|
||||||
|
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
||||||
|
// - VMADDR_CID_LOCAL: refers to local communication (loopback).
|
||||||
|
// - VMADDR_CID_HOST: refers to other processes on the host.
|
||||||
|
CID uint32
|
||||||
|
Port uint32
|
||||||
|
raw RawSockaddrVM
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
|
sa.raw.Len = SizeofSockaddrVM
|
||||||
|
sa.raw.Family = AF_VSOCK
|
||||||
|
sa.raw.Port = sa.Port
|
||||||
|
sa.raw.Cid = sa.CID
|
||||||
|
|
||||||
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
||||||
|
}
|
||||||
|
|
||||||
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
switch rsa.Addr.Family {
|
switch rsa.Addr.Family {
|
||||||
case AF_SYSTEM:
|
case AF_SYSTEM:
|
||||||
@@ -57,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa.Unit = pp.Sc_unit
|
sa.Unit = pp.Sc_unit
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
|
case AF_VSOCK:
|
||||||
|
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
|
||||||
|
sa := &SockaddrVM{
|
||||||
|
CID: pp.Cid,
|
||||||
|
Port: pp.Port,
|
||||||
|
}
|
||||||
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
}
|
}
|
||||||
@@ -127,8 +159,10 @@ func Pipe(p []int) (err error) {
|
|||||||
}
|
}
|
||||||
var x [2]int32
|
var x [2]int32
|
||||||
err = pipe(&x)
|
err = pipe(&x)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(x[0])
|
p[0] = int(x[0])
|
||||||
p[1] = int(x[1])
|
p[1] = int(x[1])
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,8 +432,62 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
|
|||||||
return x, err
|
return x, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
|
||||||
|
mib, err := sysctlmib(name, args...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var kinfo KinfoProc
|
||||||
|
n := uintptr(SizeofKinfoProc)
|
||||||
|
if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if n != SizeofKinfoProc {
|
||||||
|
return nil, EIO
|
||||||
|
}
|
||||||
|
return &kinfo, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
||||||
|
mib, err := sysctlmib(name, args...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find size.
|
||||||
|
n := uintptr(0)
|
||||||
|
if err := sysctl(mib, nil, &n, nil, 0); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if n == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
if n%SizeofKinfoProc != 0 {
|
||||||
|
return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read into buffer of that size.
|
||||||
|
buf := make([]KinfoProc, n/SizeofKinfoProc)
|
||||||
|
if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if n%SizeofKinfoProc != 0 {
|
||||||
|
return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
|
||||||
|
}
|
||||||
|
|
||||||
|
// The actual call may return less than the original reported required
|
||||||
|
// size so ensure we deal with that.
|
||||||
|
return buf[:n/SizeofKinfoProc], nil
|
||||||
|
}
|
||||||
|
|
||||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||||
|
|
||||||
|
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||||
|
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
||||||
|
//sys shmdt(addr uintptr) (err error)
|
||||||
|
//sys shmget(key int, size int, flag int) (id int, err error)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exposed directly
|
* Exposed directly
|
||||||
*/
|
*/
|
||||||
@@ -557,10 +645,6 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
|
|||||||
// Msgget
|
// Msgget
|
||||||
// Msgsnd
|
// Msgsnd
|
||||||
// Msgrcv
|
// Msgrcv
|
||||||
// Shmat
|
|
||||||
// Shmctl
|
|
||||||
// Shmdt
|
|
||||||
// Shmget
|
|
||||||
// Shm_open
|
// Shm_open
|
||||||
// Shm_unlink
|
// Shm_unlink
|
||||||
// Sem_open
|
// Sem_open
|
||||||
|
|||||||
+8
-2
@@ -101,7 +101,10 @@ func Pipe(p []int) (err error) {
|
|||||||
if len(p) != 2 {
|
if len(p) != 2 {
|
||||||
return EINVAL
|
return EINVAL
|
||||||
}
|
}
|
||||||
p[0], p[1], err = pipe()
|
r, w, err := pipe()
|
||||||
|
if err == nil {
|
||||||
|
p[0], p[1] = r, w
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +117,10 @@ func Pipe2(p []int, flags int) (err error) {
|
|||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
// pipe2 on dragonfly takes an fds array as an argument, but still
|
// pipe2 on dragonfly takes an fds array as an argument, but still
|
||||||
// returns the file descriptors.
|
// returns the file descriptors.
|
||||||
p[0], p[1], err = pipe2(&pp, flags)
|
r, w, err := pipe2(&pp, flags)
|
||||||
|
if err == nil {
|
||||||
|
p[0], p[1] = r, w
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -110,8 +110,10 @@ func Pipe2(p []int, flags int) error {
|
|||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
@@ -162,6 +162,14 @@ func (l *Lifreq) GetLifruInt() int {
|
|||||||
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
|
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 {
|
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
||||||
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
||||||
}
|
}
|
||||||
|
|||||||
+158
-71
@@ -13,7 +13,6 @@ package unix
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"runtime"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
@@ -38,6 +37,13 @@ func Creat(path string, mode uint32) (fd int, err error) {
|
|||||||
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
|
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func EpollCreate(size int) (fd int, err error) {
|
||||||
|
if size <= 0 {
|
||||||
|
return -1, EINVAL
|
||||||
|
}
|
||||||
|
return EpollCreate1(0)
|
||||||
|
}
|
||||||
|
|
||||||
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
|
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
|
||||||
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
|
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
|
||||||
|
|
||||||
@@ -66,11 +72,22 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|||||||
return fchmodat(dirfd, path, mode)
|
return fchmodat(dirfd, path, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
func InotifyInit() (fd int, err error) {
|
||||||
|
return InotifyInit1(0)
|
||||||
|
}
|
||||||
|
|
||||||
// ioctl itself should not be exposed directly, but additional get/set
|
//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
|
||||||
// functions for specific types are permissible.
|
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
|
||||||
// These are defined in ioctl.go and ioctl_linux.go.
|
|
||||||
|
// ioctl itself should not be exposed directly, but additional get/set functions
|
||||||
|
// for specific types are permissible. These are defined in ioctl.go and
|
||||||
|
// ioctl_linux.go.
|
||||||
|
//
|
||||||
|
// The third argument to ioctl is often a pointer but sometimes an integer.
|
||||||
|
// Callers should use ioctlPtr when the third argument is a pointer and ioctl
|
||||||
|
// when the third argument is an integer.
|
||||||
|
//
|
||||||
|
// TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr.
|
||||||
|
|
||||||
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
||||||
|
|
||||||
@@ -102,6 +119,25 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
|
|||||||
return openat2(dirfd, path, how, SizeofOpenHow)
|
return openat2(dirfd, path, how, SizeofOpenHow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Pipe(p []int) error {
|
||||||
|
return Pipe2(p, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) error {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err := pipe2(&pp, flags)
|
||||||
|
if err == nil {
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
||||||
|
|
||||||
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||||
@@ -111,6 +147,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
|
|||||||
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
var ts *Timespec
|
||||||
|
if timeout >= 0 {
|
||||||
|
ts = new(Timespec)
|
||||||
|
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||||
|
}
|
||||||
|
return Ppoll(fds, ts, nil)
|
||||||
|
}
|
||||||
|
|
||||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||||
|
|
||||||
func Readlink(path string, buf []byte) (n int, err error) {
|
func Readlink(path string, buf []byte) (n int, err error) {
|
||||||
@@ -161,27 +206,7 @@ func Utimes(path string, tv []Timeval) error {
|
|||||||
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
||||||
|
|
||||||
func UtimesNano(path string, ts []Timespec) error {
|
func UtimesNano(path string, ts []Timespec) error {
|
||||||
if ts == nil {
|
return UtimesNanoAt(AT_FDCWD, path, ts, 0)
|
||||||
err := utimensat(AT_FDCWD, path, nil, 0)
|
|
||||||
if err != ENOSYS {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return utimes(path, nil)
|
|
||||||
}
|
|
||||||
if len(ts) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
|
||||||
if err != ENOSYS {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// If the utimensat syscall isn't available (utimensat was added to Linux
|
|
||||||
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
|
|
||||||
var tv [2]Timeval
|
|
||||||
for i := 0; i < 2; i++ {
|
|
||||||
tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
|
|
||||||
}
|
|
||||||
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
||||||
@@ -349,9 +374,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,9 +387,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,9 +436,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
sa.raw.Hatype = sa.Hatype
|
sa.raw.Hatype = sa.Hatype
|
||||||
sa.raw.Pkttype = sa.Pkttype
|
sa.raw.Pkttype = sa.Pkttype
|
||||||
sa.raw.Halen = sa.Halen
|
sa.raw.Halen = sa.Halen
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -832,12 +851,10 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
if sa.Addr == nil {
|
if sa.Addr == nil {
|
||||||
return nil, 0, EINVAL
|
return nil, 0, EINVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
sa.raw.Family = AF_TIPC
|
sa.raw.Family = AF_TIPC
|
||||||
sa.raw.Scope = int8(sa.Scope)
|
sa.raw.Scope = int8(sa.Scope)
|
||||||
sa.raw.Addrtype = sa.Addr.tipcAddrtype()
|
sa.raw.Addrtype = sa.Addr.tipcAddrtype()
|
||||||
sa.raw.Addr = sa.Addr.tipcAddr()
|
sa.raw.Addr = sa.Addr.tipcAddr()
|
||||||
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -851,9 +868,7 @@ type SockaddrL2TPIP struct {
|
|||||||
func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
sa.raw.Family = AF_INET
|
sa.raw.Family = AF_INET
|
||||||
sa.raw.Conn_id = sa.ConnId
|
sa.raw.Conn_id = sa.ConnId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -869,9 +884,7 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
sa.raw.Family = AF_INET6
|
sa.raw.Family = AF_INET6
|
||||||
sa.raw.Conn_id = sa.ConnId
|
sa.raw.Conn_id = sa.ConnId
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -904,6 +917,46 @@ func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SockaddrNFC struct {
|
||||||
|
DeviceIdx uint32
|
||||||
|
TargetIdx uint32
|
||||||
|
NFCProtocol uint32
|
||||||
|
raw RawSockaddrNFC
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sa *SockaddrNFC) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
|
sa.raw.Sa_family = AF_NFC
|
||||||
|
sa.raw.Dev_idx = sa.DeviceIdx
|
||||||
|
sa.raw.Target_idx = sa.TargetIdx
|
||||||
|
sa.raw.Nfc_protocol = sa.NFCProtocol
|
||||||
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrNFC, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type SockaddrNFCLLCP struct {
|
||||||
|
DeviceIdx uint32
|
||||||
|
TargetIdx uint32
|
||||||
|
NFCProtocol uint32
|
||||||
|
DestinationSAP uint8
|
||||||
|
SourceSAP uint8
|
||||||
|
ServiceName string
|
||||||
|
raw RawSockaddrNFCLLCP
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sa *SockaddrNFCLLCP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
|
sa.raw.Sa_family = AF_NFC
|
||||||
|
sa.raw.Dev_idx = sa.DeviceIdx
|
||||||
|
sa.raw.Target_idx = sa.TargetIdx
|
||||||
|
sa.raw.Nfc_protocol = sa.NFCProtocol
|
||||||
|
sa.raw.Dsap = sa.DestinationSAP
|
||||||
|
sa.raw.Ssap = sa.SourceSAP
|
||||||
|
if len(sa.ServiceName) > len(sa.raw.Service_name) {
|
||||||
|
return nil, 0, EINVAL
|
||||||
|
}
|
||||||
|
copy(sa.raw.Service_name[:], sa.ServiceName)
|
||||||
|
sa.raw.SetServiceNameLen(len(sa.ServiceName))
|
||||||
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrNFCLLCP, nil
|
||||||
|
}
|
||||||
|
|
||||||
var socketProtocol = func(fd int) (int, error) {
|
var socketProtocol = func(fd int) (int, error) {
|
||||||
return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
|
return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
|
||||||
}
|
}
|
||||||
@@ -927,9 +980,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa.Hatype = pp.Hatype
|
sa.Hatype = pp.Hatype
|
||||||
sa.Pkttype = pp.Pkttype
|
sa.Pkttype = pp.Pkttype
|
||||||
sa.Halen = pp.Halen
|
sa.Halen = pp.Halen
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_UNIX:
|
case AF_UNIX:
|
||||||
@@ -968,18 +1019,14 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
|
pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
|
||||||
sa := new(SockaddrL2TPIP)
|
sa := new(SockaddrL2TPIP)
|
||||||
sa.ConnId = pp.Conn_id
|
sa.ConnId = pp.Conn_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
default:
|
default:
|
||||||
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
|
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
|
||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -995,9 +1042,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa := new(SockaddrL2TPIP6)
|
sa := new(SockaddrL2TPIP6)
|
||||||
sa.ConnId = pp.Conn_id
|
sa.ConnId = pp.Conn_id
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
default:
|
default:
|
||||||
pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
|
pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
|
||||||
@@ -1005,9 +1050,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1144,6 +1187,37 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
}
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
|
case AF_NFC:
|
||||||
|
proto, err := socketProtocol(fd)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
switch proto {
|
||||||
|
case NFC_SOCKPROTO_RAW:
|
||||||
|
pp := (*RawSockaddrNFC)(unsafe.Pointer(rsa))
|
||||||
|
sa := &SockaddrNFC{
|
||||||
|
DeviceIdx: pp.Dev_idx,
|
||||||
|
TargetIdx: pp.Target_idx,
|
||||||
|
NFCProtocol: pp.Nfc_protocol,
|
||||||
|
}
|
||||||
|
return sa, nil
|
||||||
|
case NFC_SOCKPROTO_LLCP:
|
||||||
|
pp := (*RawSockaddrNFCLLCP)(unsafe.Pointer(rsa))
|
||||||
|
if uint64(pp.Service_name_len) > uint64(len(pp.Service_name)) {
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
|
sa := &SockaddrNFCLLCP{
|
||||||
|
DeviceIdx: pp.Dev_idx,
|
||||||
|
TargetIdx: pp.Target_idx,
|
||||||
|
NFCProtocol: pp.Nfc_protocol,
|
||||||
|
DestinationSAP: pp.Dsap,
|
||||||
|
SourceSAP: pp.Ssap,
|
||||||
|
ServiceName: string(pp.Service_name[:pp.Service_name_len]),
|
||||||
|
}
|
||||||
|
return sa, nil
|
||||||
|
default:
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
}
|
}
|
||||||
@@ -1151,11 +1225,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||||
var rsa RawSockaddrAny
|
var rsa RawSockaddrAny
|
||||||
var len _Socklen = SizeofSockaddrAny
|
var len _Socklen = SizeofSockaddrAny
|
||||||
// Try accept4 first for Android, then try accept for kernel older than 2.6.28
|
|
||||||
nfd, err = accept4(fd, &rsa, &len, 0)
|
nfd, err = accept4(fd, &rsa, &len, 0)
|
||||||
if err == ENOSYS {
|
|
||||||
nfd, err = accept(fd, &rsa, &len)
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1277,6 +1347,13 @@ func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
|
|||||||
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
|
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
|
||||||
|
if len(o) == 0 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
|
||||||
|
}
|
||||||
|
|
||||||
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
||||||
|
|
||||||
// KeyctlInt calls keyctl commands in which each argument is an int.
|
// KeyctlInt calls keyctl commands in which each argument is an int.
|
||||||
@@ -1700,6 +1777,16 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
|
|||||||
return mount(source, target, fstype, flags, datap)
|
return mount(source, target, fstype, flags, datap)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
|
||||||
|
|
||||||
|
// MountSetattr is a wrapper for mount_setattr(2).
|
||||||
|
// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
|
||||||
|
//
|
||||||
|
// Requires kernel >= 5.12.
|
||||||
|
func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
|
||||||
|
return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
|
||||||
|
}
|
||||||
|
|
||||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||||
if raceenabled {
|
if raceenabled {
|
||||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||||
@@ -1731,11 +1818,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||||||
//sys Dup(oldfd int) (fd int, err error)
|
//sys Dup(oldfd int) (fd int, err error)
|
||||||
|
|
||||||
func Dup2(oldfd, newfd int) error {
|
func Dup2(oldfd, newfd int) error {
|
||||||
// Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
|
|
||||||
if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
|
|
||||||
return Dup3(oldfd, newfd, 0)
|
return Dup3(oldfd, newfd, 0)
|
||||||
}
|
|
||||||
return dup2(oldfd, newfd)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
||||||
@@ -1788,7 +1871,7 @@ func Getpgrp() (pid int) {
|
|||||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||||
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
||||||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||||
//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
@@ -2223,6 +2306,14 @@ type RemoteIovec struct {
|
|||||||
//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
|
//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
|
||||||
//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
|
//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
|
||||||
|
|
||||||
|
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
|
||||||
|
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
|
||||||
|
|
||||||
|
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||||
|
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
||||||
|
//sys shmdt(addr uintptr) (err error)
|
||||||
|
//sys shmget(key int, size int, flag int) (id int, err error)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unimplemented
|
* Unimplemented
|
||||||
*/
|
*/
|
||||||
@@ -2304,10 +2395,6 @@ type RemoteIovec struct {
|
|||||||
// SetRobustList
|
// SetRobustList
|
||||||
// SetThreadArea
|
// SetThreadArea
|
||||||
// SetTidAddress
|
// SetTidAddress
|
||||||
// Shmat
|
|
||||||
// Shmctl
|
|
||||||
// Shmdt
|
|
||||||
// Shmget
|
|
||||||
// Sigaltstack
|
// Sigaltstack
|
||||||
// Swapoff
|
// Swapoff
|
||||||
// Swapon
|
// Swapon
|
||||||
|
|||||||
+4
-38
@@ -19,36 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
|
|||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe(p *[2]_C_int) (err error)
|
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe(&pp)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (386 default is 32-bit file system and 16-bit uid).
|
// (386 default is 32-bit file system and 16-bit uid).
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||||
@@ -59,7 +31,6 @@ func Pipe2(p []int, flags int) (err error) {
|
|||||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||||
//sysnb Getgid() (gid int) = SYS_GETGID32
|
//sysnb Getgid() (gid int) = SYS_GETGID32
|
||||||
//sysnb Getuid() (uid int) = SYS_GETUID32
|
//sysnb Getuid() (uid int) = SYS_GETUID32
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
||||||
@@ -105,7 +76,7 @@ const rlimInf32 = ^uint32(0)
|
|||||||
const rlimInf64 = ^uint64(0)
|
const rlimInf64 = ^uint64(0)
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, nil, rlim)
|
err = Prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -133,7 +104,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, rlim, nil)
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -378,11 +349,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint32(length)
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-46
@@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -21,17 +19,6 @@ package unix
|
|||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb inotifyInit() (fd int, err error)
|
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
// First try inotify_init1, because Android's seccomp policy blocks the latter.
|
|
||||||
fd, err = InotifyInit1(0)
|
|
||||||
if err == ENOSYS {
|
|
||||||
fd, err = inotifyInit()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
@@ -126,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|||||||
return Timeval{Sec: sec, Usec: usec}
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe(p *[2]_C_int) (err error)
|
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe(&pp)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Rip }
|
func (r *PtraceRegs) PC() uint64 { return r.Rip }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
|
||||||
@@ -172,13 +133,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint64(length)
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||||
|
|||||||
+4
-42
@@ -19,36 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe(p *[2]_C_int) (err error)
|
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
|
|
||||||
err = pipe2(&pp, 0)
|
|
||||||
if err == ENOSYS {
|
|
||||||
err = pipe(&pp)
|
|
||||||
}
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
newoffset, errno := seek(fd, offset, whence)
|
newoffset, errno := seek(fd, offset, whence)
|
||||||
if errno != 0 {
|
if errno != 0 {
|
||||||
@@ -76,8 +46,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (16-bit uid calls are not always supported in newer kernels)
|
// (16-bit uid calls are not always supported in newer kernels)
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||||
@@ -86,7 +54,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||||
//sysnb Getgid() (gid int) = SYS_GETGID32
|
//sysnb Getgid() (gid int) = SYS_GETGID32
|
||||||
//sysnb Getuid() (uid int) = SYS_GETUID32
|
//sysnb Getuid() (uid int) = SYS_GETUID32
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||||
@@ -184,7 +151,7 @@ const rlimInf32 = ^uint32(0)
|
|||||||
const rlimInf64 = ^uint64(0)
|
const rlimInf64 = ^uint64(0)
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, nil, rlim)
|
err = Prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -212,7 +179,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, rlim, nil)
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -256,13 +223,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint32(length)
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
|
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
|
||||||
|
|||||||
+4
-51
@@ -9,13 +9,6 @@ package unix
|
|||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
if size <= 0 {
|
|
||||||
return -1, EINVAL
|
|
||||||
}
|
|
||||||
return EpollCreate1(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -145,33 +138,9 @@ func utimes(path string, tv *[2]Timeval) (err error) {
|
|||||||
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, 0)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
func Getrlimit(resource int, rlim *Rlimit) error {
|
func Getrlimit(resource int, rlim *Rlimit) error {
|
||||||
err := prlimit(0, resource, nil, rlim)
|
err := Prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -180,7 +149,7 @@ func Getrlimit(resource int, rlim *Rlimit) error {
|
|||||||
|
|
||||||
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
func Setrlimit(resource int, rlim *Rlimit) error {
|
func Setrlimit(resource int, rlim *Rlimit) error {
|
||||||
err := prlimit(0, resource, rlim, nil)
|
err := Prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -207,31 +176,15 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
return InotifyInit1(0)
|
rsa.Service_name_len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
// dup2 exists because func Dup3 in syscall_linux.go references
|
|
||||||
// it in an unreachable path. dup2 isn't available on arm64.
|
|
||||||
func dup2(oldfd int, newfd int) error
|
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
_, err := ppoll(nil, 0, nil, nil)
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
var ts *Timespec
|
|
||||||
if timeout >= 0 {
|
|
||||||
ts = new(Timespec)
|
|
||||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
|
||||||
}
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return ppoll(nil, 0, ts, nil)
|
|
||||||
}
|
|
||||||
return ppoll(&fds[0], len(fds), ts, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||||
|
|
||||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||||
|
|||||||
+2
-37
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -94,30 +92,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|||||||
return Timeval{Sec: sec, Usec: usec}
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, 0)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
@@ -217,15 +191,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
return InotifyInit1(0)
|
rsa.Service_name_len = uint64(length)
|
||||||
}
|
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-35
@@ -15,8 +15,6 @@ import (
|
|||||||
|
|
||||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||||
|
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -60,7 +58,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
|
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
|
|
||||||
@@ -113,29 +110,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe() (p1 int, p2 int, err error)
|
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
p[0], p[1], err = pipe()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
||||||
|
|
||||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||||
@@ -157,7 +131,7 @@ type rlimit32 struct {
|
|||||||
//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
|
//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, nil, rlim)
|
err = Prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -185,7 +159,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, rlim, nil)
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -229,11 +203,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint32(length)
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-40
@@ -3,8 +3,7 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && ppc
|
//go:build linux && ppc
|
||||||
// +build linux
|
// +build linux,ppc
|
||||||
// +build ppc
|
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -13,8 +12,6 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||||
@@ -24,7 +21,6 @@ import (
|
|||||||
//sysnb Geteuid() (euid int)
|
//sysnb Geteuid() (euid int)
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
@@ -143,7 +139,7 @@ const rlimInf32 = ^uint32(0)
|
|||||||
const rlimInf64 = ^uint64(0)
|
const rlimInf64 = ^uint64(0)
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, nil, rlim)
|
err = Prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -171,7 +167,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = prlimit(0, resource, rlim, nil)
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -215,39 +211,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe(p *[2]_C_int) (err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint32(length)
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe(&pp)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
||||||
|
|||||||
+2
-36
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -22,7 +20,6 @@ package unix
|
|||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
@@ -100,39 +97,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe(p *[2]_C_int) (err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint64(length)
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe(&pp)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
||||||
|
|||||||
+2
-49
@@ -9,13 +9,6 @@ package unix
|
|||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
if size <= 0 {
|
|
||||||
return -1, EINVAL
|
|
||||||
}
|
|
||||||
return EpollCreate1(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -144,30 +137,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
|
|||||||
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, 0)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
||||||
@@ -188,8 +157,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
return InotifyInit1(0)
|
rsa.Service_name_len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
@@ -197,18 +166,6 @@ func Pause() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
var ts *Timespec
|
|
||||||
if timeout >= 0 {
|
|
||||||
ts = new(Timespec)
|
|
||||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
|
||||||
}
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return ppoll(nil, 0, ts, nil)
|
|
||||||
}
|
|
||||||
return ppoll(&fds[0], len(fds), ts, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||||
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
||||||
}
|
}
|
||||||
@@ -225,7 +182,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
|||||||
}
|
}
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
// dup2 exists because func Dup3 in syscall_linux.go references
|
|
||||||
// it in an unreachable path. dup2 isn't available on arm64.
|
|
||||||
func dup2(oldfd int, newfd int) error
|
|
||||||
|
|||||||
+4
-36
@@ -11,8 +11,6 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
@@ -25,7 +23,6 @@ import (
|
|||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
@@ -77,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|||||||
return Timeval{Sec: sec, Usec: usec}
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
@@ -129,6 +102,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
|
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
|
||||||
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
|
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
|
||||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||||
@@ -320,15 +297,6 @@ func Shutdown(s, how int) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||||
|
|
||||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||||
|
|||||||
+2
-35
@@ -9,7 +9,6 @@ package unix
|
|||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys dup2(oldfd int, newfd int) (err error)
|
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||||
@@ -20,7 +19,6 @@ package unix
|
|||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb InotifyInit() (fd int, err error)
|
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
@@ -116,37 +114,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
|||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe(p *[2]_C_int) (err error)
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint64(length)
|
||||||
func Pipe(p []int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe(&pp)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err = pipe2(&pp, flags)
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
if len(fds) == 0 {
|
|
||||||
return poll(nil, 0, timeout)
|
|
||||||
}
|
|
||||||
return poll(&fds[0], len(fds), timeout)
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-7
@@ -110,14 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
|||||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe() (fd1 int, fd2 int, err error)
|
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
func Pipe(p []int) (err error) {
|
||||||
if len(p) != 2 {
|
return Pipe2(p, 0)
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
p[0], p[1], err = pipe()
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
@@ -128,8 +122,10 @@ func Pipe2(p []int, flags int) error {
|
|||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -87,8 +87,10 @@ func Pipe2(p []int, flags int) error {
|
|||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+248
-12
@@ -13,7 +13,10 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
@@ -63,8 +66,10 @@ func Pipe(p []int) (err error) {
|
|||||||
if n != 0 {
|
if n != 0 {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,8 +81,10 @@ func Pipe2(p []int, flags int) error {
|
|||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,9 +96,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,9 +109,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,9 +417,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
@@ -425,9 +426,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
@@ -744,3 +743,240 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
|
|||||||
func Munmap(b []byte) (err error) {
|
func Munmap(b []byte) (err error) {
|
||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Event Ports
|
||||||
|
|
||||||
|
type fileObjCookie struct {
|
||||||
|
fobj *fileObj
|
||||||
|
cookie interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EventPort provides a safe abstraction on top of Solaris/illumos Event Ports.
|
||||||
|
type EventPort struct {
|
||||||
|
port int
|
||||||
|
mu sync.Mutex
|
||||||
|
fds map[uintptr]interface{}
|
||||||
|
paths map[string]*fileObjCookie
|
||||||
|
}
|
||||||
|
|
||||||
|
// PortEvent is an abstraction of the port_event C struct.
|
||||||
|
// Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD
|
||||||
|
// to see if Path or Fd was the event source. The other will be
|
||||||
|
// uninitialized.
|
||||||
|
type PortEvent struct {
|
||||||
|
Cookie interface{}
|
||||||
|
Events int32
|
||||||
|
Fd uintptr
|
||||||
|
Path string
|
||||||
|
Source uint16
|
||||||
|
fobj *fileObj
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewEventPort creates a new EventPort including the
|
||||||
|
// underlying call to port_create(3c).
|
||||||
|
func NewEventPort() (*EventPort, error) {
|
||||||
|
port, err := port_create()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
e := &EventPort{
|
||||||
|
port: port,
|
||||||
|
fds: make(map[uintptr]interface{}),
|
||||||
|
paths: make(map[string]*fileObjCookie),
|
||||||
|
}
|
||||||
|
return e, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys port_create() (n int, err error)
|
||||||
|
//sys port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error)
|
||||||
|
//sys port_dissociate(port int, source int, object uintptr) (n int, err error)
|
||||||
|
//sys port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error)
|
||||||
|
//sys port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error)
|
||||||
|
|
||||||
|
// Close closes the event port.
|
||||||
|
func (e *EventPort) Close() error {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
e.fds = nil
|
||||||
|
e.paths = nil
|
||||||
|
return Close(e.port)
|
||||||
|
}
|
||||||
|
|
||||||
|
// PathIsWatched checks to see if path is associated with this EventPort.
|
||||||
|
func (e *EventPort) PathIsWatched(path string) bool {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
_, found := e.paths[path]
|
||||||
|
return found
|
||||||
|
}
|
||||||
|
|
||||||
|
// FdIsWatched checks to see if fd is associated with this EventPort.
|
||||||
|
func (e *EventPort) FdIsWatched(fd uintptr) bool {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
_, found := e.fds[fd]
|
||||||
|
return found
|
||||||
|
}
|
||||||
|
|
||||||
|
// AssociatePath wraps port_associate(3c) for a filesystem path including
|
||||||
|
// creating the necessary file_obj from the provided stat information.
|
||||||
|
func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
if _, found := e.paths[path]; found {
|
||||||
|
return fmt.Errorf("%v is already associated with this Event Port", path)
|
||||||
|
}
|
||||||
|
fobj, err := createFileObj(path, stat)
|
||||||
|
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)))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
e.paths[path] = fCookie
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DissociatePath wraps port_dissociate(3c) for a filesystem path.
|
||||||
|
func (e *EventPort) DissociatePath(path string) error {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
f, ok := e.paths[path]
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("%v is not associated with this Event Port", path)
|
||||||
|
}
|
||||||
|
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
delete(e.paths, path)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// AssociateFd wraps calls to port_associate(3c) on file descriptors.
|
||||||
|
func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
if _, found := e.fds[fd]; found {
|
||||||
|
return fmt.Errorf("%v is already associated with this Event Port", fd)
|
||||||
|
}
|
||||||
|
pcookie := &cookie
|
||||||
|
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
e.fds[fd] = pcookie
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DissociateFd wraps calls to port_dissociate(3c) on file descriptors.
|
||||||
|
func (e *EventPort) DissociateFd(fd uintptr) error {
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
_, ok := e.fds[fd]
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("%v is not associated with this Event Port", fd)
|
||||||
|
}
|
||||||
|
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
delete(e.fds, fd)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
|
||||||
|
fobj := new(fileObj)
|
||||||
|
bs, err := ByteSliceFromString(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOne wraps port_get(3c) and returns a single PortEvent.
|
||||||
|
func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
|
||||||
|
pe := new(portEvent)
|
||||||
|
_, err := port_get(e.port, pe, t)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
p := new(PortEvent)
|
||||||
|
p.Events = pe.Events
|
||||||
|
p.Source = pe.Source
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
switch pe.Source {
|
||||||
|
case PORT_SOURCE_FD:
|
||||||
|
p.Fd = uintptr(pe.Object)
|
||||||
|
cookie := (*interface{})(unsafe.Pointer(pe.User))
|
||||||
|
p.Cookie = *cookie
|
||||||
|
delete(e.fds, p.Fd)
|
||||||
|
case PORT_SOURCE_FILE:
|
||||||
|
p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
|
||||||
|
p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
|
||||||
|
cookie := (*interface{})(unsafe.Pointer(pe.User))
|
||||||
|
p.Cookie = *cookie
|
||||||
|
delete(e.paths, p.Path)
|
||||||
|
}
|
||||||
|
return p, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pending wraps port_getn(3c) and returns how many events are pending.
|
||||||
|
func (e *EventPort) Pending() (int, error) {
|
||||||
|
var n uint32 = 0
|
||||||
|
_, err := port_getn(e.port, nil, 0, &n, nil)
|
||||||
|
return int(n), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get wraps port_getn(3c) and fills a slice of PortEvent.
|
||||||
|
// It will block until either min events have been received
|
||||||
|
// or the timeout has been exceeded. It will return how many
|
||||||
|
// events were actually received along with any error information.
|
||||||
|
func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) {
|
||||||
|
if min == 0 {
|
||||||
|
return 0, fmt.Errorf("need to request at least one event or use Pending() instead")
|
||||||
|
}
|
||||||
|
if len(s) < min {
|
||||||
|
return 0, fmt.Errorf("len(s) (%d) is less than min events requested (%d)", len(s), min)
|
||||||
|
}
|
||||||
|
got := uint32(min)
|
||||||
|
max := uint32(len(s))
|
||||||
|
var err error
|
||||||
|
ps := make([]portEvent, max, 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 {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
e.mu.Lock()
|
||||||
|
defer e.mu.Unlock()
|
||||||
|
for i := 0; i < int(got); i++ {
|
||||||
|
s[i].Events = ps[i].Events
|
||||||
|
s[i].Source = ps[i].Source
|
||||||
|
switch ps[i].Source {
|
||||||
|
case PORT_SOURCE_FD:
|
||||||
|
s[i].Fd = uintptr(ps[i].Object)
|
||||||
|
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
|
||||||
|
s[i].Cookie = *cookie
|
||||||
|
delete(e.fds, s[i].Fd)
|
||||||
|
case PORT_SOURCE_FILE:
|
||||||
|
s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
|
||||||
|
s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
|
||||||
|
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
|
||||||
|
s[i].Cookie = *cookie
|
||||||
|
delete(e.paths, s[i].Path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return int(got), err
|
||||||
|
}
|
||||||
|
|||||||
+4
@@ -313,6 +313,10 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Send(s int, buf []byte, flags int) (err error) {
|
||||||
|
return sendto(s, buf, flags, nil, 0)
|
||||||
|
}
|
||||||
|
|
||||||
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
|
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
|
||||||
ptr, n, err := to.sockaddr()
|
ptr, n, err := to.sockaddr()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+6
-12
@@ -67,9 +67,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,9 +81,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.raw.Addr = sa.Addr
|
||||||
sa.raw.Addr[i] = sa.Addr[i]
|
|
||||||
}
|
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,9 +140,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
@@ -155,9 +149,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
for i := 0; i < len(sa.Addr); i++ {
|
sa.Addr = pp.Addr
|
||||||
sa.Addr[i] = pp.Addr[i]
|
|
||||||
}
|
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
@@ -587,8 +579,10 @@ func Pipe(p []int) (err error) {
|
|||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err = pipe(&pp)
|
err = pipe(&pp)
|
||||||
|
if err == nil {
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2021 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 linux
|
||||||
|
// +build linux
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import "runtime"
|
||||||
|
|
||||||
|
// SysvShmCtl performs control operations on the shared memory segment
|
||||||
|
// specified by id.
|
||||||
|
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
|
||||||
|
if runtime.GOARCH == "arm" ||
|
||||||
|
runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
|
||||||
|
cmd |= ipc_64
|
||||||
|
}
|
||||||
|
|
||||||
|
return shmctl(id, cmd, desc)
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
// Copyright 2021 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 && !ios) || linux
|
||||||
|
// +build darwin,!ios linux
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SysvShmAttach attaches the Sysv shared memory segment associated with the
|
||||||
|
// shared memory identifier id.
|
||||||
|
func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
|
||||||
|
addr, errno := shmat(id, addr, flag)
|
||||||
|
if errno != nil {
|
||||||
|
return nil, errno
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the size of the shared memory to enable slice creation
|
||||||
|
var info SysvShmDesc
|
||||||
|
|
||||||
|
_, err := SysvShmCtl(id, IPC_STAT, &info)
|
||||||
|
if err != nil {
|
||||||
|
// release the shared memory if we can't find the size
|
||||||
|
|
||||||
|
// ignoring error from shmdt as there's nothing sensible to return here
|
||||||
|
shmdt(addr)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
return b, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
|
||||||
|
//
|
||||||
|
// It is not safe to use the slice after calling this function.
|
||||||
|
func SysvShmDetach(data []byte) error {
|
||||||
|
if len(data) == 0 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
return shmdt(uintptr(unsafe.Pointer(&data[0])))
|
||||||
|
}
|
||||||
|
|
||||||
|
// SysvShmGet returns the Sysv shared memory identifier associated with key.
|
||||||
|
// If the IPC_CREAT flag is specified a new segment is created.
|
||||||
|
func SysvShmGet(key, size, flag int) (id int, err error) {
|
||||||
|
return shmget(key, size, flag)
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2021 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 && !ios
|
||||||
|
// +build darwin,!ios
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
// SysvShmCtl performs control operations on the shared memory segment
|
||||||
|
// specified by id.
|
||||||
|
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
|
||||||
|
return shmctl(id, cmd, desc)
|
||||||
|
}
|
||||||
+33
-1
@@ -130,8 +130,9 @@ const (
|
|||||||
ATTR_VOL_SIZE = 0x4
|
ATTR_VOL_SIZE = 0x4
|
||||||
ATTR_VOL_SPACEAVAIL = 0x10
|
ATTR_VOL_SPACEAVAIL = 0x10
|
||||||
ATTR_VOL_SPACEFREE = 0x8
|
ATTR_VOL_SPACEFREE = 0x8
|
||||||
|
ATTR_VOL_SPACEUSED = 0x800000
|
||||||
ATTR_VOL_UUID = 0x40000
|
ATTR_VOL_UUID = 0x40000
|
||||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
ATTR_VOL_VALIDMASK = 0xf087ffff
|
||||||
B0 = 0x0
|
B0 = 0x0
|
||||||
B110 = 0x6e
|
B110 = 0x6e
|
||||||
B115200 = 0x1c200
|
B115200 = 0x1c200
|
||||||
@@ -661,6 +662,7 @@ const (
|
|||||||
IN_CLASSD_NSHIFT = 0x1c
|
IN_CLASSD_NSHIFT = 0x1c
|
||||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||||
IN_LOOPBACKNET = 0x7f
|
IN_LOOPBACKNET = 0x7f
|
||||||
|
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
||||||
IPPROTO_3PC = 0x22
|
IPPROTO_3PC = 0x22
|
||||||
IPPROTO_ADFS = 0x44
|
IPPROTO_ADFS = 0x44
|
||||||
IPPROTO_AH = 0x33
|
IPPROTO_AH = 0x33
|
||||||
@@ -1206,6 +1208,7 @@ const (
|
|||||||
RTF_DONE = 0x40
|
RTF_DONE = 0x40
|
||||||
RTF_DYNAMIC = 0x10
|
RTF_DYNAMIC = 0x10
|
||||||
RTF_GATEWAY = 0x2
|
RTF_GATEWAY = 0x2
|
||||||
|
RTF_GLOBAL = 0x40000000
|
||||||
RTF_HOST = 0x4
|
RTF_HOST = 0x4
|
||||||
RTF_IFREF = 0x4000000
|
RTF_IFREF = 0x4000000
|
||||||
RTF_IFSCOPE = 0x1000000
|
RTF_IFSCOPE = 0x1000000
|
||||||
@@ -1262,6 +1265,11 @@ const (
|
|||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIMESTAMP_MONOTONIC = 0x4
|
SCM_TIMESTAMP_MONOTONIC = 0x4
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x4
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x3
|
||||||
|
SEEK_SET = 0x0
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
@@ -1378,6 +1386,10 @@ const (
|
|||||||
SO_SNDTIMEO = 0x1005
|
SO_SNDTIMEO = 0x1005
|
||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
||||||
|
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_UPCALLCLOSEWAIT = 0x1027
|
SO_UPCALLCLOSEWAIT = 0x1027
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
@@ -1423,6 +1435,21 @@ const (
|
|||||||
TCOFLUSH = 0x2
|
TCOFLUSH = 0x2
|
||||||
TCOOFF = 0x1
|
TCOOFF = 0x1
|
||||||
TCOON = 0x2
|
TCOON = 0x2
|
||||||
|
TCPOPT_CC = 0xb
|
||||||
|
TCPOPT_CCECHO = 0xd
|
||||||
|
TCPOPT_CCNEW = 0xc
|
||||||
|
TCPOPT_EOL = 0x0
|
||||||
|
TCPOPT_FASTOPEN = 0x22
|
||||||
|
TCPOPT_MAXSEG = 0x2
|
||||||
|
TCPOPT_NOP = 0x1
|
||||||
|
TCPOPT_SACK = 0x5
|
||||||
|
TCPOPT_SACK_HDR = 0x1010500
|
||||||
|
TCPOPT_SACK_PERMITTED = 0x4
|
||||||
|
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
||||||
|
TCPOPT_SIGNATURE = 0x13
|
||||||
|
TCPOPT_TIMESTAMP = 0x8
|
||||||
|
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||||
|
TCPOPT_WINDOW = 0x3
|
||||||
TCP_CONNECTIONTIMEOUT = 0x20
|
TCP_CONNECTIONTIMEOUT = 0x20
|
||||||
TCP_CONNECTION_INFO = 0x106
|
TCP_CONNECTION_INFO = 0x106
|
||||||
TCP_ENABLE_ECN = 0x104
|
TCP_ENABLE_ECN = 0x104
|
||||||
@@ -1525,6 +1552,11 @@ const (
|
|||||||
VINTR = 0x8
|
VINTR = 0x8
|
||||||
VKILL = 0x5
|
VKILL = 0x5
|
||||||
VLNEXT = 0xe
|
VLNEXT = 0xe
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x10
|
VMIN = 0x10
|
||||||
VM_LOADAVG = 0x2
|
VM_LOADAVG = 0x2
|
||||||
VM_MACHFACTOR = 0x4
|
VM_MACHFACTOR = 0x4
|
||||||
|
|||||||
+33
-1
@@ -130,8 +130,9 @@ const (
|
|||||||
ATTR_VOL_SIZE = 0x4
|
ATTR_VOL_SIZE = 0x4
|
||||||
ATTR_VOL_SPACEAVAIL = 0x10
|
ATTR_VOL_SPACEAVAIL = 0x10
|
||||||
ATTR_VOL_SPACEFREE = 0x8
|
ATTR_VOL_SPACEFREE = 0x8
|
||||||
|
ATTR_VOL_SPACEUSED = 0x800000
|
||||||
ATTR_VOL_UUID = 0x40000
|
ATTR_VOL_UUID = 0x40000
|
||||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
ATTR_VOL_VALIDMASK = 0xf087ffff
|
||||||
B0 = 0x0
|
B0 = 0x0
|
||||||
B110 = 0x6e
|
B110 = 0x6e
|
||||||
B115200 = 0x1c200
|
B115200 = 0x1c200
|
||||||
@@ -661,6 +662,7 @@ const (
|
|||||||
IN_CLASSD_NSHIFT = 0x1c
|
IN_CLASSD_NSHIFT = 0x1c
|
||||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||||
IN_LOOPBACKNET = 0x7f
|
IN_LOOPBACKNET = 0x7f
|
||||||
|
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
||||||
IPPROTO_3PC = 0x22
|
IPPROTO_3PC = 0x22
|
||||||
IPPROTO_ADFS = 0x44
|
IPPROTO_ADFS = 0x44
|
||||||
IPPROTO_AH = 0x33
|
IPPROTO_AH = 0x33
|
||||||
@@ -1206,6 +1208,7 @@ const (
|
|||||||
RTF_DONE = 0x40
|
RTF_DONE = 0x40
|
||||||
RTF_DYNAMIC = 0x10
|
RTF_DYNAMIC = 0x10
|
||||||
RTF_GATEWAY = 0x2
|
RTF_GATEWAY = 0x2
|
||||||
|
RTF_GLOBAL = 0x40000000
|
||||||
RTF_HOST = 0x4
|
RTF_HOST = 0x4
|
||||||
RTF_IFREF = 0x4000000
|
RTF_IFREF = 0x4000000
|
||||||
RTF_IFSCOPE = 0x1000000
|
RTF_IFSCOPE = 0x1000000
|
||||||
@@ -1262,6 +1265,11 @@ const (
|
|||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIMESTAMP_MONOTONIC = 0x4
|
SCM_TIMESTAMP_MONOTONIC = 0x4
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x4
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x3
|
||||||
|
SEEK_SET = 0x0
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
@@ -1378,6 +1386,10 @@ const (
|
|||||||
SO_SNDTIMEO = 0x1005
|
SO_SNDTIMEO = 0x1005
|
||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
||||||
|
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_UPCALLCLOSEWAIT = 0x1027
|
SO_UPCALLCLOSEWAIT = 0x1027
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
@@ -1423,6 +1435,21 @@ const (
|
|||||||
TCOFLUSH = 0x2
|
TCOFLUSH = 0x2
|
||||||
TCOOFF = 0x1
|
TCOOFF = 0x1
|
||||||
TCOON = 0x2
|
TCOON = 0x2
|
||||||
|
TCPOPT_CC = 0xb
|
||||||
|
TCPOPT_CCECHO = 0xd
|
||||||
|
TCPOPT_CCNEW = 0xc
|
||||||
|
TCPOPT_EOL = 0x0
|
||||||
|
TCPOPT_FASTOPEN = 0x22
|
||||||
|
TCPOPT_MAXSEG = 0x2
|
||||||
|
TCPOPT_NOP = 0x1
|
||||||
|
TCPOPT_SACK = 0x5
|
||||||
|
TCPOPT_SACK_HDR = 0x1010500
|
||||||
|
TCPOPT_SACK_PERMITTED = 0x4
|
||||||
|
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
||||||
|
TCPOPT_SIGNATURE = 0x13
|
||||||
|
TCPOPT_TIMESTAMP = 0x8
|
||||||
|
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||||
|
TCPOPT_WINDOW = 0x3
|
||||||
TCP_CONNECTIONTIMEOUT = 0x20
|
TCP_CONNECTIONTIMEOUT = 0x20
|
||||||
TCP_CONNECTION_INFO = 0x106
|
TCP_CONNECTION_INFO = 0x106
|
||||||
TCP_ENABLE_ECN = 0x104
|
TCP_ENABLE_ECN = 0x104
|
||||||
@@ -1525,6 +1552,11 @@ const (
|
|||||||
VINTR = 0x8
|
VINTR = 0x8
|
||||||
VKILL = 0x5
|
VKILL = 0x5
|
||||||
VLNEXT = 0xe
|
VLNEXT = 0xe
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x10
|
VMIN = 0x10
|
||||||
VM_LOADAVG = 0x2
|
VM_LOADAVG = 0x2
|
||||||
VM_MACHFACTOR = 0x4
|
VM_MACHFACTOR = 0x4
|
||||||
|
|||||||
+5
@@ -1297,6 +1297,11 @@ const (
|
|||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIME_INFO = 0x7
|
SCM_TIME_INFO = 0x7
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x3
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x4
|
||||||
|
SEEK_SET = 0x0
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|||||||
+5
@@ -1298,6 +1298,11 @@ const (
|
|||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIME_INFO = 0x7
|
SCM_TIME_INFO = 0x7
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x3
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x4
|
||||||
|
SEEK_SET = 0x0
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|||||||
+5
@@ -1276,6 +1276,11 @@ const (
|
|||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x3
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x4
|
||||||
|
SEEK_SET = 0x0
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|||||||
+5
@@ -1298,6 +1298,11 @@ const (
|
|||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIME_INFO = 0x7
|
SCM_TIME_INFO = 0x7
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x3
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x4
|
||||||
|
SEEK_SET = 0x0
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|||||||
+161
-13
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mkmerge.go; DO NOT EDIT.
|
// Code generated by mkmerge; DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
@@ -116,6 +116,7 @@ const (
|
|||||||
ARPHRD_LAPB = 0x204
|
ARPHRD_LAPB = 0x204
|
||||||
ARPHRD_LOCALTLK = 0x305
|
ARPHRD_LOCALTLK = 0x305
|
||||||
ARPHRD_LOOPBACK = 0x304
|
ARPHRD_LOOPBACK = 0x304
|
||||||
|
ARPHRD_MCTP = 0x122
|
||||||
ARPHRD_METRICOM = 0x17
|
ARPHRD_METRICOM = 0x17
|
||||||
ARPHRD_NETLINK = 0x338
|
ARPHRD_NETLINK = 0x338
|
||||||
ARPHRD_NETROM = 0x0
|
ARPHRD_NETROM = 0x0
|
||||||
@@ -228,7 +229,11 @@ const (
|
|||||||
BPF_OR = 0x40
|
BPF_OR = 0x40
|
||||||
BPF_PSEUDO_BTF_ID = 0x3
|
BPF_PSEUDO_BTF_ID = 0x3
|
||||||
BPF_PSEUDO_CALL = 0x1
|
BPF_PSEUDO_CALL = 0x1
|
||||||
|
BPF_PSEUDO_FUNC = 0x4
|
||||||
|
BPF_PSEUDO_KFUNC_CALL = 0x2
|
||||||
BPF_PSEUDO_MAP_FD = 0x1
|
BPF_PSEUDO_MAP_FD = 0x1
|
||||||
|
BPF_PSEUDO_MAP_IDX = 0x5
|
||||||
|
BPF_PSEUDO_MAP_IDX_VALUE = 0x6
|
||||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||||
BPF_RET = 0x6
|
BPF_RET = 0x6
|
||||||
BPF_RSH = 0x70
|
BPF_RSH = 0x70
|
||||||
@@ -468,6 +473,7 @@ const (
|
|||||||
DM_DEV_WAIT = 0xc138fd08
|
DM_DEV_WAIT = 0xc138fd08
|
||||||
DM_DIR = "mapper"
|
DM_DIR = "mapper"
|
||||||
DM_GET_TARGET_VERSION = 0xc138fd11
|
DM_GET_TARGET_VERSION = 0xc138fd11
|
||||||
|
DM_IMA_MEASUREMENT_FLAG = 0x80000
|
||||||
DM_INACTIVE_PRESENT_FLAG = 0x40
|
DM_INACTIVE_PRESENT_FLAG = 0x40
|
||||||
DM_INTERNAL_SUSPEND_FLAG = 0x40000
|
DM_INTERNAL_SUSPEND_FLAG = 0x40000
|
||||||
DM_IOCTL = 0xfd
|
DM_IOCTL = 0xfd
|
||||||
@@ -475,6 +481,8 @@ const (
|
|||||||
DM_LIST_VERSIONS = 0xc138fd0d
|
DM_LIST_VERSIONS = 0xc138fd0d
|
||||||
DM_MAX_TYPE_NAME = 0x10
|
DM_MAX_TYPE_NAME = 0x10
|
||||||
DM_NAME_LEN = 0x80
|
DM_NAME_LEN = 0x80
|
||||||
|
DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID = 0x2
|
||||||
|
DM_NAME_LIST_FLAG_HAS_UUID = 0x1
|
||||||
DM_NOFLUSH_FLAG = 0x800
|
DM_NOFLUSH_FLAG = 0x800
|
||||||
DM_PERSISTENT_DEV_FLAG = 0x8
|
DM_PERSISTENT_DEV_FLAG = 0x8
|
||||||
DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
|
DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
|
||||||
@@ -494,9 +502,9 @@ const (
|
|||||||
DM_UUID_FLAG = 0x4000
|
DM_UUID_FLAG = 0x4000
|
||||||
DM_UUID_LEN = 0x81
|
DM_UUID_LEN = 0x81
|
||||||
DM_VERSION = 0xc138fd00
|
DM_VERSION = 0xc138fd00
|
||||||
DM_VERSION_EXTRA = "-ioctl (2021-02-01)"
|
DM_VERSION_EXTRA = "-ioctl (2021-03-22)"
|
||||||
DM_VERSION_MAJOR = 0x4
|
DM_VERSION_MAJOR = 0x4
|
||||||
DM_VERSION_MINOR = 0x2c
|
DM_VERSION_MINOR = 0x2d
|
||||||
DM_VERSION_PATCHLEVEL = 0x0
|
DM_VERSION_PATCHLEVEL = 0x0
|
||||||
DT_BLK = 0x6
|
DT_BLK = 0x6
|
||||||
DT_CHR = 0x2
|
DT_CHR = 0x2
|
||||||
@@ -710,6 +718,7 @@ const (
|
|||||||
ETH_P_LOOPBACK = 0x9000
|
ETH_P_LOOPBACK = 0x9000
|
||||||
ETH_P_MACSEC = 0x88e5
|
ETH_P_MACSEC = 0x88e5
|
||||||
ETH_P_MAP = 0xf9
|
ETH_P_MAP = 0xf9
|
||||||
|
ETH_P_MCTP = 0xfa
|
||||||
ETH_P_MOBITEX = 0x15
|
ETH_P_MOBITEX = 0x15
|
||||||
ETH_P_MPLS_MC = 0x8848
|
ETH_P_MPLS_MC = 0x8848
|
||||||
ETH_P_MPLS_UC = 0x8847
|
ETH_P_MPLS_UC = 0x8847
|
||||||
@@ -745,6 +754,21 @@ const (
|
|||||||
ETH_P_WCCP = 0x883e
|
ETH_P_WCCP = 0x883e
|
||||||
ETH_P_X25 = 0x805
|
ETH_P_X25 = 0x805
|
||||||
ETH_P_XDSA = 0xf8
|
ETH_P_XDSA = 0xf8
|
||||||
|
EV_ABS = 0x3
|
||||||
|
EV_CNT = 0x20
|
||||||
|
EV_FF = 0x15
|
||||||
|
EV_FF_STATUS = 0x17
|
||||||
|
EV_KEY = 0x1
|
||||||
|
EV_LED = 0x11
|
||||||
|
EV_MAX = 0x1f
|
||||||
|
EV_MSC = 0x4
|
||||||
|
EV_PWR = 0x16
|
||||||
|
EV_REL = 0x2
|
||||||
|
EV_REP = 0x14
|
||||||
|
EV_SND = 0x12
|
||||||
|
EV_SW = 0x5
|
||||||
|
EV_SYN = 0x0
|
||||||
|
EV_VERSION = 0x10001
|
||||||
EXABYTE_ENABLE_NEST = 0xf0
|
EXABYTE_ENABLE_NEST = 0xf0
|
||||||
EXT2_SUPER_MAGIC = 0xef53
|
EXT2_SUPER_MAGIC = 0xef53
|
||||||
EXT3_SUPER_MAGIC = 0xef53
|
EXT3_SUPER_MAGIC = 0xef53
|
||||||
@@ -783,9 +807,11 @@ const (
|
|||||||
FAN_DELETE_SELF = 0x400
|
FAN_DELETE_SELF = 0x400
|
||||||
FAN_DENY = 0x2
|
FAN_DENY = 0x2
|
||||||
FAN_ENABLE_AUDIT = 0x40
|
FAN_ENABLE_AUDIT = 0x40
|
||||||
|
FAN_EPIDFD = -0x2
|
||||||
FAN_EVENT_INFO_TYPE_DFID = 0x3
|
FAN_EVENT_INFO_TYPE_DFID = 0x3
|
||||||
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
||||||
FAN_EVENT_INFO_TYPE_FID = 0x1
|
FAN_EVENT_INFO_TYPE_FID = 0x1
|
||||||
|
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
|
||||||
FAN_EVENT_METADATA_LEN = 0x18
|
FAN_EVENT_METADATA_LEN = 0x18
|
||||||
FAN_EVENT_ON_CHILD = 0x8000000
|
FAN_EVENT_ON_CHILD = 0x8000000
|
||||||
FAN_MARK_ADD = 0x1
|
FAN_MARK_ADD = 0x1
|
||||||
@@ -805,6 +831,7 @@ const (
|
|||||||
FAN_MOVE_SELF = 0x800
|
FAN_MOVE_SELF = 0x800
|
||||||
FAN_NOFD = -0x1
|
FAN_NOFD = -0x1
|
||||||
FAN_NONBLOCK = 0x2
|
FAN_NONBLOCK = 0x2
|
||||||
|
FAN_NOPIDFD = -0x1
|
||||||
FAN_ONDIR = 0x40000000
|
FAN_ONDIR = 0x40000000
|
||||||
FAN_OPEN = 0x20
|
FAN_OPEN = 0x20
|
||||||
FAN_OPEN_EXEC = 0x1000
|
FAN_OPEN_EXEC = 0x1000
|
||||||
@@ -815,6 +842,7 @@ const (
|
|||||||
FAN_REPORT_DIR_FID = 0x400
|
FAN_REPORT_DIR_FID = 0x400
|
||||||
FAN_REPORT_FID = 0x200
|
FAN_REPORT_FID = 0x200
|
||||||
FAN_REPORT_NAME = 0x800
|
FAN_REPORT_NAME = 0x800
|
||||||
|
FAN_REPORT_PIDFD = 0x80
|
||||||
FAN_REPORT_TID = 0x100
|
FAN_REPORT_TID = 0x100
|
||||||
FAN_UNLIMITED_MARKS = 0x20
|
FAN_UNLIMITED_MARKS = 0x20
|
||||||
FAN_UNLIMITED_QUEUE = 0x10
|
FAN_UNLIMITED_QUEUE = 0x10
|
||||||
@@ -981,12 +1009,6 @@ const (
|
|||||||
HPFS_SUPER_MAGIC = 0xf995e849
|
HPFS_SUPER_MAGIC = 0xf995e849
|
||||||
HUGETLBFS_MAGIC = 0x958458f6
|
HUGETLBFS_MAGIC = 0x958458f6
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICMPV6_FILTER = 0x1
|
|
||||||
ICMPV6_FILTER_BLOCK = 0x1
|
|
||||||
ICMPV6_FILTER_BLOCKOTHERS = 0x3
|
|
||||||
ICMPV6_FILTER_PASS = 0x2
|
|
||||||
ICMPV6_FILTER_PASSONLY = 0x4
|
|
||||||
ICMP_FILTER = 0x1
|
|
||||||
ICRNL = 0x100
|
ICRNL = 0x100
|
||||||
IFA_F_DADFAILED = 0x8
|
IFA_F_DADFAILED = 0x8
|
||||||
IFA_F_DEPRECATED = 0x20
|
IFA_F_DEPRECATED = 0x20
|
||||||
@@ -1257,6 +1279,7 @@ const (
|
|||||||
KEXEC_ARCH_PARISC = 0xf0000
|
KEXEC_ARCH_PARISC = 0xf0000
|
||||||
KEXEC_ARCH_PPC = 0x140000
|
KEXEC_ARCH_PPC = 0x140000
|
||||||
KEXEC_ARCH_PPC64 = 0x150000
|
KEXEC_ARCH_PPC64 = 0x150000
|
||||||
|
KEXEC_ARCH_RISCV = 0xf30000
|
||||||
KEXEC_ARCH_S390 = 0x160000
|
KEXEC_ARCH_S390 = 0x160000
|
||||||
KEXEC_ARCH_SH = 0x2a0000
|
KEXEC_ARCH_SH = 0x2a0000
|
||||||
KEXEC_ARCH_X86_64 = 0x3e0000
|
KEXEC_ARCH_X86_64 = 0x3e0000
|
||||||
@@ -1332,6 +1355,20 @@ const (
|
|||||||
KEY_SPEC_THREAD_KEYRING = -0x1
|
KEY_SPEC_THREAD_KEYRING = -0x1
|
||||||
KEY_SPEC_USER_KEYRING = -0x4
|
KEY_SPEC_USER_KEYRING = -0x4
|
||||||
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
||||||
|
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_FIFO = 0x400
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_REG = 0x100
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_SOCK = 0x200
|
||||||
|
LANDLOCK_ACCESS_FS_MAKE_SYM = 0x1000
|
||||||
|
LANDLOCK_ACCESS_FS_READ_DIR = 0x8
|
||||||
|
LANDLOCK_ACCESS_FS_READ_FILE = 0x4
|
||||||
|
LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10
|
||||||
|
LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
|
||||||
|
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
|
||||||
|
LANDLOCK_CREATE_RULESET_VERSION = 0x1
|
||||||
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
||||||
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
|
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
|
||||||
LINUX_REBOOT_CMD_HALT = 0xcdef0123
|
LINUX_REBOOT_CMD_HALT = 0xcdef0123
|
||||||
@@ -1382,6 +1419,8 @@ const (
|
|||||||
MADV_NOHUGEPAGE = 0xf
|
MADV_NOHUGEPAGE = 0xf
|
||||||
MADV_NORMAL = 0x0
|
MADV_NORMAL = 0x0
|
||||||
MADV_PAGEOUT = 0x15
|
MADV_PAGEOUT = 0x15
|
||||||
|
MADV_POPULATE_READ = 0x16
|
||||||
|
MADV_POPULATE_WRITE = 0x17
|
||||||
MADV_RANDOM = 0x1
|
MADV_RANDOM = 0x1
|
||||||
MADV_REMOVE = 0x9
|
MADV_REMOVE = 0x9
|
||||||
MADV_SEQUENTIAL = 0x2
|
MADV_SEQUENTIAL = 0x2
|
||||||
@@ -1437,6 +1476,18 @@ const (
|
|||||||
MNT_FORCE = 0x1
|
MNT_FORCE = 0x1
|
||||||
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
||||||
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
||||||
|
MOUNT_ATTR_IDMAP = 0x100000
|
||||||
|
MOUNT_ATTR_NOATIME = 0x10
|
||||||
|
MOUNT_ATTR_NODEV = 0x4
|
||||||
|
MOUNT_ATTR_NODIRATIME = 0x80
|
||||||
|
MOUNT_ATTR_NOEXEC = 0x8
|
||||||
|
MOUNT_ATTR_NOSUID = 0x2
|
||||||
|
MOUNT_ATTR_NOSYMFOLLOW = 0x200000
|
||||||
|
MOUNT_ATTR_RDONLY = 0x1
|
||||||
|
MOUNT_ATTR_RELATIME = 0x0
|
||||||
|
MOUNT_ATTR_SIZE_VER0 = 0x20
|
||||||
|
MOUNT_ATTR_STRICTATIME = 0x20
|
||||||
|
MOUNT_ATTR__ATIME = 0x70
|
||||||
MSDOS_SUPER_MAGIC = 0x4d44
|
MSDOS_SUPER_MAGIC = 0x4d44
|
||||||
MSG_BATCH = 0x40000
|
MSG_BATCH = 0x40000
|
||||||
MSG_CMSG_CLOEXEC = 0x40000000
|
MSG_CMSG_CLOEXEC = 0x40000000
|
||||||
@@ -1566,6 +1617,59 @@ const (
|
|||||||
NETLINK_XFRM = 0x6
|
NETLINK_XFRM = 0x6
|
||||||
NETNSA_MAX = 0x5
|
NETNSA_MAX = 0x5
|
||||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||||
|
NFC_ATR_REQ_GB_MAXSIZE = 0x30
|
||||||
|
NFC_ATR_REQ_MAXSIZE = 0x40
|
||||||
|
NFC_ATR_RES_GB_MAXSIZE = 0x2f
|
||||||
|
NFC_ATR_RES_MAXSIZE = 0x40
|
||||||
|
NFC_COMM_ACTIVE = 0x0
|
||||||
|
NFC_COMM_PASSIVE = 0x1
|
||||||
|
NFC_DEVICE_NAME_MAXSIZE = 0x8
|
||||||
|
NFC_DIRECTION_RX = 0x0
|
||||||
|
NFC_DIRECTION_TX = 0x1
|
||||||
|
NFC_FIRMWARE_NAME_MAXSIZE = 0x20
|
||||||
|
NFC_GB_MAXSIZE = 0x30
|
||||||
|
NFC_GENL_MCAST_EVENT_NAME = "events"
|
||||||
|
NFC_GENL_NAME = "nfc"
|
||||||
|
NFC_GENL_VERSION = 0x1
|
||||||
|
NFC_HEADER_SIZE = 0x1
|
||||||
|
NFC_ISO15693_UID_MAXSIZE = 0x8
|
||||||
|
NFC_LLCP_MAX_SERVICE_NAME = 0x3f
|
||||||
|
NFC_LLCP_MIUX = 0x1
|
||||||
|
NFC_LLCP_REMOTE_LTO = 0x3
|
||||||
|
NFC_LLCP_REMOTE_MIU = 0x2
|
||||||
|
NFC_LLCP_REMOTE_RW = 0x4
|
||||||
|
NFC_LLCP_RW = 0x0
|
||||||
|
NFC_NFCID1_MAXSIZE = 0xa
|
||||||
|
NFC_NFCID2_MAXSIZE = 0x8
|
||||||
|
NFC_NFCID3_MAXSIZE = 0xa
|
||||||
|
NFC_PROTO_FELICA = 0x3
|
||||||
|
NFC_PROTO_FELICA_MASK = 0x8
|
||||||
|
NFC_PROTO_ISO14443 = 0x4
|
||||||
|
NFC_PROTO_ISO14443_B = 0x6
|
||||||
|
NFC_PROTO_ISO14443_B_MASK = 0x40
|
||||||
|
NFC_PROTO_ISO14443_MASK = 0x10
|
||||||
|
NFC_PROTO_ISO15693 = 0x7
|
||||||
|
NFC_PROTO_ISO15693_MASK = 0x80
|
||||||
|
NFC_PROTO_JEWEL = 0x1
|
||||||
|
NFC_PROTO_JEWEL_MASK = 0x2
|
||||||
|
NFC_PROTO_MAX = 0x8
|
||||||
|
NFC_PROTO_MIFARE = 0x2
|
||||||
|
NFC_PROTO_MIFARE_MASK = 0x4
|
||||||
|
NFC_PROTO_NFC_DEP = 0x5
|
||||||
|
NFC_PROTO_NFC_DEP_MASK = 0x20
|
||||||
|
NFC_RAW_HEADER_SIZE = 0x2
|
||||||
|
NFC_RF_INITIATOR = 0x0
|
||||||
|
NFC_RF_NONE = 0x2
|
||||||
|
NFC_RF_TARGET = 0x1
|
||||||
|
NFC_SENSB_RES_MAXSIZE = 0xc
|
||||||
|
NFC_SENSF_RES_MAXSIZE = 0x12
|
||||||
|
NFC_SE_DISABLED = 0x0
|
||||||
|
NFC_SE_EMBEDDED = 0x2
|
||||||
|
NFC_SE_ENABLED = 0x1
|
||||||
|
NFC_SE_UICC = 0x1
|
||||||
|
NFC_SOCKPROTO_LLCP = 0x1
|
||||||
|
NFC_SOCKPROTO_MAX = 0x2
|
||||||
|
NFC_SOCKPROTO_RAW = 0x0
|
||||||
NFNETLINK_V0 = 0x0
|
NFNETLINK_V0 = 0x0
|
||||||
NFNLGRP_ACCT_QUOTA = 0x8
|
NFNLGRP_ACCT_QUOTA = 0x8
|
||||||
NFNLGRP_CONNTRACK_DESTROY = 0x3
|
NFNLGRP_CONNTRACK_DESTROY = 0x3
|
||||||
@@ -1583,11 +1687,12 @@ const (
|
|||||||
NFNL_MSG_BATCH_END = 0x11
|
NFNL_MSG_BATCH_END = 0x11
|
||||||
NFNL_NFA_NEST = 0x8000
|
NFNL_NFA_NEST = 0x8000
|
||||||
NFNL_SUBSYS_ACCT = 0x7
|
NFNL_SUBSYS_ACCT = 0x7
|
||||||
NFNL_SUBSYS_COUNT = 0xc
|
NFNL_SUBSYS_COUNT = 0xd
|
||||||
NFNL_SUBSYS_CTHELPER = 0x9
|
NFNL_SUBSYS_CTHELPER = 0x9
|
||||||
NFNL_SUBSYS_CTNETLINK = 0x1
|
NFNL_SUBSYS_CTNETLINK = 0x1
|
||||||
NFNL_SUBSYS_CTNETLINK_EXP = 0x2
|
NFNL_SUBSYS_CTNETLINK_EXP = 0x2
|
||||||
NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
|
NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
|
||||||
|
NFNL_SUBSYS_HOOK = 0xc
|
||||||
NFNL_SUBSYS_IPSET = 0x6
|
NFNL_SUBSYS_IPSET = 0x6
|
||||||
NFNL_SUBSYS_NFTABLES = 0xa
|
NFNL_SUBSYS_NFTABLES = 0xa
|
||||||
NFNL_SUBSYS_NFT_COMPAT = 0xb
|
NFNL_SUBSYS_NFT_COMPAT = 0xb
|
||||||
@@ -1703,14 +1808,19 @@ const (
|
|||||||
PERF_ATTR_SIZE_VER4 = 0x68
|
PERF_ATTR_SIZE_VER4 = 0x68
|
||||||
PERF_ATTR_SIZE_VER5 = 0x70
|
PERF_ATTR_SIZE_VER5 = 0x70
|
||||||
PERF_ATTR_SIZE_VER6 = 0x78
|
PERF_ATTR_SIZE_VER6 = 0x78
|
||||||
|
PERF_ATTR_SIZE_VER7 = 0x80
|
||||||
PERF_AUX_FLAG_COLLISION = 0x8
|
PERF_AUX_FLAG_COLLISION = 0x8
|
||||||
|
PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
|
||||||
|
PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
|
||||||
PERF_AUX_FLAG_OVERWRITE = 0x2
|
PERF_AUX_FLAG_OVERWRITE = 0x2
|
||||||
PERF_AUX_FLAG_PARTIAL = 0x4
|
PERF_AUX_FLAG_PARTIAL = 0x4
|
||||||
|
PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
|
||||||
PERF_AUX_FLAG_TRUNCATED = 0x1
|
PERF_AUX_FLAG_TRUNCATED = 0x1
|
||||||
PERF_FLAG_FD_CLOEXEC = 0x8
|
PERF_FLAG_FD_CLOEXEC = 0x8
|
||||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||||
PERF_FLAG_FD_OUTPUT = 0x2
|
PERF_FLAG_FD_OUTPUT = 0x2
|
||||||
PERF_FLAG_PID_CGROUP = 0x4
|
PERF_FLAG_PID_CGROUP = 0x4
|
||||||
|
PERF_HW_EVENT_MASK = 0xffffffff
|
||||||
PERF_MAX_CONTEXTS_PER_STACK = 0x8
|
PERF_MAX_CONTEXTS_PER_STACK = 0x8
|
||||||
PERF_MAX_STACK_DEPTH = 0x7f
|
PERF_MAX_STACK_DEPTH = 0x7f
|
||||||
PERF_MEM_BLK_ADDR = 0x4
|
PERF_MEM_BLK_ADDR = 0x4
|
||||||
@@ -1769,6 +1879,7 @@ const (
|
|||||||
PERF_MEM_TLB_OS = 0x40
|
PERF_MEM_TLB_OS = 0x40
|
||||||
PERF_MEM_TLB_SHIFT = 0x1a
|
PERF_MEM_TLB_SHIFT = 0x1a
|
||||||
PERF_MEM_TLB_WK = 0x20
|
PERF_MEM_TLB_WK = 0x20
|
||||||
|
PERF_PMU_TYPE_SHIFT = 0x20
|
||||||
PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
|
PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
|
||||||
PERF_RECORD_MISC_COMM_EXEC = 0x2000
|
PERF_RECORD_MISC_COMM_EXEC = 0x2000
|
||||||
PERF_RECORD_MISC_CPUMODE_MASK = 0x7
|
PERF_RECORD_MISC_CPUMODE_MASK = 0x7
|
||||||
@@ -1868,7 +1979,15 @@ const (
|
|||||||
PR_PAC_APGAKEY = 0x10
|
PR_PAC_APGAKEY = 0x10
|
||||||
PR_PAC_APIAKEY = 0x1
|
PR_PAC_APIAKEY = 0x1
|
||||||
PR_PAC_APIBKEY = 0x2
|
PR_PAC_APIBKEY = 0x2
|
||||||
|
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
||||||
PR_PAC_RESET_KEYS = 0x36
|
PR_PAC_RESET_KEYS = 0x36
|
||||||
|
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
||||||
|
PR_SCHED_CORE = 0x3e
|
||||||
|
PR_SCHED_CORE_CREATE = 0x1
|
||||||
|
PR_SCHED_CORE_GET = 0x0
|
||||||
|
PR_SCHED_CORE_MAX = 0x4
|
||||||
|
PR_SCHED_CORE_SHARE_FROM = 0x3
|
||||||
|
PR_SCHED_CORE_SHARE_TO = 0x2
|
||||||
PR_SET_CHILD_SUBREAPER = 0x24
|
PR_SET_CHILD_SUBREAPER = 0x24
|
||||||
PR_SET_DUMPABLE = 0x4
|
PR_SET_DUMPABLE = 0x4
|
||||||
PR_SET_ENDIAN = 0x14
|
PR_SET_ENDIAN = 0x14
|
||||||
@@ -1912,6 +2031,7 @@ const (
|
|||||||
PR_SPEC_ENABLE = 0x2
|
PR_SPEC_ENABLE = 0x2
|
||||||
PR_SPEC_FORCE_DISABLE = 0x8
|
PR_SPEC_FORCE_DISABLE = 0x8
|
||||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||||
|
PR_SPEC_L1D_FLUSH = 0x2
|
||||||
PR_SPEC_NOT_AFFECTED = 0x0
|
PR_SPEC_NOT_AFFECTED = 0x0
|
||||||
PR_SPEC_PRCTL = 0x1
|
PR_SPEC_PRCTL = 0x1
|
||||||
PR_SPEC_STORE_BYPASS = 0x0
|
PR_SPEC_STORE_BYPASS = 0x0
|
||||||
@@ -1950,6 +2070,7 @@ const (
|
|||||||
PTRACE_GETREGSET = 0x4204
|
PTRACE_GETREGSET = 0x4204
|
||||||
PTRACE_GETSIGINFO = 0x4202
|
PTRACE_GETSIGINFO = 0x4202
|
||||||
PTRACE_GETSIGMASK = 0x420a
|
PTRACE_GETSIGMASK = 0x420a
|
||||||
|
PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
|
||||||
PTRACE_GET_SYSCALL_INFO = 0x420e
|
PTRACE_GET_SYSCALL_INFO = 0x420e
|
||||||
PTRACE_INTERRUPT = 0x4207
|
PTRACE_INTERRUPT = 0x4207
|
||||||
PTRACE_KILL = 0x8
|
PTRACE_KILL = 0x8
|
||||||
@@ -1991,6 +2112,11 @@ const (
|
|||||||
QNX4_SUPER_MAGIC = 0x2f
|
QNX4_SUPER_MAGIC = 0x2f
|
||||||
QNX6_SUPER_MAGIC = 0x68191122
|
QNX6_SUPER_MAGIC = 0x68191122
|
||||||
RAMFS_MAGIC = 0x858458f6
|
RAMFS_MAGIC = 0x858458f6
|
||||||
|
RAW_PAYLOAD_DIGITAL = 0x3
|
||||||
|
RAW_PAYLOAD_HCI = 0x2
|
||||||
|
RAW_PAYLOAD_LLCP = 0x0
|
||||||
|
RAW_PAYLOAD_NCI = 0x1
|
||||||
|
RAW_PAYLOAD_PROPRIETARY = 0x4
|
||||||
RDTGROUP_SUPER_MAGIC = 0x7655821
|
RDTGROUP_SUPER_MAGIC = 0x7655821
|
||||||
REISERFS_SUPER_MAGIC = 0x52654973
|
REISERFS_SUPER_MAGIC = 0x52654973
|
||||||
RENAME_EXCHANGE = 0x2
|
RENAME_EXCHANGE = 0x2
|
||||||
@@ -2105,6 +2231,7 @@ const (
|
|||||||
RTM_DELNEIGH = 0x1d
|
RTM_DELNEIGH = 0x1d
|
||||||
RTM_DELNETCONF = 0x51
|
RTM_DELNETCONF = 0x51
|
||||||
RTM_DELNEXTHOP = 0x69
|
RTM_DELNEXTHOP = 0x69
|
||||||
|
RTM_DELNEXTHOPBUCKET = 0x75
|
||||||
RTM_DELNSID = 0x59
|
RTM_DELNSID = 0x59
|
||||||
RTM_DELQDISC = 0x25
|
RTM_DELQDISC = 0x25
|
||||||
RTM_DELROUTE = 0x19
|
RTM_DELROUTE = 0x19
|
||||||
@@ -2135,6 +2262,7 @@ const (
|
|||||||
RTM_GETNEIGHTBL = 0x42
|
RTM_GETNEIGHTBL = 0x42
|
||||||
RTM_GETNETCONF = 0x52
|
RTM_GETNETCONF = 0x52
|
||||||
RTM_GETNEXTHOP = 0x6a
|
RTM_GETNEXTHOP = 0x6a
|
||||||
|
RTM_GETNEXTHOPBUCKET = 0x76
|
||||||
RTM_GETNSID = 0x5a
|
RTM_GETNSID = 0x5a
|
||||||
RTM_GETQDISC = 0x26
|
RTM_GETQDISC = 0x26
|
||||||
RTM_GETROUTE = 0x1a
|
RTM_GETROUTE = 0x1a
|
||||||
@@ -2143,7 +2271,7 @@ const (
|
|||||||
RTM_GETTCLASS = 0x2a
|
RTM_GETTCLASS = 0x2a
|
||||||
RTM_GETTFILTER = 0x2e
|
RTM_GETTFILTER = 0x2e
|
||||||
RTM_GETVLAN = 0x72
|
RTM_GETVLAN = 0x72
|
||||||
RTM_MAX = 0x73
|
RTM_MAX = 0x77
|
||||||
RTM_NEWACTION = 0x30
|
RTM_NEWACTION = 0x30
|
||||||
RTM_NEWADDR = 0x14
|
RTM_NEWADDR = 0x14
|
||||||
RTM_NEWADDRLABEL = 0x48
|
RTM_NEWADDRLABEL = 0x48
|
||||||
@@ -2157,6 +2285,7 @@ const (
|
|||||||
RTM_NEWNEIGHTBL = 0x40
|
RTM_NEWNEIGHTBL = 0x40
|
||||||
RTM_NEWNETCONF = 0x50
|
RTM_NEWNETCONF = 0x50
|
||||||
RTM_NEWNEXTHOP = 0x68
|
RTM_NEWNEXTHOP = 0x68
|
||||||
|
RTM_NEWNEXTHOPBUCKET = 0x74
|
||||||
RTM_NEWNSID = 0x58
|
RTM_NEWNSID = 0x58
|
||||||
RTM_NEWNVLAN = 0x70
|
RTM_NEWNVLAN = 0x70
|
||||||
RTM_NEWPREFIX = 0x34
|
RTM_NEWPREFIX = 0x34
|
||||||
@@ -2166,8 +2295,8 @@ const (
|
|||||||
RTM_NEWSTATS = 0x5c
|
RTM_NEWSTATS = 0x5c
|
||||||
RTM_NEWTCLASS = 0x28
|
RTM_NEWTCLASS = 0x28
|
||||||
RTM_NEWTFILTER = 0x2c
|
RTM_NEWTFILTER = 0x2c
|
||||||
RTM_NR_FAMILIES = 0x19
|
RTM_NR_FAMILIES = 0x1a
|
||||||
RTM_NR_MSGTYPES = 0x64
|
RTM_NR_MSGTYPES = 0x68
|
||||||
RTM_SETDCB = 0x4f
|
RTM_SETDCB = 0x4f
|
||||||
RTM_SETLINK = 0x13
|
RTM_SETLINK = 0x13
|
||||||
RTM_SETNEIGHTBL = 0x43
|
RTM_SETNEIGHTBL = 0x43
|
||||||
@@ -2195,6 +2324,7 @@ const (
|
|||||||
RTPROT_MROUTED = 0x11
|
RTPROT_MROUTED = 0x11
|
||||||
RTPROT_MRT = 0xa
|
RTPROT_MRT = 0xa
|
||||||
RTPROT_NTK = 0xf
|
RTPROT_NTK = 0xf
|
||||||
|
RTPROT_OPENR = 0x63
|
||||||
RTPROT_OSPF = 0xbc
|
RTPROT_OSPF = 0xbc
|
||||||
RTPROT_RA = 0x9
|
RTPROT_RA = 0x9
|
||||||
RTPROT_REDIRECT = 0x1
|
RTPROT_REDIRECT = 0x1
|
||||||
@@ -2225,7 +2355,14 @@ const (
|
|||||||
SECCOMP_MODE_DISABLED = 0x0
|
SECCOMP_MODE_DISABLED = 0x0
|
||||||
SECCOMP_MODE_FILTER = 0x2
|
SECCOMP_MODE_FILTER = 0x2
|
||||||
SECCOMP_MODE_STRICT = 0x1
|
SECCOMP_MODE_STRICT = 0x1
|
||||||
|
SECRETMEM_MAGIC = 0x5345434d
|
||||||
SECURITYFS_MAGIC = 0x73636673
|
SECURITYFS_MAGIC = 0x73636673
|
||||||
|
SEEK_CUR = 0x1
|
||||||
|
SEEK_DATA = 0x3
|
||||||
|
SEEK_END = 0x2
|
||||||
|
SEEK_HOLE = 0x4
|
||||||
|
SEEK_MAX = 0x4
|
||||||
|
SEEK_SET = 0x0
|
||||||
SELINUX_MAGIC = 0xf97cff8c
|
SELINUX_MAGIC = 0xf97cff8c
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
@@ -2330,12 +2467,15 @@ const (
|
|||||||
SMART_WRITE_THRESHOLDS = 0xd7
|
SMART_WRITE_THRESHOLDS = 0xd7
|
||||||
SMB_SUPER_MAGIC = 0x517b
|
SMB_SUPER_MAGIC = 0x517b
|
||||||
SOCKFS_MAGIC = 0x534f434b
|
SOCKFS_MAGIC = 0x534f434b
|
||||||
|
SOCK_BUF_LOCK_MASK = 0x3
|
||||||
SOCK_DCCP = 0x6
|
SOCK_DCCP = 0x6
|
||||||
SOCK_IOC_TYPE = 0x89
|
SOCK_IOC_TYPE = 0x89
|
||||||
SOCK_PACKET = 0xa
|
SOCK_PACKET = 0xa
|
||||||
SOCK_RAW = 0x3
|
SOCK_RAW = 0x3
|
||||||
|
SOCK_RCVBUF_LOCK = 0x2
|
||||||
SOCK_RDM = 0x4
|
SOCK_RDM = 0x4
|
||||||
SOCK_SEQPACKET = 0x5
|
SOCK_SEQPACKET = 0x5
|
||||||
|
SOCK_SNDBUF_LOCK = 0x1
|
||||||
SOL_AAL = 0x109
|
SOL_AAL = 0x109
|
||||||
SOL_ALG = 0x117
|
SOL_ALG = 0x117
|
||||||
SOL_ATM = 0x108
|
SOL_ATM = 0x108
|
||||||
@@ -2472,6 +2612,14 @@ const (
|
|||||||
TCOFLUSH = 0x1
|
TCOFLUSH = 0x1
|
||||||
TCOOFF = 0x0
|
TCOOFF = 0x0
|
||||||
TCOON = 0x1
|
TCOON = 0x1
|
||||||
|
TCPOPT_EOL = 0x0
|
||||||
|
TCPOPT_MAXSEG = 0x2
|
||||||
|
TCPOPT_NOP = 0x1
|
||||||
|
TCPOPT_SACK = 0x5
|
||||||
|
TCPOPT_SACK_PERMITTED = 0x4
|
||||||
|
TCPOPT_TIMESTAMP = 0x8
|
||||||
|
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||||
|
TCPOPT_WINDOW = 0x3
|
||||||
TCP_CC_INFO = 0x1a
|
TCP_CC_INFO = 0x1a
|
||||||
TCP_CM_INQ = 0x24
|
TCP_CM_INQ = 0x24
|
||||||
TCP_CONGESTION = 0xd
|
TCP_CONGESTION = 0xd
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build 386,linux
|
// +build 386,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -137,6 +137,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x40084d0c
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
MEMUNLOCK = 0x40084d06
|
MEMUNLOCK = 0x40084d06
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
MEMWRITEOOB = 0xc00c4d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -146,6 +147,7 @@ const (
|
|||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
OTPLOCK = 0x800c4d10
|
OTPLOCK = 0x800c4d10
|
||||||
@@ -291,6 +293,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -307,6 +310,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build amd64,linux
|
// +build amd64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -137,6 +137,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x40084d0c
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
MEMUNLOCK = 0x40084d06
|
MEMUNLOCK = 0x40084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -146,6 +147,7 @@ const (
|
|||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
OTPLOCK = 0x800c4d10
|
OTPLOCK = 0x800c4d10
|
||||||
@@ -292,6 +294,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -308,6 +311,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build arm,linux
|
// +build arm,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x40084d0c
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
MEMUNLOCK = 0x40084d06
|
MEMUNLOCK = 0x40084d06
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
MEMWRITEOOB = 0xc00c4d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
OTPLOCK = 0x800c4d10
|
OTPLOCK = 0x800c4d10
|
||||||
@@ -298,6 +300,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -314,6 +317,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build arm64,linux
|
// +build arm64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -138,6 +138,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x40084d0c
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
MEMUNLOCK = 0x40084d06
|
MEMUNLOCK = 0x40084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -147,6 +148,7 @@ const (
|
|||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
OTPLOCK = 0x800c4d10
|
OTPLOCK = 0x800c4d10
|
||||||
@@ -288,6 +290,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -304,6 +307,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build mips,linux
|
// +build mips,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
MEMWRITEOOB = 0xc00c4d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -291,6 +293,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -307,6 +310,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build mips64,linux
|
// +build mips64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -291,6 +293,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -307,6 +310,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build mips64le,linux
|
// +build mips64le,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -291,6 +293,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -307,6 +310,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build mipsle,linux
|
// +build mipsle,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
MEMWRITEOOB = 0xc00c4d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -291,6 +293,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -307,6 +310,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build ppc,linux
|
// +build ppc,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
MEMWRITEOOB = 0xc00c4d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NL2 = 0x200
|
NL2 = 0x200
|
||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
@@ -146,6 +147,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -346,6 +348,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -362,6 +365,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x14
|
SO_PASSCRED = 0x14
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build ppc64,linux
|
// +build ppc64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NL2 = 0x200
|
NL2 = 0x200
|
||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
@@ -146,6 +147,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -350,6 +352,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -366,6 +369,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x14
|
SO_PASSCRED = 0x14
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build ppc64le,linux
|
// +build ppc64le,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NL2 = 0x200
|
NL2 = 0x200
|
||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
@@ -146,6 +147,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -350,6 +352,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -366,6 +369,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x14
|
SO_PASSCRED = 0x14
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build riscv64,linux
|
// +build riscv64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x40084d0c
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
MEMUNLOCK = 0x40084d06
|
MEMUNLOCK = 0x40084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
OTPLOCK = 0x800c4d10
|
OTPLOCK = 0x800c4d10
|
||||||
@@ -279,6 +281,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -295,6 +298,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build s390x,linux
|
// +build s390x,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x40084d0c
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
MEMUNLOCK = 0x40084d06
|
MEMUNLOCK = 0x40084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -144,6 +145,7 @@ const (
|
|||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
OTPLOCK = 0x800c4d10
|
OTPLOCK = 0x800c4d10
|
||||||
@@ -354,6 +356,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
@@ -370,6 +373,7 @@ const (
|
|||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
|||||||
+5
-1
@@ -5,7 +5,7 @@
|
|||||||
// +build sparc64,linux
|
// +build sparc64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@@ -140,6 +140,7 @@ const (
|
|||||||
MEMSETBADBLOCK = 0x80084d0c
|
MEMSETBADBLOCK = 0x80084d0c
|
||||||
MEMUNLOCK = 0x80084d06
|
MEMUNLOCK = 0x80084d06
|
||||||
MEMWRITEOOB = 0xc0104d03
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x20004d13
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
@@ -149,6 +150,7 @@ const (
|
|||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x800c4d19
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
OTPGETREGIONCOUNT = 0x80044d0e
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
OTPGETREGIONINFO = 0x800c4d0f
|
||||||
OTPLOCK = 0x400c4d10
|
OTPLOCK = 0x400c4d10
|
||||||
@@ -345,6 +347,7 @@ const (
|
|||||||
SO_BPF_EXTENSIONS = 0x32
|
SO_BPF_EXTENSIONS = 0x32
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0x400
|
SO_BSDCOMPAT = 0x400
|
||||||
|
SO_BUF_LOCK = 0x51
|
||||||
SO_BUSY_POLL = 0x30
|
SO_BUSY_POLL = 0x30
|
||||||
SO_BUSY_POLL_BUDGET = 0x49
|
SO_BUSY_POLL_BUDGET = 0x49
|
||||||
SO_CNX_ADVICE = 0x37
|
SO_CNX_ADVICE = 0x37
|
||||||
@@ -361,6 +364,7 @@ const (
|
|||||||
SO_MARK = 0x22
|
SO_MARK = 0x22
|
||||||
SO_MAX_PACING_RATE = 0x31
|
SO_MAX_PACING_RATE = 0x31
|
||||||
SO_MEMINFO = 0x39
|
SO_MEMINFO = 0x39
|
||||||
|
SO_NETNS_COOKIE = 0x50
|
||||||
SO_NOFCS = 0x27
|
SO_NOFCS = 0x27
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x2
|
SO_PASSCRED = 0x2
|
||||||
|
|||||||
+3
@@ -1020,7 +1020,10 @@ const (
|
|||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
RLIMIT_DATA = 0x2
|
RLIMIT_DATA = 0x2
|
||||||
RLIMIT_FSIZE = 0x1
|
RLIMIT_FSIZE = 0x1
|
||||||
|
RLIMIT_MEMLOCK = 0x6
|
||||||
RLIMIT_NOFILE = 0x8
|
RLIMIT_NOFILE = 0x8
|
||||||
|
RLIMIT_NPROC = 0x7
|
||||||
|
RLIMIT_RSS = 0x5
|
||||||
RLIMIT_STACK = 0x3
|
RLIMIT_STACK = 0x3
|
||||||
RLIM_INFINITY = 0x7fffffffffffffff
|
RLIM_INFINITY = 0x7fffffffffffffff
|
||||||
RTAX_AUTHOR = 0x6
|
RTAX_AUTHOR = 0x6
|
||||||
|
|||||||
+3
@@ -1020,7 +1020,10 @@ const (
|
|||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
RLIMIT_DATA = 0x2
|
RLIMIT_DATA = 0x2
|
||||||
RLIMIT_FSIZE = 0x1
|
RLIMIT_FSIZE = 0x1
|
||||||
|
RLIMIT_MEMLOCK = 0x6
|
||||||
RLIMIT_NOFILE = 0x8
|
RLIMIT_NOFILE = 0x8
|
||||||
|
RLIMIT_NPROC = 0x7
|
||||||
|
RLIMIT_RSS = 0x5
|
||||||
RLIMIT_STACK = 0x3
|
RLIMIT_STACK = 0x3
|
||||||
RLIM_INFINITY = 0x7fffffffffffffff
|
RLIM_INFINITY = 0x7fffffffffffffff
|
||||||
RTAX_AUTHOR = 0x6
|
RTAX_AUTHOR = 0x6
|
||||||
|
|||||||
+11
-11
@@ -17,6 +17,7 @@ int getdirent(int, uintptr_t, size_t);
|
|||||||
int wait4(int, uintptr_t, int, uintptr_t);
|
int wait4(int, uintptr_t, int, uintptr_t);
|
||||||
int ioctl(int, int, uintptr_t);
|
int ioctl(int, int, uintptr_t);
|
||||||
int fcntl(uintptr_t, int, uintptr_t);
|
int fcntl(uintptr_t, int, uintptr_t);
|
||||||
|
int fsync_range(int, int, long long, long long);
|
||||||
int acct(uintptr_t);
|
int acct(uintptr_t);
|
||||||
int chdir(uintptr_t);
|
int chdir(uintptr_t);
|
||||||
int chroot(uintptr_t);
|
int chroot(uintptr_t);
|
||||||
@@ -29,7 +30,6 @@ int fchmod(int, unsigned int);
|
|||||||
int fchmodat(int, uintptr_t, unsigned int, int);
|
int fchmodat(int, uintptr_t, unsigned int, int);
|
||||||
int fchownat(int, uintptr_t, int, int, int);
|
int fchownat(int, uintptr_t, int, int, int);
|
||||||
int fdatasync(int);
|
int fdatasync(int);
|
||||||
int fsync(int);
|
|
||||||
int getpgid(int);
|
int getpgid(int);
|
||||||
int getpgrp();
|
int getpgrp();
|
||||||
int getpid();
|
int getpid();
|
||||||
@@ -255,6 +255,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func fsyncRange(fd int, how int, start int64, length int64) (err error) {
|
||||||
|
r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
|
||||||
|
if r0 == -1 && er != nil {
|
||||||
|
err = er
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Acct(path string) (err error) {
|
func Acct(path string) (err error) {
|
||||||
_p0 := uintptr(unsafe.Pointer(C.CString(path)))
|
_p0 := uintptr(unsafe.Pointer(C.CString(path)))
|
||||||
r0, er := C.acct(C.uintptr_t(_p0))
|
r0, er := C.acct(C.uintptr_t(_p0))
|
||||||
@@ -379,16 +389,6 @@ func Fdatasync(fd int) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Fsync(fd int) (err error) {
|
|
||||||
r0, er := C.fsync(C.int(fd))
|
|
||||||
if r0 == -1 && er != nil {
|
|
||||||
err = er
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Getpgid(pid int) (pgid int, err error) {
|
func Getpgid(pid int) (pgid int, err error) {
|
||||||
r0, er := C.getpgid(C.int(pid))
|
r0, er := C.getpgid(C.int(pid))
|
||||||
pgid = int(r0)
|
pgid = int(r0)
|
||||||
|
|||||||
+10
-10
@@ -135,6 +135,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func fsyncRange(fd int, how int, start int64, length int64) (err error) {
|
||||||
|
_, e1 := callfsync_range(fd, how, start, length)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Acct(path string) (err error) {
|
func Acct(path string) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
@@ -283,16 +293,6 @@ func Fdatasync(fd int) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Fsync(fd int) (err error) {
|
|
||||||
_, e1 := callfsync(fd)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Getpgid(pid int) (pgid int, err error) {
|
func Getpgid(pid int) (pgid int, err error) {
|
||||||
r0, e1 := callgetpgid(pid)
|
r0, e1 := callgetpgid(pid)
|
||||||
pgid = int(r0)
|
pgid = int(r0)
|
||||||
|
|||||||
+10
-10
@@ -18,6 +18,7 @@ import (
|
|||||||
//go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
|
||||||
|
//go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
|
||||||
@@ -30,7 +31,6 @@ import (
|
|||||||
//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
|
|
||||||
//go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
|
||||||
//go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
|
//go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
|
||||||
@@ -136,6 +136,7 @@ import (
|
|||||||
//go:linkname libc_wait4 libc_wait4
|
//go:linkname libc_wait4 libc_wait4
|
||||||
//go:linkname libc_ioctl libc_ioctl
|
//go:linkname libc_ioctl libc_ioctl
|
||||||
//go:linkname libc_fcntl libc_fcntl
|
//go:linkname libc_fcntl libc_fcntl
|
||||||
|
//go:linkname libc_fsync_range libc_fsync_range
|
||||||
//go:linkname libc_acct libc_acct
|
//go:linkname libc_acct libc_acct
|
||||||
//go:linkname libc_chdir libc_chdir
|
//go:linkname libc_chdir libc_chdir
|
||||||
//go:linkname libc_chroot libc_chroot
|
//go:linkname libc_chroot libc_chroot
|
||||||
@@ -148,7 +149,6 @@ import (
|
|||||||
//go:linkname libc_fchmodat libc_fchmodat
|
//go:linkname libc_fchmodat libc_fchmodat
|
||||||
//go:linkname libc_fchownat libc_fchownat
|
//go:linkname libc_fchownat libc_fchownat
|
||||||
//go:linkname libc_fdatasync libc_fdatasync
|
//go:linkname libc_fdatasync libc_fdatasync
|
||||||
//go:linkname libc_fsync libc_fsync
|
|
||||||
//go:linkname libc_getpgid libc_getpgid
|
//go:linkname libc_getpgid libc_getpgid
|
||||||
//go:linkname libc_getpgrp libc_getpgrp
|
//go:linkname libc_getpgrp libc_getpgrp
|
||||||
//go:linkname libc_getpid libc_getpid
|
//go:linkname libc_getpid libc_getpid
|
||||||
@@ -257,6 +257,7 @@ var (
|
|||||||
libc_wait4,
|
libc_wait4,
|
||||||
libc_ioctl,
|
libc_ioctl,
|
||||||
libc_fcntl,
|
libc_fcntl,
|
||||||
|
libc_fsync_range,
|
||||||
libc_acct,
|
libc_acct,
|
||||||
libc_chdir,
|
libc_chdir,
|
||||||
libc_chroot,
|
libc_chroot,
|
||||||
@@ -269,7 +270,6 @@ var (
|
|||||||
libc_fchmodat,
|
libc_fchmodat,
|
||||||
libc_fchownat,
|
libc_fchownat,
|
||||||
libc_fdatasync,
|
libc_fdatasync,
|
||||||
libc_fsync,
|
|
||||||
libc_getpgid,
|
libc_getpgid,
|
||||||
libc_getpgrp,
|
libc_getpgrp,
|
||||||
libc_getpid,
|
libc_getpid,
|
||||||
@@ -430,6 +430,13 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
|
||||||
|
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
|
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
|
||||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
|
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
|
||||||
return
|
return
|
||||||
@@ -514,13 +521,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func callfsync(fd int) (r1 uintptr, e1 Errno) {
|
|
||||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
|
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
|
||||||
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
|
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
|
||||||
return
|
return
|
||||||
|
|||||||
+9
-9
@@ -16,6 +16,7 @@ int getdirent(int, uintptr_t, size_t);
|
|||||||
int wait4(int, uintptr_t, int, uintptr_t);
|
int wait4(int, uintptr_t, int, uintptr_t);
|
||||||
int ioctl(int, int, uintptr_t);
|
int ioctl(int, int, uintptr_t);
|
||||||
int fcntl(uintptr_t, int, uintptr_t);
|
int fcntl(uintptr_t, int, uintptr_t);
|
||||||
|
int fsync_range(int, int, long long, long long);
|
||||||
int acct(uintptr_t);
|
int acct(uintptr_t);
|
||||||
int chdir(uintptr_t);
|
int chdir(uintptr_t);
|
||||||
int chroot(uintptr_t);
|
int chroot(uintptr_t);
|
||||||
@@ -28,7 +29,6 @@ int fchmod(int, unsigned int);
|
|||||||
int fchmodat(int, uintptr_t, unsigned int, int);
|
int fchmodat(int, uintptr_t, unsigned int, int);
|
||||||
int fchownat(int, uintptr_t, int, int, int);
|
int fchownat(int, uintptr_t, int, int, int);
|
||||||
int fdatasync(int);
|
int fdatasync(int);
|
||||||
int fsync(int);
|
|
||||||
int getpgid(int);
|
int getpgid(int);
|
||||||
int getpgrp();
|
int getpgrp();
|
||||||
int getpid();
|
int getpid();
|
||||||
@@ -199,6 +199,14 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
|
||||||
|
r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
|
||||||
|
e1 = syscall.GetErrno()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
|
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
|
||||||
r1 = uintptr(C.acct(C.uintptr_t(_p0)))
|
r1 = uintptr(C.acct(C.uintptr_t(_p0)))
|
||||||
e1 = syscall.GetErrno()
|
e1 = syscall.GetErrno()
|
||||||
@@ -295,14 +303,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func callfsync(fd int) (r1 uintptr, e1 Errno) {
|
|
||||||
r1 = uintptr(C.fsync(C.int(fd)))
|
|
||||||
e1 = syscall.GetErrno()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
|
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
|
||||||
r1 = uintptr(C.getpgid(C.int(pid)))
|
r1 = uintptr(C.getpgid(C.int(pid)))
|
||||||
e1 = syscall.GetErrno()
|
e1 = syscall.GetErrno()
|
||||||
|
|||||||
+59
@@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
|
||||||
|
ret = uintptr(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmat_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
||||||
|
result = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmctl_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmdt(addr uintptr) (err error) {
|
||||||
|
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmdt_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmget(key int, size int, flag int) (id int, err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
|
||||||
|
id = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmget_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Access(path string, mode uint32) (err error) {
|
func Access(path string, mode uint32) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
|
|||||||
+24
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
|
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmctl(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmdt(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmget(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_access(SB)
|
JMP libc_access(SB)
|
||||||
|
|
||||||
|
|||||||
+59
@@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
|
||||||
|
ret = uintptr(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmat_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
||||||
|
result = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmctl_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmdt(addr uintptr) (err error) {
|
||||||
|
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmdt_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmget(key int, size int, flag int) (id int, err error) {
|
||||||
|
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
|
||||||
|
id = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_shmget_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Access(path string, mode uint32) (err error) {
|
func Access(path string, mode uint32) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
|
|||||||
+24
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
|
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmat(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmctl(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmdt(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shmget(SB)
|
||||||
|
|
||||||
|
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_access(SB)
|
JMP libc_access(SB)
|
||||||
|
|
||||||
|
|||||||
+94
-4
@@ -1,4 +1,4 @@
|
|||||||
// Code generated by mkmerge.go; DO NOT EDIT.
|
// Code generated by mkmerge; DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
@@ -48,6 +48,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
|
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(oldpath)
|
_p0, err = BytePtrFromString(oldpath)
|
||||||
@@ -100,6 +110,16 @@ func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err e
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
||||||
n = int(r0)
|
n = int(r0)
|
||||||
@@ -389,6 +409,21 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(pathname)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Acct(path string) (err error) {
|
func Acct(path string) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
@@ -1201,7 +1236,7 @@ func PivotRoot(newroot string, putold string) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
|
||||||
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
@@ -1935,8 +1970,63 @@ func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags u
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
func PidfdOpen(pid int, flags int) (fd int, err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
|
||||||
|
fd = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
|
||||||
|
fd = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
|
||||||
|
ret = uintptr(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
||||||
|
result = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmdt(addr uintptr) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func shmget(key int, size int, flag int) (id int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
|
||||||
|
id = int(r0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
}
|
}
|
||||||
|
|||||||
-53
@@ -46,37 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -181,17 +150,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -566,14 +524,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
-53
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func inotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -711,27 +679,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(cmdline)
|
_p0, err = BytePtrFromString(cmdline)
|
||||||
|
|||||||
-53
@@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||||
fd = int(r0)
|
fd = int(r0)
|
||||||
@@ -235,27 +225,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -340,17 +309,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Lchown(path string, uid int, gid int) (err error) {
|
func Lchown(path string, uid int, gid int) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
@@ -681,17 +639,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
|
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
|
||||||
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
|
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-55
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -544,17 +523,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -706,18 +674,6 @@ func Pause() (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe() (p1 int, p2 int, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
|
||||||
p1 = int(r0)
|
|
||||||
p2 = int(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
||||||
xaddr = uintptr(r0)
|
xaddr = uintptr(r0)
|
||||||
@@ -746,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
-32
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -717,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
-32
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -717,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
-55
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -544,17 +523,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -706,18 +674,6 @@ func Pause() (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe() (p1 int, p2 int, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
|
||||||
p1 = int(r0)
|
|
||||||
p2 = int(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
||||||
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
||||||
xaddr = uintptr(r0)
|
xaddr = uintptr(r0)
|
||||||
@@ -746,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
-53
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -161,17 +140,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -717,27 +685,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
||||||
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
|
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-53
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -763,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
||||||
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
|
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-53
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -763,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
|
||||||
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
|
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-43
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Lchown(path string, uid int, gid int) (err error) {
|
func Lchown(path string, uid int, gid int) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
@@ -553,17 +521,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(cmdline)
|
_p0, err = BytePtrFromString(cmdline)
|
||||||
|
|||||||
-42
@@ -73,16 +73,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func dup2(oldfd int, newfd int) (err error) {
|
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fchown(fd int, uid int, gid int) (err error) {
|
func Fchown(fd int, uid int, gid int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
@@ -180,17 +170,6 @@ func Getuid() (uid int) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
|
||||||
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
||||||
fd = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Lchown(path string, uid int, gid int) (err error) {
|
func Lchown(path string, uid int, gid int) (err error) {
|
||||||
var _p0 *byte
|
var _p0 *byte
|
||||||
_p0, err = BytePtrFromString(path)
|
_p0, err = BytePtrFromString(path)
|
||||||
@@ -718,24 +697,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func pipe(p *[2]_C_int) (err error) {
|
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
||||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
||||||
n = int(r0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
-12
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe() (fd1 int, fd2 int, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
|
||||||
fd1 = int(r0)
|
|
||||||
fd2 = int(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-12
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe() (fd1 int, fd2 int, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
|
||||||
fd1 = int(r0)
|
|
||||||
fd2 = int(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-12
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe() (fd1 int, fd2 int, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
|
||||||
fd1 = int(r0)
|
|
||||||
fd2 = int(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
-12
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe() (fd1 int, fd2 int, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
|
||||||
fd1 = int(r0)
|
|
||||||
fd2 = int(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
+71
-1
@@ -141,6 +141,11 @@ import (
|
|||||||
//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
|
//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
|
||||||
//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
|
//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
|
||||||
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
|
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
|
||||||
|
//go:cgo_import_dynamic libc_port_create port_create "libc.so"
|
||||||
|
//go:cgo_import_dynamic libc_port_associate port_associate "libc.so"
|
||||||
|
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
|
||||||
|
//go:cgo_import_dynamic libc_port_get port_get "libc.so"
|
||||||
|
//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
|
||||||
|
|
||||||
//go:linkname procpipe libc_pipe
|
//go:linkname procpipe libc_pipe
|
||||||
//go:linkname procpipe2 libc_pipe2
|
//go:linkname procpipe2 libc_pipe2
|
||||||
@@ -272,6 +277,11 @@ import (
|
|||||||
//go:linkname procgetpeername libc_getpeername
|
//go:linkname procgetpeername libc_getpeername
|
||||||
//go:linkname procsetsockopt libc_setsockopt
|
//go:linkname procsetsockopt libc_setsockopt
|
||||||
//go:linkname procrecvfrom libc_recvfrom
|
//go:linkname procrecvfrom libc_recvfrom
|
||||||
|
//go:linkname procport_create libc_port_create
|
||||||
|
//go:linkname procport_associate libc_port_associate
|
||||||
|
//go:linkname procport_dissociate libc_port_dissociate
|
||||||
|
//go:linkname procport_get libc_port_get
|
||||||
|
//go:linkname procport_getn libc_port_getn
|
||||||
|
|
||||||
var (
|
var (
|
||||||
procpipe,
|
procpipe,
|
||||||
@@ -403,7 +413,12 @@ var (
|
|||||||
proc__xnet_getsockopt,
|
proc__xnet_getsockopt,
|
||||||
procgetpeername,
|
procgetpeername,
|
||||||
procsetsockopt,
|
procsetsockopt,
|
||||||
procrecvfrom syscallFunc
|
procrecvfrom,
|
||||||
|
procport_create,
|
||||||
|
procport_associate,
|
||||||
|
procport_dissociate,
|
||||||
|
procport_get,
|
||||||
|
procport_getn syscallFunc
|
||||||
)
|
)
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
@@ -1981,3 +1996,58 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func port_create() (n int, err error) {
|
||||||
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 0, 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error) {
|
||||||
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_associate)), 5, uintptr(port), uintptr(source), uintptr(object), uintptr(events), uintptr(unsafe.Pointer(user)), 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func port_dissociate(port int, source int, object uintptr) (n int, err error) {
|
||||||
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_dissociate)), 3, uintptr(port), uintptr(source), uintptr(object), 0, 0, 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) {
|
||||||
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_get)), 3, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(unsafe.Pointer(timeout)), 0, 0, 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error) {
|
||||||
|
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_getn)), 5, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(max), uintptr(unsafe.Pointer(nget)), uintptr(unsafe.Pointer(timeout)), 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
+6
@@ -439,4 +439,10 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_MEMFD_SECRET = 447
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+6
@@ -361,4 +361,10 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_MEMFD_SECRET = 447
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+6
@@ -7,6 +7,7 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
SYS_SYSCALL_MASK = 0
|
||||||
SYS_RESTART_SYSCALL = 0
|
SYS_RESTART_SYSCALL = 0
|
||||||
SYS_EXIT = 1
|
SYS_EXIT = 1
|
||||||
SYS_FORK = 2
|
SYS_FORK = 2
|
||||||
@@ -403,4 +404,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+6
@@ -306,4 +306,10 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_MEMFD_SECRET = 447
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -424,4 +424,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 4440
|
SYS_PROCESS_MADVISE = 4440
|
||||||
SYS_EPOLL_PWAIT2 = 4441
|
SYS_EPOLL_PWAIT2 = 4441
|
||||||
SYS_MOUNT_SETATTR = 4442
|
SYS_MOUNT_SETATTR = 4442
|
||||||
|
SYS_QUOTACTL_FD = 4443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 4444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 4445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 4446
|
||||||
|
SYS_PROCESS_MRELEASE = 4448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -354,4 +354,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 5440
|
SYS_PROCESS_MADVISE = 5440
|
||||||
SYS_EPOLL_PWAIT2 = 5441
|
SYS_EPOLL_PWAIT2 = 5441
|
||||||
SYS_MOUNT_SETATTR = 5442
|
SYS_MOUNT_SETATTR = 5442
|
||||||
|
SYS_QUOTACTL_FD = 5443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 5444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 5445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 5446
|
||||||
|
SYS_PROCESS_MRELEASE = 5448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -354,4 +354,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 5440
|
SYS_PROCESS_MADVISE = 5440
|
||||||
SYS_EPOLL_PWAIT2 = 5441
|
SYS_EPOLL_PWAIT2 = 5441
|
||||||
SYS_MOUNT_SETATTR = 5442
|
SYS_MOUNT_SETATTR = 5442
|
||||||
|
SYS_QUOTACTL_FD = 5443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 5444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 5445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 5446
|
||||||
|
SYS_PROCESS_MRELEASE = 5448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -424,4 +424,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 4440
|
SYS_PROCESS_MADVISE = 4440
|
||||||
SYS_EPOLL_PWAIT2 = 4441
|
SYS_EPOLL_PWAIT2 = 4441
|
||||||
SYS_MOUNT_SETATTR = 4442
|
SYS_MOUNT_SETATTR = 4442
|
||||||
|
SYS_QUOTACTL_FD = 4443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 4444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 4445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 4446
|
||||||
|
SYS_PROCESS_MRELEASE = 4448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -431,4 +431,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -403,4 +403,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -403,4 +403,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -305,4 +305,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -368,4 +368,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+5
@@ -382,4 +382,9 @@ const (
|
|||||||
SYS_PROCESS_MADVISE = 440
|
SYS_PROCESS_MADVISE = 440
|
||||||
SYS_EPOLL_PWAIT2 = 441
|
SYS_EPOLL_PWAIT2 = 441
|
||||||
SYS_MOUNT_SETATTR = 442
|
SYS_MOUNT_SETATTR = 442
|
||||||
|
SYS_QUOTACTL_FD = 443
|
||||||
|
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||||
|
SYS_LANDLOCK_ADD_RULE = 445
|
||||||
|
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||||
|
SYS_PROCESS_MRELEASE = 448
|
||||||
)
|
)
|
||||||
|
|||||||
+231
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
|
|||||||
Sc_reserved [5]uint32
|
Sc_reserved [5]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XVSockPCB struct {
|
||||||
|
Xv_len uint32
|
||||||
|
Xv_vsockpp uint64
|
||||||
|
Xvp_local_cid uint32
|
||||||
|
Xvp_local_port uint32
|
||||||
|
Xvp_remote_cid uint32
|
||||||
|
Xvp_remote_port uint32
|
||||||
|
Xvp_rxcnt uint32
|
||||||
|
Xvp_txcnt uint32
|
||||||
|
Xvp_peer_rxhiwat uint32
|
||||||
|
Xvp_peer_rxcnt uint32
|
||||||
|
Xvp_last_pid int32
|
||||||
|
Xvp_gencnt uint64
|
||||||
|
Xv_socket XSocket
|
||||||
|
_ [4]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSocket struct {
|
||||||
|
Xso_len uint32
|
||||||
|
Xso_so uint32
|
||||||
|
So_type int16
|
||||||
|
So_options int16
|
||||||
|
So_linger int16
|
||||||
|
So_state int16
|
||||||
|
So_pcb uint32
|
||||||
|
Xso_protocol int32
|
||||||
|
Xso_family int32
|
||||||
|
So_qlen int16
|
||||||
|
So_incqlen int16
|
||||||
|
So_qlimit int16
|
||||||
|
So_timeo int16
|
||||||
|
So_error uint16
|
||||||
|
So_pgid int32
|
||||||
|
So_oobmark uint32
|
||||||
|
So_rcv XSockbuf
|
||||||
|
So_snd XSockbuf
|
||||||
|
So_uid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSocket64 struct {
|
||||||
|
Xso_len uint32
|
||||||
|
_ [8]byte
|
||||||
|
So_type int16
|
||||||
|
So_options int16
|
||||||
|
So_linger int16
|
||||||
|
So_state int16
|
||||||
|
_ [8]byte
|
||||||
|
Xso_protocol int32
|
||||||
|
Xso_family int32
|
||||||
|
So_qlen int16
|
||||||
|
So_incqlen int16
|
||||||
|
So_qlimit int16
|
||||||
|
So_timeo int16
|
||||||
|
So_error uint16
|
||||||
|
So_pgid int32
|
||||||
|
So_oobmark uint32
|
||||||
|
So_rcv XSockbuf
|
||||||
|
So_snd XSockbuf
|
||||||
|
So_uid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSockbuf struct {
|
||||||
|
Cc uint32
|
||||||
|
Hiwat uint32
|
||||||
|
Mbcnt uint32
|
||||||
|
Mbmax uint32
|
||||||
|
Lowat int32
|
||||||
|
Flags int16
|
||||||
|
Timeo int16
|
||||||
|
}
|
||||||
|
|
||||||
|
type XVSockPgen struct {
|
||||||
|
Len uint32
|
||||||
|
Count uint64
|
||||||
|
Gen uint64
|
||||||
|
Sogen uint64
|
||||||
|
}
|
||||||
|
|
||||||
type _Socklen uint32
|
type _Socklen uint32
|
||||||
|
|
||||||
type Xucred struct {
|
type Xucred struct {
|
||||||
@@ -287,6 +373,11 @@ const (
|
|||||||
SizeofSockaddrUnix = 0x6a
|
SizeofSockaddrUnix = 0x6a
|
||||||
SizeofSockaddrDatalink = 0x14
|
SizeofSockaddrDatalink = 0x14
|
||||||
SizeofSockaddrCtl = 0x20
|
SizeofSockaddrCtl = 0x20
|
||||||
|
SizeofSockaddrVM = 0xc
|
||||||
|
SizeofXvsockpcb = 0xa8
|
||||||
|
SizeofXSocket = 0x64
|
||||||
|
SizeofXSockbuf = 0x18
|
||||||
|
SizeofXVSockPgen = 0x20
|
||||||
SizeofXucred = 0x4c
|
SizeofXucred = 0x4c
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIovec = 0x10
|
SizeofIovec = 0x10
|
||||||
@@ -535,3 +626,143 @@ type CtlInfo struct {
|
|||||||
Id uint32
|
Id uint32
|
||||||
Name [96]byte
|
Name [96]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SizeofKinfoProc = 0x288
|
||||||
|
|
||||||
|
type Eproc struct {
|
||||||
|
Paddr uintptr
|
||||||
|
Sess uintptr
|
||||||
|
Pcred Pcred
|
||||||
|
Ucred Ucred
|
||||||
|
Vm Vmspace
|
||||||
|
Ppid int32
|
||||||
|
Pgid int32
|
||||||
|
Jobc int16
|
||||||
|
Tdev int32
|
||||||
|
Tpgid int32
|
||||||
|
Tsess uintptr
|
||||||
|
Wmesg [8]byte
|
||||||
|
Xsize int32
|
||||||
|
Xrssize int16
|
||||||
|
Xccount int16
|
||||||
|
Xswrss int16
|
||||||
|
Flag int32
|
||||||
|
Login [12]byte
|
||||||
|
Spare [4]int32
|
||||||
|
_ [4]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type ExternProc struct {
|
||||||
|
P_starttime Timeval
|
||||||
|
P_vmspace *Vmspace
|
||||||
|
P_sigacts uintptr
|
||||||
|
P_flag int32
|
||||||
|
P_stat int8
|
||||||
|
P_pid int32
|
||||||
|
P_oppid int32
|
||||||
|
P_dupfd int32
|
||||||
|
User_stack *int8
|
||||||
|
Exit_thread *byte
|
||||||
|
P_debugger int32
|
||||||
|
Sigwait int32
|
||||||
|
P_estcpu uint32
|
||||||
|
P_cpticks int32
|
||||||
|
P_pctcpu uint32
|
||||||
|
P_wchan *byte
|
||||||
|
P_wmesg *int8
|
||||||
|
P_swtime uint32
|
||||||
|
P_slptime uint32
|
||||||
|
P_realtimer Itimerval
|
||||||
|
P_rtime Timeval
|
||||||
|
P_uticks uint64
|
||||||
|
P_sticks uint64
|
||||||
|
P_iticks uint64
|
||||||
|
P_traceflag int32
|
||||||
|
P_tracep uintptr
|
||||||
|
P_siglist int32
|
||||||
|
P_textvp uintptr
|
||||||
|
P_holdcnt int32
|
||||||
|
P_sigmask uint32
|
||||||
|
P_sigignore uint32
|
||||||
|
P_sigcatch uint32
|
||||||
|
P_priority uint8
|
||||||
|
P_usrpri uint8
|
||||||
|
P_nice int8
|
||||||
|
P_comm [17]byte
|
||||||
|
P_pgrp uintptr
|
||||||
|
P_addr uintptr
|
||||||
|
P_xstat uint16
|
||||||
|
P_acflag uint16
|
||||||
|
P_ru *Rusage
|
||||||
|
}
|
||||||
|
|
||||||
|
type Itimerval struct {
|
||||||
|
Interval Timeval
|
||||||
|
Value Timeval
|
||||||
|
}
|
||||||
|
|
||||||
|
type KinfoProc struct {
|
||||||
|
Proc ExternProc
|
||||||
|
Eproc Eproc
|
||||||
|
}
|
||||||
|
|
||||||
|
type Vmspace struct {
|
||||||
|
Dummy int32
|
||||||
|
Dummy2 *int8
|
||||||
|
Dummy3 [5]int32
|
||||||
|
Dummy4 [3]*int8
|
||||||
|
}
|
||||||
|
|
||||||
|
type Pcred struct {
|
||||||
|
Pc_lock [72]int8
|
||||||
|
Pc_ucred uintptr
|
||||||
|
P_ruid uint32
|
||||||
|
P_svuid uint32
|
||||||
|
P_rgid uint32
|
||||||
|
P_svgid uint32
|
||||||
|
P_refcnt int32
|
||||||
|
_ [4]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type Ucred struct {
|
||||||
|
Ref int32
|
||||||
|
Uid uint32
|
||||||
|
Ngroups int16
|
||||||
|
Groups [16]uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type SysvIpcPerm struct {
|
||||||
|
Uid uint32
|
||||||
|
Gid uint32
|
||||||
|
Cuid uint32
|
||||||
|
Cgid uint32
|
||||||
|
Mode uint16
|
||||||
|
_ uint16
|
||||||
|
_ int32
|
||||||
|
}
|
||||||
|
type SysvShmDesc struct {
|
||||||
|
Perm SysvIpcPerm
|
||||||
|
Segsz uint64
|
||||||
|
Lpid int32
|
||||||
|
Cpid int32
|
||||||
|
Nattch uint16
|
||||||
|
_ [34]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
IPC_CREAT = 0x200
|
||||||
|
IPC_EXCL = 0x400
|
||||||
|
IPC_NOWAIT = 0x800
|
||||||
|
IPC_PRIVATE = 0x0
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
IPC_RMID = 0x0
|
||||||
|
IPC_SET = 0x1
|
||||||
|
IPC_STAT = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
SHM_RDONLY = 0x1000
|
||||||
|
SHM_RND = 0x2000
|
||||||
|
)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user