update github.com/compose-spec/compose-go to v1.3.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>pull/1246/head
parent
7b25e2cffc
commit
52fd555bdd
@ -0,0 +1,12 @@
|
|||||||
|
// +build gofuzz
|
||||||
|
|
||||||
|
package reference
|
||||||
|
|
||||||
|
// fuzzParseNormalizedNamed implements a fuzzer
|
||||||
|
// that targets ParseNormalizedNamed
|
||||||
|
// Export before building the fuzzer.
|
||||||
|
// nolint:deadcode
|
||||||
|
func fuzzParseNormalizedNamed(data []byte) int {
|
||||||
|
_, _ = ParseNormalizedNamed(string(data))
|
||||||
|
return 1
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
# This source code refers to The Go Authors for copyright purposes.
|
|
||||||
# The master list of authors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/AUTHORS.
|
|
@ -1,3 +0,0 @@
|
|||||||
# This source code was written by the Go contributors.
|
|
||||||
# The master list of contributors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !linux && riscv64
|
||||||
|
// +build !linux,riscv64
|
||||||
|
|
||||||
|
package cpu
|
||||||
|
|
||||||
|
func archInit() {
|
||||||
|
Initialized = true
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !go1.19
|
||||||
|
// +build !go1.19
|
||||||
|
|
||||||
|
package execabs
|
||||||
|
|
||||||
|
func isGo119ErrDot(err error) bool {
|
||||||
|
return false
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build go1.19
|
||||||
|
// +build go1.19
|
||||||
|
|
||||||
|
package execabs
|
||||||
|
|
||||||
|
import "strings"
|
||||||
|
|
||||||
|
func isGo119ErrDot(err error) bool {
|
||||||
|
// TODO: return errors.Is(err, exec.ErrDot)
|
||||||
|
return strings.Contains(err.Error(), "current directory")
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright 2021 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
||||||
|
// +build darwin freebsd netbsd openbsd
|
||||||
|
// +build gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
// System call support for RISCV64 BSD
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
@ -1,233 +0,0 @@
|
|||||||
// Copyright 2017 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.
|
|
||||||
|
|
||||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
|
||||||
// them here for backwards compatibility.
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
DLT_HHDLC = 0x79
|
|
||||||
IFF_SMART = 0x20
|
|
||||||
IFT_1822 = 0x2
|
|
||||||
IFT_A12MPPSWITCH = 0x82
|
|
||||||
IFT_AAL2 = 0xbb
|
|
||||||
IFT_AAL5 = 0x31
|
|
||||||
IFT_ADSL = 0x5e
|
|
||||||
IFT_AFLANE8023 = 0x3b
|
|
||||||
IFT_AFLANE8025 = 0x3c
|
|
||||||
IFT_ARAP = 0x58
|
|
||||||
IFT_ARCNET = 0x23
|
|
||||||
IFT_ARCNETPLUS = 0x24
|
|
||||||
IFT_ASYNC = 0x54
|
|
||||||
IFT_ATM = 0x25
|
|
||||||
IFT_ATMDXI = 0x69
|
|
||||||
IFT_ATMFUNI = 0x6a
|
|
||||||
IFT_ATMIMA = 0x6b
|
|
||||||
IFT_ATMLOGICAL = 0x50
|
|
||||||
IFT_ATMRADIO = 0xbd
|
|
||||||
IFT_ATMSUBINTERFACE = 0x86
|
|
||||||
IFT_ATMVCIENDPT = 0xc2
|
|
||||||
IFT_ATMVIRTUAL = 0x95
|
|
||||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
|
||||||
IFT_BSC = 0x53
|
|
||||||
IFT_CCTEMUL = 0x3d
|
|
||||||
IFT_CEPT = 0x13
|
|
||||||
IFT_CES = 0x85
|
|
||||||
IFT_CHANNEL = 0x46
|
|
||||||
IFT_CNR = 0x55
|
|
||||||
IFT_COFFEE = 0x84
|
|
||||||
IFT_COMPOSITELINK = 0x9b
|
|
||||||
IFT_DCN = 0x8d
|
|
||||||
IFT_DIGITALPOWERLINE = 0x8a
|
|
||||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
|
||||||
IFT_DLSW = 0x4a
|
|
||||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
|
||||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
|
||||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
|
||||||
IFT_DS0 = 0x51
|
|
||||||
IFT_DS0BUNDLE = 0x52
|
|
||||||
IFT_DS1FDL = 0xaa
|
|
||||||
IFT_DS3 = 0x1e
|
|
||||||
IFT_DTM = 0x8c
|
|
||||||
IFT_DVBASILN = 0xac
|
|
||||||
IFT_DVBASIOUT = 0xad
|
|
||||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
|
||||||
IFT_DVBRCCMACLAYER = 0x92
|
|
||||||
IFT_DVBRCCUPSTREAM = 0x94
|
|
||||||
IFT_ENC = 0xf4
|
|
||||||
IFT_EON = 0x19
|
|
||||||
IFT_EPLRS = 0x57
|
|
||||||
IFT_ESCON = 0x49
|
|
||||||
IFT_ETHER = 0x6
|
|
||||||
IFT_FAITH = 0xf2
|
|
||||||
IFT_FAST = 0x7d
|
|
||||||
IFT_FASTETHER = 0x3e
|
|
||||||
IFT_FASTETHERFX = 0x45
|
|
||||||
IFT_FDDI = 0xf
|
|
||||||
IFT_FIBRECHANNEL = 0x38
|
|
||||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
|
||||||
IFT_FRAMERELAYMPI = 0x5c
|
|
||||||
IFT_FRDLCIENDPT = 0xc1
|
|
||||||
IFT_FRELAY = 0x20
|
|
||||||
IFT_FRELAYDCE = 0x2c
|
|
||||||
IFT_FRF16MFRBUNDLE = 0xa3
|
|
||||||
IFT_FRFORWARD = 0x9e
|
|
||||||
IFT_G703AT2MB = 0x43
|
|
||||||
IFT_G703AT64K = 0x42
|
|
||||||
IFT_GIF = 0xf0
|
|
||||||
IFT_GIGABITETHERNET = 0x75
|
|
||||||
IFT_GR303IDT = 0xb2
|
|
||||||
IFT_GR303RDT = 0xb1
|
|
||||||
IFT_H323GATEKEEPER = 0xa4
|
|
||||||
IFT_H323PROXY = 0xa5
|
|
||||||
IFT_HDH1822 = 0x3
|
|
||||||
IFT_HDLC = 0x76
|
|
||||||
IFT_HDSL2 = 0xa8
|
|
||||||
IFT_HIPERLAN2 = 0xb7
|
|
||||||
IFT_HIPPI = 0x2f
|
|
||||||
IFT_HIPPIINTERFACE = 0x39
|
|
||||||
IFT_HOSTPAD = 0x5a
|
|
||||||
IFT_HSSI = 0x2e
|
|
||||||
IFT_HY = 0xe
|
|
||||||
IFT_IBM370PARCHAN = 0x48
|
|
||||||
IFT_IDSL = 0x9a
|
|
||||||
IFT_IEEE80211 = 0x47
|
|
||||||
IFT_IEEE80212 = 0x37
|
|
||||||
IFT_IEEE8023ADLAG = 0xa1
|
|
||||||
IFT_IFGSN = 0x91
|
|
||||||
IFT_IMT = 0xbe
|
|
||||||
IFT_INTERLEAVE = 0x7c
|
|
||||||
IFT_IP = 0x7e
|
|
||||||
IFT_IPFORWARD = 0x8e
|
|
||||||
IFT_IPOVERATM = 0x72
|
|
||||||
IFT_IPOVERCDLC = 0x6d
|
|
||||||
IFT_IPOVERCLAW = 0x6e
|
|
||||||
IFT_IPSWITCH = 0x4e
|
|
||||||
IFT_IPXIP = 0xf9
|
|
||||||
IFT_ISDN = 0x3f
|
|
||||||
IFT_ISDNBASIC = 0x14
|
|
||||||
IFT_ISDNPRIMARY = 0x15
|
|
||||||
IFT_ISDNS = 0x4b
|
|
||||||
IFT_ISDNU = 0x4c
|
|
||||||
IFT_ISO88022LLC = 0x29
|
|
||||||
IFT_ISO88023 = 0x7
|
|
||||||
IFT_ISO88024 = 0x8
|
|
||||||
IFT_ISO88025 = 0x9
|
|
||||||
IFT_ISO88025CRFPINT = 0x62
|
|
||||||
IFT_ISO88025DTR = 0x56
|
|
||||||
IFT_ISO88025FIBER = 0x73
|
|
||||||
IFT_ISO88026 = 0xa
|
|
||||||
IFT_ISUP = 0xb3
|
|
||||||
IFT_L3IPXVLAN = 0x89
|
|
||||||
IFT_LAPB = 0x10
|
|
||||||
IFT_LAPD = 0x4d
|
|
||||||
IFT_LAPF = 0x77
|
|
||||||
IFT_LOCALTALK = 0x2a
|
|
||||||
IFT_LOOP = 0x18
|
|
||||||
IFT_MEDIAMAILOVERIP = 0x8b
|
|
||||||
IFT_MFSIGLINK = 0xa7
|
|
||||||
IFT_MIOX25 = 0x26
|
|
||||||
IFT_MODEM = 0x30
|
|
||||||
IFT_MPC = 0x71
|
|
||||||
IFT_MPLS = 0xa6
|
|
||||||
IFT_MPLSTUNNEL = 0x96
|
|
||||||
IFT_MSDSL = 0x8f
|
|
||||||
IFT_MVL = 0xbf
|
|
||||||
IFT_MYRINET = 0x63
|
|
||||||
IFT_NFAS = 0xaf
|
|
||||||
IFT_NSIP = 0x1b
|
|
||||||
IFT_OPTICALCHANNEL = 0xc3
|
|
||||||
IFT_OPTICALTRANSPORT = 0xc4
|
|
||||||
IFT_OTHER = 0x1
|
|
||||||
IFT_P10 = 0xc
|
|
||||||
IFT_P80 = 0xd
|
|
||||||
IFT_PARA = 0x22
|
|
||||||
IFT_PFLOG = 0xf6
|
|
||||||
IFT_PFSYNC = 0xf7
|
|
||||||
IFT_PLC = 0xae
|
|
||||||
IFT_POS = 0xab
|
|
||||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
|
||||||
IFT_PROPBWAP2MP = 0xb8
|
|
||||||
IFT_PROPCNLS = 0x59
|
|
||||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
|
||||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
|
||||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
|
||||||
IFT_PROPMUX = 0x36
|
|
||||||
IFT_PROPWIRELESSP2P = 0x9d
|
|
||||||
IFT_PTPSERIAL = 0x16
|
|
||||||
IFT_PVC = 0xf1
|
|
||||||
IFT_QLLC = 0x44
|
|
||||||
IFT_RADIOMAC = 0xbc
|
|
||||||
IFT_RADSL = 0x5f
|
|
||||||
IFT_REACHDSL = 0xc0
|
|
||||||
IFT_RFC1483 = 0x9f
|
|
||||||
IFT_RS232 = 0x21
|
|
||||||
IFT_RSRB = 0x4f
|
|
||||||
IFT_SDLC = 0x11
|
|
||||||
IFT_SDSL = 0x60
|
|
||||||
IFT_SHDSL = 0xa9
|
|
||||||
IFT_SIP = 0x1f
|
|
||||||
IFT_SLIP = 0x1c
|
|
||||||
IFT_SMDSDXI = 0x2b
|
|
||||||
IFT_SMDSICIP = 0x34
|
|
||||||
IFT_SONET = 0x27
|
|
||||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
|
||||||
IFT_SONETPATH = 0x32
|
|
||||||
IFT_SONETVT = 0x33
|
|
||||||
IFT_SRP = 0x97
|
|
||||||
IFT_SS7SIGLINK = 0x9c
|
|
||||||
IFT_STACKTOSTACK = 0x6f
|
|
||||||
IFT_STARLAN = 0xb
|
|
||||||
IFT_STF = 0xd7
|
|
||||||
IFT_T1 = 0x12
|
|
||||||
IFT_TDLC = 0x74
|
|
||||||
IFT_TERMPAD = 0x5b
|
|
||||||
IFT_TR008 = 0xb0
|
|
||||||
IFT_TRANSPHDLC = 0x7b
|
|
||||||
IFT_TUNNEL = 0x83
|
|
||||||
IFT_ULTRA = 0x1d
|
|
||||||
IFT_USB = 0xa0
|
|
||||||
IFT_V11 = 0x40
|
|
||||||
IFT_V35 = 0x2d
|
|
||||||
IFT_V36 = 0x41
|
|
||||||
IFT_V37 = 0x78
|
|
||||||
IFT_VDSL = 0x61
|
|
||||||
IFT_VIRTUALIPADDRESS = 0x70
|
|
||||||
IFT_VOICEEM = 0x64
|
|
||||||
IFT_VOICEENCAP = 0x67
|
|
||||||
IFT_VOICEFXO = 0x65
|
|
||||||
IFT_VOICEFXS = 0x66
|
|
||||||
IFT_VOICEOVERATM = 0x98
|
|
||||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
|
||||||
IFT_VOICEOVERIP = 0x68
|
|
||||||
IFT_X213 = 0x5d
|
|
||||||
IFT_X25 = 0x5
|
|
||||||
IFT_X25DDN = 0x4
|
|
||||||
IFT_X25HUNTGROUP = 0x7a
|
|
||||||
IFT_X25MLP = 0x79
|
|
||||||
IFT_X25PLE = 0x28
|
|
||||||
IFT_XETHER = 0x1a
|
|
||||||
IPPROTO_MAXID = 0x34
|
|
||||||
IPV6_FAITH = 0x1d
|
|
||||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
|
||||||
IP_FAITH = 0x16
|
|
||||||
IP_MAX_SOURCE_FILTER = 0x400
|
|
||||||
IP_MIN_MEMBERSHIPS = 0x1f
|
|
||||||
MAP_NORESERVE = 0x40
|
|
||||||
MAP_RENAME = 0x20
|
|
||||||
NET_RT_MAXID = 0x6
|
|
||||||
RTF_PRCLONING = 0x10000
|
|
||||||
RTM_OLDADD = 0x9
|
|
||||||
RTM_OLDDEL = 0xa
|
|
||||||
RT_CACHING_CONTEXT = 0x1
|
|
||||||
RT_NORTREF = 0x2
|
|
||||||
SIOCADDRT = 0x8030720a
|
|
||||||
SIOCALIFADDR = 0x8118691b
|
|
||||||
SIOCDELRT = 0x8030720b
|
|
||||||
SIOCDLIFADDR = 0x8118691d
|
|
||||||
SIOCGLIFADDR = 0xc118691c
|
|
||||||
SIOCGLIFPHYADDR = 0xc118694b
|
|
||||||
SIOCSLIFPHYADDR = 0x8118694a
|
|
||||||
)
|
|
@ -1,233 +0,0 @@
|
|||||||
// Copyright 2017 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.
|
|
||||||
|
|
||||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
|
||||||
// them here for backwards compatibility.
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
DLT_HHDLC = 0x79
|
|
||||||
IFF_SMART = 0x20
|
|
||||||
IFT_1822 = 0x2
|
|
||||||
IFT_A12MPPSWITCH = 0x82
|
|
||||||
IFT_AAL2 = 0xbb
|
|
||||||
IFT_AAL5 = 0x31
|
|
||||||
IFT_ADSL = 0x5e
|
|
||||||
IFT_AFLANE8023 = 0x3b
|
|
||||||
IFT_AFLANE8025 = 0x3c
|
|
||||||
IFT_ARAP = 0x58
|
|
||||||
IFT_ARCNET = 0x23
|
|
||||||
IFT_ARCNETPLUS = 0x24
|
|
||||||
IFT_ASYNC = 0x54
|
|
||||||
IFT_ATM = 0x25
|
|
||||||
IFT_ATMDXI = 0x69
|
|
||||||
IFT_ATMFUNI = 0x6a
|
|
||||||
IFT_ATMIMA = 0x6b
|
|
||||||
IFT_ATMLOGICAL = 0x50
|
|
||||||
IFT_ATMRADIO = 0xbd
|
|
||||||
IFT_ATMSUBINTERFACE = 0x86
|
|
||||||
IFT_ATMVCIENDPT = 0xc2
|
|
||||||
IFT_ATMVIRTUAL = 0x95
|
|
||||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
|
||||||
IFT_BSC = 0x53
|
|
||||||
IFT_CCTEMUL = 0x3d
|
|
||||||
IFT_CEPT = 0x13
|
|
||||||
IFT_CES = 0x85
|
|
||||||
IFT_CHANNEL = 0x46
|
|
||||||
IFT_CNR = 0x55
|
|
||||||
IFT_COFFEE = 0x84
|
|
||||||
IFT_COMPOSITELINK = 0x9b
|
|
||||||
IFT_DCN = 0x8d
|
|
||||||
IFT_DIGITALPOWERLINE = 0x8a
|
|
||||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
|
||||||
IFT_DLSW = 0x4a
|
|
||||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
|
||||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
|
||||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
|
||||||
IFT_DS0 = 0x51
|
|
||||||
IFT_DS0BUNDLE = 0x52
|
|
||||||
IFT_DS1FDL = 0xaa
|
|
||||||
IFT_DS3 = 0x1e
|
|
||||||
IFT_DTM = 0x8c
|
|
||||||
IFT_DVBASILN = 0xac
|
|
||||||
IFT_DVBASIOUT = 0xad
|
|
||||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
|
||||||
IFT_DVBRCCMACLAYER = 0x92
|
|
||||||
IFT_DVBRCCUPSTREAM = 0x94
|
|
||||||
IFT_ENC = 0xf4
|
|
||||||
IFT_EON = 0x19
|
|
||||||
IFT_EPLRS = 0x57
|
|
||||||
IFT_ESCON = 0x49
|
|
||||||
IFT_ETHER = 0x6
|
|
||||||
IFT_FAITH = 0xf2
|
|
||||||
IFT_FAST = 0x7d
|
|
||||||
IFT_FASTETHER = 0x3e
|
|
||||||
IFT_FASTETHERFX = 0x45
|
|
||||||
IFT_FDDI = 0xf
|
|
||||||
IFT_FIBRECHANNEL = 0x38
|
|
||||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
|
||||||
IFT_FRAMERELAYMPI = 0x5c
|
|
||||||
IFT_FRDLCIENDPT = 0xc1
|
|
||||||
IFT_FRELAY = 0x20
|
|
||||||
IFT_FRELAYDCE = 0x2c
|
|
||||||
IFT_FRF16MFRBUNDLE = 0xa3
|
|
||||||
IFT_FRFORWARD = 0x9e
|
|
||||||
IFT_G703AT2MB = 0x43
|
|
||||||
IFT_G703AT64K = 0x42
|
|
||||||
IFT_GIF = 0xf0
|
|
||||||
IFT_GIGABITETHERNET = 0x75
|
|
||||||
IFT_GR303IDT = 0xb2
|
|
||||||
IFT_GR303RDT = 0xb1
|
|
||||||
IFT_H323GATEKEEPER = 0xa4
|
|
||||||
IFT_H323PROXY = 0xa5
|
|
||||||
IFT_HDH1822 = 0x3
|
|
||||||
IFT_HDLC = 0x76
|
|
||||||
IFT_HDSL2 = 0xa8
|
|
||||||
IFT_HIPERLAN2 = 0xb7
|
|
||||||
IFT_HIPPI = 0x2f
|
|
||||||
IFT_HIPPIINTERFACE = 0x39
|
|
||||||
IFT_HOSTPAD = 0x5a
|
|
||||||
IFT_HSSI = 0x2e
|
|
||||||
IFT_HY = 0xe
|
|
||||||
IFT_IBM370PARCHAN = 0x48
|
|
||||||
IFT_IDSL = 0x9a
|
|
||||||
IFT_IEEE80211 = 0x47
|
|
||||||
IFT_IEEE80212 = 0x37
|
|
||||||
IFT_IEEE8023ADLAG = 0xa1
|
|
||||||
IFT_IFGSN = 0x91
|
|
||||||
IFT_IMT = 0xbe
|
|
||||||
IFT_INTERLEAVE = 0x7c
|
|
||||||
IFT_IP = 0x7e
|
|
||||||
IFT_IPFORWARD = 0x8e
|
|
||||||
IFT_IPOVERATM = 0x72
|
|
||||||
IFT_IPOVERCDLC = 0x6d
|
|
||||||
IFT_IPOVERCLAW = 0x6e
|
|
||||||
IFT_IPSWITCH = 0x4e
|
|
||||||
IFT_IPXIP = 0xf9
|
|
||||||
IFT_ISDN = 0x3f
|
|
||||||
IFT_ISDNBASIC = 0x14
|
|
||||||
IFT_ISDNPRIMARY = 0x15
|
|
||||||
IFT_ISDNS = 0x4b
|
|
||||||
IFT_ISDNU = 0x4c
|
|
||||||
IFT_ISO88022LLC = 0x29
|
|
||||||
IFT_ISO88023 = 0x7
|
|
||||||
IFT_ISO88024 = 0x8
|
|
||||||
IFT_ISO88025 = 0x9
|
|
||||||
IFT_ISO88025CRFPINT = 0x62
|
|
||||||
IFT_ISO88025DTR = 0x56
|
|
||||||
IFT_ISO88025FIBER = 0x73
|
|
||||||
IFT_ISO88026 = 0xa
|
|
||||||
IFT_ISUP = 0xb3
|
|
||||||
IFT_L3IPXVLAN = 0x89
|
|
||||||
IFT_LAPB = 0x10
|
|
||||||
IFT_LAPD = 0x4d
|
|
||||||
IFT_LAPF = 0x77
|
|
||||||
IFT_LOCALTALK = 0x2a
|
|
||||||
IFT_LOOP = 0x18
|
|
||||||
IFT_MEDIAMAILOVERIP = 0x8b
|
|
||||||
IFT_MFSIGLINK = 0xa7
|
|
||||||
IFT_MIOX25 = 0x26
|
|
||||||
IFT_MODEM = 0x30
|
|
||||||
IFT_MPC = 0x71
|
|
||||||
IFT_MPLS = 0xa6
|
|
||||||
IFT_MPLSTUNNEL = 0x96
|
|
||||||
IFT_MSDSL = 0x8f
|
|
||||||
IFT_MVL = 0xbf
|
|
||||||
IFT_MYRINET = 0x63
|
|
||||||
IFT_NFAS = 0xaf
|
|
||||||
IFT_NSIP = 0x1b
|
|
||||||
IFT_OPTICALCHANNEL = 0xc3
|
|
||||||
IFT_OPTICALTRANSPORT = 0xc4
|
|
||||||
IFT_OTHER = 0x1
|
|
||||||
IFT_P10 = 0xc
|
|
||||||
IFT_P80 = 0xd
|
|
||||||
IFT_PARA = 0x22
|
|
||||||
IFT_PFLOG = 0xf6
|
|
||||||
IFT_PFSYNC = 0xf7
|
|
||||||
IFT_PLC = 0xae
|
|
||||||
IFT_POS = 0xab
|
|
||||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
|
||||||
IFT_PROPBWAP2MP = 0xb8
|
|
||||||
IFT_PROPCNLS = 0x59
|
|
||||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
|
||||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
|
||||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
|
||||||
IFT_PROPMUX = 0x36
|
|
||||||
IFT_PROPWIRELESSP2P = 0x9d
|
|
||||||
IFT_PTPSERIAL = 0x16
|
|
||||||
IFT_PVC = 0xf1
|
|
||||||
IFT_QLLC = 0x44
|
|
||||||
IFT_RADIOMAC = 0xbc
|
|
||||||
IFT_RADSL = 0x5f
|
|
||||||
IFT_REACHDSL = 0xc0
|
|
||||||
IFT_RFC1483 = 0x9f
|
|
||||||
IFT_RS232 = 0x21
|
|
||||||
IFT_RSRB = 0x4f
|
|
||||||
IFT_SDLC = 0x11
|
|
||||||
IFT_SDSL = 0x60
|
|
||||||
IFT_SHDSL = 0xa9
|
|
||||||
IFT_SIP = 0x1f
|
|
||||||
IFT_SLIP = 0x1c
|
|
||||||
IFT_SMDSDXI = 0x2b
|
|
||||||
IFT_SMDSICIP = 0x34
|
|
||||||
IFT_SONET = 0x27
|
|
||||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
|
||||||
IFT_SONETPATH = 0x32
|
|
||||||
IFT_SONETVT = 0x33
|
|
||||||
IFT_SRP = 0x97
|
|
||||||
IFT_SS7SIGLINK = 0x9c
|
|
||||||
IFT_STACKTOSTACK = 0x6f
|
|
||||||
IFT_STARLAN = 0xb
|
|
||||||
IFT_STF = 0xd7
|
|
||||||
IFT_T1 = 0x12
|
|
||||||
IFT_TDLC = 0x74
|
|
||||||
IFT_TERMPAD = 0x5b
|
|
||||||
IFT_TR008 = 0xb0
|
|
||||||
IFT_TRANSPHDLC = 0x7b
|
|
||||||
IFT_TUNNEL = 0x83
|
|
||||||
IFT_ULTRA = 0x1d
|
|
||||||
IFT_USB = 0xa0
|
|
||||||
IFT_V11 = 0x40
|
|
||||||
IFT_V35 = 0x2d
|
|
||||||
IFT_V36 = 0x41
|
|
||||||
IFT_V37 = 0x78
|
|
||||||
IFT_VDSL = 0x61
|
|
||||||
IFT_VIRTUALIPADDRESS = 0x70
|
|
||||||
IFT_VOICEEM = 0x64
|
|
||||||
IFT_VOICEENCAP = 0x67
|
|
||||||
IFT_VOICEFXO = 0x65
|
|
||||||
IFT_VOICEFXS = 0x66
|
|
||||||
IFT_VOICEOVERATM = 0x98
|
|
||||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
|
||||||
IFT_VOICEOVERIP = 0x68
|
|
||||||
IFT_X213 = 0x5d
|
|
||||||
IFT_X25 = 0x5
|
|
||||||
IFT_X25DDN = 0x4
|
|
||||||
IFT_X25HUNTGROUP = 0x7a
|
|
||||||
IFT_X25MLP = 0x79
|
|
||||||
IFT_X25PLE = 0x28
|
|
||||||
IFT_XETHER = 0x1a
|
|
||||||
IPPROTO_MAXID = 0x34
|
|
||||||
IPV6_FAITH = 0x1d
|
|
||||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
|
||||||
IP_FAITH = 0x16
|
|
||||||
IP_MAX_SOURCE_FILTER = 0x400
|
|
||||||
IP_MIN_MEMBERSHIPS = 0x1f
|
|
||||||
MAP_NORESERVE = 0x40
|
|
||||||
MAP_RENAME = 0x20
|
|
||||||
NET_RT_MAXID = 0x6
|
|
||||||
RTF_PRCLONING = 0x10000
|
|
||||||
RTM_OLDADD = 0x9
|
|
||||||
RTM_OLDDEL = 0xa
|
|
||||||
RT_CACHING_CONTEXT = 0x1
|
|
||||||
RT_NORTREF = 0x2
|
|
||||||
SIOCADDRT = 0x8040720a
|
|
||||||
SIOCALIFADDR = 0x8118691b
|
|
||||||
SIOCDELRT = 0x8040720b
|
|
||||||
SIOCDLIFADDR = 0x8118691d
|
|
||||||
SIOCGLIFADDR = 0xc118691c
|
|
||||||
SIOCGLIFPHYADDR = 0xc118694b
|
|
||||||
SIOCSLIFPHYADDR = 0x8118694a
|
|
||||||
)
|
|
@ -1,226 +0,0 @@
|
|||||||
// Copyright 2017 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
IFT_1822 = 0x2
|
|
||||||
IFT_A12MPPSWITCH = 0x82
|
|
||||||
IFT_AAL2 = 0xbb
|
|
||||||
IFT_AAL5 = 0x31
|
|
||||||
IFT_ADSL = 0x5e
|
|
||||||
IFT_AFLANE8023 = 0x3b
|
|
||||||
IFT_AFLANE8025 = 0x3c
|
|
||||||
IFT_ARAP = 0x58
|
|
||||||
IFT_ARCNET = 0x23
|
|
||||||
IFT_ARCNETPLUS = 0x24
|
|
||||||
IFT_ASYNC = 0x54
|
|
||||||
IFT_ATM = 0x25
|
|
||||||
IFT_ATMDXI = 0x69
|
|
||||||
IFT_ATMFUNI = 0x6a
|
|
||||||
IFT_ATMIMA = 0x6b
|
|
||||||
IFT_ATMLOGICAL = 0x50
|
|
||||||
IFT_ATMRADIO = 0xbd
|
|
||||||
IFT_ATMSUBINTERFACE = 0x86
|
|
||||||
IFT_ATMVCIENDPT = 0xc2
|
|
||||||
IFT_ATMVIRTUAL = 0x95
|
|
||||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
|
||||||
IFT_BSC = 0x53
|
|
||||||
IFT_CCTEMUL = 0x3d
|
|
||||||
IFT_CEPT = 0x13
|
|
||||||
IFT_CES = 0x85
|
|
||||||
IFT_CHANNEL = 0x46
|
|
||||||
IFT_CNR = 0x55
|
|
||||||
IFT_COFFEE = 0x84
|
|
||||||
IFT_COMPOSITELINK = 0x9b
|
|
||||||
IFT_DCN = 0x8d
|
|
||||||
IFT_DIGITALPOWERLINE = 0x8a
|
|
||||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
|
||||||
IFT_DLSW = 0x4a
|
|
||||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
|
||||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
|
||||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
|
||||||
IFT_DS0 = 0x51
|
|
||||||
IFT_DS0BUNDLE = 0x52
|
|
||||||
IFT_DS1FDL = 0xaa
|
|
||||||
IFT_DS3 = 0x1e
|
|
||||||
IFT_DTM = 0x8c
|
|
||||||
IFT_DVBASILN = 0xac
|
|
||||||
IFT_DVBASIOUT = 0xad
|
|
||||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
|
||||||
IFT_DVBRCCMACLAYER = 0x92
|
|
||||||
IFT_DVBRCCUPSTREAM = 0x94
|
|
||||||
IFT_ENC = 0xf4
|
|
||||||
IFT_EON = 0x19
|
|
||||||
IFT_EPLRS = 0x57
|
|
||||||
IFT_ESCON = 0x49
|
|
||||||
IFT_ETHER = 0x6
|
|
||||||
IFT_FAST = 0x7d
|
|
||||||
IFT_FASTETHER = 0x3e
|
|
||||||
IFT_FASTETHERFX = 0x45
|
|
||||||
IFT_FDDI = 0xf
|
|
||||||
IFT_FIBRECHANNEL = 0x38
|
|
||||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
|
||||||
IFT_FRAMERELAYMPI = 0x5c
|
|
||||||
IFT_FRDLCIENDPT = 0xc1
|
|
||||||
IFT_FRELAY = 0x20
|
|
||||||
IFT_FRELAYDCE = 0x2c
|
|
||||||
IFT_FRF16MFRBUNDLE = 0xa3
|
|
||||||
IFT_FRFORWARD = 0x9e
|
|
||||||
IFT_G703AT2MB = 0x43
|
|
||||||
IFT_G703AT64K = 0x42
|
|
||||||
IFT_GIF = 0xf0
|
|
||||||
IFT_GIGABITETHERNET = 0x75
|
|
||||||
IFT_GR303IDT = 0xb2
|
|
||||||
IFT_GR303RDT = 0xb1
|
|
||||||
IFT_H323GATEKEEPER = 0xa4
|
|
||||||
IFT_H323PROXY = 0xa5
|
|
||||||
IFT_HDH1822 = 0x3
|
|
||||||
IFT_HDLC = 0x76
|
|
||||||
IFT_HDSL2 = 0xa8
|
|
||||||
IFT_HIPERLAN2 = 0xb7
|
|
||||||
IFT_HIPPI = 0x2f
|
|
||||||
IFT_HIPPIINTERFACE = 0x39
|
|
||||||
IFT_HOSTPAD = 0x5a
|
|
||||||
IFT_HSSI = 0x2e
|
|
||||||
IFT_HY = 0xe
|
|
||||||
IFT_IBM370PARCHAN = 0x48
|
|
||||||
IFT_IDSL = 0x9a
|
|
||||||
IFT_IEEE80211 = 0x47
|
|
||||||
IFT_IEEE80212 = 0x37
|
|
||||||
IFT_IEEE8023ADLAG = 0xa1
|
|
||||||
IFT_IFGSN = 0x91
|
|
||||||
IFT_IMT = 0xbe
|
|
||||||
IFT_INTERLEAVE = 0x7c
|
|
||||||
IFT_IP = 0x7e
|
|
||||||
IFT_IPFORWARD = 0x8e
|
|
||||||
IFT_IPOVERATM = 0x72
|
|
||||||
IFT_IPOVERCDLC = 0x6d
|
|
||||||
IFT_IPOVERCLAW = 0x6e
|
|
||||||
IFT_IPSWITCH = 0x4e
|
|
||||||
IFT_ISDN = 0x3f
|
|
||||||
IFT_ISDNBASIC = 0x14
|
|
||||||
IFT_ISDNPRIMARY = 0x15
|
|
||||||
IFT_ISDNS = 0x4b
|
|
||||||
IFT_ISDNU = 0x4c
|
|
||||||
IFT_ISO88022LLC = 0x29
|
|
||||||
IFT_ISO88023 = 0x7
|
|
||||||
IFT_ISO88024 = 0x8
|
|
||||||
IFT_ISO88025 = 0x9
|
|
||||||
IFT_ISO88025CRFPINT = 0x62
|
|
||||||
IFT_ISO88025DTR = 0x56
|
|
||||||
IFT_ISO88025FIBER = 0x73
|
|
||||||
IFT_ISO88026 = 0xa
|
|
||||||
IFT_ISUP = 0xb3
|
|
||||||
IFT_L3IPXVLAN = 0x89
|
|
||||||
IFT_LAPB = 0x10
|
|
||||||
IFT_LAPD = 0x4d
|
|
||||||
IFT_LAPF = 0x77
|
|
||||||
IFT_LOCALTALK = 0x2a
|
|
||||||
IFT_LOOP = 0x18
|
|
||||||
IFT_MEDIAMAILOVERIP = 0x8b
|
|
||||||
IFT_MFSIGLINK = 0xa7
|
|
||||||
IFT_MIOX25 = 0x26
|
|
||||||
IFT_MODEM = 0x30
|
|
||||||
IFT_MPC = 0x71
|
|
||||||
IFT_MPLS = 0xa6
|
|
||||||
IFT_MPLSTUNNEL = 0x96
|
|
||||||
IFT_MSDSL = 0x8f
|
|
||||||
IFT_MVL = 0xbf
|
|
||||||
IFT_MYRINET = 0x63
|
|
||||||
IFT_NFAS = 0xaf
|
|
||||||
IFT_NSIP = 0x1b
|
|
||||||
IFT_OPTICALCHANNEL = 0xc3
|
|
||||||
IFT_OPTICALTRANSPORT = 0xc4
|
|
||||||
IFT_OTHER = 0x1
|
|
||||||
IFT_P10 = 0xc
|
|
||||||
IFT_P80 = 0xd
|
|
||||||
IFT_PARA = 0x22
|
|
||||||
IFT_PFLOG = 0xf6
|
|
||||||
IFT_PFSYNC = 0xf7
|
|
||||||
IFT_PLC = 0xae
|
|
||||||
IFT_POS = 0xab
|
|
||||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
|
||||||
IFT_PROPBWAP2MP = 0xb8
|
|
||||||
IFT_PROPCNLS = 0x59
|
|
||||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
|
||||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
|
||||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
|
||||||
IFT_PROPMUX = 0x36
|
|
||||||
IFT_PROPWIRELESSP2P = 0x9d
|
|
||||||
IFT_PTPSERIAL = 0x16
|
|
||||||
IFT_PVC = 0xf1
|
|
||||||
IFT_QLLC = 0x44
|
|
||||||
IFT_RADIOMAC = 0xbc
|
|
||||||
IFT_RADSL = 0x5f
|
|
||||||
IFT_REACHDSL = 0xc0
|
|
||||||
IFT_RFC1483 = 0x9f
|
|
||||||
IFT_RS232 = 0x21
|
|
||||||
IFT_RSRB = 0x4f
|
|
||||||
IFT_SDLC = 0x11
|
|
||||||
IFT_SDSL = 0x60
|
|
||||||
IFT_SHDSL = 0xa9
|
|
||||||
IFT_SIP = 0x1f
|
|
||||||
IFT_SLIP = 0x1c
|
|
||||||
IFT_SMDSDXI = 0x2b
|
|
||||||
IFT_SMDSICIP = 0x34
|
|
||||||
IFT_SONET = 0x27
|
|
||||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
|
||||||
IFT_SONETPATH = 0x32
|
|
||||||
IFT_SONETVT = 0x33
|
|
||||||
IFT_SRP = 0x97
|
|
||||||
IFT_SS7SIGLINK = 0x9c
|
|
||||||
IFT_STACKTOSTACK = 0x6f
|
|
||||||
IFT_STARLAN = 0xb
|
|
||||||
IFT_STF = 0xd7
|
|
||||||
IFT_T1 = 0x12
|
|
||||||
IFT_TDLC = 0x74
|
|
||||||
IFT_TERMPAD = 0x5b
|
|
||||||
IFT_TR008 = 0xb0
|
|
||||||
IFT_TRANSPHDLC = 0x7b
|
|
||||||
IFT_TUNNEL = 0x83
|
|
||||||
IFT_ULTRA = 0x1d
|
|
||||||
IFT_USB = 0xa0
|
|
||||||
IFT_V11 = 0x40
|
|
||||||
IFT_V35 = 0x2d
|
|
||||||
IFT_V36 = 0x41
|
|
||||||
IFT_V37 = 0x78
|
|
||||||
IFT_VDSL = 0x61
|
|
||||||
IFT_VIRTUALIPADDRESS = 0x70
|
|
||||||
IFT_VOICEEM = 0x64
|
|
||||||
IFT_VOICEENCAP = 0x67
|
|
||||||
IFT_VOICEFXO = 0x65
|
|
||||||
IFT_VOICEFXS = 0x66
|
|
||||||
IFT_VOICEOVERATM = 0x98
|
|
||||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
|
||||||
IFT_VOICEOVERIP = 0x68
|
|
||||||
IFT_X213 = 0x5d
|
|
||||||
IFT_X25 = 0x5
|
|
||||||
IFT_X25DDN = 0x4
|
|
||||||
IFT_X25HUNTGROUP = 0x7a
|
|
||||||
IFT_X25MLP = 0x79
|
|
||||||
IFT_X25PLE = 0x28
|
|
||||||
IFT_XETHER = 0x1a
|
|
||||||
|
|
||||||
// missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
|
|
||||||
IFF_SMART = 0x20
|
|
||||||
IFT_FAITH = 0xf2
|
|
||||||
IFT_IPXIP = 0xf9
|
|
||||||
IPPROTO_MAXID = 0x34
|
|
||||||
IPV6_FAITH = 0x1d
|
|
||||||
IP_FAITH = 0x16
|
|
||||||
MAP_NORESERVE = 0x40
|
|
||||||
MAP_RENAME = 0x20
|
|
||||||
NET_RT_MAXID = 0x6
|
|
||||||
RTF_PRCLONING = 0x10000
|
|
||||||
RTM_OLDADD = 0x9
|
|
||||||
RTM_OLDDEL = 0xa
|
|
||||||
SIOCADDRT = 0x8030720a
|
|
||||||
SIOCALIFADDR = 0x8118691b
|
|
||||||
SIOCDELRT = 0x8030720b
|
|
||||||
SIOCDLIFADDR = 0x8118691d
|
|
||||||
SIOCGLIFADDR = 0xc118691c
|
|
||||||
SIOCGLIFPHYADDR = 0xc118694b
|
|
||||||
SIOCSLIFPHYADDR = 0x8118694a
|
|
||||||
)
|
|
@ -1,17 +0,0 @@
|
|||||||
// Copyright 2020 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.
|
|
||||||
|
|
||||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
|
||||||
// them here for backwards compatibility.
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
DLT_HHDLC = 0x79
|
|
||||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
|
||||||
IP_MAX_SOURCE_FILTER = 0x400
|
|
||||||
IP_MIN_MEMBERSHIPS = 0x1f
|
|
||||||
RT_CACHING_CONTEXT = 0x1
|
|
||||||
RT_NORTREF = 0x2
|
|
||||||
)
|
|
@ -0,0 +1,63 @@
|
|||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build riscv64 && freebsd
|
||||||
|
// +build riscv64,freebsd
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
func setTimespec(sec, nsec int64) Timespec {
|
||||||
|
return Timespec{Sec: sec, Nsec: nsec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimeval(sec, usec int64) Timeval {
|
||||||
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
|
k.Ident = uint64(fd)
|
||||||
|
k.Filter = int16(mode)
|
||||||
|
k.Flags = uint16(flags)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (iov *Iovec) SetLen(length int) {
|
||||||
|
iov.Len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetControllen(length int) {
|
||||||
|
msghdr.Controllen = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||||
|
msghdr.Iovlen = int32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
|
cmsg.Len = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||||
|
var writtenOut uint64 = 0
|
||||||
|
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
|
||||||
|
|
||||||
|
written = int(writtenOut)
|
||||||
|
|
||||||
|
if e1 != 0 {
|
||||||
|
err = e1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||||
|
|
||||||
|
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||||
|
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||||
|
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||||
|
return int(ioDesc.Len), err
|
||||||
|
}
|
@ -0,0 +1,226 @@
|
|||||||
|
// Copyright 2022 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build loong64 && linux
|
||||||
|
// +build loong64,linux
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import "unsafe"
|
||||||
|
|
||||||
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||||
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||||
|
//sys Ftruncate(fd int, length int64) (err error)
|
||||||
|
//sysnb Getegid() (egid int)
|
||||||
|
//sysnb Geteuid() (euid int)
|
||||||
|
//sysnb Getgid() (gid int)
|
||||||
|
//sysnb Getuid() (uid int)
|
||||||
|
//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 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) {
|
||||||
|
var ts *Timespec
|
||||||
|
if timeout != nil {
|
||||||
|
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
||||||
|
}
|
||||||
|
return Pselect(nfd, r, w, e, ts, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
|
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||||
|
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||||
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
|
|
||||||
|
func timespecFromStatxTimestamp(x StatxTimestamp) Timespec {
|
||||||
|
return Timespec{
|
||||||
|
Sec: x.Sec,
|
||||||
|
Nsec: int64(x.Nsec),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Fstatat(fd int, path string, stat *Stat_t, flags int) error {
|
||||||
|
var r Statx_t
|
||||||
|
// Do it the glibc way, add AT_NO_AUTOMOUNT.
|
||||||
|
if err := Statx(fd, path, AT_NO_AUTOMOUNT|flags, STATX_BASIC_STATS, &r); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
stat.Dev = Mkdev(r.Dev_major, r.Dev_minor)
|
||||||
|
stat.Ino = r.Ino
|
||||||
|
stat.Mode = uint32(r.Mode)
|
||||||
|
stat.Nlink = r.Nlink
|
||||||
|
stat.Uid = r.Uid
|
||||||
|
stat.Gid = r.Gid
|
||||||
|
stat.Rdev = Mkdev(r.Rdev_major, r.Rdev_minor)
|
||||||
|
// hope we don't get to process files so large to overflow these size
|
||||||
|
// fields...
|
||||||
|
stat.Size = int64(r.Size)
|
||||||
|
stat.Blksize = int32(r.Blksize)
|
||||||
|
stat.Blocks = int64(r.Blocks)
|
||||||
|
stat.Atim = timespecFromStatxTimestamp(r.Atime)
|
||||||
|
stat.Mtim = timespecFromStatxTimestamp(r.Mtime)
|
||||||
|
stat.Ctim = timespecFromStatxTimestamp(r.Ctime)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
|
return Fstatat(fd, "", stat, AT_EMPTY_PATH)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Stat(path string, stat *Stat_t) (err error) {
|
||||||
|
return Fstatat(AT_FDCWD, path, stat, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Lchown(path string, uid int, gid int) (err error) {
|
||||||
|
return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Lstat(path string, stat *Stat_t) (err error) {
|
||||||
|
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||||
|
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||||
|
//sys Truncate(path string, length int64) (err error)
|
||||||
|
|
||||||
|
func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
||||||
|
return ENOSYS
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||||
|
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||||
|
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||||
|
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
|
||||||
|
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
|
||||||
|
//sysnb socket(domain int, typ int, proto int) (fd int, err error)
|
||||||
|
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
|
||||||
|
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||||
|
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||||
|
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||||
|
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||||
|
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
|
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
|
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||||
|
|
||||||
|
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||||
|
|
||||||
|
func setTimespec(sec, nsec int64) Timespec {
|
||||||
|
return Timespec{Sec: sec, Nsec: nsec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimeval(sec, usec int64) Timeval {
|
||||||
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, nil, rlim)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
|
||||||
|
if tv == nil {
|
||||||
|
return utimensat(dirfd, path, nil, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
ts := []Timespec{
|
||||||
|
NsecToTimespec(TimevalToNsec(tv[0])),
|
||||||
|
NsecToTimespec(TimevalToNsec(tv[1])),
|
||||||
|
}
|
||||||
|
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Time(t *Time_t) (Time_t, error) {
|
||||||
|
var tv Timeval
|
||||||
|
err := Gettimeofday(&tv)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
if t != nil {
|
||||||
|
*t = Time_t(tv.Sec)
|
||||||
|
}
|
||||||
|
return Time_t(tv.Sec), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Utime(path string, buf *Utimbuf) error {
|
||||||
|
tv := []Timeval{
|
||||||
|
{Sec: buf.Actime},
|
||||||
|
{Sec: buf.Modtime},
|
||||||
|
}
|
||||||
|
return Utimes(path, tv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func utimes(path string, tv *[2]Timeval) (err error) {
|
||||||
|
if tv == nil {
|
||||||
|
return utimensat(AT_FDCWD, path, nil, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
ts := []Timespec{
|
||||||
|
NsecToTimespec(TimevalToNsec(tv[0])),
|
||||||
|
NsecToTimespec(TimevalToNsec(tv[1])),
|
||||||
|
}
|
||||||
|
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *PtraceRegs) PC() uint64 { return r.Era }
|
||||||
|
|
||||||
|
func (r *PtraceRegs) SetPC(era uint64) { r.Era = era }
|
||||||
|
|
||||||
|
func (iov *Iovec) SetLen(length int) {
|
||||||
|
iov.Len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetControllen(length int) {
|
||||||
|
msghdr.Controllen = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||||
|
msghdr.Iovlen = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
|
cmsg.Len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
||||||
|
rsa.Service_name_len = uint64(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Pause() error {
|
||||||
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,818 @@
|
|||||||
|
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build loong64 && linux
|
||||||
|
// +build loong64,linux
|
||||||
|
|
||||||
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
const (
|
||||||
|
B1000000 = 0x1008
|
||||||
|
B115200 = 0x1002
|
||||||
|
B1152000 = 0x1009
|
||||||
|
B1500000 = 0x100a
|
||||||
|
B2000000 = 0x100b
|
||||||
|
B230400 = 0x1003
|
||||||
|
B2500000 = 0x100c
|
||||||
|
B3000000 = 0x100d
|
||||||
|
B3500000 = 0x100e
|
||||||
|
B4000000 = 0x100f
|
||||||
|
B460800 = 0x1004
|
||||||
|
B500000 = 0x1005
|
||||||
|
B57600 = 0x1001
|
||||||
|
B576000 = 0x1006
|
||||||
|
B921600 = 0x1007
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKPBSZGET = 0x127b
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
|
BOTHER = 0x1000
|
||||||
|
BS1 = 0x2000
|
||||||
|
BSDLY = 0x2000
|
||||||
|
CBAUD = 0x100f
|
||||||
|
CBAUDEX = 0x1000
|
||||||
|
CIBAUD = 0x100f0000
|
||||||
|
CLOCAL = 0x800
|
||||||
|
CR1 = 0x200
|
||||||
|
CR2 = 0x400
|
||||||
|
CR3 = 0x600
|
||||||
|
CRDLY = 0x600
|
||||||
|
CREAD = 0x80
|
||||||
|
CS6 = 0x10
|
||||||
|
CS7 = 0x20
|
||||||
|
CS8 = 0x30
|
||||||
|
CSIZE = 0x30
|
||||||
|
CSTOPB = 0x40
|
||||||
|
ECCGETLAYOUT = 0x81484d11
|
||||||
|
ECCGETSTATS = 0x80104d12
|
||||||
|
ECHOCTL = 0x200
|
||||||
|
ECHOE = 0x10
|
||||||
|
ECHOK = 0x20
|
||||||
|
ECHOKE = 0x800
|
||||||
|
ECHONL = 0x40
|
||||||
|
ECHOPRT = 0x400
|
||||||
|
EFD_CLOEXEC = 0x80000
|
||||||
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPOLL_CLOEXEC = 0x80000
|
||||||
|
EXTPROC = 0x10000
|
||||||
|
FF1 = 0x8000
|
||||||
|
FFDLY = 0x8000
|
||||||
|
FICLONE = 0x40049409
|
||||||
|
FICLONERANGE = 0x4020940d
|
||||||
|
FLUSHO = 0x1000
|
||||||
|
FPU_CTX_MAGIC = 0x46505501
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
|
FS_IOC_SETFLAGS = 0x40086602
|
||||||
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
F_GETLK = 0x5
|
||||||
|
F_GETLK64 = 0x5
|
||||||
|
F_GETOWN = 0x9
|
||||||
|
F_RDLCK = 0x0
|
||||||
|
F_SETLK = 0x6
|
||||||
|
F_SETLK64 = 0x6
|
||||||
|
F_SETLKW = 0x7
|
||||||
|
F_SETLKW64 = 0x7
|
||||||
|
F_SETOWN = 0x8
|
||||||
|
F_UNLCK = 0x2
|
||||||
|
F_WRLCK = 0x1
|
||||||
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
|
HIDIOCGRDESC = 0x90044802
|
||||||
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HUPCL = 0x400
|
||||||
|
ICANON = 0x2
|
||||||
|
IEXTEN = 0x8000
|
||||||
|
IN_CLOEXEC = 0x80000
|
||||||
|
IN_NONBLOCK = 0x800
|
||||||
|
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||||
|
ISIG = 0x1
|
||||||
|
IUCLC = 0x200
|
||||||
|
IXOFF = 0x1000
|
||||||
|
IXON = 0x400
|
||||||
|
MAP_ANON = 0x20
|
||||||
|
MAP_ANONYMOUS = 0x20
|
||||||
|
MAP_DENYWRITE = 0x800
|
||||||
|
MAP_EXECUTABLE = 0x1000
|
||||||
|
MAP_GROWSDOWN = 0x100
|
||||||
|
MAP_HUGETLB = 0x40000
|
||||||
|
MAP_LOCKED = 0x2000
|
||||||
|
MAP_NONBLOCK = 0x10000
|
||||||
|
MAP_NORESERVE = 0x4000
|
||||||
|
MAP_POPULATE = 0x8000
|
||||||
|
MAP_STACK = 0x20000
|
||||||
|
MAP_SYNC = 0x80000
|
||||||
|
MCL_CURRENT = 0x1
|
||||||
|
MCL_FUTURE = 0x2
|
||||||
|
MCL_ONFAULT = 0x4
|
||||||
|
MEMERASE = 0x40084d02
|
||||||
|
MEMERASE64 = 0x40104d14
|
||||||
|
MEMGETBADBLOCK = 0x40084d0b
|
||||||
|
MEMGETINFO = 0x80204d01
|
||||||
|
MEMGETOOBSEL = 0x80c84d0a
|
||||||
|
MEMGETREGIONCOUNT = 0x80044d07
|
||||||
|
MEMISLOCKED = 0x80084d17
|
||||||
|
MEMLOCK = 0x40084d05
|
||||||
|
MEMREADOOB = 0xc0104d04
|
||||||
|
MEMSETBADBLOCK = 0x40084d0c
|
||||||
|
MEMUNLOCK = 0x40084d06
|
||||||
|
MEMWRITEOOB = 0xc0104d03
|
||||||
|
MTDFILEMODE = 0x4d13
|
||||||
|
NFDBITS = 0x40
|
||||||
|
NLDLY = 0x100
|
||||||
|
NOFLSH = 0x80
|
||||||
|
NS_GET_NSTYPE = 0xb703
|
||||||
|
NS_GET_OWNER_UID = 0xb704
|
||||||
|
NS_GET_PARENT = 0xb702
|
||||||
|
NS_GET_USERNS = 0xb701
|
||||||
|
OLCUC = 0x2
|
||||||
|
ONLCR = 0x4
|
||||||
|
OTPERASE = 0x400c4d19
|
||||||
|
OTPGETREGIONCOUNT = 0x40044d0e
|
||||||
|
OTPGETREGIONINFO = 0x400c4d0f
|
||||||
|
OTPLOCK = 0x800c4d10
|
||||||
|
OTPSELECT = 0x80044d0d
|
||||||
|
O_APPEND = 0x400
|
||||||
|
O_ASYNC = 0x2000
|
||||||
|
O_CLOEXEC = 0x80000
|
||||||
|
O_CREAT = 0x40
|
||||||
|
O_DIRECT = 0x4000
|
||||||
|
O_DIRECTORY = 0x10000
|
||||||
|
O_DSYNC = 0x1000
|
||||||
|
O_EXCL = 0x80
|
||||||
|
O_FSYNC = 0x101000
|
||||||
|
O_LARGEFILE = 0x0
|
||||||
|
O_NDELAY = 0x800
|
||||||
|
O_NOATIME = 0x40000
|
||||||
|
O_NOCTTY = 0x100
|
||||||
|
O_NOFOLLOW = 0x20000
|
||||||
|
O_NONBLOCK = 0x800
|
||||||
|
O_PATH = 0x200000
|
||||||
|
O_RSYNC = 0x101000
|
||||||
|
O_SYNC = 0x101000
|
||||||
|
O_TMPFILE = 0x410000
|
||||||
|
O_TRUNC = 0x200
|
||||||
|
PARENB = 0x100
|
||||||
|
PARODD = 0x200
|
||||||
|
PENDIN = 0x4000
|
||||||
|
PERF_EVENT_IOC_DISABLE = 0x2401
|
||||||
|
PERF_EVENT_IOC_ENABLE = 0x2400
|
||||||
|
PERF_EVENT_IOC_ID = 0x80082407
|
||||||
|
PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
|
||||||
|
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
|
||||||
|
PERF_EVENT_IOC_PERIOD = 0x40082404
|
||||||
|
PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
|
||||||
|
PERF_EVENT_IOC_REFRESH = 0x2402
|
||||||
|
PERF_EVENT_IOC_RESET = 0x2403
|
||||||
|
PERF_EVENT_IOC_SET_BPF = 0x40042408
|
||||||
|
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||||
|
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||||
|
PPPIOCATTACH = 0x4004743d
|
||||||
|
PPPIOCATTCHAN = 0x40047438
|
||||||
|
PPPIOCBRIDGECHAN = 0x40047435
|
||||||
|
PPPIOCCONNECT = 0x4004743a
|
||||||
|
PPPIOCDETACH = 0x4004743c
|
||||||
|
PPPIOCDISCONN = 0x7439
|
||||||
|
PPPIOCGASYNCMAP = 0x80047458
|
||||||
|
PPPIOCGCHAN = 0x80047437
|
||||||
|
PPPIOCGDEBUG = 0x80047441
|
||||||
|
PPPIOCGFLAGS = 0x8004745a
|
||||||
|
PPPIOCGIDLE = 0x8010743f
|
||||||
|
PPPIOCGIDLE32 = 0x8008743f
|
||||||
|
PPPIOCGIDLE64 = 0x8010743f
|
||||||
|
PPPIOCGL2TPSTATS = 0x80487436
|
||||||
|
PPPIOCGMRU = 0x80047453
|
||||||
|
PPPIOCGRASYNCMAP = 0x80047455
|
||||||
|
PPPIOCGUNIT = 0x80047456
|
||||||
|
PPPIOCGXASYNCMAP = 0x80207450
|
||||||
|
PPPIOCSACTIVE = 0x40107446
|
||||||
|
PPPIOCSASYNCMAP = 0x40047457
|
||||||
|
PPPIOCSCOMPRESS = 0x4010744d
|
||||||
|
PPPIOCSDEBUG = 0x40047440
|
||||||
|
PPPIOCSFLAGS = 0x40047459
|
||||||
|
PPPIOCSMAXCID = 0x40047451
|
||||||
|
PPPIOCSMRRU = 0x4004743b
|
||||||
|
PPPIOCSMRU = 0x40047452
|
||||||
|
PPPIOCSNPMODE = 0x4008744b
|
||||||
|
PPPIOCSPASS = 0x40107447
|
||||||
|
PPPIOCSRASYNCMAP = 0x40047454
|
||||||
|
PPPIOCSXASYNCMAP = 0x4020744f
|
||||||
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
|
PPPIOCXFERUNIT = 0x744e
|
||||||
|
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||||
|
PTRACE_SYSEMU = 0x1f
|
||||||
|
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
||||||
|
RLIMIT_AS = 0x9
|
||||||
|
RLIMIT_MEMLOCK = 0x8
|
||||||
|
RLIMIT_NOFILE = 0x7
|
||||||
|
RLIMIT_NPROC = 0x6
|
||||||
|
RLIMIT_RSS = 0x5
|
||||||
|
RNDADDENTROPY = 0x40085203
|
||||||
|
RNDADDTOENTCNT = 0x40045201
|
||||||
|
RNDCLEARPOOL = 0x5206
|
||||||
|
RNDGETENTCNT = 0x80045200
|
||||||
|
RNDGETPOOL = 0x80085202
|
||||||
|
RNDRESEEDCRNG = 0x5207
|
||||||
|
RNDZAPENTCNT = 0x5204
|
||||||
|
RTC_AIE_OFF = 0x7002
|
||||||
|
RTC_AIE_ON = 0x7001
|
||||||
|
RTC_ALM_READ = 0x80247008
|
||||||
|
RTC_ALM_SET = 0x40247007
|
||||||
|
RTC_EPOCH_READ = 0x8008700d
|
||||||
|
RTC_EPOCH_SET = 0x4008700e
|
||||||
|
RTC_IRQP_READ = 0x8008700b
|
||||||
|
RTC_IRQP_SET = 0x4008700c
|
||||||
|
RTC_PARAM_GET = 0x40187013
|
||||||
|
RTC_PARAM_SET = 0x40187014
|
||||||
|
RTC_PIE_OFF = 0x7006
|
||||||
|
RTC_PIE_ON = 0x7005
|
||||||
|
RTC_PLL_GET = 0x80207011
|
||||||
|
RTC_PLL_SET = 0x40207012
|
||||||
|
RTC_RD_TIME = 0x80247009
|
||||||
|
RTC_SET_TIME = 0x4024700a
|
||||||
|
RTC_UIE_OFF = 0x7004
|
||||||
|
RTC_UIE_ON = 0x7003
|
||||||
|
RTC_VL_CLR = 0x7014
|
||||||
|
RTC_VL_READ = 0x80047013
|
||||||
|
RTC_WIE_OFF = 0x7010
|
||||||
|
RTC_WIE_ON = 0x700f
|
||||||
|
RTC_WKALM_RD = 0x80287010
|
||||||
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_TIMESTAMPING = 0x25
|
||||||
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
|
SCM_TIMESTAMPNS = 0x23
|
||||||
|
SCM_TXTIME = 0x3d
|
||||||
|
SCM_WIFI_STATUS = 0x29
|
||||||
|
SFD_CLOEXEC = 0x80000
|
||||||
|
SFD_NONBLOCK = 0x800
|
||||||
|
SIOCATMARK = 0x8905
|
||||||
|
SIOCGPGRP = 0x8904
|
||||||
|
SIOCGSTAMPNS_NEW = 0x80108907
|
||||||
|
SIOCGSTAMP_NEW = 0x80108906
|
||||||
|
SIOCINQ = 0x541b
|
||||||
|
SIOCOUTQ = 0x5411
|
||||||
|
SIOCSPGRP = 0x8902
|
||||||
|
SOCK_CLOEXEC = 0x80000
|
||||||
|
SOCK_DGRAM = 0x2
|
||||||
|
SOCK_NONBLOCK = 0x800
|
||||||
|
SOCK_STREAM = 0x1
|
||||||
|
SOL_SOCKET = 0x1
|
||||||
|
SO_ACCEPTCONN = 0x1e
|
||||||
|
SO_ATTACH_BPF = 0x32
|
||||||
|
SO_ATTACH_REUSEPORT_CBPF = 0x33
|
||||||
|
SO_ATTACH_REUSEPORT_EBPF = 0x34
|
||||||
|
SO_BINDTODEVICE = 0x19
|
||||||
|
SO_BINDTOIFINDEX = 0x3e
|
||||||
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
|
SO_BROADCAST = 0x6
|
||||||
|
SO_BSDCOMPAT = 0xe
|
||||||
|
SO_BUF_LOCK = 0x48
|
||||||
|
SO_BUSY_POLL = 0x2e
|
||||||
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
|
SO_CNX_ADVICE = 0x35
|
||||||
|
SO_COOKIE = 0x39
|
||||||
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DOMAIN = 0x27
|
||||||
|
SO_DONTROUTE = 0x5
|
||||||
|
SO_ERROR = 0x4
|
||||||
|
SO_INCOMING_CPU = 0x31
|
||||||
|
SO_INCOMING_NAPI_ID = 0x38
|
||||||
|
SO_KEEPALIVE = 0x9
|
||||||
|
SO_LINGER = 0xd
|
||||||
|
SO_LOCK_FILTER = 0x2c
|
||||||
|
SO_MARK = 0x24
|
||||||
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
|
SO_MEMINFO = 0x37
|
||||||
|
SO_NETNS_COOKIE = 0x47
|
||||||
|
SO_NOFCS = 0x2b
|
||||||
|
SO_OOBINLINE = 0xa
|
||||||
|
SO_PASSCRED = 0x10
|
||||||
|
SO_PASSSEC = 0x22
|
||||||
|
SO_PEEK_OFF = 0x2a
|
||||||
|
SO_PEERCRED = 0x11
|
||||||
|
SO_PEERGROUPS = 0x3b
|
||||||
|
SO_PEERSEC = 0x1f
|
||||||
|
SO_PREFER_BUSY_POLL = 0x45
|
||||||
|
SO_PROTOCOL = 0x26
|
||||||
|
SO_RCVBUF = 0x8
|
||||||
|
SO_RCVBUFFORCE = 0x21
|
||||||
|
SO_RCVLOWAT = 0x12
|
||||||
|
SO_RCVMARK = 0x4b
|
||||||
|
SO_RCVTIMEO = 0x14
|
||||||
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
|
SO_RESERVE_MEM = 0x49
|
||||||
|
SO_REUSEADDR = 0x2
|
||||||
|
SO_REUSEPORT = 0xf
|
||||||
|
SO_RXQ_OVFL = 0x28
|
||||||
|
SO_SECURITY_AUTHENTICATION = 0x16
|
||||||
|
SO_SECURITY_ENCRYPTION_NETWORK = 0x18
|
||||||
|
SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
|
||||||
|
SO_SELECT_ERR_QUEUE = 0x2d
|
||||||
|
SO_SNDBUF = 0x7
|
||||||
|
SO_SNDBUFFORCE = 0x20
|
||||||
|
SO_SNDLOWAT = 0x13
|
||||||
|
SO_SNDTIMEO = 0x15
|
||||||
|
SO_SNDTIMEO_NEW = 0x43
|
||||||
|
SO_SNDTIMEO_OLD = 0x15
|
||||||
|
SO_TIMESTAMPING = 0x25
|
||||||
|
SO_TIMESTAMPING_NEW = 0x41
|
||||||
|
SO_TIMESTAMPING_OLD = 0x25
|
||||||
|
SO_TIMESTAMPNS = 0x23
|
||||||
|
SO_TIMESTAMPNS_NEW = 0x40
|
||||||
|
SO_TIMESTAMPNS_OLD = 0x23
|
||||||
|
SO_TIMESTAMP_NEW = 0x3f
|
||||||
|
SO_TXREHASH = 0x4a
|
||||||
|
SO_TXTIME = 0x3d
|
||||||
|
SO_TYPE = 0x3
|
||||||
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SO_ZEROCOPY = 0x3c
|
||||||
|
TAB1 = 0x800
|
||||||
|
TAB2 = 0x1000
|
||||||
|
TAB3 = 0x1800
|
||||||
|
TABDLY = 0x1800
|
||||||
|
TCFLSH = 0x540b
|
||||||
|
TCGETA = 0x5405
|
||||||
|
TCGETS = 0x5401
|
||||||
|
TCGETS2 = 0x802c542a
|
||||||
|
TCGETX = 0x5432
|
||||||
|
TCSAFLUSH = 0x2
|
||||||
|
TCSBRK = 0x5409
|
||||||
|
TCSBRKP = 0x5425
|
||||||
|
TCSETA = 0x5406
|
||||||
|
TCSETAF = 0x5408
|
||||||
|
TCSETAW = 0x5407
|
||||||
|
TCSETS = 0x5402
|
||||||
|
TCSETS2 = 0x402c542b
|
||||||
|
TCSETSF = 0x5404
|
||||||
|
TCSETSF2 = 0x402c542d
|
||||||
|
TCSETSW = 0x5403
|
||||||
|
TCSETSW2 = 0x402c542c
|
||||||
|
TCSETX = 0x5433
|
||||||
|
TCSETXF = 0x5434
|
||||||
|
TCSETXW = 0x5435
|
||||||
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
|
TIOCCBRK = 0x5428
|
||||||
|
TIOCCONS = 0x541d
|
||||||
|
TIOCEXCL = 0x540c
|
||||||
|
TIOCGDEV = 0x80045432
|
||||||
|
TIOCGETD = 0x5424
|
||||||
|
TIOCGEXCL = 0x80045440
|
||||||
|
TIOCGICOUNT = 0x545d
|
||||||
|
TIOCGISO7816 = 0x80285442
|
||||||
|
TIOCGLCKTRMIOS = 0x5456
|
||||||
|
TIOCGPGRP = 0x540f
|
||||||
|
TIOCGPKT = 0x80045438
|
||||||
|
TIOCGPTLCK = 0x80045439
|
||||||
|
TIOCGPTN = 0x80045430
|
||||||
|
TIOCGPTPEER = 0x5441
|
||||||
|
TIOCGRS485 = 0x542e
|
||||||
|
TIOCGSERIAL = 0x541e
|
||||||
|
TIOCGSID = 0x5429
|
||||||
|
TIOCGSOFTCAR = 0x5419
|
||||||
|
TIOCGWINSZ = 0x5413
|
||||||
|
TIOCINQ = 0x541b
|
||||||
|
TIOCLINUX = 0x541c
|
||||||
|
TIOCMBIC = 0x5417
|
||||||
|
TIOCMBIS = 0x5416
|
||||||
|
TIOCMGET = 0x5415
|
||||||
|
TIOCMIWAIT = 0x545c
|
||||||
|
TIOCMSET = 0x5418
|
||||||
|
TIOCM_CAR = 0x40
|
||||||
|
TIOCM_CD = 0x40
|
||||||
|
TIOCM_CTS = 0x20
|
||||||
|
TIOCM_DSR = 0x100
|
||||||
|
TIOCM_RI = 0x80
|
||||||
|
TIOCM_RNG = 0x80
|
||||||
|
TIOCM_SR = 0x10
|
||||||
|
TIOCM_ST = 0x8
|
||||||
|
TIOCNOTTY = 0x5422
|
||||||
|
TIOCNXCL = 0x540d
|
||||||
|
TIOCOUTQ = 0x5411
|
||||||
|
TIOCPKT = 0x5420
|
||||||
|
TIOCSBRK = 0x5427
|
||||||
|
TIOCSCTTY = 0x540e
|
||||||
|
TIOCSERCONFIG = 0x5453
|
||||||
|
TIOCSERGETLSR = 0x5459
|
||||||
|
TIOCSERGETMULTI = 0x545a
|
||||||
|
TIOCSERGSTRUCT = 0x5458
|
||||||
|
TIOCSERGWILD = 0x5454
|
||||||
|
TIOCSERSETMULTI = 0x545b
|
||||||
|
TIOCSERSWILD = 0x5455
|
||||||
|
TIOCSER_TEMT = 0x1
|
||||||
|
TIOCSETD = 0x5423
|
||||||
|
TIOCSIG = 0x40045436
|
||||||
|
TIOCSISO7816 = 0xc0285443
|
||||||
|
TIOCSLCKTRMIOS = 0x5457
|
||||||
|
TIOCSPGRP = 0x5410
|
||||||
|
TIOCSPTLCK = 0x40045431
|
||||||
|
TIOCSRS485 = 0x542f
|
||||||
|
TIOCSSERIAL = 0x541f
|
||||||
|
TIOCSSOFTCAR = 0x541a
|
||||||
|
TIOCSTI = 0x5412
|
||||||
|
TIOCSWINSZ = 0x5414
|
||||||
|
TIOCVHANGUP = 0x5437
|
||||||
|
TOSTOP = 0x100
|
||||||
|
TUNATTACHFILTER = 0x401054d5
|
||||||
|
TUNDETACHFILTER = 0x401054d6
|
||||||
|
TUNGETDEVNETNS = 0x54e3
|
||||||
|
TUNGETFEATURES = 0x800454cf
|
||||||
|
TUNGETFILTER = 0x801054db
|
||||||
|
TUNGETIFF = 0x800454d2
|
||||||
|
TUNGETSNDBUF = 0x800454d3
|
||||||
|
TUNGETVNETBE = 0x800454df
|
||||||
|
TUNGETVNETHDRSZ = 0x800454d7
|
||||||
|
TUNGETVNETLE = 0x800454dd
|
||||||
|
TUNSETCARRIER = 0x400454e2
|
||||||
|
TUNSETDEBUG = 0x400454c9
|
||||||
|
TUNSETFILTEREBPF = 0x800454e1
|
||||||
|
TUNSETGROUP = 0x400454ce
|
||||||
|
TUNSETIFF = 0x400454ca
|
||||||
|
TUNSETIFINDEX = 0x400454da
|
||||||
|
TUNSETLINK = 0x400454cd
|
||||||
|
TUNSETNOCSUM = 0x400454c8
|
||||||
|
TUNSETOFFLOAD = 0x400454d0
|
||||||
|
TUNSETOWNER = 0x400454cc
|
||||||
|
TUNSETPERSIST = 0x400454cb
|
||||||
|
TUNSETQUEUE = 0x400454d9
|
||||||
|
TUNSETSNDBUF = 0x400454d4
|
||||||
|
TUNSETSTEERINGEBPF = 0x800454e0
|
||||||
|
TUNSETTXFILTER = 0x400454d1
|
||||||
|
TUNSETVNETBE = 0x400454de
|
||||||
|
TUNSETVNETHDRSZ = 0x400454d8
|
||||||
|
TUNSETVNETLE = 0x400454dc
|
||||||
|
UBI_IOCATT = 0x40186f40
|
||||||
|
UBI_IOCDET = 0x40046f41
|
||||||
|
UBI_IOCEBCH = 0x40044f02
|
||||||
|
UBI_IOCEBER = 0x40044f01
|
||||||
|
UBI_IOCEBISMAP = 0x80044f05
|
||||||
|
UBI_IOCEBMAP = 0x40084f03
|
||||||
|
UBI_IOCEBUNMAP = 0x40044f04
|
||||||
|
UBI_IOCMKVOL = 0x40986f00
|
||||||
|
UBI_IOCRMVOL = 0x40046f01
|
||||||
|
UBI_IOCRNVOL = 0x51106f03
|
||||||
|
UBI_IOCRPEB = 0x40046f04
|
||||||
|
UBI_IOCRSVOL = 0x400c6f02
|
||||||
|
UBI_IOCSETVOLPROP = 0x40104f06
|
||||||
|
UBI_IOCSPEB = 0x40046f05
|
||||||
|
UBI_IOCVOLCRBLK = 0x40804f07
|
||||||
|
UBI_IOCVOLRMBLK = 0x4f08
|
||||||
|
UBI_IOCVOLUP = 0x40084f00
|
||||||
|
VDISCARD = 0xd
|
||||||
|
VEOF = 0x4
|
||||||
|
VEOL = 0xb
|
||||||
|
VEOL2 = 0x10
|
||||||
|
VMIN = 0x6
|
||||||
|
VREPRINT = 0xc
|
||||||
|
VSTART = 0x8
|
||||||
|
VSTOP = 0x9
|
||||||
|
VSUSP = 0xa
|
||||||
|
VSWTC = 0x7
|
||||||
|
VT1 = 0x4000
|
||||||
|
VTDLY = 0x4000
|
||||||
|
VTIME = 0x5
|
||||||
|
VWERASE = 0xe
|
||||||
|
WDIOC_GETBOOTSTATUS = 0x80045702
|
||||||
|
WDIOC_GETPRETIMEOUT = 0x80045709
|
||||||
|
WDIOC_GETSTATUS = 0x80045701
|
||||||
|
WDIOC_GETSUPPORT = 0x80285700
|
||||||
|
WDIOC_GETTEMP = 0x80045703
|
||||||
|
WDIOC_GETTIMELEFT = 0x8004570a
|
||||||
|
WDIOC_GETTIMEOUT = 0x80045707
|
||||||
|
WDIOC_KEEPALIVE = 0x80045705
|
||||||
|
WDIOC_SETOPTIONS = 0x80045704
|
||||||
|
WORDSIZE = 0x40
|
||||||
|
XCASE = 0x4
|
||||||
|
XTABS = 0x1800
|
||||||
|
_HIDIOCGRAWNAME = 0x80804804
|
||||||
|
_HIDIOCGRAWPHYS = 0x80404805
|
||||||
|
_HIDIOCGRAWUNIQ = 0x80404808
|
||||||
|
)
|
||||||
|
|
||||||
|
// Errors
|
||||||
|
const (
|
||||||
|
EADDRINUSE = syscall.Errno(0x62)
|
||||||
|
EADDRNOTAVAIL = syscall.Errno(0x63)
|
||||||
|
EADV = syscall.Errno(0x44)
|
||||||
|
EAFNOSUPPORT = syscall.Errno(0x61)
|
||||||
|
EALREADY = syscall.Errno(0x72)
|
||||||
|
EBADE = syscall.Errno(0x34)
|
||||||
|
EBADFD = syscall.Errno(0x4d)
|
||||||
|
EBADMSG = syscall.Errno(0x4a)
|
||||||
|
EBADR = syscall.Errno(0x35)
|
||||||
|
EBADRQC = syscall.Errno(0x38)
|
||||||
|
EBADSLT = syscall.Errno(0x39)
|
||||||
|
EBFONT = syscall.Errno(0x3b)
|
||||||
|
ECANCELED = syscall.Errno(0x7d)
|
||||||
|
ECHRNG = syscall.Errno(0x2c)
|
||||||
|
ECOMM = syscall.Errno(0x46)
|
||||||
|
ECONNABORTED = syscall.Errno(0x67)
|
||||||
|
ECONNREFUSED = syscall.Errno(0x6f)
|
||||||
|
ECONNRESET = syscall.Errno(0x68)
|
||||||
|
EDEADLK = syscall.Errno(0x23)
|
||||||
|
EDEADLOCK = syscall.Errno(0x23)
|
||||||
|
EDESTADDRREQ = syscall.Errno(0x59)
|
||||||
|
EDOTDOT = syscall.Errno(0x49)
|
||||||
|
EDQUOT = syscall.Errno(0x7a)
|
||||||
|
EHOSTDOWN = syscall.Errno(0x70)
|
||||||
|
EHOSTUNREACH = syscall.Errno(0x71)
|
||||||
|
EHWPOISON = syscall.Errno(0x85)
|
||||||
|
EIDRM = syscall.Errno(0x2b)
|
||||||
|
EILSEQ = syscall.Errno(0x54)
|
||||||
|
EINPROGRESS = syscall.Errno(0x73)
|
||||||
|
EISCONN = syscall.Errno(0x6a)
|
||||||
|
EISNAM = syscall.Errno(0x78)
|
||||||
|
EKEYEXPIRED = syscall.Errno(0x7f)
|
||||||
|
EKEYREJECTED = syscall.Errno(0x81)
|
||||||
|
EKEYREVOKED = syscall.Errno(0x80)
|
||||||
|
EL2HLT = syscall.Errno(0x33)
|
||||||
|
EL2NSYNC = syscall.Errno(0x2d)
|
||||||
|
EL3HLT = syscall.Errno(0x2e)
|
||||||
|
EL3RST = syscall.Errno(0x2f)
|
||||||
|
ELIBACC = syscall.Errno(0x4f)
|
||||||
|
ELIBBAD = syscall.Errno(0x50)
|
||||||
|
ELIBEXEC = syscall.Errno(0x53)
|
||||||
|
ELIBMAX = syscall.Errno(0x52)
|
||||||
|
ELIBSCN = syscall.Errno(0x51)
|
||||||
|
ELNRNG = syscall.Errno(0x30)
|
||||||
|
ELOOP = syscall.Errno(0x28)
|
||||||
|
EMEDIUMTYPE = syscall.Errno(0x7c)
|
||||||
|
EMSGSIZE = syscall.Errno(0x5a)
|
||||||
|
EMULTIHOP = syscall.Errno(0x48)
|
||||||
|
ENAMETOOLONG = syscall.Errno(0x24)
|
||||||
|
ENAVAIL = syscall.Errno(0x77)
|
||||||
|
ENETDOWN = syscall.Errno(0x64)
|
||||||
|
ENETRESET = syscall.Errno(0x66)
|
||||||
|
ENETUNREACH = syscall.Errno(0x65)
|
||||||
|
ENOANO = syscall.Errno(0x37)
|
||||||
|
ENOBUFS = syscall.Errno(0x69)
|
||||||
|
ENOCSI = syscall.Errno(0x32)
|
||||||
|
ENODATA = syscall.Errno(0x3d)
|
||||||
|
ENOKEY = syscall.Errno(0x7e)
|
||||||
|
ENOLCK = syscall.Errno(0x25)
|
||||||
|
ENOLINK = syscall.Errno(0x43)
|
||||||
|
ENOMEDIUM = syscall.Errno(0x7b)
|
||||||
|
ENOMSG = syscall.Errno(0x2a)
|
||||||
|
ENONET = syscall.Errno(0x40)
|
||||||
|
ENOPKG = syscall.Errno(0x41)
|
||||||
|
ENOPROTOOPT = syscall.Errno(0x5c)
|
||||||
|
ENOSR = syscall.Errno(0x3f)
|
||||||
|
ENOSTR = syscall.Errno(0x3c)
|
||||||
|
ENOSYS = syscall.Errno(0x26)
|
||||||
|
ENOTCONN = syscall.Errno(0x6b)
|
||||||
|
ENOTEMPTY = syscall.Errno(0x27)
|
||||||
|
ENOTNAM = syscall.Errno(0x76)
|
||||||
|
ENOTRECOVERABLE = syscall.Errno(0x83)
|
||||||
|
ENOTSOCK = syscall.Errno(0x58)
|
||||||
|
ENOTSUP = syscall.Errno(0x5f)
|
||||||
|
ENOTUNIQ = syscall.Errno(0x4c)
|
||||||
|
EOPNOTSUPP = syscall.Errno(0x5f)
|
||||||
|
EOVERFLOW = syscall.Errno(0x4b)
|
||||||
|
EOWNERDEAD = syscall.Errno(0x82)
|
||||||
|
EPFNOSUPPORT = syscall.Errno(0x60)
|
||||||
|
EPROTO = syscall.Errno(0x47)
|
||||||
|
EPROTONOSUPPORT = syscall.Errno(0x5d)
|
||||||
|
EPROTOTYPE = syscall.Errno(0x5b)
|
||||||
|
EREMCHG = syscall.Errno(0x4e)
|
||||||
|
EREMOTE = syscall.Errno(0x42)
|
||||||
|
EREMOTEIO = syscall.Errno(0x79)
|
||||||
|
ERESTART = syscall.Errno(0x55)
|
||||||
|
ERFKILL = syscall.Errno(0x84)
|
||||||
|
ESHUTDOWN = syscall.Errno(0x6c)
|
||||||
|
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
|
||||||
|
ESRMNT = syscall.Errno(0x45)
|
||||||
|
ESTALE = syscall.Errno(0x74)
|
||||||
|
ESTRPIPE = syscall.Errno(0x56)
|
||||||
|
ETIME = syscall.Errno(0x3e)
|
||||||
|
ETIMEDOUT = syscall.Errno(0x6e)
|
||||||
|
ETOOMANYREFS = syscall.Errno(0x6d)
|
||||||
|
EUCLEAN = syscall.Errno(0x75)
|
||||||
|
EUNATCH = syscall.Errno(0x31)
|
||||||
|
EUSERS = syscall.Errno(0x57)
|
||||||
|
EXFULL = syscall.Errno(0x36)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
const (
|
||||||
|
SIGBUS = syscall.Signal(0x7)
|
||||||
|
SIGCHLD = syscall.Signal(0x11)
|
||||||
|
SIGCLD = syscall.Signal(0x11)
|
||||||
|
SIGCONT = syscall.Signal(0x12)
|
||||||
|
SIGIO = syscall.Signal(0x1d)
|
||||||
|
SIGPOLL = syscall.Signal(0x1d)
|
||||||
|
SIGPROF = syscall.Signal(0x1b)
|
||||||
|
SIGPWR = syscall.Signal(0x1e)
|
||||||
|
SIGSTKFLT = syscall.Signal(0x10)
|
||||||
|
SIGSTOP = syscall.Signal(0x13)
|
||||||
|
SIGSYS = syscall.Signal(0x1f)
|
||||||
|
SIGTSTP = syscall.Signal(0x14)
|
||||||
|
SIGTTIN = syscall.Signal(0x15)
|
||||||
|
SIGTTOU = syscall.Signal(0x16)
|
||||||
|
SIGURG = syscall.Signal(0x17)
|
||||||
|
SIGUSR1 = syscall.Signal(0xa)
|
||||||
|
SIGUSR2 = syscall.Signal(0xc)
|
||||||
|
SIGVTALRM = syscall.Signal(0x1a)
|
||||||
|
SIGWINCH = syscall.Signal(0x1c)
|
||||||
|
SIGXCPU = syscall.Signal(0x18)
|
||||||
|
SIGXFSZ = syscall.Signal(0x19)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Error table
|
||||||
|
var errorList = [...]struct {
|
||||||
|
num syscall.Errno
|
||||||
|
name string
|
||||||
|
desc string
|
||||||
|
}{
|
||||||
|
{1, "EPERM", "operation not permitted"},
|
||||||
|
{2, "ENOENT", "no such file or directory"},
|
||||||
|
{3, "ESRCH", "no such process"},
|
||||||
|
{4, "EINTR", "interrupted system call"},
|
||||||
|
{5, "EIO", "input/output error"},
|
||||||
|
{6, "ENXIO", "no such device or address"},
|
||||||
|
{7, "E2BIG", "argument list too long"},
|
||||||
|
{8, "ENOEXEC", "exec format error"},
|
||||||
|
{9, "EBADF", "bad file descriptor"},
|
||||||
|
{10, "ECHILD", "no child processes"},
|
||||||
|
{11, "EAGAIN", "resource temporarily unavailable"},
|
||||||
|
{12, "ENOMEM", "cannot allocate memory"},
|
||||||
|
{13, "EACCES", "permission denied"},
|
||||||
|
{14, "EFAULT", "bad address"},
|
||||||
|
{15, "ENOTBLK", "block device required"},
|
||||||
|
{16, "EBUSY", "device or resource busy"},
|
||||||
|
{17, "EEXIST", "file exists"},
|
||||||
|
{18, "EXDEV", "invalid cross-device link"},
|
||||||
|
{19, "ENODEV", "no such device"},
|
||||||
|
{20, "ENOTDIR", "not a directory"},
|
||||||
|
{21, "EISDIR", "is a directory"},
|
||||||
|
{22, "EINVAL", "invalid argument"},
|
||||||
|
{23, "ENFILE", "too many open files in system"},
|
||||||
|
{24, "EMFILE", "too many open files"},
|
||||||
|
{25, "ENOTTY", "inappropriate ioctl for device"},
|
||||||
|
{26, "ETXTBSY", "text file busy"},
|
||||||
|
{27, "EFBIG", "file too large"},
|
||||||
|
{28, "ENOSPC", "no space left on device"},
|
||||||
|
{29, "ESPIPE", "illegal seek"},
|
||||||
|
{30, "EROFS", "read-only file system"},
|
||||||
|
{31, "EMLINK", "too many links"},
|
||||||
|
{32, "EPIPE", "broken pipe"},
|
||||||
|
{33, "EDOM", "numerical argument out of domain"},
|
||||||
|
{34, "ERANGE", "numerical result out of range"},
|
||||||
|
{35, "EDEADLK", "resource deadlock avoided"},
|
||||||
|
{36, "ENAMETOOLONG", "file name too long"},
|
||||||
|
{37, "ENOLCK", "no locks available"},
|
||||||
|
{38, "ENOSYS", "function not implemented"},
|
||||||
|
{39, "ENOTEMPTY", "directory not empty"},
|
||||||
|
{40, "ELOOP", "too many levels of symbolic links"},
|
||||||
|
{42, "ENOMSG", "no message of desired type"},
|
||||||
|
{43, "EIDRM", "identifier removed"},
|
||||||
|
{44, "ECHRNG", "channel number out of range"},
|
||||||
|
{45, "EL2NSYNC", "level 2 not synchronized"},
|
||||||
|
{46, "EL3HLT", "level 3 halted"},
|
||||||
|
{47, "EL3RST", "level 3 reset"},
|
||||||
|
{48, "ELNRNG", "link number out of range"},
|
||||||
|
{49, "EUNATCH", "protocol driver not attached"},
|
||||||
|
{50, "ENOCSI", "no CSI structure available"},
|
||||||
|
{51, "EL2HLT", "level 2 halted"},
|
||||||
|
{52, "EBADE", "invalid exchange"},
|
||||||
|
{53, "EBADR", "invalid request descriptor"},
|
||||||
|
{54, "EXFULL", "exchange full"},
|
||||||
|
{55, "ENOANO", "no anode"},
|
||||||
|
{56, "EBADRQC", "invalid request code"},
|
||||||
|
{57, "EBADSLT", "invalid slot"},
|
||||||
|
{59, "EBFONT", "bad font file format"},
|
||||||
|
{60, "ENOSTR", "device not a stream"},
|
||||||
|
{61, "ENODATA", "no data available"},
|
||||||
|
{62, "ETIME", "timer expired"},
|
||||||
|
{63, "ENOSR", "out of streams resources"},
|
||||||
|
{64, "ENONET", "machine is not on the network"},
|
||||||
|
{65, "ENOPKG", "package not installed"},
|
||||||
|
{66, "EREMOTE", "object is remote"},
|
||||||
|
{67, "ENOLINK", "link has been severed"},
|
||||||
|
{68, "EADV", "advertise error"},
|
||||||
|
{69, "ESRMNT", "srmount error"},
|
||||||
|
{70, "ECOMM", "communication error on send"},
|
||||||
|
{71, "EPROTO", "protocol error"},
|
||||||
|
{72, "EMULTIHOP", "multihop attempted"},
|
||||||
|
{73, "EDOTDOT", "RFS specific error"},
|
||||||
|
{74, "EBADMSG", "bad message"},
|
||||||
|
{75, "EOVERFLOW", "value too large for defined data type"},
|
||||||
|
{76, "ENOTUNIQ", "name not unique on network"},
|
||||||
|
{77, "EBADFD", "file descriptor in bad state"},
|
||||||
|
{78, "EREMCHG", "remote address changed"},
|
||||||
|
{79, "ELIBACC", "can not access a needed shared library"},
|
||||||
|
{80, "ELIBBAD", "accessing a corrupted shared library"},
|
||||||
|
{81, "ELIBSCN", ".lib section in a.out corrupted"},
|
||||||
|
{82, "ELIBMAX", "attempting to link in too many shared libraries"},
|
||||||
|
{83, "ELIBEXEC", "cannot exec a shared library directly"},
|
||||||
|
{84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
|
||||||
|
{85, "ERESTART", "interrupted system call should be restarted"},
|
||||||
|
{86, "ESTRPIPE", "streams pipe error"},
|
||||||
|
{87, "EUSERS", "too many users"},
|
||||||
|
{88, "ENOTSOCK", "socket operation on non-socket"},
|
||||||
|
{89, "EDESTADDRREQ", "destination address required"},
|
||||||
|
{90, "EMSGSIZE", "message too long"},
|
||||||
|
{91, "EPROTOTYPE", "protocol wrong type for socket"},
|
||||||
|
{92, "ENOPROTOOPT", "protocol not available"},
|
||||||
|
{93, "EPROTONOSUPPORT", "protocol not supported"},
|
||||||
|
{94, "ESOCKTNOSUPPORT", "socket type not supported"},
|
||||||
|
{95, "ENOTSUP", "operation not supported"},
|
||||||
|
{96, "EPFNOSUPPORT", "protocol family not supported"},
|
||||||
|
{97, "EAFNOSUPPORT", "address family not supported by protocol"},
|
||||||
|
{98, "EADDRINUSE", "address already in use"},
|
||||||
|
{99, "EADDRNOTAVAIL", "cannot assign requested address"},
|
||||||
|
{100, "ENETDOWN", "network is down"},
|
||||||
|
{101, "ENETUNREACH", "network is unreachable"},
|
||||||
|
{102, "ENETRESET", "network dropped connection on reset"},
|
||||||
|
{103, "ECONNABORTED", "software caused connection abort"},
|
||||||
|
{104, "ECONNRESET", "connection reset by peer"},
|
||||||
|
{105, "ENOBUFS", "no buffer space available"},
|
||||||
|
{106, "EISCONN", "transport endpoint is already connected"},
|
||||||
|
{107, "ENOTCONN", "transport endpoint is not connected"},
|
||||||
|
{108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
|
||||||
|
{109, "ETOOMANYREFS", "too many references: cannot splice"},
|
||||||
|
{110, "ETIMEDOUT", "connection timed out"},
|
||||||
|
{111, "ECONNREFUSED", "connection refused"},
|
||||||
|
{112, "EHOSTDOWN", "host is down"},
|
||||||
|
{113, "EHOSTUNREACH", "no route to host"},
|
||||||
|
{114, "EALREADY", "operation already in progress"},
|
||||||
|
{115, "EINPROGRESS", "operation now in progress"},
|
||||||
|
{116, "ESTALE", "stale file handle"},
|
||||||
|
{117, "EUCLEAN", "structure needs cleaning"},
|
||||||
|
{118, "ENOTNAM", "not a XENIX named type file"},
|
||||||
|
{119, "ENAVAIL", "no XENIX semaphores available"},
|
||||||
|
{120, "EISNAM", "is a named type file"},
|
||||||
|
{121, "EREMOTEIO", "remote I/O error"},
|
||||||
|
{122, "EDQUOT", "disk quota exceeded"},
|
||||||
|
{123, "ENOMEDIUM", "no medium found"},
|
||||||
|
{124, "EMEDIUMTYPE", "wrong medium type"},
|
||||||
|
{125, "ECANCELED", "operation canceled"},
|
||||||
|
{126, "ENOKEY", "required key not available"},
|
||||||
|
{127, "EKEYEXPIRED", "key has expired"},
|
||||||
|
{128, "EKEYREVOKED", "key has been revoked"},
|
||||||
|
{129, "EKEYREJECTED", "key was rejected by service"},
|
||||||
|
{130, "EOWNERDEAD", "owner died"},
|
||||||
|
{131, "ENOTRECOVERABLE", "state not recoverable"},
|
||||||
|
{132, "ERFKILL", "operation not possible due to RF-kill"},
|
||||||
|
{133, "EHWPOISON", "memory page has hardware error"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// Signal table
|
||||||
|
var signalList = [...]struct {
|
||||||
|
num syscall.Signal
|
||||||
|
name string
|
||||||
|
desc string
|
||||||
|
}{
|
||||||
|
{1, "SIGHUP", "hangup"},
|
||||||
|
{2, "SIGINT", "interrupt"},
|
||||||
|
{3, "SIGQUIT", "quit"},
|
||||||
|
{4, "SIGILL", "illegal instruction"},
|
||||||
|
{5, "SIGTRAP", "trace/breakpoint trap"},
|
||||||
|
{6, "SIGABRT", "aborted"},
|
||||||
|
{7, "SIGBUS", "bus error"},
|
||||||
|
{8, "SIGFPE", "floating point exception"},
|
||||||
|
{9, "SIGKILL", "killed"},
|
||||||
|
{10, "SIGUSR1", "user defined signal 1"},
|
||||||
|
{11, "SIGSEGV", "segmentation fault"},
|
||||||
|
{12, "SIGUSR2", "user defined signal 2"},
|
||||||
|
{13, "SIGPIPE", "broken pipe"},
|
||||||
|
{14, "SIGALRM", "alarm clock"},
|
||||||
|
{15, "SIGTERM", "terminated"},
|
||||||
|
{16, "SIGSTKFLT", "stack fault"},
|
||||||
|
{17, "SIGCHLD", "child exited"},
|
||||||
|
{18, "SIGCONT", "continued"},
|
||||||
|
{19, "SIGSTOP", "stopped (signal)"},
|
||||||
|
{20, "SIGTSTP", "stopped"},
|
||||||
|
{21, "SIGTTIN", "stopped (tty input)"},
|
||||||
|
{22, "SIGTTOU", "stopped (tty output)"},
|
||||||
|
{23, "SIGURG", "urgent I/O condition"},
|
||||||
|
{24, "SIGXCPU", "CPU time limit exceeded"},
|
||||||
|
{25, "SIGXFSZ", "file size limit exceeded"},
|
||||||
|
{26, "SIGVTALRM", "virtual timer expired"},
|
||||||
|
{27, "SIGPROF", "profiling timer expired"},
|
||||||
|
{28, "SIGWINCH", "window changed"},
|
||||||
|
{29, "SIGIO", "I/O possible"},
|
||||||
|
{30, "SIGPWR", "power failure"},
|
||||||
|
{31, "SIGSYS", "bad system call"},
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,527 @@
|
|||||||
|
// go run mksyscall.go -tags linux,loong64 syscall_linux.go syscall_linux_loong64.go
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build linux && loong64
|
||||||
|
// +build linux,loong64
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ syscall.Errno
|
||||||
|
|
||||||
|
// 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 Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
|
||||||
|
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
|
||||||
|
n = int64(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(events) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&events[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||||
|
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Fchown(fd int, uid int, gid int) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Ftruncate(fd int, length int64) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getegid() (egid int) {
|
||||||
|
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||||
|
egid = int(r0)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Geteuid() (euid int) {
|
||||||
|
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||||
|
euid = int(r0)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getgid() (gid int) {
|
||||||
|
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||||
|
gid = int(r0)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getuid() (uid int) {
|
||||||
|
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||||
|
uid = int(r0)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Listen(s int, n int) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(p) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(p) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
||||||
|
n = int(r0)
|
||||||
|
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)
|
||||||
|
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_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
|
||||||
|
written = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func setfsgid(gid int) (prev int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||||
|
prev = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func setfsuid(uid int) (prev int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||||
|
prev = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Setregid(rgid int, egid int) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Setreuid(ruid int, euid int) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Shutdown(fd int, how int) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
|
||||||
|
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
||||||
|
n = int64(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Statfs(path string, buf *Statfs_t) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
|
||||||
|
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Truncate(path string, length int64) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||||
|
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||||
|
fd = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func getgroups(n int, list *_Gid_t) (nn int, err error) {
|
||||||
|
r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
|
||||||
|
nn = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func setgroups(n int, list *_Gid_t) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
|
||||||
|
_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
|
||||||
|
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func socket(domain int, typ int, proto int) (fd int, err error) {
|
||||||
|
r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
|
||||||
|
fd = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
|
||||||
|
_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(p) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&p[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||||
|
r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||||
|
r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
|
||||||
|
xaddr = uintptr(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tv *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
|
||||||
|
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
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue