mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
update go mod vendor
This commit is contained in:
parent
3028bf0bb1
commit
098dcc9582
18
go.mod
18
go.mod
@ -1,21 +1,21 @@
|
||||
module github.com/go-vgo/robotgo
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522221800-27f122750802
|
||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e
|
||||
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
|
||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||
github.com/lxn/win v0.0.0-20190226192825-50e22abd4ff9
|
||||
github.com/lxn/win v0.0.0-20190311093451-0040366d7450
|
||||
github.com/otiai10/gosseract v2.2.1+incompatible
|
||||
github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6
|
||||
github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108
|
||||
github.com/shirou/gopsutil v2.18.12+incompatible
|
||||
// github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108 // indirect
|
||||
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
|
||||
github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067
|
||||
golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e // indirect
|
||||
github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
golang.org/x/image => github.com/golang/image v0.0.0-20181116024801-cd38e8056d9b
|
||||
golang.org/x/sys => github.com/golang/sys v0.0.0-20190109145017-48ac38b7c8cb
|
||||
)
|
||||
//golang.org/x/image => github.com/golang/image v0.0.0-20181116024801-cd38e8056d9b
|
||||
//replace golang.org/x/sys => github.com/golang/sys v0.0.0-20190109145017-48ac38b7c8cb
|
||||
|
18
go.sum
18
go.sum
@ -1,5 +1,5 @@
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522221800-27f122750802 h1:otE7gFP0KwnPTKtMvPLOcWDZxx6rXYyJGlrXbhoD7og=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522221800-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA=
|
||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
|
||||
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 h1:UUppSQnhf4Yc6xGxSkoQpPhb7RVzuv5Nb1mwJ5VId9s=
|
||||
@ -10,8 +10,8 @@ github.com/golang/image v0.0.0-20181116024801-cd38e8056d9b h1:560WQdaWjsfqNwVBNZ
|
||||
github.com/golang/image v0.0.0-20181116024801-cd38e8056d9b/go.mod h1:W3cvIh6MZCq53QRt4EH8hvU9HPLAPXNxfcoJxCiaTV4=
|
||||
github.com/golang/sys v0.0.0-20190109145017-48ac38b7c8cb h1:W0jr+BhzUWF6woATVXwDdmDkouJfNJEiITOjtOEIlfI=
|
||||
github.com/golang/sys v0.0.0-20190109145017-48ac38b7c8cb/go.mod h1:5JyrLPvD/ZdaYkT7IqKhsP5xt7aLjA99KXRtk4EIYDk=
|
||||
github.com/lxn/win v0.0.0-20190226192825-50e22abd4ff9 h1:7noriXA0DUpF8QGGBsuGCRn+LLs7uR0MlDfVccQuvEg=
|
||||
github.com/lxn/win v0.0.0-20190226192825-50e22abd4ff9/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE=
|
||||
github.com/lxn/win v0.0.0-20190311093451-0040366d7450 h1:jB6Qj4k3jLhRQ7QxW6aycyLQr5oGNvNWeGv/4+az2Qk=
|
||||
github.com/lxn/win v0.0.0-20190311093451-0040366d7450/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE=
|
||||
github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I=
|
||||
github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE=
|
||||
github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6 h1:XTKPqoPYwgasmAWhtpolldqBpnbpgH6iAtQPReXiywA=
|
||||
@ -24,7 +24,9 @@ github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+D
|
||||
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
|
||||
github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa h1:kOg2u5TN+l2IBl4Q0Xm3bZRQ5gK3zGXRi/24XT8L7FI=
|
||||
github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa/go.mod h1:D+Ywq+8bsOIg4nUk1lgHtPGxYxknhySi/HfZjG7VN/g=
|
||||
golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b h1:VHyIDlv3XkfCa5/a81uzaoDkHH4rr81Z62g+xlnO8uM=
|
||||
golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35 h1:YAFjXN64LMvktoUZH9zgY4lGc/msGN7HQfoSuKCgaDU=
|
||||
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647 h1:6dJAca4/AgJ2XwHYUQVAr09rDxggPlz84noyhjZuMbc=
|
||||
github.com/vcaesar/tt v0.0.0-20181224161634-976c3d851647/go.mod h1:xKkGp+ufbz/1DQmNxdbAMFqZJOVIJEX7dGvLZMhPIWg=
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f h1:FO4MZ3N56GnxbqxGKqh+YTzUWQ2sDwtFQEZgLOxh9Jc=
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
35
vendor/github.com/lxn/win/advapi32.go
generated
vendored
35
vendor/github.com/lxn/win/advapi32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -55,30 +56,30 @@ const (
|
||||
|
||||
var (
|
||||
// Library
|
||||
libadvapi32 uintptr
|
||||
libadvapi32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
regCloseKey uintptr
|
||||
regOpenKeyEx uintptr
|
||||
regQueryValueEx uintptr
|
||||
regEnumValue uintptr
|
||||
regSetValueEx uintptr
|
||||
regCloseKey *windows.LazyProc
|
||||
regOpenKeyEx *windows.LazyProc
|
||||
regQueryValueEx *windows.LazyProc
|
||||
regEnumValue *windows.LazyProc
|
||||
regSetValueEx *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libadvapi32 = MustLoadLibrary("advapi32.dll")
|
||||
libadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
|
||||
|
||||
// Functions
|
||||
regCloseKey = MustGetProcAddress(libadvapi32, "RegCloseKey")
|
||||
regOpenKeyEx = MustGetProcAddress(libadvapi32, "RegOpenKeyExW")
|
||||
regQueryValueEx = MustGetProcAddress(libadvapi32, "RegQueryValueExW")
|
||||
regEnumValue = MustGetProcAddress(libadvapi32, "RegEnumValueW")
|
||||
regSetValueEx = MustGetProcAddress(libadvapi32, "RegSetValueExW")
|
||||
regCloseKey = libadvapi32.NewProc("RegCloseKey")
|
||||
regOpenKeyEx = libadvapi32.NewProc("RegOpenKeyExW")
|
||||
regQueryValueEx = libadvapi32.NewProc("RegQueryValueExW")
|
||||
regEnumValue = libadvapi32.NewProc("RegEnumValueW")
|
||||
regSetValueEx = libadvapi32.NewProc("RegSetValueExW")
|
||||
}
|
||||
|
||||
func RegCloseKey(hKey HKEY) int32 {
|
||||
ret, _, _ := syscall.Syscall(regCloseKey, 1,
|
||||
ret, _, _ := syscall.Syscall(regCloseKey.Addr(), 1,
|
||||
uintptr(hKey),
|
||||
0,
|
||||
0)
|
||||
@ -87,7 +88,7 @@ func RegCloseKey(hKey HKEY) int32 {
|
||||
}
|
||||
|
||||
func RegOpenKeyEx(hKey HKEY, lpSubKey *uint16, ulOptions uint32, samDesired REGSAM, phkResult *HKEY) int32 {
|
||||
ret, _, _ := syscall.Syscall6(regOpenKeyEx, 5,
|
||||
ret, _, _ := syscall.Syscall6(regOpenKeyEx.Addr(), 5,
|
||||
uintptr(hKey),
|
||||
uintptr(unsafe.Pointer(lpSubKey)),
|
||||
uintptr(ulOptions),
|
||||
@ -99,7 +100,7 @@ func RegOpenKeyEx(hKey HKEY, lpSubKey *uint16, ulOptions uint32, samDesired REGS
|
||||
}
|
||||
|
||||
func RegQueryValueEx(hKey HKEY, lpValueName *uint16, lpReserved, lpType *uint32, lpData *byte, lpcbData *uint32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(regQueryValueEx, 6,
|
||||
ret, _, _ := syscall.Syscall6(regQueryValueEx.Addr(), 6,
|
||||
uintptr(hKey),
|
||||
uintptr(unsafe.Pointer(lpValueName)),
|
||||
uintptr(unsafe.Pointer(lpReserved)),
|
||||
@ -111,7 +112,7 @@ func RegQueryValueEx(hKey HKEY, lpValueName *uint16, lpReserved, lpType *uint32,
|
||||
}
|
||||
|
||||
func RegEnumValue(hKey HKEY, index uint32, lpValueName *uint16, lpcchValueName *uint32, lpReserved, lpType *uint32, lpData *byte, lpcbData *uint32) int32 {
|
||||
ret, _, _ := syscall.Syscall9(regEnumValue, 8,
|
||||
ret, _, _ := syscall.Syscall9(regEnumValue.Addr(), 8,
|
||||
uintptr(hKey),
|
||||
uintptr(index),
|
||||
uintptr(unsafe.Pointer(lpValueName)),
|
||||
@ -125,7 +126,7 @@ func RegEnumValue(hKey HKEY, index uint32, lpValueName *uint16, lpcchValueName *
|
||||
}
|
||||
|
||||
func RegSetValueEx(hKey HKEY, lpValueName *uint16, lpReserved, lpDataType uint64, lpData *byte, cbData uint32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(regSetValueEx, 6,
|
||||
ret, _, _ := syscall.Syscall6(regSetValueEx.Addr(), 6,
|
||||
uintptr(hKey),
|
||||
uintptr(unsafe.Pointer(lpValueName)),
|
||||
uintptr(lpReserved),
|
||||
|
59
vendor/github.com/lxn/win/comctl32.go
generated
vendored
59
vendor/github.com/lxn/win/comctl32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -230,32 +231,32 @@ type NMCUSTOMDRAW struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libcomctl32 uintptr
|
||||
libcomctl32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
imageList_Add uintptr
|
||||
imageList_AddMasked uintptr
|
||||
imageList_Create uintptr
|
||||
imageList_Destroy uintptr
|
||||
imageList_ReplaceIcon uintptr
|
||||
initCommonControlsEx uintptr
|
||||
loadIconMetric uintptr
|
||||
loadIconWithScaleDown uintptr
|
||||
imageList_Add *windows.LazyProc
|
||||
imageList_AddMasked *windows.LazyProc
|
||||
imageList_Create *windows.LazyProc
|
||||
imageList_Destroy *windows.LazyProc
|
||||
imageList_ReplaceIcon *windows.LazyProc
|
||||
initCommonControlsEx *windows.LazyProc
|
||||
loadIconMetric *windows.LazyProc
|
||||
loadIconWithScaleDown *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libcomctl32 = MustLoadLibrary("comctl32.dll")
|
||||
libcomctl32 = windows.NewLazySystemDLL("comctl32.dll")
|
||||
|
||||
// Functions
|
||||
imageList_Add = MustGetProcAddress(libcomctl32, "ImageList_Add")
|
||||
imageList_AddMasked = MustGetProcAddress(libcomctl32, "ImageList_AddMasked")
|
||||
imageList_Create = MustGetProcAddress(libcomctl32, "ImageList_Create")
|
||||
imageList_Destroy = MustGetProcAddress(libcomctl32, "ImageList_Destroy")
|
||||
imageList_ReplaceIcon = MustGetProcAddress(libcomctl32, "ImageList_ReplaceIcon")
|
||||
initCommonControlsEx = MustGetProcAddress(libcomctl32, "InitCommonControlsEx")
|
||||
loadIconMetric = MaybeGetProcAddress(libcomctl32, "LoadIconMetric")
|
||||
loadIconWithScaleDown = MaybeGetProcAddress(libcomctl32, "LoadIconWithScaleDown")
|
||||
imageList_Add = libcomctl32.NewProc("ImageList_Add")
|
||||
imageList_AddMasked = libcomctl32.NewProc("ImageList_AddMasked")
|
||||
imageList_Create = libcomctl32.NewProc("ImageList_Create")
|
||||
imageList_Destroy = libcomctl32.NewProc("ImageList_Destroy")
|
||||
imageList_ReplaceIcon = libcomctl32.NewProc("ImageList_ReplaceIcon")
|
||||
initCommonControlsEx = libcomctl32.NewProc("InitCommonControlsEx")
|
||||
loadIconMetric = libcomctl32.NewProc("LoadIconMetric")
|
||||
loadIconWithScaleDown = libcomctl32.NewProc("LoadIconWithScaleDown")
|
||||
|
||||
// Initialize the common controls we support
|
||||
var initCtrls INITCOMMONCONTROLSEX
|
||||
@ -266,7 +267,7 @@ func init() {
|
||||
}
|
||||
|
||||
func ImageList_Add(himl HIMAGELIST, hbmImage, hbmMask HBITMAP) int32 {
|
||||
ret, _, _ := syscall.Syscall(imageList_Add, 3,
|
||||
ret, _, _ := syscall.Syscall(imageList_Add.Addr(), 3,
|
||||
uintptr(himl),
|
||||
uintptr(hbmImage),
|
||||
uintptr(hbmMask))
|
||||
@ -275,7 +276,7 @@ func ImageList_Add(himl HIMAGELIST, hbmImage, hbmMask HBITMAP) int32 {
|
||||
}
|
||||
|
||||
func ImageList_AddMasked(himl HIMAGELIST, hbmImage HBITMAP, crMask COLORREF) int32 {
|
||||
ret, _, _ := syscall.Syscall(imageList_AddMasked, 3,
|
||||
ret, _, _ := syscall.Syscall(imageList_AddMasked.Addr(), 3,
|
||||
uintptr(himl),
|
||||
uintptr(hbmImage),
|
||||
uintptr(crMask))
|
||||
@ -284,7 +285,7 @@ func ImageList_AddMasked(himl HIMAGELIST, hbmImage HBITMAP, crMask COLORREF) int
|
||||
}
|
||||
|
||||
func ImageList_Create(cx, cy int32, flags uint32, cInitial, cGrow int32) HIMAGELIST {
|
||||
ret, _, _ := syscall.Syscall6(imageList_Create, 5,
|
||||
ret, _, _ := syscall.Syscall6(imageList_Create.Addr(), 5,
|
||||
uintptr(cx),
|
||||
uintptr(cy),
|
||||
uintptr(flags),
|
||||
@ -296,7 +297,7 @@ func ImageList_Create(cx, cy int32, flags uint32, cInitial, cGrow int32) HIMAGEL
|
||||
}
|
||||
|
||||
func ImageList_Destroy(hIml HIMAGELIST) bool {
|
||||
ret, _, _ := syscall.Syscall(imageList_Destroy, 1,
|
||||
ret, _, _ := syscall.Syscall(imageList_Destroy.Addr(), 1,
|
||||
uintptr(hIml),
|
||||
0,
|
||||
0)
|
||||
@ -305,7 +306,7 @@ func ImageList_Destroy(hIml HIMAGELIST) bool {
|
||||
}
|
||||
|
||||
func ImageList_ReplaceIcon(himl HIMAGELIST, i int32, hicon HICON) int32 {
|
||||
ret, _, _ := syscall.Syscall(imageList_ReplaceIcon, 3,
|
||||
ret, _, _ := syscall.Syscall(imageList_ReplaceIcon.Addr(), 3,
|
||||
uintptr(himl),
|
||||
uintptr(i),
|
||||
uintptr(hicon))
|
||||
@ -314,7 +315,7 @@ func ImageList_ReplaceIcon(himl HIMAGELIST, i int32, hicon HICON) int32 {
|
||||
}
|
||||
|
||||
func InitCommonControlsEx(lpInitCtrls *INITCOMMONCONTROLSEX) bool {
|
||||
ret, _, _ := syscall.Syscall(initCommonControlsEx, 1,
|
||||
ret, _, _ := syscall.Syscall(initCommonControlsEx.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpInitCtrls)),
|
||||
0,
|
||||
0)
|
||||
@ -323,7 +324,10 @@ func InitCommonControlsEx(lpInitCtrls *INITCOMMONCONTROLSEX) bool {
|
||||
}
|
||||
|
||||
func LoadIconMetric(hInstance HINSTANCE, lpIconName *uint16, lims int32, hicon *HICON) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(loadIconMetric, 4,
|
||||
if loadIconMetric.Find() != nil {
|
||||
return HRESULT(0)
|
||||
}
|
||||
ret, _, _ := syscall.Syscall6(loadIconMetric.Addr(), 4,
|
||||
uintptr(hInstance),
|
||||
uintptr(unsafe.Pointer(lpIconName)),
|
||||
uintptr(lims),
|
||||
@ -335,7 +339,10 @@ func LoadIconMetric(hInstance HINSTANCE, lpIconName *uint16, lims int32, hicon *
|
||||
}
|
||||
|
||||
func LoadIconWithScaleDown(hInstance HINSTANCE, lpIconName *uint16, w int32, h int32, hicon *HICON) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(loadIconWithScaleDown, 5,
|
||||
if loadIconWithScaleDown.Find() != nil {
|
||||
return HRESULT(0)
|
||||
}
|
||||
ret, _, _ := syscall.Syscall6(loadIconWithScaleDown.Addr(), 5,
|
||||
uintptr(hInstance),
|
||||
uintptr(unsafe.Pointer(lpIconName)),
|
||||
uintptr(w),
|
||||
|
35
vendor/github.com/lxn/win/comdlg32.go
generated
vendored
35
vendor/github.com/lxn/win/comdlg32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -231,30 +232,30 @@ type PRINTDLGEX struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libcomdlg32 uintptr
|
||||
libcomdlg32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
chooseColor uintptr
|
||||
commDlgExtendedError uintptr
|
||||
getOpenFileName uintptr
|
||||
getSaveFileName uintptr
|
||||
printDlgEx uintptr
|
||||
chooseColor *windows.LazyProc
|
||||
commDlgExtendedError *windows.LazyProc
|
||||
getOpenFileName *windows.LazyProc
|
||||
getSaveFileName *windows.LazyProc
|
||||
printDlgEx *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libcomdlg32 = MustLoadLibrary("comdlg32.dll")
|
||||
libcomdlg32 = windows.NewLazySystemDLL("comdlg32.dll")
|
||||
|
||||
// Functions
|
||||
chooseColor = MustGetProcAddress(libcomdlg32, "ChooseColorW")
|
||||
commDlgExtendedError = MustGetProcAddress(libcomdlg32, "CommDlgExtendedError")
|
||||
getOpenFileName = MustGetProcAddress(libcomdlg32, "GetOpenFileNameW")
|
||||
getSaveFileName = MustGetProcAddress(libcomdlg32, "GetSaveFileNameW")
|
||||
printDlgEx = MustGetProcAddress(libcomdlg32, "PrintDlgExW")
|
||||
chooseColor = libcomdlg32.NewProc("ChooseColorW")
|
||||
commDlgExtendedError = libcomdlg32.NewProc("CommDlgExtendedError")
|
||||
getOpenFileName = libcomdlg32.NewProc("GetOpenFileNameW")
|
||||
getSaveFileName = libcomdlg32.NewProc("GetSaveFileNameW")
|
||||
printDlgEx = libcomdlg32.NewProc("PrintDlgExW")
|
||||
}
|
||||
|
||||
func ChooseColor(lpcc *CHOOSECOLOR) bool {
|
||||
ret, _, _ := syscall.Syscall(chooseColor, 1,
|
||||
ret, _, _ := syscall.Syscall(chooseColor.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpcc)),
|
||||
0,
|
||||
0)
|
||||
@ -263,7 +264,7 @@ func ChooseColor(lpcc *CHOOSECOLOR) bool {
|
||||
}
|
||||
|
||||
func CommDlgExtendedError() uint32 {
|
||||
ret, _, _ := syscall.Syscall(commDlgExtendedError, 0,
|
||||
ret, _, _ := syscall.Syscall(commDlgExtendedError.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -272,7 +273,7 @@ func CommDlgExtendedError() uint32 {
|
||||
}
|
||||
|
||||
func GetOpenFileName(lpofn *OPENFILENAME) bool {
|
||||
ret, _, _ := syscall.Syscall(getOpenFileName, 1,
|
||||
ret, _, _ := syscall.Syscall(getOpenFileName.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpofn)),
|
||||
0,
|
||||
0)
|
||||
@ -281,7 +282,7 @@ func GetOpenFileName(lpofn *OPENFILENAME) bool {
|
||||
}
|
||||
|
||||
func GetSaveFileName(lpofn *OPENFILENAME) bool {
|
||||
ret, _, _ := syscall.Syscall(getSaveFileName, 1,
|
||||
ret, _, _ := syscall.Syscall(getSaveFileName.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpofn)),
|
||||
0,
|
||||
0)
|
||||
@ -290,7 +291,7 @@ func GetSaveFileName(lpofn *OPENFILENAME) bool {
|
||||
}
|
||||
|
||||
func PrintDlgEx(lppd *PRINTDLGEX) HRESULT {
|
||||
ret, _, _ := syscall.Syscall(printDlgEx, 1,
|
||||
ret, _, _ := syscall.Syscall(printDlgEx.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lppd)),
|
||||
0,
|
||||
0)
|
||||
|
435
vendor/github.com/lxn/win/gdi32.go
generated
vendored
435
vendor/github.com/lxn/win/gdi32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -1028,165 +1029,165 @@ type BLENDFUNCTION struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libgdi32 uintptr
|
||||
libmsimg32 uintptr
|
||||
libgdi32 *windows.LazyDLL
|
||||
libmsimg32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
abortDoc uintptr
|
||||
addFontResourceEx uintptr
|
||||
alphaBlend uintptr
|
||||
bitBlt uintptr
|
||||
choosePixelFormat uintptr
|
||||
closeEnhMetaFile uintptr
|
||||
combineRgn uintptr
|
||||
copyEnhMetaFile uintptr
|
||||
createBitmap uintptr
|
||||
createCompatibleBitmap uintptr
|
||||
createBrushIndirect uintptr
|
||||
createCompatibleDC uintptr
|
||||
createDC uintptr
|
||||
createDIBSection uintptr
|
||||
createFontIndirect uintptr
|
||||
createEnhMetaFile uintptr
|
||||
createIC uintptr
|
||||
createPatternBrush uintptr
|
||||
createRectRgn uintptr
|
||||
deleteDC uintptr
|
||||
deleteEnhMetaFile uintptr
|
||||
deleteObject uintptr
|
||||
ellipse uintptr
|
||||
endDoc uintptr
|
||||
endPage uintptr
|
||||
excludeClipRect uintptr
|
||||
extCreatePen uintptr
|
||||
fillRgn uintptr
|
||||
gdiFlush uintptr
|
||||
getBkColor uintptr
|
||||
getDeviceCaps uintptr
|
||||
getDIBits uintptr
|
||||
getEnhMetaFile uintptr
|
||||
getEnhMetaFileHeader uintptr
|
||||
getObject uintptr
|
||||
getPixel uintptr
|
||||
getRgnBox uintptr
|
||||
getStockObject uintptr
|
||||
getTextColor uintptr
|
||||
getTextExtentExPoint uintptr
|
||||
getTextExtentPoint32 uintptr
|
||||
getTextMetrics uintptr
|
||||
getViewportOrgEx uintptr
|
||||
gradientFill uintptr
|
||||
intersectClipRect uintptr
|
||||
lineTo uintptr
|
||||
moveToEx uintptr
|
||||
playEnhMetaFile uintptr
|
||||
polyline uintptr
|
||||
rectangle uintptr
|
||||
removeFontResourceEx uintptr
|
||||
resetDC uintptr
|
||||
restoreDC uintptr
|
||||
roundRect uintptr
|
||||
selectObject uintptr
|
||||
setBkColor uintptr
|
||||
setBkMode uintptr
|
||||
setBrushOrgEx uintptr
|
||||
setDIBits uintptr
|
||||
setPixel uintptr
|
||||
setPixelFormat uintptr
|
||||
setStretchBltMode uintptr
|
||||
setTextColor uintptr
|
||||
setViewportOrgEx uintptr
|
||||
saveDC uintptr
|
||||
startDoc uintptr
|
||||
startPage uintptr
|
||||
stretchBlt uintptr
|
||||
swapBuffers uintptr
|
||||
textOut uintptr
|
||||
transparentBlt uintptr
|
||||
abortDoc *windows.LazyProc
|
||||
addFontResourceEx *windows.LazyProc
|
||||
alphaBlend *windows.LazyProc
|
||||
bitBlt *windows.LazyProc
|
||||
choosePixelFormat *windows.LazyProc
|
||||
closeEnhMetaFile *windows.LazyProc
|
||||
combineRgn *windows.LazyProc
|
||||
copyEnhMetaFile *windows.LazyProc
|
||||
createBitmap *windows.LazyProc
|
||||
createCompatibleBitmap *windows.LazyProc
|
||||
createBrushIndirect *windows.LazyProc
|
||||
createCompatibleDC *windows.LazyProc
|
||||
createDC *windows.LazyProc
|
||||
createDIBSection *windows.LazyProc
|
||||
createFontIndirect *windows.LazyProc
|
||||
createEnhMetaFile *windows.LazyProc
|
||||
createIC *windows.LazyProc
|
||||
createPatternBrush *windows.LazyProc
|
||||
createRectRgn *windows.LazyProc
|
||||
deleteDC *windows.LazyProc
|
||||
deleteEnhMetaFile *windows.LazyProc
|
||||
deleteObject *windows.LazyProc
|
||||
ellipse *windows.LazyProc
|
||||
endDoc *windows.LazyProc
|
||||
endPage *windows.LazyProc
|
||||
excludeClipRect *windows.LazyProc
|
||||
extCreatePen *windows.LazyProc
|
||||
fillRgn *windows.LazyProc
|
||||
gdiFlush *windows.LazyProc
|
||||
getBkColor *windows.LazyProc
|
||||
getDeviceCaps *windows.LazyProc
|
||||
getDIBits *windows.LazyProc
|
||||
getEnhMetaFile *windows.LazyProc
|
||||
getEnhMetaFileHeader *windows.LazyProc
|
||||
getObject *windows.LazyProc
|
||||
getPixel *windows.LazyProc
|
||||
getRgnBox *windows.LazyProc
|
||||
getStockObject *windows.LazyProc
|
||||
getTextColor *windows.LazyProc
|
||||
getTextExtentExPoint *windows.LazyProc
|
||||
getTextExtentPoint32 *windows.LazyProc
|
||||
getTextMetrics *windows.LazyProc
|
||||
getViewportOrgEx *windows.LazyProc
|
||||
gradientFill *windows.LazyProc
|
||||
intersectClipRect *windows.LazyProc
|
||||
lineTo *windows.LazyProc
|
||||
moveToEx *windows.LazyProc
|
||||
playEnhMetaFile *windows.LazyProc
|
||||
polyline *windows.LazyProc
|
||||
rectangle *windows.LazyProc
|
||||
removeFontResourceEx *windows.LazyProc
|
||||
resetDC *windows.LazyProc
|
||||
restoreDC *windows.LazyProc
|
||||
roundRect *windows.LazyProc
|
||||
selectObject *windows.LazyProc
|
||||
setBkColor *windows.LazyProc
|
||||
setBkMode *windows.LazyProc
|
||||
setBrushOrgEx *windows.LazyProc
|
||||
setDIBits *windows.LazyProc
|
||||
setPixel *windows.LazyProc
|
||||
setPixelFormat *windows.LazyProc
|
||||
setStretchBltMode *windows.LazyProc
|
||||
setTextColor *windows.LazyProc
|
||||
setViewportOrgEx *windows.LazyProc
|
||||
saveDC *windows.LazyProc
|
||||
startDoc *windows.LazyProc
|
||||
startPage *windows.LazyProc
|
||||
stretchBlt *windows.LazyProc
|
||||
swapBuffers *windows.LazyProc
|
||||
textOut *windows.LazyProc
|
||||
transparentBlt *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libgdi32 = MustLoadLibrary("gdi32.dll")
|
||||
libmsimg32 = MustLoadLibrary("msimg32.dll")
|
||||
libgdi32 = windows.NewLazySystemDLL("gdi32.dll")
|
||||
libmsimg32 = windows.NewLazySystemDLL("msimg32.dll")
|
||||
|
||||
// Functions
|
||||
abortDoc = MustGetProcAddress(libgdi32, "AbortDoc")
|
||||
addFontResourceEx = MustGetProcAddress(libgdi32, "AddFontResourceExW")
|
||||
bitBlt = MustGetProcAddress(libgdi32, "BitBlt")
|
||||
choosePixelFormat = MustGetProcAddress(libgdi32, "ChoosePixelFormat")
|
||||
closeEnhMetaFile = MustGetProcAddress(libgdi32, "CloseEnhMetaFile")
|
||||
combineRgn = MustGetProcAddress(libgdi32, "CombineRgn")
|
||||
copyEnhMetaFile = MustGetProcAddress(libgdi32, "CopyEnhMetaFileW")
|
||||
createBitmap = MustGetProcAddress(libgdi32, "CreateBitmap")
|
||||
createCompatibleBitmap = MustGetProcAddress(libgdi32, "CreateCompatibleBitmap")
|
||||
createBrushIndirect = MustGetProcAddress(libgdi32, "CreateBrushIndirect")
|
||||
createCompatibleDC = MustGetProcAddress(libgdi32, "CreateCompatibleDC")
|
||||
createDC = MustGetProcAddress(libgdi32, "CreateDCW")
|
||||
createDIBSection = MustGetProcAddress(libgdi32, "CreateDIBSection")
|
||||
createEnhMetaFile = MustGetProcAddress(libgdi32, "CreateEnhMetaFileW")
|
||||
createFontIndirect = MustGetProcAddress(libgdi32, "CreateFontIndirectW")
|
||||
createIC = MustGetProcAddress(libgdi32, "CreateICW")
|
||||
createPatternBrush = MustGetProcAddress(libgdi32, "CreatePatternBrush")
|
||||
createRectRgn = MustGetProcAddress(libgdi32, "CreateRectRgn")
|
||||
deleteDC = MustGetProcAddress(libgdi32, "DeleteDC")
|
||||
deleteEnhMetaFile = MustGetProcAddress(libgdi32, "DeleteEnhMetaFile")
|
||||
deleteObject = MustGetProcAddress(libgdi32, "DeleteObject")
|
||||
ellipse = MustGetProcAddress(libgdi32, "Ellipse")
|
||||
endDoc = MustGetProcAddress(libgdi32, "EndDoc")
|
||||
endPage = MustGetProcAddress(libgdi32, "EndPage")
|
||||
excludeClipRect = MustGetProcAddress(libgdi32, "ExcludeClipRect")
|
||||
extCreatePen = MustGetProcAddress(libgdi32, "ExtCreatePen")
|
||||
fillRgn = MustGetProcAddress(libgdi32, "FillRgn")
|
||||
gdiFlush = MustGetProcAddress(libgdi32, "GdiFlush")
|
||||
getBkColor = MustGetProcAddress(libgdi32, "GetBkColor")
|
||||
getDeviceCaps = MustGetProcAddress(libgdi32, "GetDeviceCaps")
|
||||
getDIBits = MustGetProcAddress(libgdi32, "GetDIBits")
|
||||
getEnhMetaFile = MustGetProcAddress(libgdi32, "GetEnhMetaFileW")
|
||||
getEnhMetaFileHeader = MustGetProcAddress(libgdi32, "GetEnhMetaFileHeader")
|
||||
getObject = MustGetProcAddress(libgdi32, "GetObjectW")
|
||||
getPixel = MustGetProcAddress(libgdi32, "GetPixel")
|
||||
getRgnBox = MustGetProcAddress(libgdi32, "GetRgnBox")
|
||||
getStockObject = MustGetProcAddress(libgdi32, "GetStockObject")
|
||||
getTextColor = MustGetProcAddress(libgdi32, "GetTextColor")
|
||||
getTextExtentExPoint = MustGetProcAddress(libgdi32, "GetTextExtentExPointW")
|
||||
getTextExtentPoint32 = MustGetProcAddress(libgdi32, "GetTextExtentPoint32W")
|
||||
getTextMetrics = MustGetProcAddress(libgdi32, "GetTextMetricsW")
|
||||
getViewportOrgEx = MustGetProcAddress(libgdi32, "GetViewportOrgEx")
|
||||
intersectClipRect = MustGetProcAddress(libgdi32, "IntersectClipRect")
|
||||
lineTo = MustGetProcAddress(libgdi32, "LineTo")
|
||||
moveToEx = MustGetProcAddress(libgdi32, "MoveToEx")
|
||||
playEnhMetaFile = MustGetProcAddress(libgdi32, "PlayEnhMetaFile")
|
||||
polyline = MustGetProcAddress(libgdi32, "Polyline")
|
||||
rectangle = MustGetProcAddress(libgdi32, "Rectangle")
|
||||
removeFontResourceEx = MustGetProcAddress(libgdi32, "RemoveFontResourceExW")
|
||||
resetDC = MustGetProcAddress(libgdi32, "ResetDCW")
|
||||
restoreDC = MustGetProcAddress(libgdi32, "RestoreDC")
|
||||
roundRect = MustGetProcAddress(libgdi32, "RoundRect")
|
||||
saveDC = MustGetProcAddress(libgdi32, "SaveDC")
|
||||
selectObject = MustGetProcAddress(libgdi32, "SelectObject")
|
||||
setBkColor = MustGetProcAddress(libgdi32, "SetBkColor")
|
||||
setBkMode = MustGetProcAddress(libgdi32, "SetBkMode")
|
||||
setBrushOrgEx = MustGetProcAddress(libgdi32, "SetBrushOrgEx")
|
||||
setDIBits = MustGetProcAddress(libgdi32, "SetDIBits")
|
||||
setPixel = MustGetProcAddress(libgdi32, "SetPixel")
|
||||
setPixelFormat = MustGetProcAddress(libgdi32, "SetPixelFormat")
|
||||
setStretchBltMode = MustGetProcAddress(libgdi32, "SetStretchBltMode")
|
||||
setTextColor = MustGetProcAddress(libgdi32, "SetTextColor")
|
||||
setViewportOrgEx = MustGetProcAddress(libgdi32, "SetViewportOrgEx")
|
||||
startDoc = MustGetProcAddress(libgdi32, "StartDocW")
|
||||
startPage = MustGetProcAddress(libgdi32, "StartPage")
|
||||
stretchBlt = MustGetProcAddress(libgdi32, "StretchBlt")
|
||||
swapBuffers = MustGetProcAddress(libgdi32, "SwapBuffers")
|
||||
textOut = MustGetProcAddress(libgdi32, "TextOutW")
|
||||
abortDoc = libgdi32.NewProc("AbortDoc")
|
||||
addFontResourceEx = libgdi32.NewProc("AddFontResourceExW")
|
||||
bitBlt = libgdi32.NewProc("BitBlt")
|
||||
choosePixelFormat = libgdi32.NewProc("ChoosePixelFormat")
|
||||
closeEnhMetaFile = libgdi32.NewProc("CloseEnhMetaFile")
|
||||
combineRgn = libgdi32.NewProc("CombineRgn")
|
||||
copyEnhMetaFile = libgdi32.NewProc("CopyEnhMetaFileW")
|
||||
createBitmap = libgdi32.NewProc("CreateBitmap")
|
||||
createCompatibleBitmap = libgdi32.NewProc("CreateCompatibleBitmap")
|
||||
createBrushIndirect = libgdi32.NewProc("CreateBrushIndirect")
|
||||
createCompatibleDC = libgdi32.NewProc("CreateCompatibleDC")
|
||||
createDC = libgdi32.NewProc("CreateDCW")
|
||||
createDIBSection = libgdi32.NewProc("CreateDIBSection")
|
||||
createEnhMetaFile = libgdi32.NewProc("CreateEnhMetaFileW")
|
||||
createFontIndirect = libgdi32.NewProc("CreateFontIndirectW")
|
||||
createIC = libgdi32.NewProc("CreateICW")
|
||||
createPatternBrush = libgdi32.NewProc("CreatePatternBrush")
|
||||
createRectRgn = libgdi32.NewProc("CreateRectRgn")
|
||||
deleteDC = libgdi32.NewProc("DeleteDC")
|
||||
deleteEnhMetaFile = libgdi32.NewProc("DeleteEnhMetaFile")
|
||||
deleteObject = libgdi32.NewProc("DeleteObject")
|
||||
ellipse = libgdi32.NewProc("Ellipse")
|
||||
endDoc = libgdi32.NewProc("EndDoc")
|
||||
endPage = libgdi32.NewProc("EndPage")
|
||||
excludeClipRect = libgdi32.NewProc("ExcludeClipRect")
|
||||
extCreatePen = libgdi32.NewProc("ExtCreatePen")
|
||||
fillRgn = libgdi32.NewProc("FillRgn")
|
||||
gdiFlush = libgdi32.NewProc("GdiFlush")
|
||||
getBkColor = libgdi32.NewProc("GetBkColor")
|
||||
getDeviceCaps = libgdi32.NewProc("GetDeviceCaps")
|
||||
getDIBits = libgdi32.NewProc("GetDIBits")
|
||||
getEnhMetaFile = libgdi32.NewProc("GetEnhMetaFileW")
|
||||
getEnhMetaFileHeader = libgdi32.NewProc("GetEnhMetaFileHeader")
|
||||
getObject = libgdi32.NewProc("GetObjectW")
|
||||
getPixel = libgdi32.NewProc("GetPixel")
|
||||
getRgnBox = libgdi32.NewProc("GetRgnBox")
|
||||
getStockObject = libgdi32.NewProc("GetStockObject")
|
||||
getTextColor = libgdi32.NewProc("GetTextColor")
|
||||
getTextExtentExPoint = libgdi32.NewProc("GetTextExtentExPointW")
|
||||
getTextExtentPoint32 = libgdi32.NewProc("GetTextExtentPoint32W")
|
||||
getTextMetrics = libgdi32.NewProc("GetTextMetricsW")
|
||||
getViewportOrgEx = libgdi32.NewProc("GetViewportOrgEx")
|
||||
intersectClipRect = libgdi32.NewProc("IntersectClipRect")
|
||||
lineTo = libgdi32.NewProc("LineTo")
|
||||
moveToEx = libgdi32.NewProc("MoveToEx")
|
||||
playEnhMetaFile = libgdi32.NewProc("PlayEnhMetaFile")
|
||||
polyline = libgdi32.NewProc("Polyline")
|
||||
rectangle = libgdi32.NewProc("Rectangle")
|
||||
removeFontResourceEx = libgdi32.NewProc("RemoveFontResourceExW")
|
||||
resetDC = libgdi32.NewProc("ResetDCW")
|
||||
restoreDC = libgdi32.NewProc("RestoreDC")
|
||||
roundRect = libgdi32.NewProc("RoundRect")
|
||||
saveDC = libgdi32.NewProc("SaveDC")
|
||||
selectObject = libgdi32.NewProc("SelectObject")
|
||||
setBkColor = libgdi32.NewProc("SetBkColor")
|
||||
setBkMode = libgdi32.NewProc("SetBkMode")
|
||||
setBrushOrgEx = libgdi32.NewProc("SetBrushOrgEx")
|
||||
setDIBits = libgdi32.NewProc("SetDIBits")
|
||||
setPixel = libgdi32.NewProc("SetPixel")
|
||||
setPixelFormat = libgdi32.NewProc("SetPixelFormat")
|
||||
setStretchBltMode = libgdi32.NewProc("SetStretchBltMode")
|
||||
setTextColor = libgdi32.NewProc("SetTextColor")
|
||||
setViewportOrgEx = libgdi32.NewProc("SetViewportOrgEx")
|
||||
startDoc = libgdi32.NewProc("StartDocW")
|
||||
startPage = libgdi32.NewProc("StartPage")
|
||||
stretchBlt = libgdi32.NewProc("StretchBlt")
|
||||
swapBuffers = libgdi32.NewProc("SwapBuffers")
|
||||
textOut = libgdi32.NewProc("TextOutW")
|
||||
|
||||
alphaBlend = MustGetProcAddress(libmsimg32, "AlphaBlend")
|
||||
gradientFill = MustGetProcAddress(libmsimg32, "GradientFill")
|
||||
transparentBlt = MustGetProcAddress(libmsimg32, "TransparentBlt")
|
||||
alphaBlend = libmsimg32.NewProc("AlphaBlend")
|
||||
gradientFill = libmsimg32.NewProc("GradientFill")
|
||||
transparentBlt = libmsimg32.NewProc("TransparentBlt")
|
||||
}
|
||||
|
||||
func AbortDoc(hdc HDC) int32 {
|
||||
ret, _, _ := syscall.Syscall(abortDoc, 1,
|
||||
ret, _, _ := syscall.Syscall(abortDoc.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1195,7 +1196,7 @@ func AbortDoc(hdc HDC) int32 {
|
||||
}
|
||||
|
||||
func AddFontResourceEx(lpszFilename *uint16, fl uint32, pdv unsafe.Pointer) int32 {
|
||||
ret, _, _ := syscall.Syscall(addFontResourceEx, 3,
|
||||
ret, _, _ := syscall.Syscall(addFontResourceEx.Addr(), 3,
|
||||
uintptr(unsafe.Pointer(lpszFilename)),
|
||||
uintptr(fl),
|
||||
uintptr(pdv))
|
||||
@ -1204,7 +1205,7 @@ func AddFontResourceEx(lpszFilename *uint16, fl uint32, pdv unsafe.Pointer) int3
|
||||
}
|
||||
|
||||
func AlphaBlend(hdcDest HDC, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest int32, hdcSrc HDC, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc int32, ftn BLENDFUNCTION) bool {
|
||||
ret, _, _ := syscall.Syscall12(alphaBlend, 11,
|
||||
ret, _, _ := syscall.Syscall12(alphaBlend.Addr(), 11,
|
||||
uintptr(hdcDest),
|
||||
uintptr(nXOriginDest),
|
||||
uintptr(nYOriginDest),
|
||||
@ -1222,7 +1223,7 @@ func AlphaBlend(hdcDest HDC, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest
|
||||
}
|
||||
|
||||
func BitBlt(hdcDest HDC, nXDest, nYDest, nWidth, nHeight int32, hdcSrc HDC, nXSrc, nYSrc int32, dwRop uint32) bool {
|
||||
ret, _, _ := syscall.Syscall9(bitBlt, 9,
|
||||
ret, _, _ := syscall.Syscall9(bitBlt.Addr(), 9,
|
||||
uintptr(hdcDest),
|
||||
uintptr(nXDest),
|
||||
uintptr(nYDest),
|
||||
@ -1237,7 +1238,7 @@ func BitBlt(hdcDest HDC, nXDest, nYDest, nWidth, nHeight int32, hdcSrc HDC, nXSr
|
||||
}
|
||||
|
||||
func ChoosePixelFormat(hdc HDC, ppfd *PIXELFORMATDESCRIPTOR) int32 {
|
||||
ret, _, _ := syscall.Syscall(choosePixelFormat, 2,
|
||||
ret, _, _ := syscall.Syscall(choosePixelFormat.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(ppfd)),
|
||||
0)
|
||||
@ -1246,7 +1247,7 @@ func ChoosePixelFormat(hdc HDC, ppfd *PIXELFORMATDESCRIPTOR) int32 {
|
||||
}
|
||||
|
||||
func CloseEnhMetaFile(hdc HDC) HENHMETAFILE {
|
||||
ret, _, _ := syscall.Syscall(closeEnhMetaFile, 1,
|
||||
ret, _, _ := syscall.Syscall(closeEnhMetaFile.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1255,7 +1256,7 @@ func CloseEnhMetaFile(hdc HDC) HENHMETAFILE {
|
||||
}
|
||||
|
||||
func CombineRgn(hrgnDest, hrgnSrc1, hrgnSrc2 HRGN, fnCombineMode int32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(combineRgn, 4,
|
||||
ret, _, _ := syscall.Syscall6(combineRgn.Addr(), 4,
|
||||
uintptr(hrgnDest),
|
||||
uintptr(hrgnSrc1),
|
||||
uintptr(hrgnSrc2),
|
||||
@ -1267,7 +1268,7 @@ func CombineRgn(hrgnDest, hrgnSrc1, hrgnSrc2 HRGN, fnCombineMode int32) int32 {
|
||||
}
|
||||
|
||||
func CopyEnhMetaFile(hemfSrc HENHMETAFILE, lpszFile *uint16) HENHMETAFILE {
|
||||
ret, _, _ := syscall.Syscall(copyEnhMetaFile, 2,
|
||||
ret, _, _ := syscall.Syscall(copyEnhMetaFile.Addr(), 2,
|
||||
uintptr(hemfSrc),
|
||||
uintptr(unsafe.Pointer(lpszFile)),
|
||||
0)
|
||||
@ -1276,7 +1277,7 @@ func CopyEnhMetaFile(hemfSrc HENHMETAFILE, lpszFile *uint16) HENHMETAFILE {
|
||||
}
|
||||
|
||||
func CreateBitmap(nWidth, nHeight int32, cPlanes, cBitsPerPel uint32, lpvBits unsafe.Pointer) HBITMAP {
|
||||
ret, _, _ := syscall.Syscall6(createBitmap, 5,
|
||||
ret, _, _ := syscall.Syscall6(createBitmap.Addr(), 5,
|
||||
uintptr(nWidth),
|
||||
uintptr(nHeight),
|
||||
uintptr(cPlanes),
|
||||
@ -1288,7 +1289,7 @@ func CreateBitmap(nWidth, nHeight int32, cPlanes, cBitsPerPel uint32, lpvBits un
|
||||
}
|
||||
|
||||
func CreateCompatibleBitmap(hdc HDC, nWidth, nHeight int32) HBITMAP {
|
||||
ret, _, _ := syscall.Syscall(createCompatibleBitmap, 3,
|
||||
ret, _, _ := syscall.Syscall(createCompatibleBitmap.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(nWidth),
|
||||
uintptr(nHeight))
|
||||
@ -1297,7 +1298,7 @@ func CreateCompatibleBitmap(hdc HDC, nWidth, nHeight int32) HBITMAP {
|
||||
}
|
||||
|
||||
func CreateBrushIndirect(lplb *LOGBRUSH) HBRUSH {
|
||||
ret, _, _ := syscall.Syscall(createBrushIndirect, 1,
|
||||
ret, _, _ := syscall.Syscall(createBrushIndirect.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lplb)),
|
||||
0,
|
||||
0)
|
||||
@ -1306,7 +1307,7 @@ func CreateBrushIndirect(lplb *LOGBRUSH) HBRUSH {
|
||||
}
|
||||
|
||||
func CreateCompatibleDC(hdc HDC) HDC {
|
||||
ret, _, _ := syscall.Syscall(createCompatibleDC, 1,
|
||||
ret, _, _ := syscall.Syscall(createCompatibleDC.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1315,7 +1316,7 @@ func CreateCompatibleDC(hdc HDC) HDC {
|
||||
}
|
||||
|
||||
func CreateDC(lpszDriver, lpszDevice, lpszOutput *uint16, lpInitData *DEVMODE) HDC {
|
||||
ret, _, _ := syscall.Syscall6(createDC, 4,
|
||||
ret, _, _ := syscall.Syscall6(createDC.Addr(), 4,
|
||||
uintptr(unsafe.Pointer(lpszDriver)),
|
||||
uintptr(unsafe.Pointer(lpszDevice)),
|
||||
uintptr(unsafe.Pointer(lpszOutput)),
|
||||
@ -1327,7 +1328,7 @@ func CreateDC(lpszDriver, lpszDevice, lpszOutput *uint16, lpInitData *DEVMODE) H
|
||||
}
|
||||
|
||||
func CreateDIBSection(hdc HDC, pbmih *BITMAPINFOHEADER, iUsage uint32, ppvBits *unsafe.Pointer, hSection HANDLE, dwOffset uint32) HBITMAP {
|
||||
ret, _, _ := syscall.Syscall6(createDIBSection, 6,
|
||||
ret, _, _ := syscall.Syscall6(createDIBSection.Addr(), 6,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(pbmih)),
|
||||
uintptr(iUsage),
|
||||
@ -1339,7 +1340,7 @@ func CreateDIBSection(hdc HDC, pbmih *BITMAPINFOHEADER, iUsage uint32, ppvBits *
|
||||
}
|
||||
|
||||
func CreateEnhMetaFile(hdcRef HDC, lpFilename *uint16, lpRect *RECT, lpDescription *uint16) HDC {
|
||||
ret, _, _ := syscall.Syscall6(createEnhMetaFile, 4,
|
||||
ret, _, _ := syscall.Syscall6(createEnhMetaFile.Addr(), 4,
|
||||
uintptr(hdcRef),
|
||||
uintptr(unsafe.Pointer(lpFilename)),
|
||||
uintptr(unsafe.Pointer(lpRect)),
|
||||
@ -1351,7 +1352,7 @@ func CreateEnhMetaFile(hdcRef HDC, lpFilename *uint16, lpRect *RECT, lpDescripti
|
||||
}
|
||||
|
||||
func CreateFontIndirect(lplf *LOGFONT) HFONT {
|
||||
ret, _, _ := syscall.Syscall(createFontIndirect, 1,
|
||||
ret, _, _ := syscall.Syscall(createFontIndirect.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lplf)),
|
||||
0,
|
||||
0)
|
||||
@ -1360,7 +1361,7 @@ func CreateFontIndirect(lplf *LOGFONT) HFONT {
|
||||
}
|
||||
|
||||
func CreateIC(lpszDriver, lpszDevice, lpszOutput *uint16, lpdvmInit *DEVMODE) HDC {
|
||||
ret, _, _ := syscall.Syscall6(createIC, 4,
|
||||
ret, _, _ := syscall.Syscall6(createIC.Addr(), 4,
|
||||
uintptr(unsafe.Pointer(lpszDriver)),
|
||||
uintptr(unsafe.Pointer(lpszDevice)),
|
||||
uintptr(unsafe.Pointer(lpszOutput)),
|
||||
@ -1372,7 +1373,7 @@ func CreateIC(lpszDriver, lpszDevice, lpszOutput *uint16, lpdvmInit *DEVMODE) HD
|
||||
}
|
||||
|
||||
func CreatePatternBrush(hbmp HBITMAP) HBRUSH {
|
||||
ret, _, _ := syscall.Syscall(createPatternBrush, 1,
|
||||
ret, _, _ := syscall.Syscall(createPatternBrush.Addr(), 1,
|
||||
uintptr(hbmp),
|
||||
0,
|
||||
0)
|
||||
@ -1381,7 +1382,7 @@ func CreatePatternBrush(hbmp HBITMAP) HBRUSH {
|
||||
}
|
||||
|
||||
func CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect int32) HRGN {
|
||||
ret, _, _ := syscall.Syscall6(createRectRgn, 4,
|
||||
ret, _, _ := syscall.Syscall6(createRectRgn.Addr(), 4,
|
||||
uintptr(nLeftRect),
|
||||
uintptr(nTopRect),
|
||||
uintptr(nRightRect),
|
||||
@ -1393,7 +1394,7 @@ func CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect int32) HRGN {
|
||||
}
|
||||
|
||||
func DeleteDC(hdc HDC) bool {
|
||||
ret, _, _ := syscall.Syscall(deleteDC, 1,
|
||||
ret, _, _ := syscall.Syscall(deleteDC.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1402,7 +1403,7 @@ func DeleteDC(hdc HDC) bool {
|
||||
}
|
||||
|
||||
func DeleteEnhMetaFile(hemf HENHMETAFILE) bool {
|
||||
ret, _, _ := syscall.Syscall(deleteEnhMetaFile, 1,
|
||||
ret, _, _ := syscall.Syscall(deleteEnhMetaFile.Addr(), 1,
|
||||
uintptr(hemf),
|
||||
0,
|
||||
0)
|
||||
@ -1411,7 +1412,7 @@ func DeleteEnhMetaFile(hemf HENHMETAFILE) bool {
|
||||
}
|
||||
|
||||
func DeleteObject(hObject HGDIOBJ) bool {
|
||||
ret, _, _ := syscall.Syscall(deleteObject, 1,
|
||||
ret, _, _ := syscall.Syscall(deleteObject.Addr(), 1,
|
||||
uintptr(hObject),
|
||||
0,
|
||||
0)
|
||||
@ -1420,7 +1421,7 @@ func DeleteObject(hObject HGDIOBJ) bool {
|
||||
}
|
||||
|
||||
func Ellipse(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32) bool {
|
||||
ret, _, _ := syscall.Syscall6(ellipse, 5,
|
||||
ret, _, _ := syscall.Syscall6(ellipse.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(nLeftRect),
|
||||
uintptr(nTopRect),
|
||||
@ -1432,7 +1433,7 @@ func Ellipse(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32) bool {
|
||||
}
|
||||
|
||||
func EndDoc(hdc HDC) int32 {
|
||||
ret, _, _ := syscall.Syscall(endDoc, 1,
|
||||
ret, _, _ := syscall.Syscall(endDoc.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1441,7 +1442,7 @@ func EndDoc(hdc HDC) int32 {
|
||||
}
|
||||
|
||||
func EndPage(hdc HDC) int32 {
|
||||
ret, _, _ := syscall.Syscall(endPage, 1,
|
||||
ret, _, _ := syscall.Syscall(endPage.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1450,7 +1451,7 @@ func EndPage(hdc HDC) int32 {
|
||||
}
|
||||
|
||||
func ExcludeClipRect(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(excludeClipRect, 5,
|
||||
ret, _, _ := syscall.Syscall6(excludeClipRect.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(nLeftRect),
|
||||
uintptr(nTopRect),
|
||||
@ -1462,7 +1463,7 @@ func ExcludeClipRect(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32
|
||||
}
|
||||
|
||||
func ExtCreatePen(dwPenStyle, dwWidth uint32, lplb *LOGBRUSH, dwStyleCount uint32, lpStyle *uint32) HPEN {
|
||||
ret, _, _ := syscall.Syscall6(extCreatePen, 5,
|
||||
ret, _, _ := syscall.Syscall6(extCreatePen.Addr(), 5,
|
||||
uintptr(dwPenStyle),
|
||||
uintptr(dwWidth),
|
||||
uintptr(unsafe.Pointer(lplb)),
|
||||
@ -1474,7 +1475,7 @@ func ExtCreatePen(dwPenStyle, dwWidth uint32, lplb *LOGBRUSH, dwStyleCount uint3
|
||||
}
|
||||
|
||||
func FillRgn(hdc HDC, hrgn HRGN, hbr HBRUSH) bool {
|
||||
ret, _, _ := syscall.Syscall(fillRgn, 3,
|
||||
ret, _, _ := syscall.Syscall(fillRgn.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(hrgn),
|
||||
uintptr(hbr))
|
||||
@ -1483,7 +1484,7 @@ func FillRgn(hdc HDC, hrgn HRGN, hbr HBRUSH) bool {
|
||||
}
|
||||
|
||||
func GdiFlush() bool {
|
||||
ret, _, _ := syscall.Syscall(gdiFlush, 0,
|
||||
ret, _, _ := syscall.Syscall(gdiFlush.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -1492,7 +1493,7 @@ func GdiFlush() bool {
|
||||
}
|
||||
|
||||
func GetBkColor(hdc HDC) COLORREF {
|
||||
ret, _, _ := syscall.Syscall(getBkColor, 1,
|
||||
ret, _, _ := syscall.Syscall(getBkColor.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1501,7 +1502,7 @@ func GetBkColor(hdc HDC) COLORREF {
|
||||
}
|
||||
|
||||
func GetDeviceCaps(hdc HDC, nIndex int32) int32 {
|
||||
ret, _, _ := syscall.Syscall(getDeviceCaps, 2,
|
||||
ret, _, _ := syscall.Syscall(getDeviceCaps.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(nIndex),
|
||||
0)
|
||||
@ -1510,7 +1511,7 @@ func GetDeviceCaps(hdc HDC, nIndex int32) int32 {
|
||||
}
|
||||
|
||||
func GetDIBits(hdc HDC, hbmp HBITMAP, uStartScan uint32, cScanLines uint32, lpvBits *byte, lpbi *BITMAPINFO, uUsage uint32) int32 {
|
||||
ret, _, _ := syscall.Syscall9(getDIBits, 7,
|
||||
ret, _, _ := syscall.Syscall9(getDIBits.Addr(), 7,
|
||||
uintptr(hdc),
|
||||
uintptr(hbmp),
|
||||
uintptr(uStartScan),
|
||||
@ -1524,7 +1525,7 @@ func GetDIBits(hdc HDC, hbmp HBITMAP, uStartScan uint32, cScanLines uint32, lpvB
|
||||
}
|
||||
|
||||
func GetEnhMetaFile(lpszMetaFile *uint16) HENHMETAFILE {
|
||||
ret, _, _ := syscall.Syscall(getEnhMetaFile, 1,
|
||||
ret, _, _ := syscall.Syscall(getEnhMetaFile.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpszMetaFile)),
|
||||
0,
|
||||
0)
|
||||
@ -1533,7 +1534,7 @@ func GetEnhMetaFile(lpszMetaFile *uint16) HENHMETAFILE {
|
||||
}
|
||||
|
||||
func GetEnhMetaFileHeader(hemf HENHMETAFILE, cbBuffer uint32, lpemh *ENHMETAHEADER) uint32 {
|
||||
ret, _, _ := syscall.Syscall(getEnhMetaFileHeader, 3,
|
||||
ret, _, _ := syscall.Syscall(getEnhMetaFileHeader.Addr(), 3,
|
||||
uintptr(hemf),
|
||||
uintptr(cbBuffer),
|
||||
uintptr(unsafe.Pointer(lpemh)))
|
||||
@ -1542,7 +1543,7 @@ func GetEnhMetaFileHeader(hemf HENHMETAFILE, cbBuffer uint32, lpemh *ENHMETAHEAD
|
||||
}
|
||||
|
||||
func GetObject(hgdiobj HGDIOBJ, cbBuffer uintptr, lpvObject unsafe.Pointer) int32 {
|
||||
ret, _, _ := syscall.Syscall(getObject, 3,
|
||||
ret, _, _ := syscall.Syscall(getObject.Addr(), 3,
|
||||
uintptr(hgdiobj),
|
||||
uintptr(cbBuffer),
|
||||
uintptr(lpvObject))
|
||||
@ -1551,7 +1552,7 @@ func GetObject(hgdiobj HGDIOBJ, cbBuffer uintptr, lpvObject unsafe.Pointer) int3
|
||||
}
|
||||
|
||||
func GetPixel(hdc HDC, nXPos, nYPos int32) COLORREF {
|
||||
ret, _, _ := syscall.Syscall(getPixel, 3,
|
||||
ret, _, _ := syscall.Syscall(getPixel.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(nXPos),
|
||||
uintptr(nYPos))
|
||||
@ -1560,7 +1561,7 @@ func GetPixel(hdc HDC, nXPos, nYPos int32) COLORREF {
|
||||
}
|
||||
|
||||
func GetRgnBox(hrgn HRGN, lprc *RECT) int32 {
|
||||
ret, _, _ := syscall.Syscall(getRgnBox, 2,
|
||||
ret, _, _ := syscall.Syscall(getRgnBox.Addr(), 2,
|
||||
uintptr(hrgn),
|
||||
uintptr(unsafe.Pointer(lprc)),
|
||||
0)
|
||||
@ -1569,7 +1570,7 @@ func GetRgnBox(hrgn HRGN, lprc *RECT) int32 {
|
||||
}
|
||||
|
||||
func GetStockObject(fnObject int32) HGDIOBJ {
|
||||
ret, _, _ := syscall.Syscall(getStockObject, 1,
|
||||
ret, _, _ := syscall.Syscall(getStockObject.Addr(), 1,
|
||||
uintptr(fnObject),
|
||||
0,
|
||||
0)
|
||||
@ -1578,7 +1579,7 @@ func GetStockObject(fnObject int32) HGDIOBJ {
|
||||
}
|
||||
|
||||
func GetTextColor(hdc HDC) COLORREF {
|
||||
ret, _, _ := syscall.Syscall(getTextColor, 1,
|
||||
ret, _, _ := syscall.Syscall(getTextColor.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1587,7 +1588,7 @@ func GetTextColor(hdc HDC) COLORREF {
|
||||
}
|
||||
|
||||
func GetTextExtentExPoint(hdc HDC, lpszStr *uint16, cchString, nMaxExtent int32, lpnFit, alpDx *int32, lpSize *SIZE) bool {
|
||||
ret, _, _ := syscall.Syscall9(getTextExtentExPoint, 7,
|
||||
ret, _, _ := syscall.Syscall9(getTextExtentExPoint.Addr(), 7,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(lpszStr)),
|
||||
uintptr(cchString),
|
||||
@ -1602,7 +1603,7 @@ func GetTextExtentExPoint(hdc HDC, lpszStr *uint16, cchString, nMaxExtent int32,
|
||||
}
|
||||
|
||||
func GetTextExtentPoint32(hdc HDC, lpString *uint16, c int32, lpSize *SIZE) bool {
|
||||
ret, _, _ := syscall.Syscall6(getTextExtentPoint32, 4,
|
||||
ret, _, _ := syscall.Syscall6(getTextExtentPoint32.Addr(), 4,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(lpString)),
|
||||
uintptr(c),
|
||||
@ -1614,7 +1615,7 @@ func GetTextExtentPoint32(hdc HDC, lpString *uint16, c int32, lpSize *SIZE) bool
|
||||
}
|
||||
|
||||
func GetTextMetrics(hdc HDC, lptm *TEXTMETRIC) bool {
|
||||
ret, _, _ := syscall.Syscall(getTextMetrics, 2,
|
||||
ret, _, _ := syscall.Syscall(getTextMetrics.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(lptm)),
|
||||
0)
|
||||
@ -1623,7 +1624,7 @@ func GetTextMetrics(hdc HDC, lptm *TEXTMETRIC) bool {
|
||||
}
|
||||
|
||||
func GetViewportOrgEx(hdc HDC, lpPoint *POINT) bool {
|
||||
ret, _, _ := syscall.Syscall(getViewportOrgEx, 2,
|
||||
ret, _, _ := syscall.Syscall(getViewportOrgEx.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(lpPoint)),
|
||||
0)
|
||||
@ -1632,7 +1633,7 @@ func GetViewportOrgEx(hdc HDC, lpPoint *POINT) bool {
|
||||
}
|
||||
|
||||
func GradientFill(hdc HDC, pVertex *TRIVERTEX, nVertex uint32, pMesh unsafe.Pointer, nMesh, ulMode uint32) bool {
|
||||
ret, _, _ := syscall.Syscall6(gradientFill, 6,
|
||||
ret, _, _ := syscall.Syscall6(gradientFill.Addr(), 6,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(pVertex)),
|
||||
uintptr(nVertex),
|
||||
@ -1644,7 +1645,7 @@ func GradientFill(hdc HDC, pVertex *TRIVERTEX, nVertex uint32, pMesh unsafe.Poin
|
||||
}
|
||||
|
||||
func IntersectClipRect(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(intersectClipRect, 5,
|
||||
ret, _, _ := syscall.Syscall6(intersectClipRect.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(nLeftRect),
|
||||
uintptr(nTopRect),
|
||||
@ -1656,7 +1657,7 @@ func IntersectClipRect(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int
|
||||
}
|
||||
|
||||
func LineTo(hdc HDC, nXEnd, nYEnd int32) bool {
|
||||
ret, _, _ := syscall.Syscall(lineTo, 3,
|
||||
ret, _, _ := syscall.Syscall(lineTo.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(nXEnd),
|
||||
uintptr(nYEnd))
|
||||
@ -1665,7 +1666,7 @@ func LineTo(hdc HDC, nXEnd, nYEnd int32) bool {
|
||||
}
|
||||
|
||||
func MoveToEx(hdc HDC, x, y int, lpPoint *POINT) bool {
|
||||
ret, _, _ := syscall.Syscall6(moveToEx, 4,
|
||||
ret, _, _ := syscall.Syscall6(moveToEx.Addr(), 4,
|
||||
uintptr(hdc),
|
||||
uintptr(x),
|
||||
uintptr(y),
|
||||
@ -1677,7 +1678,7 @@ func MoveToEx(hdc HDC, x, y int, lpPoint *POINT) bool {
|
||||
}
|
||||
|
||||
func PlayEnhMetaFile(hdc HDC, hemf HENHMETAFILE, lpRect *RECT) bool {
|
||||
ret, _, _ := syscall.Syscall(playEnhMetaFile, 3,
|
||||
ret, _, _ := syscall.Syscall(playEnhMetaFile.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(hemf),
|
||||
uintptr(unsafe.Pointer(lpRect)))
|
||||
@ -1686,7 +1687,7 @@ func PlayEnhMetaFile(hdc HDC, hemf HENHMETAFILE, lpRect *RECT) bool {
|
||||
}
|
||||
|
||||
func Polyline(hdc HDC, lppt unsafe.Pointer, cPoints int32) bool {
|
||||
ret, _, _ := syscall.Syscall(polyline, 3,
|
||||
ret, _, _ := syscall.Syscall(polyline.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(lppt),
|
||||
uintptr(cPoints))
|
||||
@ -1695,7 +1696,7 @@ func Polyline(hdc HDC, lppt unsafe.Pointer, cPoints int32) bool {
|
||||
}
|
||||
|
||||
func Rectangle_(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32) bool {
|
||||
ret, _, _ := syscall.Syscall6(rectangle, 5,
|
||||
ret, _, _ := syscall.Syscall6(rectangle.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(nLeftRect),
|
||||
uintptr(nTopRect),
|
||||
@ -1707,7 +1708,7 @@ func Rectangle_(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int32) boo
|
||||
}
|
||||
|
||||
func RemoveFontResourceEx(lpszFilename *uint16, fl uint32, pdv unsafe.Pointer) bool {
|
||||
ret, _, _ := syscall.Syscall(removeFontResourceEx, 3,
|
||||
ret, _, _ := syscall.Syscall(removeFontResourceEx.Addr(), 3,
|
||||
uintptr(unsafe.Pointer(lpszFilename)),
|
||||
uintptr(fl),
|
||||
uintptr(pdv))
|
||||
@ -1716,7 +1717,7 @@ func RemoveFontResourceEx(lpszFilename *uint16, fl uint32, pdv unsafe.Pointer) b
|
||||
}
|
||||
|
||||
func ResetDC(hdc HDC, lpInitData *DEVMODE) HDC {
|
||||
ret, _, _ := syscall.Syscall(resetDC, 2,
|
||||
ret, _, _ := syscall.Syscall(resetDC.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(lpInitData)),
|
||||
0)
|
||||
@ -1725,7 +1726,7 @@ func ResetDC(hdc HDC, lpInitData *DEVMODE) HDC {
|
||||
}
|
||||
|
||||
func RestoreDC(hdc HDC, nSaveDC int32) bool {
|
||||
ret, _, _ := syscall.Syscall(restoreDC, 2,
|
||||
ret, _, _ := syscall.Syscall(restoreDC.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(nSaveDC),
|
||||
0)
|
||||
@ -1733,7 +1734,7 @@ func RestoreDC(hdc HDC, nSaveDC int32) bool {
|
||||
}
|
||||
|
||||
func RoundRect(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect, nWidth, nHeight int32) bool {
|
||||
ret, _, _ := syscall.Syscall9(roundRect, 7,
|
||||
ret, _, _ := syscall.Syscall9(roundRect.Addr(), 7,
|
||||
uintptr(hdc),
|
||||
uintptr(nLeftRect),
|
||||
uintptr(nTopRect),
|
||||
@ -1748,7 +1749,7 @@ func RoundRect(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect, nWidth, nH
|
||||
}
|
||||
|
||||
func SaveDC(hdc HDC) int32 {
|
||||
ret, _, _ := syscall.Syscall(saveDC, 1,
|
||||
ret, _, _ := syscall.Syscall(saveDC.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1756,7 +1757,7 @@ func SaveDC(hdc HDC) int32 {
|
||||
}
|
||||
|
||||
func SelectObject(hdc HDC, hgdiobj HGDIOBJ) HGDIOBJ {
|
||||
ret, _, _ := syscall.Syscall(selectObject, 2,
|
||||
ret, _, _ := syscall.Syscall(selectObject.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(hgdiobj),
|
||||
0)
|
||||
@ -1765,7 +1766,7 @@ func SelectObject(hdc HDC, hgdiobj HGDIOBJ) HGDIOBJ {
|
||||
}
|
||||
|
||||
func SetBkColor(hdc HDC, crColor COLORREF) COLORREF {
|
||||
ret, _, _ := syscall.Syscall(setBkColor, 2,
|
||||
ret, _, _ := syscall.Syscall(setBkColor.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(crColor),
|
||||
0)
|
||||
@ -1774,7 +1775,7 @@ func SetBkColor(hdc HDC, crColor COLORREF) COLORREF {
|
||||
}
|
||||
|
||||
func SetBkMode(hdc HDC, iBkMode int32) int32 {
|
||||
ret, _, _ := syscall.Syscall(setBkMode, 2,
|
||||
ret, _, _ := syscall.Syscall(setBkMode.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(iBkMode),
|
||||
0)
|
||||
@ -1783,7 +1784,7 @@ func SetBkMode(hdc HDC, iBkMode int32) int32 {
|
||||
}
|
||||
|
||||
func SetBrushOrgEx(hdc HDC, nXOrg, nYOrg int32, lppt *POINT) bool {
|
||||
ret, _, _ := syscall.Syscall6(setBrushOrgEx, 4,
|
||||
ret, _, _ := syscall.Syscall6(setBrushOrgEx.Addr(), 4,
|
||||
uintptr(hdc),
|
||||
uintptr(nXOrg),
|
||||
uintptr(nYOrg),
|
||||
@ -1795,7 +1796,7 @@ func SetBrushOrgEx(hdc HDC, nXOrg, nYOrg int32, lppt *POINT) bool {
|
||||
}
|
||||
|
||||
func SetDIBits(hdc HDC, hbmp HBITMAP, uStartScan, cScanLines uint32, lpvBits *byte, lpbmi *BITMAPINFO, fuColorUse uint32) int32 {
|
||||
ret, _, _ := syscall.Syscall9(setDIBits, 7,
|
||||
ret, _, _ := syscall.Syscall9(setDIBits.Addr(), 7,
|
||||
uintptr(hdc),
|
||||
uintptr(hbmp),
|
||||
uintptr(uStartScan),
|
||||
@ -1810,7 +1811,7 @@ func SetDIBits(hdc HDC, hbmp HBITMAP, uStartScan, cScanLines uint32, lpvBits *by
|
||||
}
|
||||
|
||||
func SetPixel(hdc HDC, X, Y int32, crColor COLORREF) COLORREF {
|
||||
ret, _, _ := syscall.Syscall6(setPixel, 4,
|
||||
ret, _, _ := syscall.Syscall6(setPixel.Addr(), 4,
|
||||
uintptr(hdc),
|
||||
uintptr(X),
|
||||
uintptr(Y),
|
||||
@ -1822,7 +1823,7 @@ func SetPixel(hdc HDC, X, Y int32, crColor COLORREF) COLORREF {
|
||||
}
|
||||
|
||||
func SetPixelFormat(hdc HDC, iPixelFormat int32, ppfd *PIXELFORMATDESCRIPTOR) bool {
|
||||
ret, _, _ := syscall.Syscall(setPixelFormat, 3,
|
||||
ret, _, _ := syscall.Syscall(setPixelFormat.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(iPixelFormat),
|
||||
uintptr(unsafe.Pointer(ppfd)))
|
||||
@ -1831,7 +1832,7 @@ func SetPixelFormat(hdc HDC, iPixelFormat int32, ppfd *PIXELFORMATDESCRIPTOR) bo
|
||||
}
|
||||
|
||||
func SetStretchBltMode(hdc HDC, iStretchMode int32) int32 {
|
||||
ret, _, _ := syscall.Syscall(setStretchBltMode, 2,
|
||||
ret, _, _ := syscall.Syscall(setStretchBltMode.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(iStretchMode),
|
||||
0)
|
||||
@ -1840,7 +1841,7 @@ func SetStretchBltMode(hdc HDC, iStretchMode int32) int32 {
|
||||
}
|
||||
|
||||
func SetTextColor(hdc HDC, crColor COLORREF) COLORREF {
|
||||
ret, _, _ := syscall.Syscall(setTextColor, 2,
|
||||
ret, _, _ := syscall.Syscall(setTextColor.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(crColor),
|
||||
0)
|
||||
@ -1849,7 +1850,7 @@ func SetTextColor(hdc HDC, crColor COLORREF) COLORREF {
|
||||
}
|
||||
|
||||
func SetViewportOrgEx(hdc HDC, x, y int32, lpPoint *POINT) COLORREF {
|
||||
ret, _, _ := syscall.Syscall6(setViewportOrgEx, 4,
|
||||
ret, _, _ := syscall.Syscall6(setViewportOrgEx.Addr(), 4,
|
||||
uintptr(hdc),
|
||||
uintptr(x),
|
||||
uintptr(y),
|
||||
@ -1861,7 +1862,7 @@ func SetViewportOrgEx(hdc HDC, x, y int32, lpPoint *POINT) COLORREF {
|
||||
}
|
||||
|
||||
func StartDoc(hdc HDC, lpdi *DOCINFO) int32 {
|
||||
ret, _, _ := syscall.Syscall(startDoc, 2,
|
||||
ret, _, _ := syscall.Syscall(startDoc.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(lpdi)),
|
||||
0)
|
||||
@ -1870,7 +1871,7 @@ func StartDoc(hdc HDC, lpdi *DOCINFO) int32 {
|
||||
}
|
||||
|
||||
func StartPage(hdc HDC) int32 {
|
||||
ret, _, _ := syscall.Syscall(startPage, 1,
|
||||
ret, _, _ := syscall.Syscall(startPage.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1879,7 +1880,7 @@ func StartPage(hdc HDC) int32 {
|
||||
}
|
||||
|
||||
func StretchBlt(hdcDest HDC, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest int32, hdcSrc HDC, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc int32, dwRop uint32) bool {
|
||||
ret, _, _ := syscall.Syscall12(stretchBlt, 11,
|
||||
ret, _, _ := syscall.Syscall12(stretchBlt.Addr(), 11,
|
||||
uintptr(hdcDest),
|
||||
uintptr(nXOriginDest),
|
||||
uintptr(nYOriginDest),
|
||||
@ -1897,7 +1898,7 @@ func StretchBlt(hdcDest HDC, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest
|
||||
}
|
||||
|
||||
func SwapBuffers(hdc HDC) bool {
|
||||
ret, _, _ := syscall.Syscall(swapBuffers, 1,
|
||||
ret, _, _ := syscall.Syscall(swapBuffers.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -1906,7 +1907,7 @@ func SwapBuffers(hdc HDC) bool {
|
||||
}
|
||||
|
||||
func TextOut(hdc HDC, nXStart, nYStart int32, lpString *uint16, cchString int32) bool {
|
||||
ret, _, _ := syscall.Syscall6(textOut, 5,
|
||||
ret, _, _ := syscall.Syscall6(textOut.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(nXStart),
|
||||
uintptr(nYStart),
|
||||
@ -1917,7 +1918,7 @@ func TextOut(hdc HDC, nXStart, nYStart int32, lpString *uint16, cchString int32)
|
||||
}
|
||||
|
||||
func TransparentBlt(hdcDest HDC, xoriginDest, yoriginDest, wDest, hDest int32, hdcSrc HDC, xoriginSrc, yoriginSrc, wSrc, hSrc int32, crTransparent uint32) bool {
|
||||
ret, _, _ := syscall.Syscall12(transparentBlt, 11,
|
||||
ret, _, _ := syscall.Syscall12(transparentBlt.Addr(), 11,
|
||||
uintptr(hdcDest),
|
||||
uintptr(xoriginDest),
|
||||
uintptr(yoriginDest),
|
||||
|
43
vendor/github.com/lxn/win/gdiplus.go
generated
vendored
43
vendor/github.com/lxn/win/gdiplus.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -130,15 +131,15 @@ type ARGB uint32
|
||||
|
||||
var (
|
||||
// Library
|
||||
libgdiplus uintptr
|
||||
libgdiplus *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
gdipCreateBitmapFromFile uintptr
|
||||
gdipCreateBitmapFromHBITMAP uintptr
|
||||
gdipCreateHBITMAPFromBitmap uintptr
|
||||
gdipDisposeImage uintptr
|
||||
gdiplusShutdown uintptr
|
||||
gdiplusStartup uintptr
|
||||
gdipCreateBitmapFromFile *windows.LazyProc
|
||||
gdipCreateBitmapFromHBITMAP *windows.LazyProc
|
||||
gdipCreateHBITMAPFromBitmap *windows.LazyProc
|
||||
gdipDisposeImage *windows.LazyProc
|
||||
gdiplusShutdown *windows.LazyProc
|
||||
gdiplusStartup *windows.LazyProc
|
||||
)
|
||||
|
||||
var (
|
||||
@ -147,19 +148,19 @@ var (
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libgdiplus = MustLoadLibrary("gdiplus.dll")
|
||||
libgdiplus = windows.NewLazySystemDLL("gdiplus.dll")
|
||||
|
||||
// Functions
|
||||
gdipCreateBitmapFromFile = MustGetProcAddress(libgdiplus, "GdipCreateBitmapFromFile")
|
||||
gdipCreateBitmapFromHBITMAP = MustGetProcAddress(libgdiplus, "GdipCreateBitmapFromHBITMAP")
|
||||
gdipCreateHBITMAPFromBitmap = MustGetProcAddress(libgdiplus, "GdipCreateHBITMAPFromBitmap")
|
||||
gdipDisposeImage = MustGetProcAddress(libgdiplus, "GdipDisposeImage")
|
||||
gdiplusShutdown = MustGetProcAddress(libgdiplus, "GdiplusShutdown")
|
||||
gdiplusStartup = MustGetProcAddress(libgdiplus, "GdiplusStartup")
|
||||
gdipCreateBitmapFromFile = libgdiplus.NewProc("GdipCreateBitmapFromFile")
|
||||
gdipCreateBitmapFromHBITMAP = libgdiplus.NewProc("GdipCreateBitmapFromHBITMAP")
|
||||
gdipCreateHBITMAPFromBitmap = libgdiplus.NewProc("GdipCreateHBITMAPFromBitmap")
|
||||
gdipDisposeImage = libgdiplus.NewProc("GdipDisposeImage")
|
||||
gdiplusShutdown = libgdiplus.NewProc("GdiplusShutdown")
|
||||
gdiplusStartup = libgdiplus.NewProc("GdiplusStartup")
|
||||
}
|
||||
|
||||
func GdipCreateBitmapFromFile(filename *uint16, bitmap **GpBitmap) GpStatus {
|
||||
ret, _, _ := syscall.Syscall(gdipCreateBitmapFromFile, 2,
|
||||
ret, _, _ := syscall.Syscall(gdipCreateBitmapFromFile.Addr(), 2,
|
||||
uintptr(unsafe.Pointer(filename)),
|
||||
uintptr(unsafe.Pointer(bitmap)),
|
||||
0)
|
||||
@ -168,7 +169,7 @@ func GdipCreateBitmapFromFile(filename *uint16, bitmap **GpBitmap) GpStatus {
|
||||
}
|
||||
|
||||
func GdipCreateBitmapFromHBITMAP(hbm HBITMAP, hpal HPALETTE, bitmap **GpBitmap) GpStatus {
|
||||
ret, _, _ := syscall.Syscall(gdipCreateBitmapFromHBITMAP, 3,
|
||||
ret, _, _ := syscall.Syscall(gdipCreateBitmapFromHBITMAP.Addr(), 3,
|
||||
uintptr(hbm),
|
||||
uintptr(hpal),
|
||||
uintptr(unsafe.Pointer(bitmap)))
|
||||
@ -177,7 +178,7 @@ func GdipCreateBitmapFromHBITMAP(hbm HBITMAP, hpal HPALETTE, bitmap **GpBitmap)
|
||||
}
|
||||
|
||||
func GdipCreateHBITMAPFromBitmap(bitmap *GpBitmap, hbmReturn *HBITMAP, background ARGB) GpStatus {
|
||||
ret, _, _ := syscall.Syscall(gdipCreateHBITMAPFromBitmap, 3,
|
||||
ret, _, _ := syscall.Syscall(gdipCreateHBITMAPFromBitmap.Addr(), 3,
|
||||
uintptr(unsafe.Pointer(bitmap)),
|
||||
uintptr(unsafe.Pointer(hbmReturn)),
|
||||
uintptr(background))
|
||||
@ -186,7 +187,7 @@ func GdipCreateHBITMAPFromBitmap(bitmap *GpBitmap, hbmReturn *HBITMAP, backgroun
|
||||
}
|
||||
|
||||
func GdipDisposeImage(image *GpImage) GpStatus {
|
||||
ret, _, _ := syscall.Syscall(gdipDisposeImage, 1,
|
||||
ret, _, _ := syscall.Syscall(gdipDisposeImage.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(image)),
|
||||
0,
|
||||
0)
|
||||
@ -195,14 +196,14 @@ func GdipDisposeImage(image *GpImage) GpStatus {
|
||||
}
|
||||
|
||||
func GdiplusShutdown() {
|
||||
syscall.Syscall(gdiplusShutdown, 1,
|
||||
syscall.Syscall(gdiplusShutdown.Addr(), 1,
|
||||
token,
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func GdiplusStartup(input *GdiplusStartupInput, output *GdiplusStartupOutput) GpStatus {
|
||||
ret, _, _ := syscall.Syscall(gdiplusStartup, 3,
|
||||
ret, _, _ := syscall.Syscall(gdiplusStartup.Addr(), 3,
|
||||
uintptr(unsafe.Pointer(&token)),
|
||||
uintptr(unsafe.Pointer(input)),
|
||||
uintptr(unsafe.Pointer(output)))
|
||||
@ -211,7 +212,7 @@ func GdiplusStartup(input *GdiplusStartupInput, output *GdiplusStartupOutput) Gp
|
||||
}
|
||||
|
||||
/*GdipSaveImageToFile(image *GpImage, filename *uint16, clsidEncoder *CLSID, encoderParams *EncoderParameters) GpStatus {
|
||||
ret, _, _ := syscall.Syscall6(gdipSaveImageToFile, 4,
|
||||
ret, _, _ := syscall.Syscall6(gdipSaveImageToFile.Addr(), 4,
|
||||
uintptr(unsafe.Pointer(image)),
|
||||
uintptr(unsafe.Pointer(filename)),
|
||||
uintptr(unsafe.Pointer(clsidEncoder)),
|
||||
|
154
vendor/github.com/lxn/win/kernel32.go
generated
vendored
154
vendor/github.com/lxn/win/kernel32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -54,33 +55,33 @@ const (
|
||||
|
||||
var (
|
||||
// Library
|
||||
libkernel32 uintptr
|
||||
libkernel32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
activateActCtx uintptr
|
||||
closeHandle uintptr
|
||||
createActCtx uintptr
|
||||
fileTimeToSystemTime uintptr
|
||||
getConsoleTitle uintptr
|
||||
getConsoleWindow uintptr
|
||||
getLastError uintptr
|
||||
getLocaleInfo uintptr
|
||||
getLogicalDriveStrings uintptr
|
||||
getModuleHandle uintptr
|
||||
getNumberFormat uintptr
|
||||
getPhysicallyInstalledSystemMemory uintptr
|
||||
getProfileString uintptr
|
||||
getThreadLocale uintptr
|
||||
getThreadUILanguage uintptr
|
||||
getVersion uintptr
|
||||
globalAlloc uintptr
|
||||
globalFree uintptr
|
||||
globalLock uintptr
|
||||
globalUnlock uintptr
|
||||
moveMemory uintptr
|
||||
mulDiv uintptr
|
||||
setLastError uintptr
|
||||
systemTimeToFileTime uintptr
|
||||
activateActCtx *windows.LazyProc
|
||||
closeHandle *windows.LazyProc
|
||||
createActCtx *windows.LazyProc
|
||||
fileTimeToSystemTime *windows.LazyProc
|
||||
getConsoleTitle *windows.LazyProc
|
||||
getConsoleWindow *windows.LazyProc
|
||||
getLastError *windows.LazyProc
|
||||
getLocaleInfo *windows.LazyProc
|
||||
getLogicalDriveStrings *windows.LazyProc
|
||||
getModuleHandle *windows.LazyProc
|
||||
getNumberFormat *windows.LazyProc
|
||||
getPhysicallyInstalledSystemMemory *windows.LazyProc
|
||||
getProfileString *windows.LazyProc
|
||||
getThreadLocale *windows.LazyProc
|
||||
getThreadUILanguage *windows.LazyProc
|
||||
getVersion *windows.LazyProc
|
||||
globalAlloc *windows.LazyProc
|
||||
globalFree *windows.LazyProc
|
||||
globalLock *windows.LazyProc
|
||||
globalUnlock *windows.LazyProc
|
||||
moveMemory *windows.LazyProc
|
||||
mulDiv *windows.LazyProc
|
||||
setLastError *windows.LazyProc
|
||||
systemTimeToFileTime *windows.LazyProc
|
||||
)
|
||||
|
||||
type (
|
||||
@ -134,38 +135,38 @@ type ACTCTX struct {
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libkernel32 = MustLoadLibrary("kernel32.dll")
|
||||
libkernel32 = windows.NewLazySystemDLL("kernel32.dll")
|
||||
|
||||
// Functions
|
||||
activateActCtx = MustGetProcAddress(libkernel32, "ActivateActCtx")
|
||||
closeHandle = MustGetProcAddress(libkernel32, "CloseHandle")
|
||||
createActCtx = MustGetProcAddress(libkernel32, "CreateActCtxW")
|
||||
fileTimeToSystemTime = MustGetProcAddress(libkernel32, "FileTimeToSystemTime")
|
||||
getConsoleTitle = MustGetProcAddress(libkernel32, "GetConsoleTitleW")
|
||||
getConsoleWindow = MustGetProcAddress(libkernel32, "GetConsoleWindow")
|
||||
getLastError = MustGetProcAddress(libkernel32, "GetLastError")
|
||||
getLocaleInfo = MustGetProcAddress(libkernel32, "GetLocaleInfoW")
|
||||
getLogicalDriveStrings = MustGetProcAddress(libkernel32, "GetLogicalDriveStringsW")
|
||||
getModuleHandle = MustGetProcAddress(libkernel32, "GetModuleHandleW")
|
||||
getNumberFormat = MustGetProcAddress(libkernel32, "GetNumberFormatW")
|
||||
getPhysicallyInstalledSystemMemory, _ = syscall.GetProcAddress(syscall.Handle(libkernel32), "GetPhysicallyInstalledSystemMemory")
|
||||
getProfileString = MustGetProcAddress(libkernel32, "GetProfileStringW")
|
||||
getThreadLocale = MustGetProcAddress(libkernel32, "GetThreadLocale")
|
||||
getThreadUILanguage, _ = syscall.GetProcAddress(syscall.Handle(libkernel32), "GetThreadUILanguage")
|
||||
getVersion = MustGetProcAddress(libkernel32, "GetVersion")
|
||||
globalAlloc = MustGetProcAddress(libkernel32, "GlobalAlloc")
|
||||
globalFree = MustGetProcAddress(libkernel32, "GlobalFree")
|
||||
globalLock = MustGetProcAddress(libkernel32, "GlobalLock")
|
||||
globalUnlock = MustGetProcAddress(libkernel32, "GlobalUnlock")
|
||||
moveMemory = MustGetProcAddress(libkernel32, "RtlMoveMemory")
|
||||
mulDiv = MustGetProcAddress(libkernel32, "MulDiv")
|
||||
setLastError = MustGetProcAddress(libkernel32, "SetLastError")
|
||||
systemTimeToFileTime = MustGetProcAddress(libkernel32, "SystemTimeToFileTime")
|
||||
activateActCtx = libkernel32.NewProc("ActivateActCtx")
|
||||
closeHandle = libkernel32.NewProc("CloseHandle")
|
||||
createActCtx = libkernel32.NewProc("CreateActCtxW")
|
||||
fileTimeToSystemTime = libkernel32.NewProc("FileTimeToSystemTime")
|
||||
getConsoleTitle = libkernel32.NewProc("GetConsoleTitleW")
|
||||
getConsoleWindow = libkernel32.NewProc("GetConsoleWindow")
|
||||
getLastError = libkernel32.NewProc("GetLastError")
|
||||
getLocaleInfo = libkernel32.NewProc("GetLocaleInfoW")
|
||||
getLogicalDriveStrings = libkernel32.NewProc("GetLogicalDriveStringsW")
|
||||
getModuleHandle = libkernel32.NewProc("GetModuleHandleW")
|
||||
getNumberFormat = libkernel32.NewProc("GetNumberFormatW")
|
||||
getPhysicallyInstalledSystemMemory = libkernel32.NewProc("GetPhysicallyInstalledSystemMemory")
|
||||
getProfileString = libkernel32.NewProc("GetProfileStringW")
|
||||
getThreadLocale = libkernel32.NewProc("GetThreadLocale")
|
||||
getThreadUILanguage = libkernel32.NewProc("GetThreadUILanguage")
|
||||
getVersion = libkernel32.NewProc("GetVersion")
|
||||
globalAlloc = libkernel32.NewProc("GlobalAlloc")
|
||||
globalFree = libkernel32.NewProc("GlobalFree")
|
||||
globalLock = libkernel32.NewProc("GlobalLock")
|
||||
globalUnlock = libkernel32.NewProc("GlobalUnlock")
|
||||
moveMemory = libkernel32.NewProc("RtlMoveMemory")
|
||||
mulDiv = libkernel32.NewProc("MulDiv")
|
||||
setLastError = libkernel32.NewProc("SetLastError")
|
||||
systemTimeToFileTime = libkernel32.NewProc("SystemTimeToFileTime")
|
||||
}
|
||||
|
||||
func ActivateActCtx(ctx HANDLE) (uintptr, bool) {
|
||||
var cookie uintptr
|
||||
ret, _, _ := syscall.Syscall(activateActCtx, 2,
|
||||
ret, _, _ := syscall.Syscall(activateActCtx.Addr(), 2,
|
||||
uintptr(ctx),
|
||||
uintptr(unsafe.Pointer(&cookie)),
|
||||
0)
|
||||
@ -173,7 +174,7 @@ func ActivateActCtx(ctx HANDLE) (uintptr, bool) {
|
||||
}
|
||||
|
||||
func CloseHandle(hObject HANDLE) bool {
|
||||
ret, _, _ := syscall.Syscall(closeHandle, 1,
|
||||
ret, _, _ := syscall.Syscall(closeHandle.Addr(), 1,
|
||||
uintptr(hObject),
|
||||
0,
|
||||
0)
|
||||
@ -186,7 +187,7 @@ func CreateActCtx(ctx *ACTCTX) HANDLE {
|
||||
ctx.size = uint32(unsafe.Sizeof(*ctx))
|
||||
}
|
||||
ret, _, _ := syscall.Syscall(
|
||||
createActCtx,
|
||||
createActCtx.Addr(),
|
||||
1,
|
||||
uintptr(unsafe.Pointer(ctx)),
|
||||
0,
|
||||
@ -195,7 +196,7 @@ func CreateActCtx(ctx *ACTCTX) HANDLE {
|
||||
}
|
||||
|
||||
func FileTimeToSystemTime(lpFileTime *FILETIME, lpSystemTime *SYSTEMTIME) bool {
|
||||
ret, _, _ := syscall.Syscall(fileTimeToSystemTime, 2,
|
||||
ret, _, _ := syscall.Syscall(fileTimeToSystemTime.Addr(), 2,
|
||||
uintptr(unsafe.Pointer(lpFileTime)),
|
||||
uintptr(unsafe.Pointer(lpSystemTime)),
|
||||
0)
|
||||
@ -204,7 +205,7 @@ func FileTimeToSystemTime(lpFileTime *FILETIME, lpSystemTime *SYSTEMTIME) bool {
|
||||
}
|
||||
|
||||
func GetConsoleTitle(lpConsoleTitle *uint16, nSize uint32) uint32 {
|
||||
ret, _, _ := syscall.Syscall(getConsoleTitle, 2,
|
||||
ret, _, _ := syscall.Syscall(getConsoleTitle.Addr(), 2,
|
||||
uintptr(unsafe.Pointer(lpConsoleTitle)),
|
||||
uintptr(nSize),
|
||||
0)
|
||||
@ -213,7 +214,7 @@ func GetConsoleTitle(lpConsoleTitle *uint16, nSize uint32) uint32 {
|
||||
}
|
||||
|
||||
func GetConsoleWindow() HWND {
|
||||
ret, _, _ := syscall.Syscall(getConsoleWindow, 0,
|
||||
ret, _, _ := syscall.Syscall(getConsoleWindow.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -222,7 +223,7 @@ func GetConsoleWindow() HWND {
|
||||
}
|
||||
|
||||
func GetLastError() uint32 {
|
||||
ret, _, _ := syscall.Syscall(getLastError, 0,
|
||||
ret, _, _ := syscall.Syscall(getLastError.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -231,7 +232,7 @@ func GetLastError() uint32 {
|
||||
}
|
||||
|
||||
func GetLocaleInfo(Locale LCID, LCType LCTYPE, lpLCData *uint16, cchData int32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(getLocaleInfo, 4,
|
||||
ret, _, _ := syscall.Syscall6(getLocaleInfo.Addr(), 4,
|
||||
uintptr(Locale),
|
||||
uintptr(LCType),
|
||||
uintptr(unsafe.Pointer(lpLCData)),
|
||||
@ -243,7 +244,7 @@ func GetLocaleInfo(Locale LCID, LCType LCTYPE, lpLCData *uint16, cchData int32)
|
||||
}
|
||||
|
||||
func GetLogicalDriveStrings(nBufferLength uint32, lpBuffer *uint16) uint32 {
|
||||
ret, _, _ := syscall.Syscall(getLogicalDriveStrings, 2,
|
||||
ret, _, _ := syscall.Syscall(getLogicalDriveStrings.Addr(), 2,
|
||||
uintptr(nBufferLength),
|
||||
uintptr(unsafe.Pointer(lpBuffer)),
|
||||
0)
|
||||
@ -252,7 +253,7 @@ func GetLogicalDriveStrings(nBufferLength uint32, lpBuffer *uint16) uint32 {
|
||||
}
|
||||
|
||||
func GetModuleHandle(lpModuleName *uint16) HINSTANCE {
|
||||
ret, _, _ := syscall.Syscall(getModuleHandle, 1,
|
||||
ret, _, _ := syscall.Syscall(getModuleHandle.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpModuleName)),
|
||||
0,
|
||||
0)
|
||||
@ -261,7 +262,7 @@ func GetModuleHandle(lpModuleName *uint16) HINSTANCE {
|
||||
}
|
||||
|
||||
func GetNumberFormat(Locale LCID, dwFlags uint32, lpValue *uint16, lpFormat *NUMBERFMT, lpNumberStr *uint16, cchNumber int32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(getNumberFormat, 6,
|
||||
ret, _, _ := syscall.Syscall6(getNumberFormat.Addr(), 6,
|
||||
uintptr(Locale),
|
||||
uintptr(dwFlags),
|
||||
uintptr(unsafe.Pointer(lpValue)),
|
||||
@ -273,7 +274,10 @@ func GetNumberFormat(Locale LCID, dwFlags uint32, lpValue *uint16, lpFormat *NUM
|
||||
}
|
||||
|
||||
func GetPhysicallyInstalledSystemMemory(totalMemoryInKilobytes *uint64) bool {
|
||||
ret, _, _ := syscall.Syscall(getPhysicallyInstalledSystemMemory, 1,
|
||||
if getPhysicallyInstalledSystemMemory.Find() != nil {
|
||||
return false
|
||||
}
|
||||
ret, _, _ := syscall.Syscall(getPhysicallyInstalledSystemMemory.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(totalMemoryInKilobytes)),
|
||||
0,
|
||||
0)
|
||||
@ -282,7 +286,7 @@ func GetPhysicallyInstalledSystemMemory(totalMemoryInKilobytes *uint64) bool {
|
||||
}
|
||||
|
||||
func GetProfileString(lpAppName, lpKeyName, lpDefault *uint16, lpReturnedString uintptr, nSize uint32) bool {
|
||||
ret, _, _ := syscall.Syscall6(getProfileString, 5,
|
||||
ret, _, _ := syscall.Syscall6(getProfileString.Addr(), 5,
|
||||
uintptr(unsafe.Pointer(lpAppName)),
|
||||
uintptr(unsafe.Pointer(lpKeyName)),
|
||||
uintptr(unsafe.Pointer(lpDefault)),
|
||||
@ -293,7 +297,7 @@ func GetProfileString(lpAppName, lpKeyName, lpDefault *uint16, lpReturnedString
|
||||
}
|
||||
|
||||
func GetThreadLocale() LCID {
|
||||
ret, _, _ := syscall.Syscall(getThreadLocale, 0,
|
||||
ret, _, _ := syscall.Syscall(getThreadLocale.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -302,11 +306,11 @@ func GetThreadLocale() LCID {
|
||||
}
|
||||
|
||||
func GetThreadUILanguage() LANGID {
|
||||
if getThreadUILanguage == 0 {
|
||||
if getThreadUILanguage.Find() != nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
ret, _, _ := syscall.Syscall(getThreadUILanguage, 0,
|
||||
ret, _, _ := syscall.Syscall(getThreadUILanguage.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -315,7 +319,7 @@ func GetThreadUILanguage() LANGID {
|
||||
}
|
||||
|
||||
func GetVersion() int64 {
|
||||
ret, _, _ := syscall.Syscall(getVersion, 0,
|
||||
ret, _, _ := syscall.Syscall(getVersion.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -323,7 +327,7 @@ func GetVersion() int64 {
|
||||
}
|
||||
|
||||
func GlobalAlloc(uFlags uint32, dwBytes uintptr) HGLOBAL {
|
||||
ret, _, _ := syscall.Syscall(globalAlloc, 2,
|
||||
ret, _, _ := syscall.Syscall(globalAlloc.Addr(), 2,
|
||||
uintptr(uFlags),
|
||||
dwBytes,
|
||||
0)
|
||||
@ -332,7 +336,7 @@ func GlobalAlloc(uFlags uint32, dwBytes uintptr) HGLOBAL {
|
||||
}
|
||||
|
||||
func GlobalFree(hMem HGLOBAL) HGLOBAL {
|
||||
ret, _, _ := syscall.Syscall(globalFree, 1,
|
||||
ret, _, _ := syscall.Syscall(globalFree.Addr(), 1,
|
||||
uintptr(hMem),
|
||||
0,
|
||||
0)
|
||||
@ -341,7 +345,7 @@ func GlobalFree(hMem HGLOBAL) HGLOBAL {
|
||||
}
|
||||
|
||||
func GlobalLock(hMem HGLOBAL) unsafe.Pointer {
|
||||
ret, _, _ := syscall.Syscall(globalLock, 1,
|
||||
ret, _, _ := syscall.Syscall(globalLock.Addr(), 1,
|
||||
uintptr(hMem),
|
||||
0,
|
||||
0)
|
||||
@ -350,7 +354,7 @@ func GlobalLock(hMem HGLOBAL) unsafe.Pointer {
|
||||
}
|
||||
|
||||
func GlobalUnlock(hMem HGLOBAL) bool {
|
||||
ret, _, _ := syscall.Syscall(globalUnlock, 1,
|
||||
ret, _, _ := syscall.Syscall(globalUnlock.Addr(), 1,
|
||||
uintptr(hMem),
|
||||
0,
|
||||
0)
|
||||
@ -359,14 +363,14 @@ func GlobalUnlock(hMem HGLOBAL) bool {
|
||||
}
|
||||
|
||||
func MoveMemory(destination, source unsafe.Pointer, length uintptr) {
|
||||
syscall.Syscall(moveMemory, 3,
|
||||
syscall.Syscall(moveMemory.Addr(), 3,
|
||||
uintptr(unsafe.Pointer(destination)),
|
||||
uintptr(source),
|
||||
uintptr(length))
|
||||
}
|
||||
|
||||
func MulDiv(nNumber, nNumerator, nDenominator int32) int32 {
|
||||
ret, _, _ := syscall.Syscall(mulDiv, 3,
|
||||
ret, _, _ := syscall.Syscall(mulDiv.Addr(), 3,
|
||||
uintptr(nNumber),
|
||||
uintptr(nNumerator),
|
||||
uintptr(nDenominator))
|
||||
@ -375,14 +379,14 @@ func MulDiv(nNumber, nNumerator, nDenominator int32) int32 {
|
||||
}
|
||||
|
||||
func SetLastError(dwErrorCode uint32) {
|
||||
syscall.Syscall(setLastError, 1,
|
||||
syscall.Syscall(setLastError.Addr(), 1,
|
||||
uintptr(dwErrorCode),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func SystemTimeToFileTime(lpSystemTime *SYSTEMTIME, lpFileTime *FILETIME) bool {
|
||||
ret, _, _ := syscall.Syscall(systemTimeToFileTime, 2,
|
||||
ret, _, _ := syscall.Syscall(systemTimeToFileTime.Addr(), 2,
|
||||
uintptr(unsafe.Pointer(lpSystemTime)),
|
||||
uintptr(unsafe.Pointer(lpFileTime)),
|
||||
0)
|
||||
|
41
vendor/github.com/lxn/win/ole32.go
generated
vendored
41
vendor/github.com/lxn/win/ole32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -419,32 +420,32 @@ type COSERVERINFO struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libole32 uintptr
|
||||
libole32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
coCreateInstance uintptr
|
||||
coGetClassObject uintptr
|
||||
coTaskMemFree uintptr
|
||||
oleInitialize uintptr
|
||||
oleSetContainedObject uintptr
|
||||
oleUninitialize uintptr
|
||||
coCreateInstance *windows.LazyProc
|
||||
coGetClassObject *windows.LazyProc
|
||||
coTaskMemFree *windows.LazyProc
|
||||
oleInitialize *windows.LazyProc
|
||||
oleSetContainedObject *windows.LazyProc
|
||||
oleUninitialize *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libole32 = MustLoadLibrary("ole32.dll")
|
||||
libole32 = windows.NewLazySystemDLL("ole32.dll")
|
||||
|
||||
// Functions
|
||||
coCreateInstance = MustGetProcAddress(libole32, "CoCreateInstance")
|
||||
coGetClassObject = MustGetProcAddress(libole32, "CoGetClassObject")
|
||||
coTaskMemFree = MustGetProcAddress(libole32, "CoTaskMemFree")
|
||||
oleInitialize = MustGetProcAddress(libole32, "OleInitialize")
|
||||
oleSetContainedObject = MustGetProcAddress(libole32, "OleSetContainedObject")
|
||||
oleUninitialize = MustGetProcAddress(libole32, "OleUninitialize")
|
||||
coCreateInstance = libole32.NewProc("CoCreateInstance")
|
||||
coGetClassObject = libole32.NewProc("CoGetClassObject")
|
||||
coTaskMemFree = libole32.NewProc("CoTaskMemFree")
|
||||
oleInitialize = libole32.NewProc("OleInitialize")
|
||||
oleSetContainedObject = libole32.NewProc("OleSetContainedObject")
|
||||
oleUninitialize = libole32.NewProc("OleUninitialize")
|
||||
}
|
||||
|
||||
func CoCreateInstance(rclsid REFCLSID, pUnkOuter *IUnknown, dwClsContext uint32, riid REFIID, ppv *unsafe.Pointer) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(coCreateInstance, 5,
|
||||
ret, _, _ := syscall.Syscall6(coCreateInstance.Addr(), 5,
|
||||
uintptr(unsafe.Pointer(rclsid)),
|
||||
uintptr(unsafe.Pointer(pUnkOuter)),
|
||||
uintptr(dwClsContext),
|
||||
@ -456,7 +457,7 @@ func CoCreateInstance(rclsid REFCLSID, pUnkOuter *IUnknown, dwClsContext uint32,
|
||||
}
|
||||
|
||||
func CoGetClassObject(rclsid REFCLSID, dwClsContext uint32, pServerInfo *COSERVERINFO, riid REFIID, ppv *unsafe.Pointer) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(coGetClassObject, 5,
|
||||
ret, _, _ := syscall.Syscall6(coGetClassObject.Addr(), 5,
|
||||
uintptr(unsafe.Pointer(rclsid)),
|
||||
uintptr(dwClsContext),
|
||||
uintptr(unsafe.Pointer(pServerInfo)),
|
||||
@ -468,14 +469,14 @@ func CoGetClassObject(rclsid REFCLSID, dwClsContext uint32, pServerInfo *COSERVE
|
||||
}
|
||||
|
||||
func CoTaskMemFree(pv uintptr) {
|
||||
syscall.Syscall(coTaskMemFree, 1,
|
||||
syscall.Syscall(coTaskMemFree.Addr(), 1,
|
||||
pv,
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func OleInitialize() HRESULT {
|
||||
ret, _, _ := syscall.Syscall(oleInitialize, 1, // WTF, why does 0 not work here?
|
||||
ret, _, _ := syscall.Syscall(oleInitialize.Addr(), 1, // WTF, why does 0 not work here?
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -484,7 +485,7 @@ func OleInitialize() HRESULT {
|
||||
}
|
||||
|
||||
func OleSetContainedObject(pUnknown *IUnknown, fContained bool) HRESULT {
|
||||
ret, _, _ := syscall.Syscall(oleSetContainedObject, 2,
|
||||
ret, _, _ := syscall.Syscall(oleSetContainedObject.Addr(), 2,
|
||||
uintptr(unsafe.Pointer(pUnknown)),
|
||||
uintptr(BoolToBOOL(fContained)),
|
||||
0)
|
||||
@ -493,7 +494,7 @@ func OleSetContainedObject(pUnknown *IUnknown, fContained bool) HRESULT {
|
||||
}
|
||||
|
||||
func OleUninitialize() {
|
||||
syscall.Syscall(oleUninitialize, 0,
|
||||
syscall.Syscall(oleUninitialize.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
|
23
vendor/github.com/lxn/win/oleaut32.go
generated
vendored
23
vendor/github.com/lxn/win/oleaut32.go
generated
vendored
@ -8,6 +8,7 @@ package win
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -418,26 +419,26 @@ type DISPPARAMS struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
liboleaut32 uintptr
|
||||
liboleaut32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
sysAllocString uintptr
|
||||
sysFreeString uintptr
|
||||
sysStringLen uintptr
|
||||
sysAllocString *windows.LazyProc
|
||||
sysFreeString *windows.LazyProc
|
||||
sysStringLen *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
liboleaut32 = MustLoadLibrary("oleaut32.dll")
|
||||
liboleaut32 = windows.NewLazySystemDLL("oleaut32.dll")
|
||||
|
||||
// Functions
|
||||
sysAllocString = MustGetProcAddress(liboleaut32, "SysAllocString")
|
||||
sysFreeString = MustGetProcAddress(liboleaut32, "SysFreeString")
|
||||
sysStringLen = MustGetProcAddress(liboleaut32, "SysStringLen")
|
||||
sysAllocString = liboleaut32.NewProc("SysAllocString")
|
||||
sysFreeString = liboleaut32.NewProc("SysFreeString")
|
||||
sysStringLen = liboleaut32.NewProc("SysStringLen")
|
||||
}
|
||||
|
||||
func SysAllocString(s string) *uint16 /*BSTR*/ {
|
||||
ret, _, _ := syscall.Syscall(sysAllocString, 1,
|
||||
ret, _, _ := syscall.Syscall(sysAllocString.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(s))),
|
||||
0,
|
||||
0)
|
||||
@ -446,14 +447,14 @@ func SysAllocString(s string) *uint16 /*BSTR*/ {
|
||||
}
|
||||
|
||||
func SysFreeString(bstr *uint16 /*BSTR*/) {
|
||||
syscall.Syscall(sysFreeString, 1,
|
||||
syscall.Syscall(sysFreeString.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(bstr)),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func SysStringLen(bstr *uint16 /*BSTR*/) uint32 {
|
||||
ret, _, _ := syscall.Syscall(sysStringLen, 1,
|
||||
ret, _, _ := syscall.Syscall(sysStringLen.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(bstr)),
|
||||
0,
|
||||
0)
|
||||
|
101
vendor/github.com/lxn/win/opengl32.go
generated
vendored
101
vendor/github.com/lxn/win/opengl32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -91,52 +92,52 @@ type GLYPHMETRICSFLOAT struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
lib uintptr
|
||||
lib *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
wglCopyContext uintptr
|
||||
wglCreateContext uintptr
|
||||
wglCreateLayerContext uintptr
|
||||
wglDeleteContext uintptr
|
||||
wglDescribeLayerPlane uintptr
|
||||
wglGetCurrentContext uintptr
|
||||
wglGetCurrentDC uintptr
|
||||
wglGetLayerPaletteEntries uintptr
|
||||
wglGetProcAddress uintptr
|
||||
wglMakeCurrent uintptr
|
||||
wglRealizeLayerPalette uintptr
|
||||
wglSetLayerPaletteEntries uintptr
|
||||
wglShareLists uintptr
|
||||
wglSwapLayerBuffers uintptr
|
||||
wglUseFontBitmaps uintptr
|
||||
wglUseFontOutlines uintptr
|
||||
wglCopyContext *windows.LazyProc
|
||||
wglCreateContext *windows.LazyProc
|
||||
wglCreateLayerContext *windows.LazyProc
|
||||
wglDeleteContext *windows.LazyProc
|
||||
wglDescribeLayerPlane *windows.LazyProc
|
||||
wglGetCurrentContext *windows.LazyProc
|
||||
wglGetCurrentDC *windows.LazyProc
|
||||
wglGetLayerPaletteEntries *windows.LazyProc
|
||||
wglGetProcAddress *windows.LazyProc
|
||||
wglMakeCurrent *windows.LazyProc
|
||||
wglRealizeLayerPalette *windows.LazyProc
|
||||
wglSetLayerPaletteEntries *windows.LazyProc
|
||||
wglShareLists *windows.LazyProc
|
||||
wglSwapLayerBuffers *windows.LazyProc
|
||||
wglUseFontBitmaps *windows.LazyProc
|
||||
wglUseFontOutlines *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
lib = MustLoadLibrary("opengl32.dll")
|
||||
lib = windows.NewLazySystemDLL("opengl32.dll")
|
||||
|
||||
// Functions
|
||||
wglCopyContext = MustGetProcAddress(lib, "wglCopyContext")
|
||||
wglCreateContext = MustGetProcAddress(lib, "wglCreateContext")
|
||||
wglCreateLayerContext = MustGetProcAddress(lib, "wglCreateLayerContext")
|
||||
wglDeleteContext = MustGetProcAddress(lib, "wglDeleteContext")
|
||||
wglDescribeLayerPlane = MustGetProcAddress(lib, "wglDescribeLayerPlane")
|
||||
wglGetCurrentContext = MustGetProcAddress(lib, "wglGetCurrentContext")
|
||||
wglGetCurrentDC = MustGetProcAddress(lib, "wglGetCurrentDC")
|
||||
wglGetLayerPaletteEntries = MustGetProcAddress(lib, "wglGetLayerPaletteEntries")
|
||||
wglGetProcAddress = MustGetProcAddress(lib, "wglGetProcAddress")
|
||||
wglMakeCurrent = MustGetProcAddress(lib, "wglMakeCurrent")
|
||||
wglRealizeLayerPalette = MustGetProcAddress(lib, "wglRealizeLayerPalette")
|
||||
wglSetLayerPaletteEntries = MustGetProcAddress(lib, "wglSetLayerPaletteEntries")
|
||||
wglShareLists = MustGetProcAddress(lib, "wglShareLists")
|
||||
wglSwapLayerBuffers = MustGetProcAddress(lib, "wglSwapLayerBuffers")
|
||||
wglUseFontBitmaps = MustGetProcAddress(lib, "wglUseFontBitmapsW")
|
||||
wglUseFontOutlines = MustGetProcAddress(lib, "wglUseFontOutlinesW")
|
||||
wglCopyContext = lib.NewProc("wglCopyContext")
|
||||
wglCreateContext = lib.NewProc("wglCreateContext")
|
||||
wglCreateLayerContext = lib.NewProc("wglCreateLayerContext")
|
||||
wglDeleteContext = lib.NewProc("wglDeleteContext")
|
||||
wglDescribeLayerPlane = lib.NewProc("wglDescribeLayerPlane")
|
||||
wglGetCurrentContext = lib.NewProc("wglGetCurrentContext")
|
||||
wglGetCurrentDC = lib.NewProc("wglGetCurrentDC")
|
||||
wglGetLayerPaletteEntries = lib.NewProc("wglGetLayerPaletteEntries")
|
||||
wglGetProcAddress = lib.NewProc("wglGetProcAddress")
|
||||
wglMakeCurrent = lib.NewProc("wglMakeCurrent")
|
||||
wglRealizeLayerPalette = lib.NewProc("wglRealizeLayerPalette")
|
||||
wglSetLayerPaletteEntries = lib.NewProc("wglSetLayerPaletteEntries")
|
||||
wglShareLists = lib.NewProc("wglShareLists")
|
||||
wglSwapLayerBuffers = lib.NewProc("wglSwapLayerBuffers")
|
||||
wglUseFontBitmaps = lib.NewProc("wglUseFontBitmapsW")
|
||||
wglUseFontOutlines = lib.NewProc("wglUseFontOutlinesW")
|
||||
}
|
||||
|
||||
func WglCopyContext(hglrcSrc, hglrcDst HGLRC, mask uint) bool {
|
||||
ret, _, _ := syscall.Syscall(wglCopyContext, 3,
|
||||
ret, _, _ := syscall.Syscall(wglCopyContext.Addr(), 3,
|
||||
uintptr(hglrcSrc),
|
||||
uintptr(hglrcDst),
|
||||
uintptr(mask))
|
||||
@ -145,7 +146,7 @@ func WglCopyContext(hglrcSrc, hglrcDst HGLRC, mask uint) bool {
|
||||
}
|
||||
|
||||
func WglCreateContext(hdc HDC) HGLRC {
|
||||
ret, _, _ := syscall.Syscall(wglCreateContext, 1,
|
||||
ret, _, _ := syscall.Syscall(wglCreateContext.Addr(), 1,
|
||||
uintptr(hdc),
|
||||
0,
|
||||
0)
|
||||
@ -154,7 +155,7 @@ func WglCreateContext(hdc HDC) HGLRC {
|
||||
}
|
||||
|
||||
func WglCreateLayerContext(hdc HDC, iLayerPlane int) HGLRC {
|
||||
ret, _, _ := syscall.Syscall(wglCreateLayerContext, 2,
|
||||
ret, _, _ := syscall.Syscall(wglCreateLayerContext.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(iLayerPlane),
|
||||
0)
|
||||
@ -163,7 +164,7 @@ func WglCreateLayerContext(hdc HDC, iLayerPlane int) HGLRC {
|
||||
}
|
||||
|
||||
func WglDeleteContext(hglrc HGLRC) bool {
|
||||
ret, _, _ := syscall.Syscall(wglDeleteContext, 1,
|
||||
ret, _, _ := syscall.Syscall(wglDeleteContext.Addr(), 1,
|
||||
uintptr(hglrc),
|
||||
0,
|
||||
0)
|
||||
@ -172,7 +173,7 @@ func WglDeleteContext(hglrc HGLRC) bool {
|
||||
}
|
||||
|
||||
func WglDescribeLayerPlane(hdc HDC, iPixelFormat, iLayerPlane int, nBytes uint8, plpd *LAYERPLANEDESCRIPTOR) bool {
|
||||
ret, _, _ := syscall.Syscall6(wglDescribeLayerPlane, 5,
|
||||
ret, _, _ := syscall.Syscall6(wglDescribeLayerPlane.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(iPixelFormat),
|
||||
uintptr(iLayerPlane),
|
||||
@ -184,7 +185,7 @@ func WglDescribeLayerPlane(hdc HDC, iPixelFormat, iLayerPlane int, nBytes uint8,
|
||||
}
|
||||
|
||||
func WglGetCurrentContext() HGLRC {
|
||||
ret, _, _ := syscall.Syscall(wglGetCurrentContext, 0,
|
||||
ret, _, _ := syscall.Syscall(wglGetCurrentContext.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -193,7 +194,7 @@ func WglGetCurrentContext() HGLRC {
|
||||
}
|
||||
|
||||
func WglGetCurrentDC() HDC {
|
||||
ret, _, _ := syscall.Syscall(wglGetCurrentDC, 0,
|
||||
ret, _, _ := syscall.Syscall(wglGetCurrentDC.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -202,7 +203,7 @@ func WglGetCurrentDC() HDC {
|
||||
}
|
||||
|
||||
func WglGetLayerPaletteEntries(hdc HDC, iLayerPlane, iStart, cEntries int, pcr *COLORREF) int {
|
||||
ret, _, _ := syscall.Syscall6(wglGetLayerPaletteEntries, 5,
|
||||
ret, _, _ := syscall.Syscall6(wglGetLayerPaletteEntries.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(iLayerPlane),
|
||||
uintptr(iStart),
|
||||
@ -214,7 +215,7 @@ func WglGetLayerPaletteEntries(hdc HDC, iLayerPlane, iStart, cEntries int, pcr *
|
||||
}
|
||||
|
||||
func WglGetProcAddress(lpszProc *byte) uintptr {
|
||||
ret, _, _ := syscall.Syscall(wglGetProcAddress, 1,
|
||||
ret, _, _ := syscall.Syscall(wglGetProcAddress.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpszProc)),
|
||||
0,
|
||||
0)
|
||||
@ -223,7 +224,7 @@ func WglGetProcAddress(lpszProc *byte) uintptr {
|
||||
}
|
||||
|
||||
func WglMakeCurrent(hdc HDC, hglrc HGLRC) bool {
|
||||
ret, _, _ := syscall.Syscall(wglMakeCurrent, 2,
|
||||
ret, _, _ := syscall.Syscall(wglMakeCurrent.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(hglrc),
|
||||
0)
|
||||
@ -232,7 +233,7 @@ func WglMakeCurrent(hdc HDC, hglrc HGLRC) bool {
|
||||
}
|
||||
|
||||
func WglRealizeLayerPalette(hdc HDC, iLayerPlane int, bRealize bool) bool {
|
||||
ret, _, _ := syscall.Syscall(wglRealizeLayerPalette, 3,
|
||||
ret, _, _ := syscall.Syscall(wglRealizeLayerPalette.Addr(), 3,
|
||||
uintptr(hdc),
|
||||
uintptr(iLayerPlane),
|
||||
uintptr(BoolToBOOL(bRealize)))
|
||||
@ -241,7 +242,7 @@ func WglRealizeLayerPalette(hdc HDC, iLayerPlane int, bRealize bool) bool {
|
||||
}
|
||||
|
||||
func WglSetLayerPaletteEntries(hdc HDC, iLayerPlane, iStart, cEntries int, pcr *COLORREF) int {
|
||||
ret, _, _ := syscall.Syscall6(wglSetLayerPaletteEntries, 5,
|
||||
ret, _, _ := syscall.Syscall6(wglSetLayerPaletteEntries.Addr(), 5,
|
||||
uintptr(hdc),
|
||||
uintptr(iLayerPlane),
|
||||
uintptr(iStart),
|
||||
@ -253,7 +254,7 @@ func WglSetLayerPaletteEntries(hdc HDC, iLayerPlane, iStart, cEntries int, pcr *
|
||||
}
|
||||
|
||||
func WglShareLists(hglrc1, hglrc2 HGLRC) bool {
|
||||
ret, _, _ := syscall.Syscall(wglShareLists, 2,
|
||||
ret, _, _ := syscall.Syscall(wglShareLists.Addr(), 2,
|
||||
uintptr(hglrc1),
|
||||
uintptr(hglrc2),
|
||||
0)
|
||||
@ -262,7 +263,7 @@ func WglShareLists(hglrc1, hglrc2 HGLRC) bool {
|
||||
}
|
||||
|
||||
func WglSwapLayerBuffers(hdc HDC, fuPlanes uint) bool {
|
||||
ret, _, _ := syscall.Syscall(wglSwapLayerBuffers, 2,
|
||||
ret, _, _ := syscall.Syscall(wglSwapLayerBuffers.Addr(), 2,
|
||||
uintptr(hdc),
|
||||
uintptr(fuPlanes),
|
||||
0)
|
||||
@ -271,7 +272,7 @@ func WglSwapLayerBuffers(hdc HDC, fuPlanes uint) bool {
|
||||
}
|
||||
|
||||
func WglUseFontBitmaps(hdc HDC, first, count, listbase uint32) bool {
|
||||
ret, _, _ := syscall.Syscall6(wglUseFontBitmaps, 4,
|
||||
ret, _, _ := syscall.Syscall6(wglUseFontBitmaps.Addr(), 4,
|
||||
uintptr(hdc),
|
||||
uintptr(first),
|
||||
uintptr(count),
|
||||
@ -283,7 +284,7 @@ func WglUseFontBitmaps(hdc HDC, first, count, listbase uint32) bool {
|
||||
}
|
||||
|
||||
func WglUseFontOutlines(hdc HDC, first, count, listbase uint32, deviation, extrusion float32, format int, pgmf *GLYPHMETRICSFLOAT) bool {
|
||||
ret, _, _ := syscall.Syscall12(wglUseFontBitmaps, 8,
|
||||
ret, _, _ := syscall.Syscall12(wglUseFontBitmaps.Addr(), 8,
|
||||
uintptr(hdc),
|
||||
uintptr(first),
|
||||
uintptr(count),
|
||||
|
39
vendor/github.com/lxn/win/pdh.go
generated
vendored
39
vendor/github.com/lxn/win/pdh.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -161,32 +162,32 @@ type PDH_FMT_COUNTERVALUE_ITEM_LONG struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libpdhDll *syscall.DLL
|
||||
libpdhDll *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
pdh_AddCounterW *syscall.Proc
|
||||
pdh_AddEnglishCounterW *syscall.Proc
|
||||
pdh_CloseQuery *syscall.Proc
|
||||
pdh_CollectQueryData *syscall.Proc
|
||||
pdh_GetFormattedCounterValue *syscall.Proc
|
||||
pdh_GetFormattedCounterArrayW *syscall.Proc
|
||||
pdh_OpenQuery *syscall.Proc
|
||||
pdh_ValidatePathW *syscall.Proc
|
||||
pdh_AddCounterW *windows.LazyProc
|
||||
pdh_AddEnglishCounterW *windows.LazyProc
|
||||
pdh_CloseQuery *windows.LazyProc
|
||||
pdh_CollectQueryData *windows.LazyProc
|
||||
pdh_GetFormattedCounterValue *windows.LazyProc
|
||||
pdh_GetFormattedCounterArrayW *windows.LazyProc
|
||||
pdh_OpenQuery *windows.LazyProc
|
||||
pdh_ValidatePathW *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libpdhDll = syscall.MustLoadDLL("pdh.dll")
|
||||
libpdhDll = windows.NewLazySystemDLL("pdh.dll")
|
||||
|
||||
// Functions
|
||||
pdh_AddCounterW = libpdhDll.MustFindProc("PdhAddCounterW")
|
||||
pdh_AddEnglishCounterW, _ = libpdhDll.FindProc("PdhAddEnglishCounterW") // XXX: only supported on versions > Vista.
|
||||
pdh_CloseQuery = libpdhDll.MustFindProc("PdhCloseQuery")
|
||||
pdh_CollectQueryData = libpdhDll.MustFindProc("PdhCollectQueryData")
|
||||
pdh_GetFormattedCounterValue = libpdhDll.MustFindProc("PdhGetFormattedCounterValue")
|
||||
pdh_GetFormattedCounterArrayW = libpdhDll.MustFindProc("PdhGetFormattedCounterArrayW")
|
||||
pdh_OpenQuery = libpdhDll.MustFindProc("PdhOpenQuery")
|
||||
pdh_ValidatePathW = libpdhDll.MustFindProc("PdhValidatePathW")
|
||||
pdh_AddCounterW = libpdhDll.NewProc("PdhAddCounterW")
|
||||
pdh_AddEnglishCounterW = libpdhDll.NewProc("PdhAddEnglishCounterW")
|
||||
pdh_CloseQuery = libpdhDll.NewProc("PdhCloseQuery")
|
||||
pdh_CollectQueryData = libpdhDll.NewProc("PdhCollectQueryData")
|
||||
pdh_GetFormattedCounterValue = libpdhDll.NewProc("PdhGetFormattedCounterValue")
|
||||
pdh_GetFormattedCounterArrayW = libpdhDll.NewProc("PdhGetFormattedCounterArrayW")
|
||||
pdh_OpenQuery = libpdhDll.NewProc("PdhOpenQuery")
|
||||
pdh_ValidatePathW = libpdhDll.NewProc("PdhValidatePathW")
|
||||
}
|
||||
|
||||
// Adds the specified counter to the query. This is the internationalized version. Preferably, use the
|
||||
@ -241,7 +242,7 @@ func PdhAddCounter(hQuery PDH_HQUERY, szFullCounterPath string, dwUserData uintp
|
||||
// Adds the specified language-neutral counter to the query. See the PdhAddCounter function. This function only exists on
|
||||
// Windows versions higher than Vista.
|
||||
func PdhAddEnglishCounter(hQuery PDH_HQUERY, szFullCounterPath string, dwUserData uintptr, phCounter *PDH_HCOUNTER) uint32 {
|
||||
if pdh_AddEnglishCounterW == nil {
|
||||
if pdh_AddEnglishCounterW.Find() != nil {
|
||||
return ERROR_INVALID_FUNCTION
|
||||
}
|
||||
|
||||
|
79
vendor/github.com/lxn/win/shell32.go
generated
vendored
79
vendor/github.com/lxn/win/shell32.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -293,40 +294,42 @@ type SHSTOCKICONINFO struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libshell32 uintptr
|
||||
libshell32 *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
dragAcceptFiles uintptr
|
||||
dragFinish uintptr
|
||||
dragQueryFile uintptr
|
||||
shBrowseForFolder uintptr
|
||||
shGetFileInfo uintptr
|
||||
shGetPathFromIDList uintptr
|
||||
shGetSpecialFolderPath uintptr
|
||||
shParseDisplayName uintptr
|
||||
shGetStockIconInfo uintptr
|
||||
shell_NotifyIcon uintptr
|
||||
dragAcceptFiles *windows.LazyProc
|
||||
dragFinish *windows.LazyProc
|
||||
dragQueryFile *windows.LazyProc
|
||||
extractIcon *windows.LazyProc
|
||||
shBrowseForFolder *windows.LazyProc
|
||||
shGetFileInfo *windows.LazyProc
|
||||
shGetPathFromIDList *windows.LazyProc
|
||||
shGetSpecialFolderPath *windows.LazyProc
|
||||
shParseDisplayName *windows.LazyProc
|
||||
shGetStockIconInfo *windows.LazyProc
|
||||
shell_NotifyIcon *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libshell32 = MustLoadLibrary("shell32.dll")
|
||||
libshell32 = windows.NewLazySystemDLL("shell32.dll")
|
||||
|
||||
// Functions
|
||||
dragAcceptFiles = MustGetProcAddress(libshell32, "DragAcceptFiles")
|
||||
dragFinish = MustGetProcAddress(libshell32, "DragFinish")
|
||||
dragQueryFile = MustGetProcAddress(libshell32, "DragQueryFileW")
|
||||
shBrowseForFolder = MustGetProcAddress(libshell32, "SHBrowseForFolderW")
|
||||
shGetFileInfo = MustGetProcAddress(libshell32, "SHGetFileInfoW")
|
||||
shGetPathFromIDList = MustGetProcAddress(libshell32, "SHGetPathFromIDListW")
|
||||
shGetSpecialFolderPath = MustGetProcAddress(libshell32, "SHGetSpecialFolderPathW")
|
||||
shGetStockIconInfo = MaybeGetProcAddress(libshell32, "SHGetStockIconInfo")
|
||||
shell_NotifyIcon = MustGetProcAddress(libshell32, "Shell_NotifyIconW")
|
||||
shParseDisplayName = MustGetProcAddress(libshell32, "SHParseDisplayName")
|
||||
dragAcceptFiles = libshell32.NewProc("DragAcceptFiles")
|
||||
dragFinish = libshell32.NewProc("DragFinish")
|
||||
dragQueryFile = libshell32.NewProc("DragQueryFileW")
|
||||
extractIcon = libshell32.NewProc("ExtractIconW")
|
||||
shBrowseForFolder = libshell32.NewProc("SHBrowseForFolderW")
|
||||
shGetFileInfo = libshell32.NewProc("SHGetFileInfoW")
|
||||
shGetPathFromIDList = libshell32.NewProc("SHGetPathFromIDListW")
|
||||
shGetSpecialFolderPath = libshell32.NewProc("SHGetSpecialFolderPathW")
|
||||
shGetStockIconInfo = libshell32.NewProc("SHGetStockIconInfo")
|
||||
shell_NotifyIcon = libshell32.NewProc("Shell_NotifyIconW")
|
||||
shParseDisplayName = libshell32.NewProc("SHParseDisplayName")
|
||||
}
|
||||
|
||||
func DragAcceptFiles(hWnd HWND, fAccept bool) bool {
|
||||
ret, _, _ := syscall.Syscall(dragAcceptFiles, 2,
|
||||
ret, _, _ := syscall.Syscall(dragAcceptFiles.Addr(), 2,
|
||||
uintptr(hWnd),
|
||||
uintptr(BoolToBOOL(fAccept)),
|
||||
0)
|
||||
@ -335,7 +338,7 @@ func DragAcceptFiles(hWnd HWND, fAccept bool) bool {
|
||||
}
|
||||
|
||||
func DragQueryFile(hDrop HDROP, iFile uint, lpszFile *uint16, cch uint) uint {
|
||||
ret, _, _ := syscall.Syscall6(dragQueryFile, 4,
|
||||
ret, _, _ := syscall.Syscall6(dragQueryFile.Addr(), 4,
|
||||
uintptr(hDrop),
|
||||
uintptr(iFile),
|
||||
uintptr(unsafe.Pointer(lpszFile)),
|
||||
@ -347,14 +350,23 @@ func DragQueryFile(hDrop HDROP, iFile uint, lpszFile *uint16, cch uint) uint {
|
||||
}
|
||||
|
||||
func DragFinish(hDrop HDROP) {
|
||||
syscall.Syscall(dragAcceptFiles, 1,
|
||||
syscall.Syscall(dragAcceptFiles.Addr(), 1,
|
||||
uintptr(hDrop),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func ExtractIcon(hInst HINSTANCE, exeFileName *uint16, iconIndex int32) HICON {
|
||||
ret, _, _ := syscall.Syscall(extractIcon.Addr(), 3,
|
||||
uintptr(hInst),
|
||||
uintptr(unsafe.Pointer(exeFileName)),
|
||||
uintptr(iconIndex))
|
||||
|
||||
return HICON(ret)
|
||||
}
|
||||
|
||||
func SHBrowseForFolder(lpbi *BROWSEINFO) uintptr {
|
||||
ret, _, _ := syscall.Syscall(shBrowseForFolder, 1,
|
||||
ret, _, _ := syscall.Syscall(shBrowseForFolder.Addr(), 1,
|
||||
uintptr(unsafe.Pointer(lpbi)),
|
||||
0,
|
||||
0)
|
||||
@ -363,7 +375,7 @@ func SHBrowseForFolder(lpbi *BROWSEINFO) uintptr {
|
||||
}
|
||||
|
||||
func SHGetFileInfo(pszPath *uint16, dwFileAttributes uint32, psfi *SHFILEINFO, cbFileInfo, uFlags uint32) uintptr {
|
||||
ret, _, _ := syscall.Syscall6(shGetFileInfo, 5,
|
||||
ret, _, _ := syscall.Syscall6(shGetFileInfo.Addr(), 5,
|
||||
uintptr(unsafe.Pointer(pszPath)),
|
||||
uintptr(dwFileAttributes),
|
||||
uintptr(unsafe.Pointer(psfi)),
|
||||
@ -375,7 +387,7 @@ func SHGetFileInfo(pszPath *uint16, dwFileAttributes uint32, psfi *SHFILEINFO, c
|
||||
}
|
||||
|
||||
func SHGetPathFromIDList(pidl uintptr, pszPath *uint16) bool {
|
||||
ret, _, _ := syscall.Syscall(shGetPathFromIDList, 2,
|
||||
ret, _, _ := syscall.Syscall(shGetPathFromIDList.Addr(), 2,
|
||||
pidl,
|
||||
uintptr(unsafe.Pointer(pszPath)),
|
||||
0)
|
||||
@ -384,7 +396,7 @@ func SHGetPathFromIDList(pidl uintptr, pszPath *uint16) bool {
|
||||
}
|
||||
|
||||
func SHGetSpecialFolderPath(hwndOwner HWND, lpszPath *uint16, csidl CSIDL, fCreate bool) bool {
|
||||
ret, _, _ := syscall.Syscall6(shGetSpecialFolderPath, 4,
|
||||
ret, _, _ := syscall.Syscall6(shGetSpecialFolderPath.Addr(), 4,
|
||||
uintptr(hwndOwner),
|
||||
uintptr(unsafe.Pointer(lpszPath)),
|
||||
uintptr(csidl),
|
||||
@ -396,7 +408,7 @@ func SHGetSpecialFolderPath(hwndOwner HWND, lpszPath *uint16, csidl CSIDL, fCrea
|
||||
}
|
||||
|
||||
func SHParseDisplayName(pszName *uint16, pbc uintptr, ppidl *uintptr, sfgaoIn uint32, psfgaoOut *uint32) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(shParseDisplayName, 5,
|
||||
ret, _, _ := syscall.Syscall6(shParseDisplayName.Addr(), 5,
|
||||
uintptr(unsafe.Pointer(pszName)),
|
||||
pbc,
|
||||
uintptr(unsafe.Pointer(ppidl)),
|
||||
@ -408,7 +420,10 @@ func SHParseDisplayName(pszName *uint16, pbc uintptr, ppidl *uintptr, sfgaoIn ui
|
||||
}
|
||||
|
||||
func SHGetStockIconInfo(stockIconId int32, uFlags uint32, stockIcon *SHSTOCKICONINFO) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(shGetStockIconInfo, 3,
|
||||
if shGetStockIconInfo.Find() != nil {
|
||||
return HRESULT(0)
|
||||
}
|
||||
ret, _, _ := syscall.Syscall6(shGetStockIconInfo.Addr(), 3,
|
||||
uintptr(stockIconId),
|
||||
uintptr(uFlags),
|
||||
uintptr(unsafe.Pointer(stockIcon)),
|
||||
@ -420,7 +435,7 @@ func SHGetStockIconInfo(stockIconId int32, uFlags uint32, stockIcon *SHSTOCKICON
|
||||
}
|
||||
|
||||
func Shell_NotifyIcon(dwMessage uint32, lpdata *NOTIFYICONDATA) bool {
|
||||
ret, _, _ := syscall.Syscall(shell_NotifyIcon, 2,
|
||||
ret, _, _ := syscall.Syscall(shell_NotifyIcon.Addr(), 2,
|
||||
uintptr(dwMessage),
|
||||
uintptr(unsafe.Pointer(lpdata)),
|
||||
0)
|
||||
|
722
vendor/github.com/lxn/win/user32.go
generated
vendored
722
vendor/github.com/lxn/win/user32.go
generated
vendored
File diff suppressed because it is too large
Load Diff
56
vendor/github.com/lxn/win/uxtheme.go
generated
vendored
56
vendor/github.com/lxn/win/uxtheme.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -138,36 +139,36 @@ type DTTOPTS struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libuxtheme uintptr
|
||||
libuxtheme *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
closeThemeData uintptr
|
||||
drawThemeBackground uintptr
|
||||
drawThemeTextEx uintptr
|
||||
getThemePartSize uintptr
|
||||
getThemeTextExtent uintptr
|
||||
isAppThemed uintptr
|
||||
openThemeData uintptr
|
||||
setWindowTheme uintptr
|
||||
closeThemeData *windows.LazyProc
|
||||
drawThemeBackground *windows.LazyProc
|
||||
drawThemeTextEx *windows.LazyProc
|
||||
getThemePartSize *windows.LazyProc
|
||||
getThemeTextExtent *windows.LazyProc
|
||||
isAppThemed *windows.LazyProc
|
||||
openThemeData *windows.LazyProc
|
||||
setWindowTheme *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libuxtheme = MustLoadLibrary("uxtheme.dll")
|
||||
libuxtheme = windows.NewLazySystemDLL("uxtheme.dll")
|
||||
|
||||
// Functions
|
||||
closeThemeData = MustGetProcAddress(libuxtheme, "CloseThemeData")
|
||||
drawThemeBackground = MustGetProcAddress(libuxtheme, "DrawThemeBackground")
|
||||
drawThemeTextEx, _ = syscall.GetProcAddress(syscall.Handle(libuxtheme), "DrawThemeTextEx")
|
||||
getThemePartSize = MustGetProcAddress(libuxtheme, "GetThemePartSize")
|
||||
getThemeTextExtent = MustGetProcAddress(libuxtheme, "GetThemeTextExtent")
|
||||
isAppThemed = MustGetProcAddress(libuxtheme, "IsAppThemed")
|
||||
openThemeData = MustGetProcAddress(libuxtheme, "OpenThemeData")
|
||||
setWindowTheme = MustGetProcAddress(libuxtheme, "SetWindowTheme")
|
||||
closeThemeData = libuxtheme.NewProc("CloseThemeData")
|
||||
drawThemeBackground = libuxtheme.NewProc("DrawThemeBackground")
|
||||
drawThemeTextEx = libuxtheme.NewProc("DrawThemeTextEx")
|
||||
getThemePartSize = libuxtheme.NewProc("GetThemePartSize")
|
||||
getThemeTextExtent = libuxtheme.NewProc("GetThemeTextExtent")
|
||||
isAppThemed = libuxtheme.NewProc("IsAppThemed")
|
||||
openThemeData = libuxtheme.NewProc("OpenThemeData")
|
||||
setWindowTheme = libuxtheme.NewProc("SetWindowTheme")
|
||||
}
|
||||
|
||||
func CloseThemeData(hTheme HTHEME) HRESULT {
|
||||
ret, _, _ := syscall.Syscall(closeThemeData, 1,
|
||||
ret, _, _ := syscall.Syscall(closeThemeData.Addr(), 1,
|
||||
uintptr(hTheme),
|
||||
0,
|
||||
0)
|
||||
@ -176,7 +177,7 @@ func CloseThemeData(hTheme HTHEME) HRESULT {
|
||||
}
|
||||
|
||||
func DrawThemeBackground(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pRect, pClipRect *RECT) HRESULT {
|
||||
ret, _, _ := syscall.Syscall6(drawThemeBackground, 6,
|
||||
ret, _, _ := syscall.Syscall6(drawThemeBackground.Addr(), 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
@ -188,7 +189,10 @@ func DrawThemeBackground(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pRect,
|
||||
}
|
||||
|
||||
func DrawThemeTextEx(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pszText *uint16, iCharCount int32, dwFlags uint32, pRect *RECT, pOptions *DTTOPTS) HRESULT {
|
||||
ret, _, _ := syscall.Syscall9(drawThemeTextEx, 9,
|
||||
if drawThemeTextEx.Find() != nil {
|
||||
return HRESULT(0)
|
||||
}
|
||||
ret, _, _ := syscall.Syscall9(drawThemeTextEx.Addr(), 9,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
@ -203,7 +207,7 @@ func DrawThemeTextEx(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pszText *u
|
||||
}
|
||||
|
||||
func GetThemePartSize(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, prc *RECT, eSize THEMESIZE, psz *SIZE) HRESULT {
|
||||
ret, _, _ := syscall.Syscall9(getThemePartSize, 7,
|
||||
ret, _, _ := syscall.Syscall9(getThemePartSize.Addr(), 7,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
@ -218,7 +222,7 @@ func GetThemePartSize(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, prc *RECT
|
||||
}
|
||||
|
||||
func GetThemeTextExtent(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pszText *uint16, iCharCount int32, dwTextFlags uint32, pBoundingRect, pExtentRect *RECT) HRESULT {
|
||||
ret, _, _ := syscall.Syscall9(getThemeTextExtent, 9,
|
||||
ret, _, _ := syscall.Syscall9(getThemeTextExtent.Addr(), 9,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
@ -233,7 +237,7 @@ func GetThemeTextExtent(hTheme HTHEME, hdc HDC, iPartId, iStateId int32, pszText
|
||||
}
|
||||
|
||||
func IsAppThemed() bool {
|
||||
ret, _, _ := syscall.Syscall(isAppThemed, 0,
|
||||
ret, _, _ := syscall.Syscall(isAppThemed.Addr(), 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
@ -242,7 +246,7 @@ func IsAppThemed() bool {
|
||||
}
|
||||
|
||||
func OpenThemeData(hwnd HWND, pszClassList *uint16) HTHEME {
|
||||
ret, _, _ := syscall.Syscall(openThemeData, 2,
|
||||
ret, _, _ := syscall.Syscall(openThemeData.Addr(), 2,
|
||||
uintptr(hwnd),
|
||||
uintptr(unsafe.Pointer(pszClassList)),
|
||||
0)
|
||||
@ -251,7 +255,7 @@ func OpenThemeData(hwnd HWND, pszClassList *uint16) HTHEME {
|
||||
}
|
||||
|
||||
func SetWindowTheme(hwnd HWND, pszSubAppName, pszSubIdList *uint16) HRESULT {
|
||||
ret, _, _ := syscall.Syscall(setWindowTheme, 3,
|
||||
ret, _, _ := syscall.Syscall(setWindowTheme.Addr(), 3,
|
||||
uintptr(hwnd),
|
||||
uintptr(unsafe.Pointer(pszSubAppName)),
|
||||
uintptr(unsafe.Pointer(pszSubIdList)))
|
||||
|
24
vendor/github.com/lxn/win/win.go
generated
vendored
24
vendor/github.com/lxn/win/win.go
generated
vendored
@ -42,30 +42,6 @@ type (
|
||||
HRESULT int32
|
||||
)
|
||||
|
||||
func MustLoadLibrary(name string) uintptr {
|
||||
lib, err := syscall.LoadLibrary(name)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return uintptr(lib)
|
||||
}
|
||||
|
||||
func MustGetProcAddress(lib uintptr, name string) uintptr {
|
||||
addr, err := syscall.GetProcAddress(syscall.Handle(lib), name)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return uintptr(addr)
|
||||
}
|
||||
|
||||
func MaybeGetProcAddress(lib uintptr, name string) uintptr {
|
||||
addr, _ := syscall.GetProcAddress(syscall.Handle(lib), name)
|
||||
|
||||
return uintptr(addr)
|
||||
}
|
||||
|
||||
func SUCCEEDED(hr HRESULT) bool {
|
||||
return hr >= 0
|
||||
}
|
||||
|
29
vendor/github.com/lxn/win/winspool.go
generated
vendored
29
vendor/github.com/lxn/win/winspool.go
generated
vendored
@ -7,6 +7,7 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -31,28 +32,28 @@ type PRINTER_INFO_4 struct {
|
||||
|
||||
var (
|
||||
// Library
|
||||
libwinspool uintptr
|
||||
libwinspool *windows.LazyDLL
|
||||
|
||||
// Functions
|
||||
deviceCapabilities uintptr
|
||||
documentProperties uintptr
|
||||
enumPrinters uintptr
|
||||
getDefaultPrinter uintptr
|
||||
deviceCapabilities *windows.LazyProc
|
||||
documentProperties *windows.LazyProc
|
||||
enumPrinters *windows.LazyProc
|
||||
getDefaultPrinter *windows.LazyProc
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libwinspool = MustLoadLibrary("winspool.drv")
|
||||
libwinspool = windows.NewLazySystemDLL("winspool.drv")
|
||||
|
||||
// Functions
|
||||
deviceCapabilities = MustGetProcAddress(libwinspool, "DeviceCapabilitiesW")
|
||||
documentProperties = MustGetProcAddress(libwinspool, "DocumentPropertiesW")
|
||||
enumPrinters = MustGetProcAddress(libwinspool, "EnumPrintersW")
|
||||
getDefaultPrinter = MustGetProcAddress(libwinspool, "GetDefaultPrinterW")
|
||||
deviceCapabilities = libwinspool.NewProc("DeviceCapabilitiesW")
|
||||
documentProperties = libwinspool.NewProc("DocumentPropertiesW")
|
||||
enumPrinters = libwinspool.NewProc("EnumPrintersW")
|
||||
getDefaultPrinter = libwinspool.NewProc("GetDefaultPrinterW")
|
||||
}
|
||||
|
||||
func DeviceCapabilities(pDevice, pPort *uint16, fwCapability uint16, pOutput *uint16, pDevMode *DEVMODE) uint32 {
|
||||
ret, _, _ := syscall.Syscall6(deviceCapabilities, 5,
|
||||
ret, _, _ := syscall.Syscall6(deviceCapabilities.Addr(), 5,
|
||||
uintptr(unsafe.Pointer(pDevice)),
|
||||
uintptr(unsafe.Pointer(pPort)),
|
||||
uintptr(fwCapability),
|
||||
@ -64,7 +65,7 @@ func DeviceCapabilities(pDevice, pPort *uint16, fwCapability uint16, pOutput *ui
|
||||
}
|
||||
|
||||
func DocumentProperties(hWnd HWND, hPrinter HANDLE, pDeviceName *uint16, pDevModeOutput, pDevModeInput *DEVMODE, fMode uint32) int32 {
|
||||
ret, _, _ := syscall.Syscall6(documentProperties, 6,
|
||||
ret, _, _ := syscall.Syscall6(documentProperties.Addr(), 6,
|
||||
uintptr(hWnd),
|
||||
uintptr(hPrinter),
|
||||
uintptr(unsafe.Pointer(pDeviceName)),
|
||||
@ -76,7 +77,7 @@ func DocumentProperties(hWnd HWND, hPrinter HANDLE, pDeviceName *uint16, pDevMod
|
||||
}
|
||||
|
||||
func EnumPrinters(Flags uint32, Name *uint16, Level uint32, pPrinterEnum *byte, cbBuf uint32, pcbNeeded, pcReturned *uint32) bool {
|
||||
ret, _, _ := syscall.Syscall9(enumPrinters, 7,
|
||||
ret, _, _ := syscall.Syscall9(enumPrinters.Addr(), 7,
|
||||
uintptr(Flags),
|
||||
uintptr(unsafe.Pointer(Name)),
|
||||
uintptr(Level),
|
||||
@ -91,7 +92,7 @@ func EnumPrinters(Flags uint32, Name *uint16, Level uint32, pPrinterEnum *byte,
|
||||
}
|
||||
|
||||
func GetDefaultPrinter(pszBuffer *uint16, pcchBuffer *uint32) bool {
|
||||
ret, _, _ := syscall.Syscall(getDefaultPrinter, 2,
|
||||
ret, _, _ := syscall.Syscall(getDefaultPrinter.Addr(), 2,
|
||||
uintptr(unsafe.Pointer(pszBuffer)),
|
||||
uintptr(unsafe.Pointer(pcchBuffer)),
|
||||
0)
|
||||
|
9
vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_arm.go
generated
vendored
9
vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_arm.go
generated
vendored
@ -1,9 +0,0 @@
|
||||
package cpu
|
||||
|
||||
type cpuTimes struct {
|
||||
User uint32
|
||||
Nice uint32
|
||||
Sys uint32
|
||||
Intr uint32
|
||||
Idle uint32
|
||||
}
|
58
vendor/github.com/shirou/gopsutil/cpu/cpu_openbsd.go
generated
vendored
58
vendor/github.com/shirou/gopsutil/cpu/cpu_openbsd.go
generated
vendored
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
// sys/sched.h
|
||||
var (
|
||||
const (
|
||||
CPUser = 0
|
||||
CPNice = 1
|
||||
CPSys = 2
|
||||
@ -35,36 +35,18 @@ const (
|
||||
var ClocksPerSec = float64(128)
|
||||
|
||||
func init() {
|
||||
func() {
|
||||
getconf, err := exec.LookPath("/usr/bin/getconf")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
out, err := invoke.Command(getconf, "CLK_TCK")
|
||||
// ignore errors
|
||||
getconf, err := exec.LookPath("/usr/bin/getconf")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
out, err := invoke.Command(getconf, "CLK_TCK")
|
||||
// ignore errors
|
||||
if err == nil {
|
||||
i, err := strconv.ParseFloat(strings.TrimSpace(string(out)), 64)
|
||||
if err == nil {
|
||||
i, err := strconv.ParseFloat(strings.TrimSpace(string(out)), 64)
|
||||
if err == nil {
|
||||
ClocksPerSec = float64(i)
|
||||
}
|
||||
ClocksPerSec = float64(i)
|
||||
}
|
||||
}()
|
||||
func() {
|
||||
v, err := unix.Sysctl("kern.osrelease") // can't reuse host.PlatformInformation because of circular import
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
v = strings.ToLower(v)
|
||||
version, err := strconv.ParseFloat(v, 64)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if version >= 6.4 {
|
||||
CPIntr = 4
|
||||
CPIdle = 5
|
||||
CPUStates = 6
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
func Times(percpu bool) ([]TimesStat, error) {
|
||||
@ -82,7 +64,7 @@ func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
|
||||
}
|
||||
|
||||
for i := 0; i < ncpu; i++ {
|
||||
var cpuTimes = make([]int64, CPUStates)
|
||||
var cpuTimes [CPUStates]int64
|
||||
var mib []int32
|
||||
if percpu {
|
||||
mib = []int32{CTLKern, KernCptime}
|
||||
@ -124,24 +106,14 @@ func Info() ([]InfoStat, error) {
|
||||
|
||||
func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
|
||||
var ret []InfoStat
|
||||
var err error
|
||||
|
||||
c := InfoStat{}
|
||||
|
||||
var u32 uint32
|
||||
if u32, err = unix.SysctlUint32("hw.cpuspeed"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.Mhz = float64(u32)
|
||||
|
||||
if u32, err = unix.SysctlUint32("hw.ncpuonline"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.Cores = int32(u32)
|
||||
|
||||
if c.ModelName, err = unix.Sysctl("hw.model"); err != nil {
|
||||
v, err := unix.Sysctl("hw.model")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.ModelName = v
|
||||
|
||||
return append(ret, c), nil
|
||||
}
|
||||
|
27
vendor/github.com/shirou/gopsutil/host/host_darwin.go
generated
vendored
27
vendor/github.com/shirou/gopsutil/host/host_darwin.go
generated
vendored
@ -18,7 +18,6 @@ import (
|
||||
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
"github.com/shirou/gopsutil/process"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// from utmpx.h
|
||||
@ -181,13 +180,17 @@ func PlatformInformationWithContext(ctx context.Context) (string, string, string
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
|
||||
p, err := unix.Sysctl("kern.ostype")
|
||||
if err == nil {
|
||||
platform = strings.ToLower(p)
|
||||
uname, err := exec.LookPath("uname")
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
|
||||
out, err := invoke.CommandWithContext(ctx, sw_vers, "-productVersion")
|
||||
out, err := invoke.CommandWithContext(ctx, uname, "-s")
|
||||
if err == nil {
|
||||
platform = strings.ToLower(strings.TrimSpace(string(out)))
|
||||
}
|
||||
|
||||
out, err = invoke.CommandWithContext(ctx, sw_vers, "-productVersion")
|
||||
if err == nil {
|
||||
pver = strings.ToLower(strings.TrimSpace(string(out)))
|
||||
}
|
||||
@ -208,8 +211,16 @@ func KernelVersion() (string, error) {
|
||||
}
|
||||
|
||||
func KernelVersionWithContext(ctx context.Context) (string, error) {
|
||||
version, err := unix.Sysctl("kern.osrelease")
|
||||
return strings.ToLower(version), err
|
||||
uname, err := exec.LookPath("uname")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
out, err := invoke.CommandWithContext(ctx, uname, "-r")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
version := strings.ToLower(strings.TrimSpace(string(out)))
|
||||
return version, err
|
||||
}
|
||||
|
||||
func SensorsTemperatures() ([]TemperatureStat, error) {
|
||||
|
19
vendor/github.com/shirou/gopsutil/host/host_openbsd.go
generated
vendored
19
vendor/github.com/shirou/gopsutil/host/host_openbsd.go
generated
vendored
@ -8,6 +8,7 @@ import (
|
||||
"encoding/binary"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -16,7 +17,6 @@ import (
|
||||
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
"github.com/shirou/gopsutil/process"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -108,14 +108,19 @@ func PlatformInformationWithContext(ctx context.Context) (string, string, string
|
||||
platform := ""
|
||||
family := ""
|
||||
version := ""
|
||||
|
||||
p, err := unix.Sysctl("kern.ostype")
|
||||
if err == nil {
|
||||
platform = strings.ToLower(p)
|
||||
uname, err := exec.LookPath("uname")
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
v, err := unix.Sysctl("kern.osrelease")
|
||||
|
||||
out, err := invoke.CommandWithContext(ctx, uname, "-s")
|
||||
if err == nil {
|
||||
version = strings.ToLower(v)
|
||||
platform = strings.ToLower(strings.TrimSpace(string(out)))
|
||||
}
|
||||
|
||||
out, err = invoke.CommandWithContext(ctx, uname, "-r")
|
||||
if err == nil {
|
||||
version = strings.ToLower(strings.TrimSpace(string(out)))
|
||||
}
|
||||
|
||||
return platform, family, version, nil
|
||||
|
8
vendor/github.com/shirou/gopsutil/process/process.go
generated
vendored
8
vendor/github.com/shirou/gopsutil/process/process.go
generated
vendored
@ -43,7 +43,6 @@ type OpenFilesStat struct {
|
||||
type MemoryInfoStat struct {
|
||||
RSS uint64 `json:"rss"` // bytes
|
||||
VMS uint64 `json:"vms"` // bytes
|
||||
HWM uint64 `json:"hwm"` // bytes
|
||||
Data uint64 `json:"data"` // bytes
|
||||
Stack uint64 `json:"stack"` // bytes
|
||||
Locked uint64 `json:"locked"` // bytes
|
||||
@ -77,13 +76,6 @@ type NumCtxSwitchesStat struct {
|
||||
Involuntary int64 `json:"involuntary"`
|
||||
}
|
||||
|
||||
type PageFaultsStat struct {
|
||||
MinorFaults uint64 `json:"minorFaults"`
|
||||
MajorFaults uint64 `json:"majorFaults"`
|
||||
ChildMinorFaults uint64 `json:"childMinorFaults"`
|
||||
ChildMajorFaults uint64 `json:"childMajorFaults"`
|
||||
}
|
||||
|
||||
// Resource limit constants are from /usr/include/x86_64-linux-gnu/bits/resource.h
|
||||
// from libc6-dev package in Ubuntu 16.10
|
||||
const (
|
||||
|
8
vendor/github.com/shirou/gopsutil/process/process_darwin.go
generated
vendored
8
vendor/github.com/shirou/gopsutil/process/process_darwin.go
generated
vendored
@ -481,14 +481,6 @@ func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExSta
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) PageFaults() (*PageFaultsStat, error) {
|
||||
return p.PageFaultsWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) Children() ([]*Process, error) {
|
||||
return p.ChildrenWithContext(context.Background())
|
||||
}
|
||||
|
6
vendor/github.com/shirou/gopsutil/process/process_fallback.go
generated
vendored
6
vendor/github.com/shirou/gopsutil/process/process_fallback.go
generated
vendored
@ -233,12 +233,6 @@ func (p *Process) MemoryInfoEx() (*MemoryInfoExStat, error) {
|
||||
func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
func (p *Process) PageFaults() (*PageFaultsStat, error) {
|
||||
return p.PageFaultsWithContext(context.Background())
|
||||
}
|
||||
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
func (p *Process) Children() ([]*Process, error) {
|
||||
return p.ChildrenWithContext(context.Background())
|
||||
}
|
||||
|
8
vendor/github.com/shirou/gopsutil/process/process_freebsd.go
generated
vendored
8
vendor/github.com/shirou/gopsutil/process/process_freebsd.go
generated
vendored
@ -371,14 +371,6 @@ func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExSta
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) PageFaults() (*PageFaultsStat, error) {
|
||||
return p.PageFaultsWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) Children() ([]*Process, error) {
|
||||
return p.ChildrenWithContext(context.Background())
|
||||
}
|
||||
|
101
vendor/github.com/shirou/gopsutil/process/process_linux.go
generated
vendored
101
vendor/github.com/shirou/gopsutil/process/process_linux.go
generated
vendored
@ -84,7 +84,7 @@ func (p *Process) Ppid() (int32, error) {
|
||||
}
|
||||
|
||||
func (p *Process) PpidWithContext(ctx context.Context) (int32, error) {
|
||||
_, ppid, _, _, _, _, _, err := p.fillFromStat()
|
||||
_, ppid, _, _, _, _, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
@ -150,7 +150,7 @@ func (p *Process) CreateTime() (int64, error) {
|
||||
}
|
||||
|
||||
func (p *Process) CreateTimeWithContext(ctx context.Context) (int64, error) {
|
||||
_, _, _, createTime, _, _, _, err := p.fillFromStat()
|
||||
_, _, _, createTime, _, _, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@ -253,7 +253,7 @@ func (p *Process) Terminal() (string, error) {
|
||||
}
|
||||
|
||||
func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {
|
||||
t, _, _, _, _, _, _, err := p.fillFromStat()
|
||||
t, _, _, _, _, _, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -272,7 +272,7 @@ func (p *Process) Nice() (int32, error) {
|
||||
}
|
||||
|
||||
func (p *Process) NiceWithContext(ctx context.Context) (int32, error) {
|
||||
_, _, _, _, _, nice, _, err := p.fillFromStat()
|
||||
_, _, _, _, _, nice, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@ -310,7 +310,7 @@ func (p *Process) RlimitUsageWithContext(ctx context.Context, gatherUsed bool) (
|
||||
return rlimits, err
|
||||
}
|
||||
|
||||
_, _, _, _, rtprio, nice, _, err := p.fillFromStat()
|
||||
_, _, _, _, rtprio, nice, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -418,7 +418,7 @@ func (p *Process) ThreadsWithContext(ctx context.Context) (map[int32]*cpu.TimesS
|
||||
}
|
||||
|
||||
for _, tid := range tids {
|
||||
_, _, cpuTimes, _, _, _, _, err := p.fillFromTIDStat(tid)
|
||||
_, _, cpuTimes, _, _, _, err := p.fillFromTIDStat(tid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -434,7 +434,7 @@ func (p *Process) Times() (*cpu.TimesStat, error) {
|
||||
}
|
||||
|
||||
func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) {
|
||||
_, _, cpuTimes, _, _, _, _, err := p.fillFromStat()
|
||||
_, _, cpuTimes, _, _, _, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -478,20 +478,6 @@ func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExSta
|
||||
return memInfoEx, nil
|
||||
}
|
||||
|
||||
// PageFaultsInfo returns the process's page fault counters
|
||||
func (p *Process) PageFaults() (*PageFaultsStat, error) {
|
||||
return p.PageFaultsWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
|
||||
_, _, _, _, _, _, pageFaults, err := p.fillFromStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return pageFaults, nil
|
||||
|
||||
}
|
||||
|
||||
// Children returns a slice of Process of the process.
|
||||
func (p *Process) Children() ([]*Process, error) {
|
||||
return p.ChildrenWithContext(context.Background())
|
||||
@ -573,9 +559,6 @@ func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error) {
|
||||
func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]MemoryMapsStat, error) {
|
||||
pid := p.Pid
|
||||
var ret []MemoryMapsStat
|
||||
if grouped {
|
||||
ret = make([]MemoryMapsStat, 1)
|
||||
}
|
||||
smapsPath := common.HostProc(strconv.Itoa(int(pid)), "smaps")
|
||||
contents, err := ioutil.ReadFile(smapsPath)
|
||||
if err != nil {
|
||||
@ -638,20 +621,7 @@ func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]M
|
||||
if err != nil {
|
||||
return &ret, err
|
||||
}
|
||||
if grouped {
|
||||
ret[0].Size += g.Size
|
||||
ret[0].Rss += g.Rss
|
||||
ret[0].Pss += g.Pss
|
||||
ret[0].SharedClean += g.SharedClean
|
||||
ret[0].SharedDirty += g.SharedDirty
|
||||
ret[0].PrivateClean += g.PrivateClean
|
||||
ret[0].PrivateDirty += g.PrivateDirty
|
||||
ret[0].Referenced += g.Referenced
|
||||
ret[0].Anonymous += g.Anonymous
|
||||
ret[0].Swap += g.Swap
|
||||
} else {
|
||||
ret = append(ret, g)
|
||||
}
|
||||
ret = append(ret, g)
|
||||
}
|
||||
// starts new block
|
||||
blocks = make([]string, 16)
|
||||
@ -1113,13 +1083,6 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
p.memInfo.Swap = v * 1024
|
||||
case "VmHWM":
|
||||
value := strings.Trim(value, " kB") // remove last "kB"
|
||||
v, err := strconv.ParseUint(value, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p.memInfo.HWM = v * 1024
|
||||
case "VmData":
|
||||
value := strings.Trim(value, " kB") // remove last "kB"
|
||||
v, err := strconv.ParseUint(value, 10, 64)
|
||||
@ -1177,11 +1140,11 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *Process) fillFromTIDStat(tid int32) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) {
|
||||
func (p *Process) fillFromTIDStat(tid int32) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, error) {
|
||||
return p.fillFromTIDStatWithContext(context.Background(), tid)
|
||||
}
|
||||
|
||||
func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) {
|
||||
func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, error) {
|
||||
pid := p.Pid
|
||||
var statPath string
|
||||
|
||||
@ -1193,7 +1156,7 @@ func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (ui
|
||||
|
||||
contents, err := ioutil.ReadFile(statPath)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
fields := strings.Fields(string(contents))
|
||||
|
||||
@ -1204,21 +1167,21 @@ func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (ui
|
||||
|
||||
terminal, err := strconv.ParseUint(fields[i+5], 10, 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
|
||||
ppid, err := strconv.ParseInt(fields[i+2], 10, 32)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
utime, err := strconv.ParseFloat(fields[i+12], 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
|
||||
stime, err := strconv.ParseFloat(fields[i+13], 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
|
||||
cpuTimes := &cpu.TimesStat{
|
||||
@ -1230,14 +1193,14 @@ func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (ui
|
||||
bootTime, _ := host.BootTime()
|
||||
t, err := strconv.ParseUint(fields[i+20], 10, 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
ctime := (t / uint64(ClockTicks)) + uint64(bootTime)
|
||||
createTime := int64(ctime * 1000)
|
||||
|
||||
rtpriority, err := strconv.ParseInt(fields[i+16], 10, 32)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
return 0, 0, nil, 0, 0, 0, err
|
||||
}
|
||||
if rtpriority < 0 {
|
||||
rtpriority = rtpriority*-1 - 1
|
||||
@ -1250,38 +1213,14 @@ func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (ui
|
||||
snice, _ := unix.Getpriority(PrioProcess, int(pid))
|
||||
nice := int32(snice) // FIXME: is this true?
|
||||
|
||||
minFault, err := strconv.ParseUint(fields[i+8], 10, 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
}
|
||||
cMinFault, err := strconv.ParseUint(fields[i+9], 10, 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
}
|
||||
majFault, err := strconv.ParseUint(fields[i+10], 10, 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
}
|
||||
cMajFault, err := strconv.ParseUint(fields[i+11], 10, 64)
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
}
|
||||
|
||||
faults := &PageFaultsStat{
|
||||
MinorFaults: minFault,
|
||||
MajorFaults: majFault,
|
||||
ChildMinorFaults: cMinFault,
|
||||
ChildMajorFaults: cMajFault,
|
||||
}
|
||||
|
||||
return terminal, int32(ppid), cpuTimes, createTime, uint32(rtpriority), nice, faults, nil
|
||||
return terminal, int32(ppid), cpuTimes, createTime, uint32(rtpriority), nice, nil
|
||||
}
|
||||
|
||||
func (p *Process) fillFromStat() (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) {
|
||||
func (p *Process) fillFromStat() (uint64, int32, *cpu.TimesStat, int64, uint32, int32, error) {
|
||||
return p.fillFromStatWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (p *Process) fillFromStatWithContext(ctx context.Context) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) {
|
||||
func (p *Process) fillFromStatWithContext(ctx context.Context) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, error) {
|
||||
return p.fillFromTIDStat(-1)
|
||||
}
|
||||
|
||||
|
10
vendor/github.com/shirou/gopsutil/process/process_openbsd.go
generated
vendored
10
vendor/github.com/shirou/gopsutil/process/process_openbsd.go
generated
vendored
@ -7,8 +7,6 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
@ -359,14 +357,6 @@ func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExSta
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) PageFaults() (*PageFaultsStat, error) {
|
||||
return p.PageFaultsWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) Children() ([]*Process, error) {
|
||||
return p.ChildrenWithContext(context.Background())
|
||||
}
|
||||
|
8
vendor/github.com/shirou/gopsutil/process/process_windows.go
generated
vendored
8
vendor/github.com/shirou/gopsutil/process/process_windows.go
generated
vendored
@ -530,14 +530,6 @@ func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExSta
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) PageFaults() (*PageFaultsStat, error) {
|
||||
return p.PageFaultsWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func (p *Process) Children() ([]*Process, error) {
|
||||
return p.ChildrenWithContext(context.Background())
|
||||
}
|
||||
|
19
vendor/github.com/vcaesar/tt/.gitignore
generated
vendored
Normal file
19
vendor/github.com/vcaesar/tt/.gitignore
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# Object files
|
||||
.DS_Store
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
||||
.glide/
|
15
vendor/github.com/vcaesar/tt/.travis.yml
generated
vendored
Normal file
15
vendor/github.com/vcaesar/tt/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
language: go
|
||||
|
||||
go_import_path: github.com/vcaesar/tt
|
||||
|
||||
go:
|
||||
# - 1.8.x
|
||||
- 1.9.x
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
# - tip
|
||||
|
||||
install:
|
||||
- export PATH=$PATH:$HOME/gopath/bin
|
||||
# - go get -u github.com/shirou/gopsutil
|
||||
- go get -v -t ./...
|
73
vendor/github.com/vcaesar/tt/CONTRIBUTING.md
generated
vendored
Normal file
73
vendor/github.com/vcaesar/tt/CONTRIBUTING.md
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
# Contribution Guidelines
|
||||
|
||||
## Introduction
|
||||
|
||||
This document explains how to contribute changes to the Ego project. It assumes you have followed the README.md and [API Document](https://github.com/vcaesar/tt/tree/master/docs). <!--Sensitive security-related issues should be reported to [security@Ego.io](mailto:security@Ego.io.)-->
|
||||
|
||||
## Bug reports
|
||||
|
||||
Please search the issues on the issue tracker with a variety of keywords to ensure your bug is not already reported.
|
||||
|
||||
If unique, [open an issue](https://github.com/vcaesar/tt/issues/new) and answer the questions so we can understand and reproduce the problematic behavior.
|
||||
|
||||
The burden is on you to convince us that it is actually a bug in Ego. This is easiest to do when you write clear, concise instructions so we can reproduce the behavior (even if it seems obvious). The more detailed and specific you are, the faster we will be able to help you. Check out [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html).
|
||||
|
||||
Please be kind, remember that Ego comes at no cost to you, and you're getting free help.
|
||||
|
||||
## Discuss your design
|
||||
|
||||
The project welcomes submissions but please let everyone know what you're working on if you want to change or add something to the Ego repositories.
|
||||
|
||||
Before starting to write something new for the Ego project, please [file an issue](https://github.com/vcaesar/tt/issues/new). Significant changes must go through the [change proposal process](https://github.com/go-ego/proposals) before they can be accepted.
|
||||
|
||||
This process gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits inside the goals for the project and tools. It also checks that the design is sound before code is written; the code review tool is not the place for high-level discussions.
|
||||
|
||||
## Testing redux
|
||||
|
||||
Before sending code out for review, run all the tests for the whole tree to make sure the changes don't break other usage and keep the compatibility on upgrade. You must be test on Mac, Windows, Linux and other. You should install the CLI for Circle CI, as we are using the server for continous testing.
|
||||
|
||||
## Code review
|
||||
|
||||
In addition to the owner, Changes to Ego must be reviewed before they are accepted, no matter who makes the change even if it is a maintainer. We use GitHub's pull request workflow to do that and we also use [LGTM](http://lgtm.co) to ensure every PR is reviewed by vz or least 2 maintainers.
|
||||
|
||||
|
||||
## Sign your work
|
||||
|
||||
The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch.
|
||||
|
||||
## Maintainers
|
||||
|
||||
To make sure every PR is checked, we got team maintainers. A maintainer should be a contributor of Ego and contributed at least 4 accepted PRs.
|
||||
|
||||
## Owners
|
||||
|
||||
Since Ego is a pure community organization without any company support, Copyright 2016 The go-ego Project Developers.
|
||||
|
||||
|
||||
## Versions
|
||||
|
||||
Ego has the `master` branch as a tip branch and has version branches such as `v0.30.0`. `v0.40.0` is a release branch and we will tag `v0.40.0` for binary download. If `v0.40.0` has bugs, we will accept pull requests on the `v0.40.0` branch and publish a `v0.40.1` tag, after bringing the bug fix also to the master branch.
|
||||
|
||||
Since the `master` branch is a tip version, if you wish to use Ego in production, please download the latest release tag version. All the branches will be protected via GitHub, all the PRs to every branch must be reviewed by two maintainers and must pass the automatic tests.
|
||||
|
||||
## Copyright
|
||||
|
||||
Code that you contribute should use the standard copyright header:
|
||||
|
||||
```
|
||||
// Copyright 2018 The go-ego Project Developers.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"): you may
|
||||
// not use this file except in compliance with the License. You may obtain
|
||||
// a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing permissions and limitations
|
||||
// under the License.
|
||||
```
|
||||
|
||||
Files in the repository contain copyright from the year they are added to the year they are last changed. If the copyright author is changed, just paste the header below the old one.
|
201
vendor/github.com/vcaesar/tt/LICENSE
generated
vendored
Normal file
201
vendor/github.com/vcaesar/tt/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
68
vendor/github.com/vcaesar/tt/README.md
generated
vendored
Normal file
68
vendor/github.com/vcaesar/tt/README.md
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
# tt
|
||||
Simple and colorful test tools
|
||||
|
||||
[](https://circleci.com/gh/vcaesar/tt)
|
||||

|
||||
[](https://codecov.io/gh/vcaesar/tt)
|
||||
[](https://travis-ci.org/vcaesar/tt)
|
||||
[](https://goreportcard.com/report/github.com/vcaesar/tt)
|
||||
[](https://godoc.org/github.com/vcaesar/tt)
|
||||
[](https://github.com/vcaesar/tt/releases/latest)
|
||||
[](https://gitter.im/go-ego/ego?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
## Installation/Update
|
||||
|
||||
```
|
||||
go get -u github.com/vcaesar/tt
|
||||
```
|
||||
|
||||
## Usage:
|
||||
|
||||
#### [Look at an example](/example/)
|
||||
|
||||
```go
|
||||
package tt
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/vcaesar/tt"
|
||||
"github.com/vcaesar/tt/example"
|
||||
)
|
||||
|
||||
func TestAdd(t *testing.T) {
|
||||
fmt.Println(add.Add(1, 1))
|
||||
|
||||
tt.Expect(t, "1", add.Add(1, 1))
|
||||
tt.Expect(t, "2", add.Add(1, 1))
|
||||
|
||||
tt.Equal(t, 1, add.Add(1, 1))
|
||||
tt.Equal(t, 2, add.Add(1, 1))
|
||||
|
||||
at := tt.New(t)
|
||||
at.Expect("2", add.Add(1, 1))
|
||||
at.Equal(2, add.Add(1, 1))
|
||||
}
|
||||
|
||||
func Benchmark1(b *testing.B) {
|
||||
at := tt.New(b)
|
||||
fn := func() {
|
||||
at.Equal(2, add.Add(1, 1))
|
||||
}
|
||||
|
||||
tt.BM(b, fn)
|
||||
// at.BM(b, fn)
|
||||
}
|
||||
|
||||
func Benchmark2(b *testing.B) {
|
||||
at := tt.New(b)
|
||||
for i := 0; i < b.N; i++ {
|
||||
at.Equal(2, Add(1, 1))
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
## Thanks
|
||||
|
||||
[Testify](https://github.com/stretchr/testify), the code has some inspiration.
|
42
vendor/github.com/vcaesar/tt/appveyor.yml
generated
vendored
Normal file
42
vendor/github.com/vcaesar/tt/appveyor.yml
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
version: "{build}"
|
||||
image: 'Visual Studio 2017'
|
||||
# platform: x64
|
||||
|
||||
clone_folder: c:\gopath\src\github.com\vcaesar\tt
|
||||
# max_jobs: 1
|
||||
|
||||
environment:
|
||||
global:
|
||||
GOPATH: C:\gopath
|
||||
# CC: gcc.exe
|
||||
matrix:
|
||||
- GOARCH: amd64
|
||||
# - GOARCH: 386
|
||||
GOVERSION: 1.11.4
|
||||
# GOPATH: c:\gopath
|
||||
|
||||
install:
|
||||
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
|
||||
- git submodule update --init
|
||||
- rmdir C:\go /s /q
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-%GOARCH%.zip
|
||||
- 7z x go%GOVERSION%.windows-%GOARCH%.zip -y -oC:\ > NUL
|
||||
- go version
|
||||
- go env
|
||||
# - gcc --version
|
||||
|
||||
# To run your custom scripts instead of automatic MSBuild
|
||||
build_script:
|
||||
# We need to disable firewall - https://github.com/appveyor/ci/issues/1579#issuecomment-309830648
|
||||
- ps: Disable-NetFirewallRule -DisplayName 'File and Printer Sharing (SMB-Out)'
|
||||
- cd c:\gopath\src\github.com\vcaesar\tt
|
||||
- git branch
|
||||
- go get -t ./...
|
||||
|
||||
# To run your custom scripts instead of automatic tests
|
||||
test_script:
|
||||
# Unit tests
|
||||
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
|
||||
# - go test -u github.com/vcaesar/tt/...
|
||||
- go test -v github.com/vcaesar/tt/...
|
||||
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
|
123
vendor/github.com/vcaesar/tt/assert.go
generated
vendored
Normal file
123
vendor/github.com/vcaesar/tt/assert.go
generated
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
package tt
|
||||
|
||||
import "testing"
|
||||
|
||||
// Assertions provides assertion methods around the
|
||||
// TestingT interface.
|
||||
type Assertions struct {
|
||||
t TestingT
|
||||
}
|
||||
|
||||
// New makes a new Assertions object for the specified TestingT.
|
||||
func New(t TestingT) *Assertions {
|
||||
return &Assertions{
|
||||
t: t,
|
||||
}
|
||||
}
|
||||
|
||||
// BM func Benchmark1(b *testing.B, fn func())
|
||||
func (at *Assertions) BM(b *testing.B, fn func()) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
fn()
|
||||
}
|
||||
}
|
||||
|
||||
// Equal asserts that two objects are equal.
|
||||
func (at *Assertions) Equal(expect, actual interface{}, args ...int) bool {
|
||||
call := 5
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Equal(at.t, expect, actual, call)
|
||||
}
|
||||
|
||||
// Expect asserts that string and objects are equal.
|
||||
func (at *Assertions) Expect(expect string, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(at.t, expect, actual, call)
|
||||
}
|
||||
|
||||
// Nil asserts that nil and objects are equal.
|
||||
func (at *Assertions) Nil(actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(at.t, "<nil>", actual, call)
|
||||
}
|
||||
|
||||
// Empty asserts that empty and objects are equal.
|
||||
func (at *Assertions) Empty(actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(at.t, "", actual, call)
|
||||
}
|
||||
|
||||
// Bool asserts that true and objects are equal.
|
||||
func (at *Assertions) Bool(actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(at.t, "true", actual, call)
|
||||
}
|
||||
|
||||
// True asserts that true and objects are equal.
|
||||
func (at *Assertions) True(actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(at.t, "true", actual, call)
|
||||
}
|
||||
|
||||
// False asserts that flase and objects are equal.
|
||||
func (at *Assertions) False(actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(at.t, "false", actual, call)
|
||||
}
|
||||
|
||||
// Not asserts that two objects are not equal.
|
||||
func (at *Assertions) Not(expect, actual interface{}, args ...int) bool {
|
||||
call := 5
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Not(at.t, expect, actual, call)
|
||||
}
|
||||
|
||||
// NotEqual asserts that two objects are not equal.
|
||||
func (at *Assertions) NotEqual(expect, actual interface{}, args ...int) bool {
|
||||
call := 5
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return NotEqual(at.t, expect, actual, call)
|
||||
}
|
||||
|
||||
// NotExpect asserts that string and objects are not equal.
|
||||
func (at *Assertions) NotExpect(expect string, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return NotExpect(at.t, expect, actual, call)
|
||||
}
|
25
vendor/github.com/vcaesar/tt/circle.yml
generated
vendored
Normal file
25
vendor/github.com/vcaesar/tt/circle.yml
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# circle.yml #
|
||||
# machine:
|
||||
# go:
|
||||
# version: 1.9.1
|
||||
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: govgo/go:1.10.3
|
||||
working_directory: /gopath/src/github.com/vcaesar/tt
|
||||
steps:
|
||||
- checkout
|
||||
# specify any bash command here prefixed with `run: `
|
||||
# - run: go get -u github.com/shirou/gopsutil
|
||||
- run: go get -v -t -d ./...
|
||||
- run: go test -v ./...
|
||||
# codecov.io
|
||||
- run: go test -v -covermode=count -coverprofile=coverage.out
|
||||
- run: bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
# script:
|
||||
# - ./go.test.sh
|
||||
|
1
vendor/github.com/vcaesar/tt/go.mod
generated
vendored
Normal file
1
vendor/github.com/vcaesar/tt/go.mod
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module github.com/vcaesar/tt
|
287
vendor/github.com/vcaesar/tt/tt.go
generated
vendored
Normal file
287
vendor/github.com/vcaesar/tt/tt.go
generated
vendored
Normal file
@ -0,0 +1,287 @@
|
||||
// Copyright 2018 The go-ego Project Developers.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"): you may
|
||||
// not use this file except in compliance with the License. You may obtain
|
||||
// a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
// package tt is simple and colorful test tools
|
||||
|
||||
package tt
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
// TestingT is an interface wrapper around *testing.T
|
||||
type TestingT interface {
|
||||
Errorf(format string, args ...interface{})
|
||||
}
|
||||
|
||||
// Blue returns a blue string
|
||||
func Blue(message string) string {
|
||||
return fmt.Sprintf("\x1b[34m%s\x1b[0m", message)
|
||||
}
|
||||
|
||||
// Red returns a red string
|
||||
func Red(message string) string {
|
||||
return fmt.Sprintf("\x1b[31m%s\x1b[0m", message)
|
||||
}
|
||||
|
||||
// Yellow returns a yellow string
|
||||
func Yellow(message string) string {
|
||||
return fmt.Sprintf("\x1b[33m%s\x1b[0m", message)
|
||||
}
|
||||
|
||||
//Bold returns a blod string
|
||||
func Bold(message string) string {
|
||||
return fmt.Sprintf("\x1b[1m%s\x1b[21m", message)
|
||||
}
|
||||
|
||||
// RedBold returns a red bold string
|
||||
func RedBold(message string) string {
|
||||
return fmt.Sprintf("\x1b[31m%s\x1b[0m", Bold(message))
|
||||
}
|
||||
|
||||
func isTest(name, prefix string) bool {
|
||||
if !strings.HasPrefix(name, prefix) {
|
||||
return false
|
||||
}
|
||||
if len(name) == len(prefix) { // "Test" is ok
|
||||
return true
|
||||
}
|
||||
rune, _ := utf8.DecodeRuneInString(name[len(prefix):])
|
||||
return !unicode.IsLower(rune)
|
||||
}
|
||||
|
||||
// CallerInfo returns an array of strings containing the file and line number
|
||||
// of each stack frame leading from the current test to the assert call that
|
||||
// failed.
|
||||
func CallerInfo() []string {
|
||||
|
||||
pc := uintptr(0)
|
||||
file := ""
|
||||
line := 0
|
||||
ok := false
|
||||
name := ""
|
||||
|
||||
callers := []string{}
|
||||
for i := 0; ; i++ {
|
||||
pc, file, line, ok = runtime.Caller(i)
|
||||
if !ok {
|
||||
// The breaks below failed to terminate the loop, and we ran off the
|
||||
// end of the call stack.
|
||||
break
|
||||
}
|
||||
|
||||
// This is a huge edge case, but it will panic if this is the case, see #180
|
||||
if file == "<autogenerated>" {
|
||||
break
|
||||
}
|
||||
|
||||
f := runtime.FuncForPC(pc)
|
||||
if f == nil {
|
||||
break
|
||||
}
|
||||
name = f.Name()
|
||||
|
||||
// testing.tRunner is the standard library function that calls
|
||||
// tests. Subtests are called directly by tRunner, without going through
|
||||
// the Test/Benchmark/Example function that contains the t.Run calls, so
|
||||
// with subtests we should break when we hit tRunner, without adding it
|
||||
// to the list of callers.
|
||||
if name == "testing.tRunner" {
|
||||
break
|
||||
}
|
||||
|
||||
parts := strings.Split(file, "/")
|
||||
file = parts[len(parts)-1]
|
||||
if len(parts) > 1 {
|
||||
dir := parts[len(parts)-2]
|
||||
if (dir != "assert" && dir != "mock" && dir != "require") ||
|
||||
file == "mock_test.go" {
|
||||
callers = append(callers, fmt.Sprintf("%s:%d", file, line))
|
||||
}
|
||||
}
|
||||
|
||||
// Drop the package
|
||||
segments := strings.Split(name, ".")
|
||||
name = segments[len(segments)-1]
|
||||
if isTest(name, "Test") ||
|
||||
isTest(name, "Benchmark") ||
|
||||
isTest(name, "Example") {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return callers
|
||||
}
|
||||
|
||||
// BM func Benchmark1(b *testing.B, fn func())
|
||||
func BM(b *testing.B, fn func()) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
fn()
|
||||
}
|
||||
}
|
||||
|
||||
// FmtErr return error string
|
||||
func FmtErr(call int) string {
|
||||
err := RedBold("\n Error Trace: " + CallerInfo()[call] + ",")
|
||||
err += Yellow("\n Error: Not equal; \n ")
|
||||
err += Blue("expected: '%s',\n ") + Red("but got: '%s' \n\n")
|
||||
return err
|
||||
}
|
||||
|
||||
// Equal asserts that two objects are equal.
|
||||
//
|
||||
// tt.Equal(t *testing.T, 1, 1)
|
||||
//
|
||||
func Equal(t TestingT, expect, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
expectStr := fmt.Sprint(expect)
|
||||
return Expect(t, expectStr, actual, call)
|
||||
}
|
||||
|
||||
// Expect asserts that string and objects are equal.
|
||||
//
|
||||
// tt.Expect(t *testing.T, "1", 1)
|
||||
//
|
||||
func Expect(t TestingT, expect string, actual interface{}, args ...int) bool {
|
||||
call := 3
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
actualStr := fmt.Sprint(actual)
|
||||
if expect != actualStr {
|
||||
err := FmtErr(call)
|
||||
t.Errorf(err, expect, actualStr)
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// Nil asserts that nil and objects are equal.
|
||||
func Nil(t TestingT, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(t, "<nil>", actual, call)
|
||||
}
|
||||
|
||||
// Empty asserts that empty and objects are equal.
|
||||
func Empty(t TestingT, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(t, "", actual, call)
|
||||
}
|
||||
|
||||
// Bool asserts that true and objects are equal.
|
||||
func Bool(t TestingT, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(t, "true", actual, call)
|
||||
}
|
||||
|
||||
// True asserts that true and objects are equal.
|
||||
func True(t TestingT, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(t, "true", actual, call)
|
||||
}
|
||||
|
||||
// False asserts that flase and objects are equal.
|
||||
func False(t TestingT, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
return Expect(t, "false", actual, call)
|
||||
}
|
||||
|
||||
// NotErr return not equal error string
|
||||
func NotErr(call int) string {
|
||||
err := RedBold("\n Error Trace: " + CallerInfo()[call] + ",")
|
||||
err += Yellow("\n Error: Equal; \n ")
|
||||
err += Blue("not expected: '%s',\n ") + Red("but got: '%s' \n\n")
|
||||
return err
|
||||
}
|
||||
|
||||
// Not asserts that two objects are not equal.
|
||||
//
|
||||
// tt.NotEqual(t *testing.T, 1, 1)
|
||||
//
|
||||
func Not(t TestingT, expect, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
expectStr := fmt.Sprint(expect)
|
||||
return NotExpect(t, expectStr, actual, call)
|
||||
}
|
||||
|
||||
// NotEqual asserts that two objects are not equal.
|
||||
//
|
||||
// tt.NotEqual(t *testing.T, 1, 1)
|
||||
//
|
||||
func NotEqual(t TestingT, expect, actual interface{}, args ...int) bool {
|
||||
call := 4
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
expectStr := fmt.Sprint(expect)
|
||||
return NotExpect(t, expectStr, actual, call)
|
||||
}
|
||||
|
||||
// NotExpect asserts that string and objects are not equal.
|
||||
//
|
||||
// tt.NotExpect(t *testing.T, "1", 1)
|
||||
//
|
||||
func NotExpect(t TestingT, expect string, actual interface{}, args ...int) bool {
|
||||
call := 3
|
||||
if len(args) > 0 {
|
||||
call = args[0]
|
||||
}
|
||||
|
||||
actualStr := fmt.Sprint(actual)
|
||||
if expect == actualStr {
|
||||
err := NotErr(call)
|
||||
t.Errorf(err, expect, actualStr)
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
16
vendor/golang.org/x/sys/unix/README.md
generated
vendored
16
vendor/golang.org/x/sys/unix/README.md
generated
vendored
@ -32,7 +32,7 @@ To build the files for your current OS and architecture, make sure GOOS and
|
||||
GOARCH are set correctly and run `mkall.sh`. This will generate the files for
|
||||
your specific system. Running `mkall.sh -n` shows the commands that will be run.
|
||||
|
||||
Requirements: bash, perl, go
|
||||
Requirements: bash, go
|
||||
|
||||
### New Build System (currently for `GOOS == "linux"`)
|
||||
|
||||
@ -52,14 +52,14 @@ system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
|
||||
then generate all of the files for all of the GOOS/GOARCH pairs in the new build
|
||||
system. Running `mkall.sh -n` shows the commands that will be run.
|
||||
|
||||
Requirements: bash, perl, go, docker
|
||||
Requirements: bash, go, docker
|
||||
|
||||
## Component files
|
||||
|
||||
This section describes the various files used in the code generation process.
|
||||
It also contains instructions on how to modify these files to add a new
|
||||
architecture/OS or to add additional syscalls, types, or constants. Note that
|
||||
if you are using the new build system, the scripts cannot be called normally.
|
||||
if you are using the new build system, the scripts/programs cannot be called normally.
|
||||
They must be called from within the docker container.
|
||||
|
||||
### asm files
|
||||
@ -81,8 +81,8 @@ each GOOS/GOARCH pair.
|
||||
|
||||
### mksysnum
|
||||
|
||||
Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
|
||||
for the old system). This script takes in a list of header files containing the
|
||||
Mksysnum is a Go program located at `${GOOS}/mksysnum.go` (or `mksysnum_${GOOS}.go`
|
||||
for the old system). This program takes in a list of header files containing the
|
||||
syscall number declarations and parses them to produce the corresponding list of
|
||||
Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
|
||||
constants.
|
||||
@ -92,14 +92,14 @@ new installation of the target OS (or updating the source checkouts for the
|
||||
new build system). However, depending on the OS, you make need to update the
|
||||
parsing in mksysnum.
|
||||
|
||||
### mksyscall.pl
|
||||
### mksyscall.go
|
||||
|
||||
The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
|
||||
hand-written Go files which implement system calls (for unix, the specific OS,
|
||||
or the specific OS/Architecture pair respectively) that need special handling
|
||||
and list `//sys` comments giving prototypes for ones that can be generated.
|
||||
|
||||
The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
|
||||
The mksyscall.go program takes the `//sys` and `//sysnb` comments and converts
|
||||
them into syscalls. This requires the name of the prototype in the comment to
|
||||
match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
|
||||
prototype can be exported (capitalized) or not.
|
||||
@ -160,7 +160,7 @@ signal numbers, and constants. Generated by `mkerrors.sh` (see above).
|
||||
### `zsyscall_${GOOS}_${GOARCH}.go`
|
||||
|
||||
A file containing all the generated syscalls for a specific GOOS and GOARCH.
|
||||
Generated by `mksyscall.pl` (see above).
|
||||
Generated by `mksyscall.go` (see above).
|
||||
|
||||
### `zsysnum_${GOOS}_${GOARCH}.go`
|
||||
|
||||
|
29
vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
generated
vendored
Normal file
29
vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System call support for ARM64, NetBSD
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
B syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
B syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
B syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
B syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
B syscall·RawSyscall6(SB)
|
8
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
8
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
@ -67,7 +67,7 @@ aix_ppc)
|
||||
;;
|
||||
aix_ppc64)
|
||||
mkerrors="$mkerrors -maix64"
|
||||
mksyscall="./mksyscall_aix_ppc64.pl -aix"
|
||||
mksyscall="go run mksyscall_aix_ppc64.go -aix"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
darwin_386)
|
||||
@ -170,7 +170,7 @@ openbsd_arm)
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
solaris_amd64)
|
||||
mksyscall="./mksyscall_solaris.pl"
|
||||
mksyscall="go run mksyscall_solaris.go"
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum=
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
@ -207,8 +207,6 @@ esac
|
||||
esac
|
||||
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
|
||||
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
|
||||
if [ -n "$mktypes" ]; then
|
||||
echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
|
||||
if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; fi
|
||||
if [ -n "$mkasm" ]; then echo "$mkasm $GOARCH"; fi
|
||||
fi
|
||||
) | $run
|
||||
|
19
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
19
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@ -179,8 +179,10 @@ struct ltchars {
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/signalfd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_alg.h>
|
||||
#include <linux/if_arp.h>
|
||||
@ -190,6 +192,7 @@ struct ltchars {
|
||||
#include <linux/if_packet.h>
|
||||
#include <linux/if_addr.h>
|
||||
#include <linux/falloc.h>
|
||||
#include <linux/fanotify.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/kexec.h>
|
||||
@ -257,16 +260,6 @@ struct ltchars {
|
||||
#define FS_KEY_DESC_PREFIX "fscrypt:"
|
||||
#define FS_KEY_DESC_PREFIX_SIZE 8
|
||||
#define FS_MAX_KEY_SIZE 64
|
||||
|
||||
// XDP socket constants do not appear to be picked up otherwise.
|
||||
// Copied from samples/bpf/xdpsock_user.c.
|
||||
#ifndef SOL_XDP
|
||||
#define SOL_XDP 283
|
||||
#endif
|
||||
|
||||
#ifndef AF_XDP
|
||||
#define AF_XDP 44
|
||||
#endif
|
||||
'
|
||||
|
||||
includes_NetBSD='
|
||||
@ -453,7 +446,7 @@ ccflags="$@"
|
||||
$2 !~ "MNT_BITS" &&
|
||||
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
|
||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||
$2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
|
||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
|
||||
$2 ~ /^KEXEC_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
||||
@ -474,12 +467,13 @@ ccflags="$@"
|
||||
$2 ~ /^CLONE_[A-Z_]+/ ||
|
||||
$2 !~ /^(BPF_TIMEVAL)$/ &&
|
||||
$2 ~ /^(BPF|DLT)_/ ||
|
||||
$2 ~ /^CLOCK_/ ||
|
||||
$2 ~ /^(CLOCK|TIMER)_/ ||
|
||||
$2 ~ /^CAN_/ ||
|
||||
$2 ~ /^CAP_/ ||
|
||||
$2 ~ /^ALG_/ ||
|
||||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
|
||||
$2 ~ /^GRND_/ ||
|
||||
$2 ~ /^RND/ ||
|
||||
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
|
||||
$2 ~ /^KEYCTL_/ ||
|
||||
$2 ~ /^PERF_EVENT_IOC_/ ||
|
||||
@ -508,6 +502,7 @@ ccflags="$@"
|
||||
$2 !~ "WMESGLEN" &&
|
||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||
$2 ~/^PPPIOC/ ||
|
||||
$2 ~ /^FAN_|FANOTIFY_/ ||
|
||||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
||||
$2 ~ /^__WCOREFLAG$/ {next}
|
||||
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
|
||||
|
11
vendor/golang.org/x/sys/unix/mksyscall.go
generated
vendored
11
vendor/golang.org/x/sys/unix/mksyscall.go
generated
vendored
@ -88,6 +88,10 @@ func parseParam(p string) Param {
|
||||
func main() {
|
||||
// Get the OS and architecture (using GOARCH_TARGET if it exists)
|
||||
goos := os.Getenv("GOOS")
|
||||
if goos == "" {
|
||||
fmt.Fprintln(os.Stderr, "GOOS not defined in environment")
|
||||
os.Exit(1)
|
||||
}
|
||||
goarch := os.Getenv("GOARCH_TARGET")
|
||||
if goarch == "" {
|
||||
goarch = os.Getenv("GOARCH")
|
||||
@ -149,6 +153,11 @@ func main() {
|
||||
}
|
||||
funct, inps, outps, sysname := f[2], f[3], f[4], f[5]
|
||||
|
||||
// ClockGettime doesn't have a syscall number on Darwin, only generate libc wrappers.
|
||||
if goos == "darwin" && !libc && funct == "ClockGettime" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
@ -224,7 +233,7 @@ func main() {
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
}
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
} else if (p.Type == "int64" || p.Type == "uint64") && endianness != "" {
|
||||
if len(args)%2 == 1 && *arm {
|
||||
// arm abi specifies 64-bit argument uses
|
||||
// (even, odd) pair
|
||||
|
602
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go
generated
vendored
Normal file
602
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go
generated
vendored
Normal file
@ -0,0 +1,602 @@
|
||||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
This program reads a file containing function prototypes
|
||||
(like syscall_aix.go) and generates system call bodies.
|
||||
The prototypes are marked by lines beginning with "//sys"
|
||||
and read like func declarations if //sys is replaced by func, but:
|
||||
* The parameter lists must give a name for each argument.
|
||||
This includes return parameters.
|
||||
* The parameter lists must give a type for each argument:
|
||||
the (x, y, z int) shorthand is not allowed.
|
||||
* If the return parameter is an error number, it must be named err.
|
||||
* If go func name needs to be different than its libc name,
|
||||
* or the function is not in libc, name could be specified
|
||||
* at the end, after "=" sign, like
|
||||
//sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
|
||||
|
||||
This program will generate three files and handle both gc and gccgo implementation:
|
||||
- zsyscall_aix_ppc64.go: the common part of each implementation (error handler, pointer creation)
|
||||
- zsyscall_aix_ppc64_gc.go: gc part with //go_cgo_import_dynamic and a call to syscall6
|
||||
- zsyscall_aix_ppc64_gccgo.go: gccgo part with C function and conversion to C type.
|
||||
|
||||
The generated code looks like this
|
||||
|
||||
zsyscall_aix_ppc64.go
|
||||
func asyscall(...) (n int, err error) {
|
||||
// Pointer Creation
|
||||
r1, e1 := callasyscall(...)
|
||||
// Type Conversion
|
||||
// Error Handler
|
||||
return
|
||||
}
|
||||
|
||||
zsyscall_aix_ppc64_gc.go
|
||||
//go:cgo_import_dynamic libc_asyscall asyscall "libc.a/shr_64.o"
|
||||
//go:linkname libc_asyscall libc_asyscall
|
||||
var asyscall syscallFunc
|
||||
|
||||
func callasyscall(...) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_asyscall)), "nb_args", ... )
|
||||
return
|
||||
}
|
||||
|
||||
zsyscall_aix_ppc64_ggcgo.go
|
||||
|
||||
// int asyscall(...)
|
||||
|
||||
import "C"
|
||||
|
||||
func callasyscall(...) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.asyscall(...))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
b32 = flag.Bool("b32", false, "32bit big-endian")
|
||||
l32 = flag.Bool("l32", false, "32bit little-endian")
|
||||
aix = flag.Bool("aix", false, "aix")
|
||||
tags = flag.String("tags", "", "build tags")
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksyscall_aix_ppc64.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
|
||||
// Param is function parameter
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// usage prints the program usage
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: go run mksyscall_aix_ppc64.go [-b32 | -l32] [-tags x,y] [file ...]\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// parseParamList parses parameter list and returns a slice of parameters
|
||||
func parseParamList(list string) []string {
|
||||
list = strings.TrimSpace(list)
|
||||
if list == "" {
|
||||
return []string{}
|
||||
}
|
||||
return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
|
||||
}
|
||||
|
||||
// parseParam splits a parameter into name and type
|
||||
func parseParam(p string) Param {
|
||||
ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
|
||||
if ps == nil {
|
||||
fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
|
||||
os.Exit(1)
|
||||
}
|
||||
return Param{ps[1], ps[2]}
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
if len(flag.Args()) <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "no files to parse provided\n")
|
||||
usage()
|
||||
}
|
||||
|
||||
endianness := ""
|
||||
if *b32 {
|
||||
endianness = "big-endian"
|
||||
} else if *l32 {
|
||||
endianness = "little-endian"
|
||||
}
|
||||
|
||||
pack := ""
|
||||
// GCCGO
|
||||
textgccgo := ""
|
||||
cExtern := "/*\n#include <stdint.h>\n"
|
||||
// GC
|
||||
textgc := ""
|
||||
dynimports := ""
|
||||
linknames := ""
|
||||
var vars []string
|
||||
// COMMON
|
||||
textcommon := ""
|
||||
for _, path := range flag.Args() {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
s := bufio.NewScanner(file)
|
||||
for s.Scan() {
|
||||
t := s.Text()
|
||||
t = strings.TrimSpace(t)
|
||||
t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
|
||||
if p := regexp.MustCompile(`^package (\S+)$`).FindStringSubmatch(t); p != nil && pack == "" {
|
||||
pack = p[1]
|
||||
}
|
||||
nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
|
||||
if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Line must be of the form
|
||||
// func Open(path string, mode int, perm int) (fd int, err error)
|
||||
// Split into name, in params, out params.
|
||||
f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$`).FindStringSubmatch(t)
|
||||
if f == nil {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
|
||||
os.Exit(1)
|
||||
}
|
||||
funct, inps, outps, modname, sysname := f[2], f[3], f[4], f[5], f[6]
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
||||
inps = strings.Join(in, ", ")
|
||||
outps = strings.Join(out, ", ")
|
||||
|
||||
if sysname == "" {
|
||||
sysname = funct
|
||||
}
|
||||
|
||||
onlyCommon := false
|
||||
if funct == "readlen" || funct == "writelen" || funct == "FcntlInt" || funct == "FcntlFlock" {
|
||||
// This function call another syscall which is already implemented.
|
||||
// Therefore, the gc and gccgo part must not be generated.
|
||||
onlyCommon = true
|
||||
}
|
||||
|
||||
// Try in vain to keep people from editing this file.
|
||||
// The theory is that they jump into the middle of the file
|
||||
// without reading the header.
|
||||
|
||||
textcommon += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
if !onlyCommon {
|
||||
textgccgo += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
textgc += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
}
|
||||
|
||||
// Check if value return, err return available
|
||||
errvar := ""
|
||||
rettype := ""
|
||||
for _, param := range out {
|
||||
p := parseParam(param)
|
||||
if p.Type == "error" {
|
||||
errvar = p.Name
|
||||
} else {
|
||||
rettype = p.Type
|
||||
}
|
||||
}
|
||||
|
||||
sysname = regexp.MustCompile(`([a-z])([A-Z])`).ReplaceAllString(sysname, `${1}_$2`)
|
||||
sysname = strings.ToLower(sysname) // All libc functions are lowercase.
|
||||
|
||||
// GCCGO Prototype return type
|
||||
cRettype := ""
|
||||
if rettype == "unsafe.Pointer" {
|
||||
cRettype = "uintptr_t"
|
||||
} else if rettype == "uintptr" {
|
||||
cRettype = "uintptr_t"
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(rettype) != nil {
|
||||
cRettype = "uintptr_t"
|
||||
} else if rettype == "int" {
|
||||
cRettype = "int"
|
||||
} else if rettype == "int32" {
|
||||
cRettype = "int"
|
||||
} else if rettype == "int64" {
|
||||
cRettype = "long long"
|
||||
} else if rettype == "uint32" {
|
||||
cRettype = "unsigned int"
|
||||
} else if rettype == "uint64" {
|
||||
cRettype = "unsigned long long"
|
||||
} else {
|
||||
cRettype = "int"
|
||||
}
|
||||
if sysname == "exit" {
|
||||
cRettype = "void"
|
||||
}
|
||||
|
||||
// GCCGO Prototype arguments type
|
||||
var cIn []string
|
||||
for i, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "string" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t", "size_t")
|
||||
} else if p.Type == "unsafe.Pointer" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "uintptr" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "int" {
|
||||
if (i == 0 || i == 2) && funct == "fcntl" {
|
||||
// These fcntl arguments needs to be uintptr to be able to call FcntlInt and FcntlFlock
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else {
|
||||
cIn = append(cIn, "int")
|
||||
}
|
||||
|
||||
} else if p.Type == "int32" {
|
||||
cIn = append(cIn, "int")
|
||||
} else if p.Type == "int64" {
|
||||
cIn = append(cIn, "long long")
|
||||
} else if p.Type == "uint32" {
|
||||
cIn = append(cIn, "unsigned int")
|
||||
} else if p.Type == "uint64" {
|
||||
cIn = append(cIn, "unsigned long long")
|
||||
} else {
|
||||
cIn = append(cIn, "int")
|
||||
}
|
||||
}
|
||||
|
||||
if !onlyCommon {
|
||||
// GCCGO Prototype Generation
|
||||
// Imports of system calls from libc
|
||||
cExtern += fmt.Sprintf("%s %s", cRettype, sysname)
|
||||
cIn := strings.Join(cIn, ", ")
|
||||
cExtern += fmt.Sprintf("(%s);\n", cIn)
|
||||
}
|
||||
// GC Library name
|
||||
if modname == "" {
|
||||
modname = "libc.a/shr_64.o"
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: only syscall using libc are available\n", funct)
|
||||
os.Exit(1)
|
||||
}
|
||||
sysvarname := fmt.Sprintf("libc_%s", sysname)
|
||||
|
||||
if !onlyCommon {
|
||||
// GC Runtime import of function to allow cross-platform builds.
|
||||
dynimports += fmt.Sprintf("//go:cgo_import_dynamic %s %s \"%s\"\n", sysvarname, sysname, modname)
|
||||
// GC Link symbol to proc address variable.
|
||||
linknames += fmt.Sprintf("//go:linkname %s %s\n", sysvarname, sysvarname)
|
||||
// GC Library proc address variable.
|
||||
vars = append(vars, sysvarname)
|
||||
}
|
||||
|
||||
strconvfunc := "BytePtrFromString"
|
||||
strconvtype := "*byte"
|
||||
|
||||
// Go function header.
|
||||
if outps != "" {
|
||||
outps = fmt.Sprintf(" (%s)", outps)
|
||||
}
|
||||
if textcommon != "" {
|
||||
textcommon += "\n"
|
||||
}
|
||||
|
||||
textcommon += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outps)
|
||||
|
||||
// Prepare arguments tocall.
|
||||
var argscommon []string // Arguments in the common part
|
||||
var argscall []string // Arguments for call prototype
|
||||
var argsgc []string // Arguments for gc call (with syscall6)
|
||||
var argsgccgo []string // Arguments for gccgo call (with C.name_of_syscall)
|
||||
n := 0
|
||||
argN := 0
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(%s))", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else if p.Type == "string" && errvar != "" {
|
||||
textcommon += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
textcommon += fmt.Sprintf("\t_p%d, %s = %s(%s)\n", n, errvar, strconvfunc, p.Name)
|
||||
textcommon += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
argscall = append(argscall, fmt.Sprintf("_p%d uintptr ", n))
|
||||
argsgc = append(argsgc, fmt.Sprintf("_p%d", n))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(_p%d)", n))
|
||||
n++
|
||||
} else if p.Type == "string" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
|
||||
textcommon += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
textcommon += fmt.Sprintf("\t_p%d, %s = %s(%s)\n", n, errvar, strconvfunc, p.Name)
|
||||
textcommon += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
argscall = append(argscall, fmt.Sprintf("_p%d uintptr", n))
|
||||
argsgc = append(argsgc, fmt.Sprintf("_p%d", n))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(_p%d)", n))
|
||||
n++
|
||||
} else if m := regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type); m != nil {
|
||||
// Convert slice into pointer, length.
|
||||
// Have to be careful not to take address of &a[0] if len == 0:
|
||||
// pass nil in that case.
|
||||
textcommon += fmt.Sprintf("\tvar _p%d *%s\n", n, m[1])
|
||||
textcommon += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = &%s[0]\n\t}\n", p.Name, n, p.Name)
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n), fmt.Sprintf("len(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("_p%d uintptr", n), fmt.Sprintf("_lenp%d int", n))
|
||||
argsgc = append(argsgc, fmt.Sprintf("_p%d", n), fmt.Sprintf("uintptr(_lenp%d)", n))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(_p%d)", n), fmt.Sprintf("C.size_t(_lenp%d)", n))
|
||||
n++
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses int64 with 32 bits mode. Case not yet implemented\n")
|
||||
} else if p.Type == "bool" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses bool. Case not yet implemented\n")
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil || p.Type == "unsafe.Pointer" {
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else if p.Type == "int" {
|
||||
if (argN == 0 || argN == 2) && ((funct == "fcntl") || (funct == "FcntlInt") || (funct == "FcntlFlock")) {
|
||||
// These fcntl arguments need to be uintptr to be able to call FcntlInt and FcntlFlock
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
|
||||
} else {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s int", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
}
|
||||
} else if p.Type == "int32" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s int32", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
} else if p.Type == "int64" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s int64", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.longlong(%s)", p.Name))
|
||||
} else if p.Type == "uint32" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s uint32", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uint(%s)", p.Name))
|
||||
} else if p.Type == "uint64" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s uint64", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.ulonglong(%s)", p.Name))
|
||||
} else if p.Type == "uintptr" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else {
|
||||
argscommon = append(argscommon, fmt.Sprintf("int(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s int", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
}
|
||||
argN++
|
||||
}
|
||||
nargs := len(argsgc)
|
||||
|
||||
// COMMON function generation
|
||||
argscommonlist := strings.Join(argscommon, ", ")
|
||||
callcommon := fmt.Sprintf("call%s(%s)", sysname, argscommonlist)
|
||||
ret := []string{"_", "_"}
|
||||
body := ""
|
||||
doErrno := false
|
||||
for i := 0; i < len(out); i++ {
|
||||
p := parseParam(out[i])
|
||||
reg := ""
|
||||
if p.Name == "err" {
|
||||
reg = "e1"
|
||||
ret[1] = reg
|
||||
doErrno = true
|
||||
} else {
|
||||
reg = "r0"
|
||||
ret[0] = reg
|
||||
}
|
||||
if p.Type == "bool" {
|
||||
reg = fmt.Sprintf("%s != 0", reg)
|
||||
}
|
||||
if reg != "e1" {
|
||||
body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
|
||||
}
|
||||
}
|
||||
if ret[0] == "_" && ret[1] == "_" {
|
||||
textcommon += fmt.Sprintf("\t%s\n", callcommon)
|
||||
} else {
|
||||
textcommon += fmt.Sprintf("\t%s, %s := %s\n", ret[0], ret[1], callcommon)
|
||||
}
|
||||
textcommon += body
|
||||
|
||||
if doErrno {
|
||||
textcommon += "\tif e1 != 0 {\n"
|
||||
textcommon += "\t\terr = errnoErr(e1)\n"
|
||||
textcommon += "\t}\n"
|
||||
}
|
||||
textcommon += "\treturn\n"
|
||||
textcommon += "}\n"
|
||||
|
||||
if onlyCommon {
|
||||
continue
|
||||
}
|
||||
|
||||
// CALL Prototype
|
||||
callProto := fmt.Sprintf("func call%s(%s) (r1 uintptr, e1 Errno) {\n", sysname, strings.Join(argscall, ", "))
|
||||
|
||||
// GC function generation
|
||||
asm := "syscall6"
|
||||
if nonblock != nil {
|
||||
asm = "rawSyscall6"
|
||||
}
|
||||
|
||||
if len(argsgc) <= 6 {
|
||||
for len(argsgc) < 6 {
|
||||
argsgc = append(argsgc, "0")
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: too many arguments to system call", funct)
|
||||
os.Exit(1)
|
||||
}
|
||||
argsgclist := strings.Join(argsgc, ", ")
|
||||
callgc := fmt.Sprintf("%s(uintptr(unsafe.Pointer(&%s)), %d, %s)", asm, sysvarname, nargs, argsgclist)
|
||||
|
||||
textgc += callProto
|
||||
textgc += fmt.Sprintf("\tr1, _, e1 = %s\n", callgc)
|
||||
textgc += "\treturn\n}\n"
|
||||
|
||||
// GCCGO function generation
|
||||
argsgccgolist := strings.Join(argsgccgo, ", ")
|
||||
callgccgo := fmt.Sprintf("C.%s(%s)", sysname, argsgccgolist)
|
||||
textgccgo += callProto
|
||||
textgccgo += fmt.Sprintf("\tr1 = uintptr(%s)\n", callgccgo)
|
||||
textgccgo += "\te1 = syscall.GetErrno()\n"
|
||||
textgccgo += "\treturn\n}\n"
|
||||
}
|
||||
if err := s.Err(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
imp := ""
|
||||
if pack != "unix" {
|
||||
imp = "import \"golang.org/x/sys/unix\"\n"
|
||||
|
||||
}
|
||||
|
||||
// Print zsyscall_aix_ppc64.go
|
||||
err := ioutil.WriteFile("zsyscall_aix_ppc64.go",
|
||||
[]byte(fmt.Sprintf(srcTemplate1, cmdLine(), buildTags(), pack, imp, textcommon)),
|
||||
0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Print zsyscall_aix_ppc64_gc.go
|
||||
vardecls := "\t" + strings.Join(vars, ",\n\t")
|
||||
vardecls += " syscallFunc"
|
||||
err = ioutil.WriteFile("zsyscall_aix_ppc64_gc.go",
|
||||
[]byte(fmt.Sprintf(srcTemplate2, cmdLine(), buildTags(), pack, imp, dynimports, linknames, vardecls, textgc)),
|
||||
0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Print zsyscall_aix_ppc64_gccgo.go
|
||||
err = ioutil.WriteFile("zsyscall_aix_ppc64_gccgo.go",
|
||||
[]byte(fmt.Sprintf(srcTemplate3, cmdLine(), buildTags(), pack, cExtern, imp, textgccgo)),
|
||||
0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
const srcTemplate1 = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package %s
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
||||
%s
|
||||
|
||||
%s
|
||||
`
|
||||
const srcTemplate2 = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
// +build !gccgo
|
||||
|
||||
package %s
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
type syscallFunc uintptr
|
||||
|
||||
var (
|
||||
%s
|
||||
)
|
||||
|
||||
// Implemented in runtime/syscall_aix.go.
|
||||
func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
|
||||
%s
|
||||
`
|
||||
const srcTemplate3 = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
// +build gccgo
|
||||
|
||||
package %s
|
||||
|
||||
%s
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
||||
%s
|
||||
|
||||
%s
|
||||
`
|
579
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.pl
generated
vendored
579
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.pl
generated
vendored
@ -1,579 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2018 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.
|
||||
|
||||
# This program reads a file containing function prototypes
|
||||
# (like syscall_aix.go) and generates system call bodies.
|
||||
# The prototypes are marked by lines beginning with "//sys"
|
||||
# and read like func declarations if //sys is replaced by func, but:
|
||||
# * The parameter lists must give a name for each argument.
|
||||
# This includes return parameters.
|
||||
# * The parameter lists must give a type for each argument:
|
||||
# the (x, y, z int) shorthand is not allowed.
|
||||
# * If the return parameter is an error number, it must be named err.
|
||||
# * If go func name needs to be different than its libc name,
|
||||
# * or the function is not in libc, name could be specified
|
||||
# * at the end, after "=" sign, like
|
||||
# //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
|
||||
# This program will generate three files and handle both gc and gccgo implementation:
|
||||
# - zsyscall_aix_ppc64.go: the common part of each implementation (error handler, pointer creation)
|
||||
# - zsyscall_aix_ppc64_gc.go: gc part with //go_cgo_import_dynamic and a call to syscall6
|
||||
# - zsyscall_aix_ppc64_gccgo.go: gccgo part with C function and conversion to C type.
|
||||
|
||||
# The generated code looks like this
|
||||
#
|
||||
# zsyscall_aix_ppc64.go
|
||||
# func asyscall(...) (n int, err error) {
|
||||
# // Pointer Creation
|
||||
# r1, e1 := callasyscall(...)
|
||||
# // Type Conversion
|
||||
# // Error Handler
|
||||
# return
|
||||
# }
|
||||
#
|
||||
# zsyscall_aix_ppc64_gc.go
|
||||
# //go:cgo_import_dynamic libc_asyscall asyscall "libc.a/shr_64.o"
|
||||
# //go:linkname libc_asyscall libc_asyscall
|
||||
# var asyscall syscallFunc
|
||||
#
|
||||
# func callasyscall(...) (r1 uintptr, e1 Errno) {
|
||||
# r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_asyscall)), "nb_args", ... )
|
||||
# return
|
||||
# }
|
||||
#
|
||||
# zsyscall_aix_ppc64_ggcgo.go
|
||||
# /*
|
||||
# int asyscall(...)
|
||||
#
|
||||
# */
|
||||
# import "C"
|
||||
#
|
||||
# func callasyscall(...) (r1 uintptr, e1 Errno) {
|
||||
# r1 = uintptr(C.asyscall(...))
|
||||
# e1 = syscall.GetErrno()
|
||||
# return
|
||||
# }
|
||||
|
||||
|
||||
|
||||
use strict;
|
||||
|
||||
my $cmdline = "mksyscall_aix_ppc64.pl " . join(' ', @ARGV);
|
||||
my $errors = 0;
|
||||
my $_32bit = "";
|
||||
my $tags = ""; # build tags
|
||||
my $aix = 0;
|
||||
my $solaris = 0;
|
||||
|
||||
binmode STDOUT;
|
||||
|
||||
if($ARGV[0] eq "-b32") {
|
||||
$_32bit = "big-endian";
|
||||
shift;
|
||||
} elsif($ARGV[0] eq "-l32") {
|
||||
$_32bit = "little-endian";
|
||||
shift;
|
||||
}
|
||||
if($ARGV[0] eq "-aix") {
|
||||
$aix = 1;
|
||||
shift;
|
||||
}
|
||||
if($ARGV[0] eq "-tags") {
|
||||
shift;
|
||||
$tags = $ARGV[0];
|
||||
shift;
|
||||
}
|
||||
|
||||
if($ARGV[0] =~ /^-/) {
|
||||
print STDERR "usage: mksyscall_aix.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
sub parseparamlist($) {
|
||||
my ($list) = @_;
|
||||
$list =~ s/^\s*//;
|
||||
$list =~ s/\s*$//;
|
||||
if($list eq "") {
|
||||
return ();
|
||||
}
|
||||
return split(/\s*,\s*/, $list);
|
||||
}
|
||||
|
||||
sub parseparam($) {
|
||||
my ($p) = @_;
|
||||
if($p !~ /^(\S*) (\S*)$/) {
|
||||
print STDERR "$ARGV:$.: malformed parameter: $p\n";
|
||||
$errors = 1;
|
||||
return ("xx", "int");
|
||||
}
|
||||
return ($1, $2);
|
||||
}
|
||||
|
||||
my $package = "";
|
||||
# GCCGO
|
||||
my $textgccgo = "";
|
||||
my $c_extern = "/*\n#include <stdint.h>\n";
|
||||
# GC
|
||||
my $textgc = "";
|
||||
my $dynimports = "";
|
||||
my $linknames = "";
|
||||
my @vars = ();
|
||||
# COMMUN
|
||||
my $textcommon = "";
|
||||
|
||||
while(<>) {
|
||||
chomp;
|
||||
s/\s+/ /g;
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
$package = $1 if !$package && /^package (\S+)$/;
|
||||
my $nonblock = /^\/\/sysnb /;
|
||||
next if !/^\/\/sys / && !$nonblock;
|
||||
|
||||
# Line must be of the form
|
||||
# func Open(path string, mode int, perm int) (fd int, err error)
|
||||
# Split into name, in params, out params.
|
||||
if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
|
||||
print STDERR "$ARGV:$.: malformed //sys declaration\n";
|
||||
$errors = 1;
|
||||
next;
|
||||
}
|
||||
my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
|
||||
|
||||
# Split argument lists on comma.
|
||||
my @in = parseparamlist($in);
|
||||
my @out = parseparamlist($out);
|
||||
|
||||
$in = join(', ', @in);
|
||||
$out = join(', ', @out);
|
||||
|
||||
if($sysname eq "") {
|
||||
$sysname = "$func";
|
||||
}
|
||||
|
||||
my $onlyCommon = 0;
|
||||
if ($func eq "readlen" || $func eq "writelen" || $func eq "FcntlInt" || $func eq "FcntlFlock") {
|
||||
# This function call another syscall which is already implemented.
|
||||
# Therefore, the gc and gccgo part must not be generated.
|
||||
$onlyCommon = 1
|
||||
}
|
||||
|
||||
# Try in vain to keep people from editing this file.
|
||||
# The theory is that they jump into the middle of the file
|
||||
# without reading the header.
|
||||
|
||||
$textcommon .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
|
||||
if (!$onlyCommon) {
|
||||
$textgccgo .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
|
||||
$textgc .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
|
||||
}
|
||||
|
||||
|
||||
# Check if value return, err return available
|
||||
my $errvar = "";
|
||||
my $retvar = "";
|
||||
my $rettype = "";
|
||||
foreach my $p (@out) {
|
||||
my ($name, $type) = parseparam($p);
|
||||
if($type eq "error") {
|
||||
$errvar = $name;
|
||||
} else {
|
||||
$retvar = $name;
|
||||
$rettype = $type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sysname =~ s/([a-z])([A-Z])/${1}_$2/g;
|
||||
$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
|
||||
|
||||
# GCCGO Prototype return type
|
||||
my $C_rettype = "";
|
||||
if($rettype eq "unsafe.Pointer") {
|
||||
$C_rettype = "uintptr_t";
|
||||
} elsif($rettype eq "uintptr") {
|
||||
$C_rettype = "uintptr_t";
|
||||
} elsif($rettype =~ /^_/) {
|
||||
$C_rettype = "uintptr_t";
|
||||
} elsif($rettype eq "int") {
|
||||
$C_rettype = "int";
|
||||
} elsif($rettype eq "int32") {
|
||||
$C_rettype = "int";
|
||||
} elsif($rettype eq "int64") {
|
||||
$C_rettype = "long long";
|
||||
} elsif($rettype eq "uint32") {
|
||||
$C_rettype = "unsigned int";
|
||||
} elsif($rettype eq "uint64") {
|
||||
$C_rettype = "unsigned long long";
|
||||
} else {
|
||||
$C_rettype = "int";
|
||||
}
|
||||
if($sysname eq "exit") {
|
||||
$C_rettype = "void";
|
||||
}
|
||||
|
||||
# GCCGO Prototype arguments type
|
||||
my @c_in = ();
|
||||
foreach my $i (0 .. $#in) {
|
||||
my ($name, $type) = parseparam($in[$i]);
|
||||
if($type =~ /^\*/) {
|
||||
push @c_in, "uintptr_t";
|
||||
} elsif($type eq "string") {
|
||||
push @c_in, "uintptr_t";
|
||||
} elsif($type =~ /^\[\](.*)/) {
|
||||
push @c_in, "uintptr_t", "size_t";
|
||||
} elsif($type eq "unsafe.Pointer") {
|
||||
push @c_in, "uintptr_t";
|
||||
} elsif($type eq "uintptr") {
|
||||
push @c_in, "uintptr_t";
|
||||
} elsif($type =~ /^_/) {
|
||||
push @c_in, "uintptr_t";
|
||||
} elsif($type eq "int") {
|
||||
if (($i == 0 || $i == 2) && $func eq "fcntl"){
|
||||
# These fcntl arguments needs to be uintptr to be able to call FcntlInt and FcntlFlock
|
||||
push @c_in, "uintptr_t";
|
||||
} else {
|
||||
push @c_in, "int";
|
||||
}
|
||||
} elsif($type eq "int32") {
|
||||
push @c_in, "int";
|
||||
} elsif($type eq "int64") {
|
||||
push @c_in, "long long";
|
||||
} elsif($type eq "uint32") {
|
||||
push @c_in, "unsigned int";
|
||||
} elsif($type eq "uint64") {
|
||||
push @c_in, "unsigned long long";
|
||||
} else {
|
||||
push @c_in, "int";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$onlyCommon){
|
||||
# GCCGO Prototype Generation
|
||||
# Imports of system calls from libc
|
||||
$c_extern .= "$C_rettype $sysname";
|
||||
my $c_in = join(', ', @c_in);
|
||||
$c_extern .= "($c_in);\n";
|
||||
}
|
||||
|
||||
# GC Library name
|
||||
if($modname eq "") {
|
||||
$modname = "libc.a/shr_64.o";
|
||||
} else {
|
||||
print STDERR "$func: only syscall using libc are available\n";
|
||||
$errors = 1;
|
||||
next;
|
||||
}
|
||||
my $sysvarname = "libc_${sysname}";
|
||||
|
||||
if (!$onlyCommon){
|
||||
# GC Runtime import of function to allow cross-platform builds.
|
||||
$dynimports .= "//go:cgo_import_dynamic ${sysvarname} ${sysname} \"$modname\"\n";
|
||||
# GC Link symbol to proc address variable.
|
||||
$linknames .= "//go:linkname ${sysvarname} ${sysvarname}\n";
|
||||
# GC Library proc address variable.
|
||||
push @vars, $sysvarname;
|
||||
}
|
||||
|
||||
my $strconvfunc ="BytePtrFromString";
|
||||
my $strconvtype = "*byte";
|
||||
|
||||
# Go function header.
|
||||
if($out ne "") {
|
||||
$out = " ($out)";
|
||||
}
|
||||
if($textcommon ne "") {
|
||||
$textcommon .= "\n"
|
||||
}
|
||||
|
||||
$textcommon .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out ;
|
||||
|
||||
# Prepare arguments to call.
|
||||
my @argscommun = (); # Arguments in the commun part
|
||||
my @argscall = (); # Arguments for call prototype
|
||||
my @argsgc = (); # Arguments for gc call (with syscall6)
|
||||
my @argsgccgo = (); # Arguments for gccgo call (with C.name_of_syscall)
|
||||
my $n = 0;
|
||||
my $arg_n = 0;
|
||||
foreach my $p (@in) {
|
||||
my ($name, $type) = parseparam($p);
|
||||
if($type =~ /^\*/) {
|
||||
push @argscommun, "uintptr(unsafe.Pointer($name))";
|
||||
push @argscall, "$name uintptr";
|
||||
push @argsgc, "$name";
|
||||
push @argsgccgo, "C.uintptr_t($name)";
|
||||
} elsif($type eq "string" && $errvar ne "") {
|
||||
$textcommon .= "\tvar _p$n $strconvtype\n";
|
||||
$textcommon .= "\t_p$n, $errvar = $strconvfunc($name)\n";
|
||||
$textcommon .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
|
||||
|
||||
push @argscommun, "uintptr(unsafe.Pointer(_p$n))";
|
||||
push @argscall, "_p$n uintptr ";
|
||||
push @argsgc, "_p$n";
|
||||
push @argsgccgo, "C.uintptr_t(_p$n)";
|
||||
$n++;
|
||||
} elsif($type eq "string") {
|
||||
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
|
||||
$textcommon .= "\tvar _p$n $strconvtype\n";
|
||||
$textcommon .= "\t_p$n, $errvar = $strconvfunc($name)\n";
|
||||
$textcommon .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
|
||||
|
||||
push @argscommun, "uintptr(unsafe.Pointer(_p$n))";
|
||||
push @argscall, "_p$n uintptr";
|
||||
push @argsgc, "_p$n";
|
||||
push @argsgccgo, "C.uintptr_t(_p$n)";
|
||||
$n++;
|
||||
} elsif($type =~ /^\[\](.*)/) {
|
||||
# Convert slice into pointer, length.
|
||||
# Have to be careful not to take address of &a[0] if len == 0:
|
||||
# pass nil in that case.
|
||||
$textcommon .= "\tvar _p$n *$1\n";
|
||||
$textcommon .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
|
||||
push @argscommun, "uintptr(unsafe.Pointer(_p$n))", "len($name)";
|
||||
push @argscall, "_p$n uintptr", "_lenp$n int";
|
||||
push @argsgc, "_p$n", "uintptr(_lenp$n)";
|
||||
push @argsgccgo, "C.uintptr_t(_p$n)", "C.size_t(_lenp$n)";
|
||||
$n++;
|
||||
} elsif($type eq "int64" && $_32bit ne "") {
|
||||
print STDERR "$ARGV:$.: $func uses int64 with 32 bits mode. Case not yet implemented\n";
|
||||
# if($_32bit eq "big-endian") {
|
||||
# push @args, "uintptr($name >> 32)", "uintptr($name)";
|
||||
# } else {
|
||||
# push @args, "uintptr($name)", "uintptr($name >> 32)";
|
||||
# }
|
||||
# $n++;
|
||||
} elsif($type eq "bool") {
|
||||
print STDERR "$ARGV:$.: $func uses bool. Case not yet implemented\n";
|
||||
# $text .= "\tvar _p$n uint32\n";
|
||||
# $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
|
||||
# push @args, "_p$n";
|
||||
# $n++;
|
||||
} elsif($type =~ /^_/ ||$type eq "unsafe.Pointer") {
|
||||
push @argscommun, "uintptr($name)";
|
||||
push @argscall, "$name uintptr";
|
||||
push @argsgc, "$name";
|
||||
push @argsgccgo, "C.uintptr_t($name)";
|
||||
} elsif($type eq "int") {
|
||||
if (($arg_n == 0 || $arg_n == 2) && ($func eq "fcntl" || $func eq "FcntlInt" || $func eq "FcntlFlock")) {
|
||||
# These fcntl arguments need to be uintptr to be able to call FcntlInt and FcntlFlock
|
||||
push @argscommun, "uintptr($name)";
|
||||
push @argscall, "$name uintptr";
|
||||
push @argsgc, "$name";
|
||||
push @argsgccgo, "C.uintptr_t($name)";
|
||||
} else {
|
||||
push @argscommun, "$name";
|
||||
push @argscall, "$name int";
|
||||
push @argsgc, "uintptr($name)";
|
||||
push @argsgccgo, "C.int($name)";
|
||||
}
|
||||
} elsif($type eq "int32") {
|
||||
push @argscommun, "$name";
|
||||
push @argscall, "$name int32";
|
||||
push @argsgc, "uintptr($name)";
|
||||
push @argsgccgo, "C.int($name)";
|
||||
} elsif($type eq "int64") {
|
||||
push @argscommun, "$name";
|
||||
push @argscall, "$name int64";
|
||||
push @argsgc, "uintptr($name)";
|
||||
push @argsgccgo, "C.longlong($name)";
|
||||
} elsif($type eq "uint32") {
|
||||
push @argscommun, "$name";
|
||||
push @argscall, "$name uint32";
|
||||
push @argsgc, "uintptr($name)";
|
||||
push @argsgccgo, "C.uint($name)";
|
||||
} elsif($type eq "uint64") {
|
||||
push @argscommun, "$name";
|
||||
push @argscall, "$name uint64";
|
||||
push @argsgc, "uintptr($name)";
|
||||
push @argsgccgo, "C.ulonglong($name)";
|
||||
} elsif($type eq "uintptr") {
|
||||
push @argscommun, "$name";
|
||||
push @argscall, "$name uintptr";
|
||||
push @argsgc, "$name";
|
||||
push @argsgccgo, "C.uintptr_t($name)";
|
||||
} else {
|
||||
push @argscommun, "int($name)";
|
||||
push @argscall, "$name int";
|
||||
push @argsgc, "uintptr($name)";
|
||||
push @argsgccgo, "C.int($name)";
|
||||
}
|
||||
$arg_n++;
|
||||
}
|
||||
my $nargs = @argsgc;
|
||||
|
||||
# COMMUN function generation
|
||||
my $argscommun = join(', ', @argscommun);
|
||||
my $callcommun = "call$sysname($argscommun)";
|
||||
my @ret = ("_", "_");
|
||||
my $body = "";
|
||||
my $do_errno = 0;
|
||||
for(my $i=0; $i<@out; $i++) {
|
||||
my $p = $out[$i];
|
||||
my ($name, $type) = parseparam($p);
|
||||
my $reg = "";
|
||||
if($name eq "err") {
|
||||
$reg = "e1";
|
||||
$ret[1] = $reg;
|
||||
$do_errno = 1;
|
||||
} else {
|
||||
$reg = "r0";
|
||||
$ret[0] = $reg;
|
||||
}
|
||||
if($type eq "bool") {
|
||||
$reg = "$reg != 0";
|
||||
}
|
||||
if($reg ne "e1") {
|
||||
$body .= "\t$name = $type($reg)\n";
|
||||
}
|
||||
}
|
||||
if ($ret[0] eq "_" && $ret[1] eq "_") {
|
||||
$textcommon .= "\t$callcommun\n";
|
||||
} else {
|
||||
$textcommon .= "\t$ret[0], $ret[1] := $callcommun\n";
|
||||
}
|
||||
$textcommon .= $body;
|
||||
|
||||
if ($do_errno) {
|
||||
$textcommon .= "\tif e1 != 0 {\n";
|
||||
$textcommon .= "\t\terr = errnoErr(e1)\n";
|
||||
$textcommon .= "\t}\n";
|
||||
}
|
||||
$textcommon .= "\treturn\n";
|
||||
$textcommon .= "}\n";
|
||||
|
||||
if ($onlyCommon){
|
||||
next
|
||||
}
|
||||
# CALL Prototype
|
||||
my $callProto = sprintf "func call%s(%s) (r1 uintptr, e1 Errno) {\n", $sysname, join(', ', @argscall);
|
||||
|
||||
# GC function generation
|
||||
my $asm = "syscall6";
|
||||
if ($nonblock) {
|
||||
$asm = "rawSyscall6";
|
||||
}
|
||||
|
||||
if(@argsgc <= 6) {
|
||||
while(@argsgc < 6) {
|
||||
push @argsgc, "0";
|
||||
}
|
||||
} else {
|
||||
print STDERR "$ARGV:$.: too many arguments to system call\n";
|
||||
}
|
||||
my $argsgc = join(', ', @argsgc);
|
||||
my $callgc = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $argsgc)";
|
||||
|
||||
$textgc .= $callProto;
|
||||
$textgc .= "\tr1, _, e1 = $callgc\n";
|
||||
$textgc .= "\treturn\n}\n";
|
||||
|
||||
# GCCGO function generation
|
||||
my $argsgccgo = join(', ', @argsgccgo);
|
||||
my $callgccgo = "C.$sysname($argsgccgo)";
|
||||
$textgccgo .= $callProto;
|
||||
$textgccgo .= "\tr1 = uintptr($callgccgo)\n";
|
||||
$textgccgo .= "\te1 = syscall.GetErrno()\n";
|
||||
$textgccgo .= "\treturn\n}\n";
|
||||
}
|
||||
|
||||
if($errors) {
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Print zsyscall_aix_ppc64.go
|
||||
open(my $fcommun, '>', 'zsyscall_aix_ppc64.go');
|
||||
my $tofcommun = <<EOF;
|
||||
// $cmdline
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build $tags
|
||||
|
||||
package $package
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
EOF
|
||||
|
||||
$tofcommun .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
|
||||
|
||||
$tofcommun .=<<EOF;
|
||||
|
||||
$textcommon
|
||||
EOF
|
||||
print $fcommun $tofcommun;
|
||||
|
||||
|
||||
# Print zsyscall_aix_ppc64_gc.go
|
||||
open(my $fgc, '>', 'zsyscall_aix_ppc64_gc.go');
|
||||
my $tofgc = <<EOF;
|
||||
// $cmdline
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build $tags
|
||||
// +build !gccgo
|
||||
|
||||
package $package
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
$tofgc .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
|
||||
|
||||
my $vardecls = "\t" . join(",\n\t", @vars);
|
||||
$vardecls .= " syscallFunc";
|
||||
|
||||
$tofgc .=<<EOF;
|
||||
$dynimports
|
||||
$linknames
|
||||
type syscallFunc uintptr
|
||||
|
||||
var (
|
||||
$vardecls
|
||||
)
|
||||
|
||||
// Implemented in runtime/syscall_aix.go.
|
||||
func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
|
||||
$textgc
|
||||
EOF
|
||||
print $fgc $tofgc;
|
||||
|
||||
# Print zsyscall_aix_ppc64_gc.go
|
||||
open(my $fgccgo, '>', 'zsyscall_aix_ppc64_gccgo.go');
|
||||
my $tofgccgo = <<EOF;
|
||||
// $cmdline
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build $tags
|
||||
// +build gccgo
|
||||
|
||||
package $package
|
||||
|
||||
|
||||
$c_extern
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
$tofgccgo .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
|
||||
|
||||
$tofgccgo .=<<EOF;
|
||||
|
||||
$textgccgo
|
||||
EOF
|
||||
print $fgccgo $tofgccgo;
|
||||
exit 0;
|
335
vendor/golang.org/x/sys/unix/mksyscall_solaris.go
generated
vendored
Normal file
335
vendor/golang.org/x/sys/unix/mksyscall_solaris.go
generated
vendored
Normal file
@ -0,0 +1,335 @@
|
||||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
This program reads a file containing function prototypes
|
||||
(like syscall_solaris.go) and generates system call bodies.
|
||||
The prototypes are marked by lines beginning with "//sys"
|
||||
and read like func declarations if //sys is replaced by func, but:
|
||||
* The parameter lists must give a name for each argument.
|
||||
This includes return parameters.
|
||||
* The parameter lists must give a type for each argument:
|
||||
the (x, y, z int) shorthand is not allowed.
|
||||
* If the return parameter is an error number, it must be named err.
|
||||
* If go func name needs to be different than its libc name,
|
||||
* or the function is not in libc, name could be specified
|
||||
* at the end, after "=" sign, like
|
||||
//sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
b32 = flag.Bool("b32", false, "32bit big-endian")
|
||||
l32 = flag.Bool("l32", false, "32bit little-endian")
|
||||
tags = flag.String("tags", "", "build tags")
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksyscall_solaris.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
|
||||
// Param is function parameter
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// usage prints the program usage
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: go run mksyscall_solaris.go [-b32 | -l32] [-tags x,y] [file ...]\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// parseParamList parses parameter list and returns a slice of parameters
|
||||
func parseParamList(list string) []string {
|
||||
list = strings.TrimSpace(list)
|
||||
if list == "" {
|
||||
return []string{}
|
||||
}
|
||||
return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
|
||||
}
|
||||
|
||||
// parseParam splits a parameter into name and type
|
||||
func parseParam(p string) Param {
|
||||
ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
|
||||
if ps == nil {
|
||||
fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
|
||||
os.Exit(1)
|
||||
}
|
||||
return Param{ps[1], ps[2]}
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
if len(flag.Args()) <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "no files to parse provided\n")
|
||||
usage()
|
||||
}
|
||||
|
||||
endianness := ""
|
||||
if *b32 {
|
||||
endianness = "big-endian"
|
||||
} else if *l32 {
|
||||
endianness = "little-endian"
|
||||
}
|
||||
|
||||
pack := ""
|
||||
text := ""
|
||||
dynimports := ""
|
||||
linknames := ""
|
||||
var vars []string
|
||||
for _, path := range flag.Args() {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
s := bufio.NewScanner(file)
|
||||
for s.Scan() {
|
||||
t := s.Text()
|
||||
t = strings.TrimSpace(t)
|
||||
t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
|
||||
if p := regexp.MustCompile(`^package (\S+)$`).FindStringSubmatch(t); p != nil && pack == "" {
|
||||
pack = p[1]
|
||||
}
|
||||
nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
|
||||
if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Line must be of the form
|
||||
// func Open(path string, mode int, perm int) (fd int, err error)
|
||||
// Split into name, in params, out params.
|
||||
f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$`).FindStringSubmatch(t)
|
||||
if f == nil {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
|
||||
os.Exit(1)
|
||||
}
|
||||
funct, inps, outps, modname, sysname := f[2], f[3], f[4], f[5], f[6]
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
||||
inps = strings.Join(in, ", ")
|
||||
outps = strings.Join(out, ", ")
|
||||
|
||||
// Try in vain to keep people from editing this file.
|
||||
// The theory is that they jump into the middle of the file
|
||||
// without reading the header.
|
||||
text += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
|
||||
// So file name.
|
||||
if modname == "" {
|
||||
modname = "libc"
|
||||
}
|
||||
|
||||
// System call name.
|
||||
if sysname == "" {
|
||||
sysname = funct
|
||||
}
|
||||
|
||||
// System call pointer variable name.
|
||||
sysvarname := fmt.Sprintf("proc%s", sysname)
|
||||
|
||||
strconvfunc := "BytePtrFromString"
|
||||
strconvtype := "*byte"
|
||||
|
||||
sysname = strings.ToLower(sysname) // All libc functions are lowercase.
|
||||
|
||||
// Runtime import of function to allow cross-platform builds.
|
||||
dynimports += fmt.Sprintf("//go:cgo_import_dynamic libc_%s %s \"%s.so\"\n", sysname, sysname, modname)
|
||||
// Link symbol to proc address variable.
|
||||
linknames += fmt.Sprintf("//go:linkname %s libc_%s\n", sysvarname, sysname)
|
||||
// Library proc address variable.
|
||||
vars = append(vars, sysvarname)
|
||||
|
||||
// Go function header.
|
||||
outlist := strings.Join(out, ", ")
|
||||
if outlist != "" {
|
||||
outlist = fmt.Sprintf(" (%s)", outlist)
|
||||
}
|
||||
if text != "" {
|
||||
text += "\n"
|
||||
}
|
||||
text += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outlist)
|
||||
|
||||
// Check if err return available
|
||||
errvar := ""
|
||||
for _, param := range out {
|
||||
p := parseParam(param)
|
||||
if p.Type == "error" {
|
||||
errvar = p.Name
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare arguments to Syscall.
|
||||
var args []string
|
||||
n := 0
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
args = append(args, "uintptr(unsafe.Pointer("+p.Name+"))")
|
||||
} else if p.Type == "string" && errvar != "" {
|
||||
text += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
text += fmt.Sprintf("\t_p%d, %s = %s(%s)\n", n, errvar, strconvfunc, p.Name)
|
||||
text += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
n++
|
||||
} else if p.Type == "string" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
|
||||
text += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
text += fmt.Sprintf("\t_p%d, _ = %s(%s)\n", n, strconvfunc, p.Name)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
n++
|
||||
} else if s := regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type); s != nil {
|
||||
// Convert slice into pointer, length.
|
||||
// Have to be careful not to take address of &a[0] if len == 0:
|
||||
// pass nil in that case.
|
||||
text += fmt.Sprintf("\tvar _p%d *%s\n", n, s[1])
|
||||
text += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = &%s[0]\n\t}\n", p.Name, n, p.Name)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n), fmt.Sprintf("uintptr(len(%s))", p.Name))
|
||||
n++
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
if endianness == "big-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
|
||||
}
|
||||
} else if p.Type == "bool" {
|
||||
text += fmt.Sprintf("\tvar _p%d uint32\n", n)
|
||||
text += fmt.Sprintf("\tif %s {\n\t\t_p%d = 1\n\t} else {\n\t\t_p%d = 0\n\t}\n", p.Name, n, n)
|
||||
args = append(args, fmt.Sprintf("uintptr(_p%d)", n))
|
||||
n++
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
}
|
||||
}
|
||||
nargs := len(args)
|
||||
|
||||
// Determine which form to use; pad args with zeros.
|
||||
asm := "sysvicall6"
|
||||
if nonblock != nil {
|
||||
asm = "rawSysvicall6"
|
||||
}
|
||||
if len(args) <= 6 {
|
||||
for len(args) < 6 {
|
||||
args = append(args, "0")
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: too many arguments to system call\n", path)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Actual call.
|
||||
arglist := strings.Join(args, ", ")
|
||||
call := fmt.Sprintf("%s(uintptr(unsafe.Pointer(&%s)), %d, %s)", asm, sysvarname, nargs, arglist)
|
||||
|
||||
// Assign return values.
|
||||
body := ""
|
||||
ret := []string{"_", "_", "_"}
|
||||
doErrno := false
|
||||
for i := 0; i < len(out); i++ {
|
||||
p := parseParam(out[i])
|
||||
reg := ""
|
||||
if p.Name == "err" {
|
||||
reg = "e1"
|
||||
ret[2] = reg
|
||||
doErrno = true
|
||||
} else {
|
||||
reg = fmt.Sprintf("r%d", i)
|
||||
ret[i] = reg
|
||||
}
|
||||
if p.Type == "bool" {
|
||||
reg = fmt.Sprintf("%d != 0", reg)
|
||||
}
|
||||
if p.Type == "int64" && endianness != "" {
|
||||
// 64-bit number in r1:r0 or r0:r1.
|
||||
if i+2 > len(out) {
|
||||
fmt.Fprintf(os.Stderr, "%s: not enough registers for int64 return\n", path)
|
||||
os.Exit(1)
|
||||
}
|
||||
if endianness == "big-endian" {
|
||||
reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i, i+1)
|
||||
} else {
|
||||
reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i+1, i)
|
||||
}
|
||||
ret[i] = fmt.Sprintf("r%d", i)
|
||||
ret[i+1] = fmt.Sprintf("r%d", i+1)
|
||||
}
|
||||
if reg != "e1" {
|
||||
body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
|
||||
}
|
||||
}
|
||||
if ret[0] == "_" && ret[1] == "_" && ret[2] == "_" {
|
||||
text += fmt.Sprintf("\t%s\n", call)
|
||||
} else {
|
||||
text += fmt.Sprintf("\t%s, %s, %s := %s\n", ret[0], ret[1], ret[2], call)
|
||||
}
|
||||
text += body
|
||||
|
||||
if doErrno {
|
||||
text += "\tif e1 != 0 {\n"
|
||||
text += "\t\terr = e1\n"
|
||||
text += "\t}\n"
|
||||
}
|
||||
text += "\treturn\n"
|
||||
text += "}\n"
|
||||
}
|
||||
if err := s.Err(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
imp := ""
|
||||
if pack != "unix" {
|
||||
imp = "import \"golang.org/x/sys/unix\"\n"
|
||||
|
||||
}
|
||||
vardecls := "\t" + strings.Join(vars, ",\n\t")
|
||||
vardecls += " syscallFunc"
|
||||
fmt.Printf(srcTemplate, cmdLine(), buildTags(), pack, imp, dynimports, linknames, vardecls, text)
|
||||
}
|
||||
|
||||
const srcTemplate = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package %s
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
var (
|
||||
%s
|
||||
)
|
||||
|
||||
%s
|
||||
`
|
294
vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
generated
vendored
294
vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
generated
vendored
@ -1,294 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2009 The Go Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
# This program reads a file containing function prototypes
|
||||
# (like syscall_solaris.go) and generates system call bodies.
|
||||
# The prototypes are marked by lines beginning with "//sys"
|
||||
# and read like func declarations if //sys is replaced by func, but:
|
||||
# * The parameter lists must give a name for each argument.
|
||||
# This includes return parameters.
|
||||
# * The parameter lists must give a type for each argument:
|
||||
# the (x, y, z int) shorthand is not allowed.
|
||||
# * If the return parameter is an error number, it must be named err.
|
||||
# * If go func name needs to be different than its libc name,
|
||||
# * or the function is not in libc, name could be specified
|
||||
# * at the end, after "=" sign, like
|
||||
# //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
|
||||
use strict;
|
||||
|
||||
my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
|
||||
my $errors = 0;
|
||||
my $_32bit = "";
|
||||
my $tags = ""; # build tags
|
||||
|
||||
binmode STDOUT;
|
||||
|
||||
if($ARGV[0] eq "-b32") {
|
||||
$_32bit = "big-endian";
|
||||
shift;
|
||||
} elsif($ARGV[0] eq "-l32") {
|
||||
$_32bit = "little-endian";
|
||||
shift;
|
||||
}
|
||||
if($ARGV[0] eq "-tags") {
|
||||
shift;
|
||||
$tags = $ARGV[0];
|
||||
shift;
|
||||
}
|
||||
|
||||
if($ARGV[0] =~ /^-/) {
|
||||
print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
sub parseparamlist($) {
|
||||
my ($list) = @_;
|
||||
$list =~ s/^\s*//;
|
||||
$list =~ s/\s*$//;
|
||||
if($list eq "") {
|
||||
return ();
|
||||
}
|
||||
return split(/\s*,\s*/, $list);
|
||||
}
|
||||
|
||||
sub parseparam($) {
|
||||
my ($p) = @_;
|
||||
if($p !~ /^(\S*) (\S*)$/) {
|
||||
print STDERR "$ARGV:$.: malformed parameter: $p\n";
|
||||
$errors = 1;
|
||||
return ("xx", "int");
|
||||
}
|
||||
return ($1, $2);
|
||||
}
|
||||
|
||||
my $package = "";
|
||||
my $text = "";
|
||||
my $dynimports = "";
|
||||
my $linknames = "";
|
||||
my @vars = ();
|
||||
while(<>) {
|
||||
chomp;
|
||||
s/\s+/ /g;
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
$package = $1 if !$package && /^package (\S+)$/;
|
||||
my $nonblock = /^\/\/sysnb /;
|
||||
next if !/^\/\/sys / && !$nonblock;
|
||||
|
||||
# Line must be of the form
|
||||
# func Open(path string, mode int, perm int) (fd int, err error)
|
||||
# Split into name, in params, out params.
|
||||
if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
|
||||
print STDERR "$ARGV:$.: malformed //sys declaration\n";
|
||||
$errors = 1;
|
||||
next;
|
||||
}
|
||||
my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
|
||||
|
||||
# Split argument lists on comma.
|
||||
my @in = parseparamlist($in);
|
||||
my @out = parseparamlist($out);
|
||||
|
||||
# Try in vain to keep people from editing this file.
|
||||
# The theory is that they jump into the middle of the file
|
||||
# without reading the header.
|
||||
$text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
|
||||
|
||||
# So file name.
|
||||
if($modname eq "") {
|
||||
$modname = "libc";
|
||||
}
|
||||
|
||||
# System call name.
|
||||
if($sysname eq "") {
|
||||
$sysname = "$func";
|
||||
}
|
||||
|
||||
# System call pointer variable name.
|
||||
my $sysvarname = "proc$sysname";
|
||||
|
||||
my $strconvfunc = "BytePtrFromString";
|
||||
my $strconvtype = "*byte";
|
||||
|
||||
$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
|
||||
|
||||
# Runtime import of function to allow cross-platform builds.
|
||||
$dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
|
||||
# Link symbol to proc address variable.
|
||||
$linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
|
||||
# Library proc address variable.
|
||||
push @vars, $sysvarname;
|
||||
|
||||
# Go function header.
|
||||
$out = join(', ', @out);
|
||||
if($out ne "") {
|
||||
$out = " ($out)";
|
||||
}
|
||||
if($text ne "") {
|
||||
$text .= "\n"
|
||||
}
|
||||
$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
|
||||
|
||||
# Check if err return available
|
||||
my $errvar = "";
|
||||
foreach my $p (@out) {
|
||||
my ($name, $type) = parseparam($p);
|
||||
if($type eq "error") {
|
||||
$errvar = $name;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Prepare arguments to Syscall.
|
||||
my @args = ();
|
||||
my $n = 0;
|
||||
foreach my $p (@in) {
|
||||
my ($name, $type) = parseparam($p);
|
||||
if($type =~ /^\*/) {
|
||||
push @args, "uintptr(unsafe.Pointer($name))";
|
||||
} elsif($type eq "string" && $errvar ne "") {
|
||||
$text .= "\tvar _p$n $strconvtype\n";
|
||||
$text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
|
||||
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
|
||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
||||
$n++;
|
||||
} elsif($type eq "string") {
|
||||
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
|
||||
$text .= "\tvar _p$n $strconvtype\n";
|
||||
$text .= "\t_p$n, _ = $strconvfunc($name)\n";
|
||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
||||
$n++;
|
||||
} elsif($type =~ /^\[\](.*)/) {
|
||||
# Convert slice into pointer, length.
|
||||
# Have to be careful not to take address of &a[0] if len == 0:
|
||||
# pass nil in that case.
|
||||
$text .= "\tvar _p$n *$1\n";
|
||||
$text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
|
||||
push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
|
||||
$n++;
|
||||
} elsif($type eq "int64" && $_32bit ne "") {
|
||||
if($_32bit eq "big-endian") {
|
||||
push @args, "uintptr($name >> 32)", "uintptr($name)";
|
||||
} else {
|
||||
push @args, "uintptr($name)", "uintptr($name >> 32)";
|
||||
}
|
||||
} elsif($type eq "bool") {
|
||||
$text .= "\tvar _p$n uint32\n";
|
||||
$text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
|
||||
push @args, "uintptr(_p$n)";
|
||||
$n++;
|
||||
} else {
|
||||
push @args, "uintptr($name)";
|
||||
}
|
||||
}
|
||||
my $nargs = @args;
|
||||
|
||||
# Determine which form to use; pad args with zeros.
|
||||
my $asm = "sysvicall6";
|
||||
if ($nonblock) {
|
||||
$asm = "rawSysvicall6";
|
||||
}
|
||||
if(@args <= 6) {
|
||||
while(@args < 6) {
|
||||
push @args, "0";
|
||||
}
|
||||
} else {
|
||||
print STDERR "$ARGV:$.: too many arguments to system call\n";
|
||||
}
|
||||
|
||||
# Actual call.
|
||||
my $args = join(', ', @args);
|
||||
my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
|
||||
|
||||
# Assign return values.
|
||||
my $body = "";
|
||||
my $failexpr = "";
|
||||
my @ret = ("_", "_", "_");
|
||||
my @pout= ();
|
||||
my $do_errno = 0;
|
||||
for(my $i=0; $i<@out; $i++) {
|
||||
my $p = $out[$i];
|
||||
my ($name, $type) = parseparam($p);
|
||||
my $reg = "";
|
||||
if($name eq "err") {
|
||||
$reg = "e1";
|
||||
$ret[2] = $reg;
|
||||
$do_errno = 1;
|
||||
} else {
|
||||
$reg = sprintf("r%d", $i);
|
||||
$ret[$i] = $reg;
|
||||
}
|
||||
if($type eq "bool") {
|
||||
$reg = "$reg != 0";
|
||||
}
|
||||
if($type eq "int64" && $_32bit ne "") {
|
||||
# 64-bit number in r1:r0 or r0:r1.
|
||||
if($i+2 > @out) {
|
||||
print STDERR "$ARGV:$.: not enough registers for int64 return\n";
|
||||
}
|
||||
if($_32bit eq "big-endian") {
|
||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
|
||||
} else {
|
||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
|
||||
}
|
||||
$ret[$i] = sprintf("r%d", $i);
|
||||
$ret[$i+1] = sprintf("r%d", $i+1);
|
||||
}
|
||||
if($reg ne "e1") {
|
||||
$body .= "\t$name = $type($reg)\n";
|
||||
}
|
||||
}
|
||||
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
|
||||
$text .= "\t$call\n";
|
||||
} else {
|
||||
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
|
||||
}
|
||||
$text .= $body;
|
||||
|
||||
if ($do_errno) {
|
||||
$text .= "\tif e1 != 0 {\n";
|
||||
$text .= "\t\terr = e1\n";
|
||||
$text .= "\t}\n";
|
||||
}
|
||||
$text .= "\treturn\n";
|
||||
$text .= "}\n";
|
||||
}
|
||||
|
||||
if($errors) {
|
||||
exit 1;
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
// $cmdline
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build $tags
|
||||
|
||||
package $package
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
EOF
|
||||
|
||||
print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
|
||||
|
||||
my $vardecls = "\t" . join(",\n\t", @vars);
|
||||
$vardecls .= " syscallFunc";
|
||||
|
||||
chomp($_=<<EOF);
|
||||
|
||||
$dynimports
|
||||
$linknames
|
||||
var (
|
||||
$vardecls
|
||||
)
|
||||
|
||||
$text
|
||||
EOF
|
||||
print $_;
|
||||
exit 0;
|
4
vendor/golang.org/x/sys/unix/sockcmsg_unix.go
generated
vendored
4
vendor/golang.org/x/sys/unix/sockcmsg_unix.go
generated
vendored
@ -25,8 +25,8 @@ func cmsgAlignOf(salen int) int {
|
||||
if SizeofPtr == 8 {
|
||||
salign = 4
|
||||
}
|
||||
case "openbsd":
|
||||
// OpenBSD armv7 requires 64-bit alignment.
|
||||
case "netbsd", "openbsd":
|
||||
// NetBSD and OpenBSD armv7 require 64-bit alignment.
|
||||
if runtime.GOARCH == "arm" {
|
||||
salign = 8
|
||||
}
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -227,7 +227,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
|
||||
// Some versions of AIX have a bug in getsockname (see IV78655).
|
||||
// We can't rely on sa.Len being set correctly.
|
||||
n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
|
||||
n := SizeofSockaddrUnix - 3 // subtract leading Family, Len, terminating NUL.
|
||||
for i := 0; i < n; i++ {
|
||||
if pp.Path[i] == 0 {
|
||||
n = i
|
||||
@ -545,3 +545,5 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
//sys gettimeofday(tv *Timeval, tzp *Timezone) (err error)
|
||||
//sysnb Time(t *Time_t) (tt Time_t, err error)
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
//sys Getsystemcfg(label int) (n uint64)
|
||||
|
18
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
18
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -144,6 +144,23 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
|
||||
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
@ -416,6 +433,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Chmod(path string, mode uint32) (err error)
|
||||
//sys Chown(path string, uid int, gid int) (err error)
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys ClockGettime(clockid int32, time *Timespec) (err error)
|
||||
//sys Close(fd int) (err error)
|
||||
//sys Dup(fd int) (nfd int, err error)
|
||||
//sys Dup2(from int, to int) (err error)
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
@ -304,6 +304,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys read(fd int, p []byte) (n int, err error)
|
||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||
//sys Rename(from string, to string) (err error)
|
||||
//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
|
||||
//sys Revoke(path string) (err error)
|
||||
//sys Rmdir(path string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
||||
|
71
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
71
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -14,6 +14,7 @@ package unix
|
||||
import (
|
||||
"encoding/binary"
|
||||
"net"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -38,6 +39,20 @@ func Creat(path string, mode uint32) (fd int, err error) {
|
||||
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
|
||||
}
|
||||
|
||||
//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)
|
||||
|
||||
func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (err error) {
|
||||
if pathname == "" {
|
||||
return fanotifyMark(fd, flags, mask, dirFd, nil)
|
||||
}
|
||||
p, err := BytePtrFromString(pathname)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return fanotifyMark(fd, flags, mask, dirFd, p)
|
||||
}
|
||||
|
||||
//sys fchmodat(dirfd int, path string, mode uint32) (err error)
|
||||
|
||||
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
@ -80,6 +95,12 @@ func ioctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
||||
err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
|
||||
runtime.KeepAlive(value)
|
||||
return err
|
||||
}
|
||||
|
||||
// IoctlGetInt performs an ioctl operation which gets an integer value
|
||||
// from fd, using the specified request number.
|
||||
func IoctlGetInt(fd int, req uint) (int, error) {
|
||||
@ -100,6 +121,12 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
||||
var value RTCTime
|
||||
err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
||||
|
||||
func Link(oldpath string, newpath string) (err error) {
|
||||
@ -977,10 +1004,50 @@ func GetsockoptString(fd, level, opt int) (string, error) {
|
||||
return string(buf[:vallen-1]), nil
|
||||
}
|
||||
|
||||
func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) {
|
||||
var value TpacketStats
|
||||
vallen := _Socklen(SizeofTpacketStats)
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func GetsockoptTpacketStatsV3(fd, level, opt int) (*TpacketStatsV3, error) {
|
||||
var value TpacketStatsV3
|
||||
vallen := _Socklen(SizeofTpacketStatsV3)
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
||||
}
|
||||
|
||||
func SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
||||
}
|
||||
|
||||
// SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a
|
||||
// socket to filter incoming packets. See 'man 7 socket' for usage information.
|
||||
func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(fprog), unsafe.Sizeof(*fprog))
|
||||
}
|
||||
|
||||
func SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) error {
|
||||
var p unsafe.Pointer
|
||||
if len(filter) > 0 {
|
||||
p = unsafe.Pointer(&filter[0])
|
||||
}
|
||||
return setsockopt(fd, level, opt, p, uintptr(len(filter)*SizeofCanFilter))
|
||||
}
|
||||
|
||||
func SetsockoptTpacketReq(fd, level, opt int, tp *TpacketReq) error {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
|
||||
}
|
||||
|
||||
func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
|
||||
}
|
||||
|
||||
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
||||
|
||||
// KeyctlInt calls keyctl commands in which each argument is an int.
|
||||
@ -1381,6 +1448,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys ClockGetres(clockid int32, res *Timespec) (err error)
|
||||
//sys ClockGettime(clockid int32, time *Timespec) (err error)
|
||||
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
|
||||
//sys Close(fd int) (err error)
|
||||
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys DeleteModule(name string, flags int) (err error)
|
||||
@ -1441,7 +1509,6 @@ func Getpgrp() (pid int) {
|
||||
//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 Removexattr(path string, attr string) (err error)
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
|
||||
//sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
|
||||
//sys Setdomainname(p []byte) (err error)
|
||||
@ -1466,6 +1533,7 @@ func Setgid(uid int) (err error) {
|
||||
|
||||
//sys Setpriority(which int, who int, prio int) (err error)
|
||||
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
|
||||
//sys Signalfd(fd int, mask *Sigset_t, flags int) = SYS_SIGNALFD4
|
||||
//sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
|
||||
//sys Sync()
|
||||
//sys Syncfs(fd int) (err error)
|
||||
@ -1682,7 +1750,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
// Shmdt
|
||||
// Shmget
|
||||
// Sigaltstack
|
||||
// Signalfd
|
||||
// Swapoff
|
||||
// Swapon
|
||||
// Sysfs
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
@ -68,6 +68,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
@ -43,6 +43,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
|
7
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
7
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
@ -19,12 +19,18 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
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
|
||||
@ -89,6 +95,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Pause() (err error)
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
|
14
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
14
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@ -30,6 +30,7 @@ func EpollCreate(size int) (fd int, err error) {
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
@ -207,3 +208,16 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), ts, nil)
|
||||
}
|
||||
|
||||
//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 {
|
||||
cmdlineLen := len(cmdline)
|
||||
if cmdlineLen > 0 {
|
||||
// Account for the additional NULL byte added by
|
||||
// BytePtrFromString in kexecFileLoad. The kexec_file_load
|
||||
// syscall expects a NULL-terminated string.
|
||||
cmdlineLen++
|
||||
}
|
||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||
}
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
@ -24,6 +24,7 @@ package unix
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
@ -28,6 +28,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
@ -30,6 +30,7 @@ package unix
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
|
17
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
@ -207,3 +207,20 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), ts, nil)
|
||||
}
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
||||
}
|
||||
|
||||
//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 {
|
||||
cmdlineLen := len(cmdline)
|
||||
if cmdlineLen > 0 {
|
||||
// Account for the additional NULL byte added by
|
||||
// BytePtrFromString in kexecFileLoad. The kexec_file_load
|
||||
// syscall expects a NULL-terminated string.
|
||||
cmdlineLen++
|
||||
}
|
||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||
}
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
@ -30,6 +30,7 @@ import (
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
@ -26,6 +26,7 @@ package unix
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
|
33
vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
generated
vendored
Normal file
33
vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build arm64,netbsd
|
||||
|
||||
package unix
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = uint32(mode)
|
||||
k.Flags = uint32(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
17
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
17
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
@ -43,6 +43,23 @@ func nametomib(name string) (mib []_C_int, err error) {
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
func SysctlUvmexp(name string) (*Uvmexp, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
|
54
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
54
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -28,6 +28,11 @@ var (
|
||||
errENOENT error = syscall.ENOENT
|
||||
)
|
||||
|
||||
var (
|
||||
signalNameMapOnce sync.Once
|
||||
signalNameMap map[string]syscall.Signal
|
||||
)
|
||||
|
||||
// errnoErr returns common boxed Errno values, to prevent
|
||||
// allocations at runtime.
|
||||
func errnoErr(e syscall.Errno) error {
|
||||
@ -66,6 +71,19 @@ func SignalName(s syscall.Signal) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// SignalNum returns the syscall.Signal for signal named s,
|
||||
// or 0 if a signal with such name is not found.
|
||||
// The signal name should start with "SIG".
|
||||
func SignalNum(s string) syscall.Signal {
|
||||
signalNameMapOnce.Do(func() {
|
||||
signalNameMap = make(map[string]syscall.Signal)
|
||||
for _, signal := range signalList {
|
||||
signalNameMap[signal.name] = signal.num
|
||||
}
|
||||
})
|
||||
return signalNameMap[s]
|
||||
}
|
||||
|
||||
// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
|
||||
func clen(n []byte) int {
|
||||
i := bytes.IndexByte(n, 0)
|
||||
@ -276,6 +294,13 @@ func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {
|
||||
return &tv, err
|
||||
}
|
||||
|
||||
func GetsockoptUint64(fd, level, opt int) (value uint64, err error) {
|
||||
var n uint64
|
||||
vallen := _Socklen(8)
|
||||
err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
|
||||
var rsa RawSockaddrAny
|
||||
var len _Socklen = SizeofSockaddrAny
|
||||
@ -326,13 +351,21 @@ func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
|
||||
}
|
||||
|
||||
func SetsockoptString(fd, level, opt int, s string) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
|
||||
var p unsafe.Pointer
|
||||
if len(s) > 0 {
|
||||
p = unsafe.Pointer(&[]byte(s)[0])
|
||||
}
|
||||
return setsockopt(fd, level, opt, p, uintptr(len(s)))
|
||||
}
|
||||
|
||||
func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
|
||||
}
|
||||
|
||||
func SetsockoptUint64(fd, level, opt int, value uint64) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)
|
||||
}
|
||||
|
||||
func Socket(domain, typ, proto int) (fd int, err error) {
|
||||
if domain == AF_INET6 && SocketDisableIPv6 {
|
||||
return -1, EAFNOSUPPORT
|
||||
@ -377,3 +410,22 @@ func SetNonblock(fd int, nonblocking bool) (err error) {
|
||||
func Exec(argv0 string, argv []string, envv []string) error {
|
||||
return syscall.Exec(argv0, argv, envv)
|
||||
}
|
||||
|
||||
// Lutimes sets the access and modification times tv on path. If path refers to
|
||||
// a symlink, it is not dereferenced and the timestamps are set on the symlink.
|
||||
// If tv is nil, the access and modification times are set to the current time.
|
||||
// Otherwise tv must contain exactly 2 elements, with access time as the first
|
||||
// element and modification time as the second element.
|
||||
func Lutimes(path string, tv []Timeval) error {
|
||||
if tv == nil {
|
||||
return UtimesNanoAt(AT_FDCWD, path, nil, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
if len(tv) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
ts := []Timespec{
|
||||
NsecToTimespec(TimevalToNsec(tv[0])),
|
||||
NsecToTimespec(TimevalToNsec(tv[1])),
|
||||
}
|
||||
return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
6
vendor/golang.org/x/sys/unix/types_darwin.go
generated
vendored
6
vendor/golang.org/x/sys/unix/types_darwin.go
generated
vendored
@ -275,3 +275,9 @@ const (
|
||||
// uname
|
||||
|
||||
type Utsname C.struct_utsname
|
||||
|
||||
// Clockinfo
|
||||
|
||||
const SizeofClockinfo = C.sizeof_struct_clockinfo
|
||||
|
||||
type Clockinfo C.struct_clockinfo
|
||||
|
6
vendor/golang.org/x/sys/unix/types_openbsd.go
generated
vendored
6
vendor/golang.org/x/sys/unix/types_openbsd.go
generated
vendored
@ -274,3 +274,9 @@ type Utsname C.struct_utsname
|
||||
const SizeofUvmexp = C.sizeof_struct_uvmexp
|
||||
|
||||
type Uvmexp C.struct_uvmexp
|
||||
|
||||
// Clockinfo
|
||||
|
||||
const SizeofClockinfo = C.sizeof_struct_clockinfo
|
||||
|
||||
type Clockinfo C.struct_clockinfo
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x80041270
|
||||
BLKBSZSET = 0x40041271
|
||||
@ -486,6 +487,50 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@ -493,6 +538,7 @@ const (
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FP_XSTATE_MAGIC2 = 0x46505845
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -514,7 +560,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -707,6 +753,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -778,6 +825,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1132,7 +1180,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1396,6 +1444,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1537,6 +1591,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1744,6 +1805,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1905,6 +1968,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2038,6 +2112,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2052,6 +2127,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2071,6 +2147,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2085,6 +2164,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2101,6 +2181,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2203,6 +2284,7 @@ const (
|
||||
TUNGETVNETBE = 0x800454df
|
||||
TUNGETVNETHDRSZ = 0x800454d7
|
||||
TUNGETVNETLE = 0x800454dd
|
||||
TUNSETCARRIER = 0x400454e2
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETFILTEREBPF = 0x800454e1
|
||||
TUNSETGROUP = 0x400454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
@ -486,6 +487,50 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@ -493,6 +538,7 @@ const (
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FP_XSTATE_MAGIC2 = 0x46505845
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -514,7 +560,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -707,6 +753,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -778,6 +825,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1132,7 +1180,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1396,6 +1444,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1538,6 +1592,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1745,6 +1806,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1906,6 +1969,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2039,6 +2113,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2053,6 +2128,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2072,6 +2148,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2086,6 +2165,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2102,6 +2182,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2204,6 +2285,7 @@ const (
|
||||
TUNGETVNETBE = 0x800454df
|
||||
TUNGETVNETHDRSZ = 0x800454d7
|
||||
TUNGETVNETLE = 0x800454dd
|
||||
TUNSETCARRIER = 0x400454e2
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETFILTEREBPF = 0x800454e1
|
||||
TUNSETGROUP = 0x400454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x80041270
|
||||
BLKBSZSET = 0x40041271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1544,6 +1598,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1751,6 +1812,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1912,6 +1975,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2045,6 +2119,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2059,6 +2134,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2078,6 +2154,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2092,6 +2171,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2108,6 +2188,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2210,6 +2291,7 @@ const (
|
||||
TUNGETVNETBE = 0x800454df
|
||||
TUNGETVNETHDRSZ = 0x800454d7
|
||||
TUNGETVNETLE = 0x800454dd
|
||||
TUNSETCARRIER = 0x400454e2
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETFILTEREBPF = 0x800454e1
|
||||
TUNSETGROUP = 0x400454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
@ -488,6 +489,50 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
@ -495,6 +540,7 @@ const (
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FPSIMD_MAGIC = 0x46508001
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -516,7 +562,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -709,6 +755,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -780,6 +827,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1133,7 +1181,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1397,6 +1445,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1528,6 +1582,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1735,6 +1796,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1896,6 +1959,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2030,6 +2104,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2044,6 +2119,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2063,6 +2139,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2077,6 +2156,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2093,6 +2173,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2195,6 +2276,7 @@ const (
|
||||
TUNGETVNETBE = 0x800454df
|
||||
TUNGETVNETHDRSZ = 0x800454d7
|
||||
TUNGETVNETLE = 0x800454dd
|
||||
TUNSETCARRIER = 0x400454e2
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETFILTEREBPF = 0x800454e1
|
||||
TUNSETGROUP = 0x400454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40041270
|
||||
BLKBSZSET = 0x80041271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1537,6 +1591,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1744,6 +1805,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1905,6 +1968,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2038,6 +2112,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2052,6 +2127,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2071,6 +2147,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2085,6 +2164,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2098,6 +2178,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2205,6 +2286,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40081270
|
||||
BLKBSZSET = 0x80081271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1537,6 +1591,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1744,6 +1805,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1905,6 +1968,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2038,6 +2112,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2052,6 +2127,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2071,6 +2147,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2085,6 +2164,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2098,6 +2178,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2205,6 +2286,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40081270
|
||||
BLKBSZSET = 0x80081271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1537,6 +1591,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1744,6 +1805,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1905,6 +1968,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2038,6 +2112,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2052,6 +2127,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2071,6 +2147,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2085,6 +2164,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2098,6 +2178,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2205,6 +2286,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40041270
|
||||
BLKBSZSET = 0x80041271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1537,6 +1591,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1744,6 +1805,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1905,6 +1968,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2038,6 +2112,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2052,6 +2127,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2071,6 +2147,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2085,6 +2164,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2098,6 +2178,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2205,6 +2286,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40081270
|
||||
BLKBSZSET = 0x80081271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1129,7 +1177,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1396,6 +1444,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1595,6 +1649,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1802,6 +1863,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1963,6 +2026,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2094,6 +2168,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2108,6 +2183,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2127,6 +2203,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2141,6 +2220,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x2000741d
|
||||
TCSBRKP = 0x5425
|
||||
@ -2151,6 +2231,7 @@ const (
|
||||
TCSETSF = 0x802c7416
|
||||
TCSETSW = 0x802c7415
|
||||
TCXONC = 0x2000741e
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2265,6 +2346,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40081270
|
||||
BLKBSZSET = 0x80081271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1129,7 +1177,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1396,6 +1444,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1595,6 +1649,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1802,6 +1863,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1963,6 +2026,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2094,6 +2168,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2108,6 +2183,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2127,6 +2203,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2141,6 +2220,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x2000741d
|
||||
TCSBRKP = 0x5425
|
||||
@ -2151,6 +2231,7 @@ const (
|
||||
TCSETSF = 0x802c7416
|
||||
TCSETSW = 0x802c7415
|
||||
TCXONC = 0x2000741e
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2265,6 +2346,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1525,6 +1579,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1732,6 +1793,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1893,6 +1956,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2026,6 +2100,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2040,6 +2115,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2059,6 +2135,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2073,6 +2152,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2089,6 +2169,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2191,6 +2272,7 @@ const (
|
||||
TUNGETVNETBE = 0x800454df
|
||||
TUNGETVNETHDRSZ = 0x800454d7
|
||||
TUNGETVNETLE = 0x800454dd
|
||||
TUNSETCARRIER = 0x400454e2
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETFILTEREBPF = 0x800454e1
|
||||
TUNSETGROUP = 0x400454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -174,6 +174,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x80081270
|
||||
BLKBSZSET = 0x40081271
|
||||
@ -486,12 +487,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -513,7 +559,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -706,6 +752,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +824,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1130,7 +1178,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1394,6 +1442,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1598,6 +1652,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1805,6 +1866,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1966,6 +2029,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2099,6 +2173,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2113,6 +2188,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2132,6 +2208,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2146,6 +2225,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2162,6 +2242,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2264,6 +2345,7 @@ const (
|
||||
TUNGETVNETBE = 0x800454df
|
||||
TUNGETVNETHDRSZ = 0x800454d7
|
||||
TUNGETVNETLE = 0x800454dd
|
||||
TUNSETCARRIER = 0x400454e2
|
||||
TUNSETDEBUG = 0x400454c9
|
||||
TUNSETFILTEREBPF = 0x800454e1
|
||||
TUNSETGROUP = 0x400454ce
|
||||
|
88
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -177,6 +177,7 @@ const (
|
||||
B9600 = 0xd
|
||||
BALLOON_KVM_MAGIC = 0x13661366
|
||||
BDEVFS_MAGIC = 0x62646576
|
||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||
BINFMTFS_MAGIC = 0x42494e4d
|
||||
BLKBSZGET = 0x40081270
|
||||
BLKBSZSET = 0x80081271
|
||||
@ -490,12 +491,57 @@ const (
|
||||
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||
FALLOC_FL_UNSHARE_RANGE = 0x40
|
||||
FALLOC_FL_ZERO_RANGE = 0x10
|
||||
FANOTIFY_METADATA_VERSION = 0x3
|
||||
FAN_ACCESS = 0x1
|
||||
FAN_ACCESS_PERM = 0x20000
|
||||
FAN_ALLOW = 0x1
|
||||
FAN_ALL_CLASS_BITS = 0xc
|
||||
FAN_ALL_EVENTS = 0x3b
|
||||
FAN_ALL_INIT_FLAGS = 0x3f
|
||||
FAN_ALL_MARK_FLAGS = 0xff
|
||||
FAN_ALL_OUTGOING_EVENTS = 0x3403b
|
||||
FAN_ALL_PERM_EVENTS = 0x30000
|
||||
FAN_AUDIT = 0x10
|
||||
FAN_CLASS_CONTENT = 0x4
|
||||
FAN_CLASS_NOTIF = 0x0
|
||||
FAN_CLASS_PRE_CONTENT = 0x8
|
||||
FAN_CLOEXEC = 0x1
|
||||
FAN_CLOSE = 0x18
|
||||
FAN_CLOSE_NOWRITE = 0x10
|
||||
FAN_CLOSE_WRITE = 0x8
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
FAN_MARK_FLUSH = 0x80
|
||||
FAN_MARK_IGNORED_MASK = 0x20
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_NOFD = -0x1
|
||||
FAN_NONBLOCK = 0x2
|
||||
FAN_ONDIR = 0x40000000
|
||||
FAN_OPEN = 0x20
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
@ -517,7 +563,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@ -710,6 +756,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -781,6 +828,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -1134,7 +1182,7 @@ const (
|
||||
NETLINK_UNUSED = 0x1
|
||||
NETLINK_USERSOCK = 0x2
|
||||
NETLINK_XFRM = 0x6
|
||||
NETNSA_MAX = 0x3
|
||||
NETNSA_MAX = 0x5
|
||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||
NFNETLINK_V0 = 0x0
|
||||
NFNLGRP_ACCT_QUOTA = 0x8
|
||||
@ -1398,6 +1446,12 @@ const (
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_PAC_APDAKEY = 0x4
|
||||
PR_PAC_APDBKEY = 0x8
|
||||
PR_PAC_APGAKEY = 0x10
|
||||
PR_PAC_APIAKEY = 0x1
|
||||
PR_PAC_APIBKEY = 0x2
|
||||
PR_PAC_RESET_KEYS = 0x36
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
PR_SET_DUMPABLE = 0x4
|
||||
PR_SET_ENDIAN = 0x14
|
||||
@ -1590,6 +1644,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1797,6 +1858,8 @@ const (
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x400000
|
||||
SFD_NONBLOCK = 0x4000
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1958,6 +2021,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x33
|
||||
@ -2090,6 +2164,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2104,6 +2179,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2123,6 +2199,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2137,6 +2216,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x20005405
|
||||
TCSBRKP = 0x5425
|
||||
@ -2150,6 +2230,7 @@ const (
|
||||
TCSETSW = 0x8024540a
|
||||
TCSETSW2 = 0x802c540e
|
||||
TCXONC = 0x20005406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x2000747a
|
||||
TIOCCONS = 0x20007424
|
||||
TIOCEXCL = 0x2000740d
|
||||
@ -2253,6 +2334,7 @@ const (
|
||||
TUNGETVNETBE = 0x400454df
|
||||
TUNGETVNETHDRSZ = 0x400454d7
|
||||
TUNGETVNETLE = 0x400454dd
|
||||
TUNSETCARRIER = 0x800454e2
|
||||
TUNSETDEBUG = 0x800454c9
|
||||
TUNSETFILTEREBPF = 0x400454e1
|
||||
TUNSETGROUP = 0x800454ce
|
||||
|
1762
vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
generated
vendored
Normal file
1762
vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
generated
vendored
10
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc64
|
||||
@ -1367,6 +1367,14 @@ func Utime(path string, buf *Utimbuf) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getsystemcfg(label int) (n uint64) {
|
||||
r0, _ := callgetsystemcfg(label)
|
||||
n = uint64(r0)
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
|
||||
if e1 != 0 {
|
||||
|
12
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc64
|
||||
@ -120,6 +120,7 @@ import (
|
||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_time time "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_utime utime "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
|
||||
@ -235,6 +236,7 @@ import (
|
||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||
//go:linkname libc_time libc_time
|
||||
//go:linkname libc_utime libc_utime
|
||||
//go:linkname libc_getsystemcfg libc_getsystemcfg
|
||||
//go:linkname libc_getrlimit libc_getrlimit
|
||||
//go:linkname libc_setrlimit libc_setrlimit
|
||||
//go:linkname libc_lseek libc_lseek
|
||||
@ -353,6 +355,7 @@ var (
|
||||
libc_gettimeofday,
|
||||
libc_time,
|
||||
libc_utime,
|
||||
libc_getsystemcfg,
|
||||
libc_getrlimit,
|
||||
libc_setrlimit,
|
||||
libc_lseek,
|
||||
@ -1135,6 +1138,13 @@ func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
|
||||
return
|
||||
|
11
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
generated
vendored
11
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc64
|
||||
@ -118,6 +118,7 @@ int poll(uintptr_t, int, int);
|
||||
int gettimeofday(uintptr_t, uintptr_t);
|
||||
int time(uintptr_t);
|
||||
int utime(uintptr_t, uintptr_t);
|
||||
unsigned long long getsystemcfg(int);
|
||||
int getrlimit(int, uintptr_t);
|
||||
int setrlimit(int, uintptr_t);
|
||||
long long lseek(int, long long, int);
|
||||
@ -1011,6 +1012,14 @@ func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.getsystemcfg(C.int(label)))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim)))
|
||||
e1 = syscall.GetErrno()
|
||||
|
15
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
15
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
@ -943,6 +943,21 @@ func libc_chroot_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
_, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_clock_gettime_trampoline()
|
||||
|
||||
//go:linkname libc_clock_gettime libc_clock_gettime
|
||||
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
2
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
2
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
@ -108,6 +108,8 @@ TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_clock_gettime(SB)
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
|
20
vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
generated
vendored
20
vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
generated
vendored
@ -1194,6 +1194,26 @@ func Rename(from string, to string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(to)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Revoke(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1901,6 +1919,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
|
||||
written = int(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1906,6 +1924,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
88
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
88
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1661,6 +1679,16 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
|
||||
|
||||
// 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 pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
@ -2016,6 +2044,26 @@ func Pause() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
|
||||
written = int(r0)
|
||||
|
93
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
93
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1829,6 +1847,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
@ -2189,3 +2227,18 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
}
|
||||
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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(cmdline)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1820,6 +1838,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
||||
n = int(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1850,6 +1868,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1850,6 +1868,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1820,6 +1838,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
||||
n = int(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1921,6 +1939,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1921,6 +1939,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
73
vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
generated
vendored
73
vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -2189,3 +2207,18 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
}
|
||||
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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(cmdline)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1891,6 +1909,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
78
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
78
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
@ -14,6 +14,27 @@ var _ syscall.Errno
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fchmodat(dirfd int, path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -437,6 +458,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1195,26 +1226,6 @@ func Removexattr(path string, attr string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
@ -1370,6 +1381,13 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1890,6 +1908,26 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(oldpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var _p1 *byte
|
||||
_p1, err = BytePtrFromString(newpath)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
||||
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
|
||||
off = int64(r0)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user