mirror of https://github.com/docker/cli.git
update golang.org/x/sys for OpenBSD
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
aaa7a7cb95
commit
d9f5fa8124
|
@ -69,7 +69,7 @@ github.com/xeipuuv/gojsonschema 93e72a773fade158921402d6a24c819b48aba29d
|
|||
golang.org/x/crypto 558b6879de74bc843225cde5686419267ff707ca
|
||||
golang.org/x/net a8b9294777976932365dabb6640cf1468d95c70f
|
||||
golang.org/x/sync f52d1811a62927559de87708c
|
||||
golang.org/x/sys 95c6576299259db960f6c5b9b69ea52422860fce
|
||||
golang.org/x/sys 37707fdb30a5b38865cfb95e5aab41707daec7fd
|
||||
golang.org/x/text f72d8390a633d5dfb0cc84043294db9f6c935756
|
||||
golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb
|
||||
google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
// 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.
|
||||
|
||||
// CPU affinity functions
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const cpuSetSize = _CPU_SETSIZE / _NCPUBITS
|
||||
|
||||
// CPUSet represents a CPU affinity mask.
|
||||
type CPUSet [cpuSetSize]cpuMask
|
||||
|
||||
func schedAffinity(trap uintptr, pid int, set *CPUSet) error {
|
||||
_, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set)))
|
||||
if e != 0 {
|
||||
return errnoErr(e)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SchedGetaffinity gets the CPU affinity mask of the thread specified by pid.
|
||||
// If pid is 0 the calling thread is used.
|
||||
func SchedGetaffinity(pid int, set *CPUSet) error {
|
||||
return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set)
|
||||
}
|
||||
|
||||
// SchedSetaffinity sets the CPU affinity mask of the thread specified by pid.
|
||||
// If pid is 0 the calling thread is used.
|
||||
func SchedSetaffinity(pid int, set *CPUSet) error {
|
||||
return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set)
|
||||
}
|
||||
|
||||
// Zero clears the set s, so that it contains no CPUs.
|
||||
func (s *CPUSet) Zero() {
|
||||
for i := range s {
|
||||
s[i] = 0
|
||||
}
|
||||
}
|
||||
|
||||
func cpuBitsIndex(cpu int) int {
|
||||
return cpu / _NCPUBITS
|
||||
}
|
||||
|
||||
func cpuBitsMask(cpu int) cpuMask {
|
||||
return cpuMask(1 << (uint(cpu) % _NCPUBITS))
|
||||
}
|
||||
|
||||
// Set adds cpu to the set s.
|
||||
func (s *CPUSet) Set(cpu int) {
|
||||
i := cpuBitsIndex(cpu)
|
||||
if i < len(s) {
|
||||
s[i] |= cpuBitsMask(cpu)
|
||||
}
|
||||
}
|
||||
|
||||
// Clear removes cpu from the set s.
|
||||
func (s *CPUSet) Clear(cpu int) {
|
||||
i := cpuBitsIndex(cpu)
|
||||
if i < len(s) {
|
||||
s[i] &^= cpuBitsMask(cpu)
|
||||
}
|
||||
}
|
||||
|
||||
// IsSet reports whether cpu is in the set s.
|
||||
func (s *CPUSet) IsSet(cpu int) bool {
|
||||
i := cpuBitsIndex(cpu)
|
||||
if i < len(s) {
|
||||
return s[i]&cpuBitsMask(cpu) != 0
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Count returns the number of CPUs in the set s.
|
||||
func (s *CPUSet) Count() int {
|
||||
c := 0
|
||||
for _, b := range s {
|
||||
c += onesCount64(uint64(b))
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
// onesCount64 is a copy of Go 1.9's math/bits.OnesCount64.
|
||||
// Once this package can require Go 1.9, we can delete this
|
||||
// and update the caller to use bits.OnesCount64.
|
||||
func onesCount64(x uint64) int {
|
||||
const m0 = 0x5555555555555555 // 01010101 ...
|
||||
const m1 = 0x3333333333333333 // 00110011 ...
|
||||
const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ...
|
||||
const m3 = 0x00ff00ff00ff00ff // etc.
|
||||
const m4 = 0x0000ffff0000ffff
|
||||
|
||||
// Implementation: Parallel summing of adjacent bits.
|
||||
// See "Hacker's Delight", Chap. 5: Counting Bits.
|
||||
// The following pattern shows the general approach:
|
||||
//
|
||||
// x = x>>1&(m0&m) + x&(m0&m)
|
||||
// x = x>>2&(m1&m) + x&(m1&m)
|
||||
// x = x>>4&(m2&m) + x&(m2&m)
|
||||
// x = x>>8&(m3&m) + x&(m3&m)
|
||||
// x = x>>16&(m4&m) + x&(m4&m)
|
||||
// x = x>>32&(m5&m) + x&(m5&m)
|
||||
// return int(x)
|
||||
//
|
||||
// Masking (& operations) can be left away when there's no
|
||||
// danger that a field's sum will carry over into the next
|
||||
// field: Since the result cannot be > 64, 8 bits is enough
|
||||
// and we can ignore the masks for the shifts by 8 and up.
|
||||
// Per "Hacker's Delight", the first line can be simplified
|
||||
// more, but it saves at best one instruction, so we leave
|
||||
// it alone for clarity.
|
||||
const m = 1<<64 - 1
|
||||
x = x>>1&(m0&m) + x&(m0&m)
|
||||
x = x>>2&(m1&m) + x&(m1&m)
|
||||
x = (x>>4 + x) & (m2 & m)
|
||||
x += x >> 8
|
||||
x += x >> 16
|
||||
x += x >> 32
|
||||
return int(x) & (1<<7 - 1)
|
||||
}
|
|
@ -10,21 +10,51 @@
|
|||
// System calls for 386, Linux
|
||||
//
|
||||
|
||||
// See ../runtime/sys_linux_386.s for the reason why we always use int 0x80
|
||||
// instead of the glibc-specific "CALL 0x10(GS)".
|
||||
#define INVOKE_SYSCALL INT $0x80
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL trap+0(FP), AX // syscall entry
|
||||
MOVL a1+4(FP), BX
|
||||
MOVL a2+8(FP), CX
|
||||
MOVL a3+12(FP), DX
|
||||
MOVL $0, SI
|
||||
MOVL $0, DI
|
||||
INVOKE_SYSCALL
|
||||
MOVL AX, r1+16(FP)
|
||||
MOVL DX, r2+20(FP)
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
|
||||
MOVL trap+0(FP), AX // syscall entry
|
||||
MOVL a1+4(FP), BX
|
||||
MOVL a2+8(FP), CX
|
||||
MOVL a3+12(FP), DX
|
||||
MOVL $0, SI
|
||||
MOVL $0, DI
|
||||
INVOKE_SYSCALL
|
||||
MOVL AX, r1+16(FP)
|
||||
MOVL DX, r2+20(FP)
|
||||
RET
|
||||
|
||||
TEXT ·socketcall(SB),NOSPLIT,$0-36
|
||||
JMP syscall·socketcall(SB)
|
||||
|
||||
|
|
|
@ -13,17 +13,45 @@
|
|||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
SYSCALL
|
||||
MOVQ AX, r1+32(FP)
|
||||
MOVQ DX, r2+40(FP)
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVQ a1+8(FP), DI
|
||||
MOVQ a2+16(FP), SI
|
||||
MOVQ a3+24(FP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ trap+0(FP), AX // syscall entry
|
||||
SYSCALL
|
||||
MOVQ AX, r1+32(FP)
|
||||
MOVQ DX, r2+40(FP)
|
||||
RET
|
||||
|
||||
TEXT ·gettimeofday(SB),NOSPLIT,$0-16
|
||||
JMP syscall·gettimeofday(SB)
|
||||
|
|
|
@ -13,17 +13,44 @@
|
|||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
B syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
B syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW trap+0(FP), R7
|
||||
MOVW a1+4(FP), R0
|
||||
MOVW a2+8(FP), R1
|
||||
MOVW a3+12(FP), R2
|
||||
MOVW $0, R3
|
||||
MOVW $0, R4
|
||||
MOVW $0, R5
|
||||
SWI $0
|
||||
MOVW R0, r1+16(FP)
|
||||
MOVW $0, R0
|
||||
MOVW R0, r2+20(FP)
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
B syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
B syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·seek(SB),NOSPLIT,$0-32
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
|
||||
MOVW trap+0(FP), R7 // syscall entry
|
||||
MOVW a1+4(FP), R0
|
||||
MOVW a2+8(FP), R1
|
||||
MOVW a3+12(FP), R2
|
||||
SWI $0
|
||||
MOVW R0, r1+16(FP)
|
||||
MOVW $0, R0
|
||||
MOVW R0, r2+20(FP)
|
||||
RET
|
||||
|
||||
TEXT ·seek(SB),NOSPLIT,$0-28
|
||||
B syscall·seek(SB)
|
||||
|
|
|
@ -11,14 +11,42 @@
|
|||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
B syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
B syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVD a1+8(FP), R0
|
||||
MOVD a2+16(FP), R1
|
||||
MOVD a3+24(FP), R2
|
||||
MOVD $0, R3
|
||||
MOVD $0, R4
|
||||
MOVD $0, R5
|
||||
MOVD trap+0(FP), R8 // syscall entry
|
||||
SVC
|
||||
MOVD R0, r1+32(FP) // r1
|
||||
MOVD R1, r2+40(FP) // r2
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
B syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
B syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVD a1+8(FP), R0
|
||||
MOVD a2+16(FP), R1
|
||||
MOVD a3+24(FP), R2
|
||||
MOVD $0, R3
|
||||
MOVD $0, R4
|
||||
MOVD $0, R5
|
||||
MOVD trap+0(FP), R8 // syscall entry
|
||||
SVC
|
||||
MOVD R0, r1+32(FP)
|
||||
MOVD R1, r2+40(FP)
|
||||
RET
|
||||
|
|
|
@ -15,14 +15,42 @@
|
|||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
JAL runtime·entersyscall(SB)
|
||||
MOVV a1+8(FP), R4
|
||||
MOVV a2+16(FP), R5
|
||||
MOVV a3+24(FP), R6
|
||||
MOVV R0, R7
|
||||
MOVV R0, R8
|
||||
MOVV R0, R9
|
||||
MOVV trap+0(FP), R2 // syscall entry
|
||||
SYSCALL
|
||||
MOVV R2, r1+32(FP)
|
||||
MOVV R3, r2+40(FP)
|
||||
JAL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVV a1+8(FP), R4
|
||||
MOVV a2+16(FP), R5
|
||||
MOVV a3+24(FP), R6
|
||||
MOVV R0, R7
|
||||
MOVV R0, R8
|
||||
MOVV R0, R9
|
||||
MOVV trap+0(FP), R2 // syscall entry
|
||||
SYSCALL
|
||||
MOVV R2, r1+32(FP)
|
||||
MOVV R3, r2+40(FP)
|
||||
RET
|
||||
|
|
|
@ -15,17 +15,40 @@
|
|||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
|
||||
JAL runtime·entersyscall(SB)
|
||||
MOVW a1+4(FP), R4
|
||||
MOVW a2+8(FP), R5
|
||||
MOVW a3+12(FP), R6
|
||||
MOVW R0, R7
|
||||
MOVW trap+0(FP), R2 // syscall entry
|
||||
SYSCALL
|
||||
MOVW R2, r1+16(FP) // r1
|
||||
MOVW R3, r2+20(FP) // r2
|
||||
JAL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
|
||||
MOVW a1+4(FP), R4
|
||||
MOVW a2+8(FP), R5
|
||||
MOVW a3+12(FP), R6
|
||||
MOVW trap+0(FP), R2 // syscall entry
|
||||
SYSCALL
|
||||
MOVW R2, r1+16(FP)
|
||||
MOVW R3, r2+20(FP)
|
||||
RET
|
||||
|
|
|
@ -15,14 +15,42 @@
|
|||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
BR syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
BR syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVD a1+8(FP), R3
|
||||
MOVD a2+16(FP), R4
|
||||
MOVD a3+24(FP), R5
|
||||
MOVD R0, R6
|
||||
MOVD R0, R7
|
||||
MOVD R0, R8
|
||||
MOVD trap+0(FP), R9 // syscall entry
|
||||
SYSCALL R9
|
||||
MOVD R3, r1+32(FP)
|
||||
MOVD R4, r2+40(FP)
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
BR syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
BR syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVD a1+8(FP), R3
|
||||
MOVD a2+16(FP), R4
|
||||
MOVD a3+24(FP), R5
|
||||
MOVD R0, R6
|
||||
MOVD R0, R7
|
||||
MOVD R0, R8
|
||||
MOVD trap+0(FP), R9 // syscall entry
|
||||
SYSCALL R9
|
||||
MOVD R3, r1+32(FP)
|
||||
MOVD R4, r2+40(FP)
|
||||
RET
|
||||
|
|
|
@ -21,8 +21,36 @@ TEXT ·Syscall(SB),NOSPLIT,$0-56
|
|||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
BR syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVD a1+8(FP), R2
|
||||
MOVD a2+16(FP), R3
|
||||
MOVD a3+24(FP), R4
|
||||
MOVD $0, R5
|
||||
MOVD $0, R6
|
||||
MOVD $0, R7
|
||||
MOVD trap+0(FP), R1 // syscall entry
|
||||
SYSCALL
|
||||
MOVD R2, r1+32(FP)
|
||||
MOVD R3, r2+40(FP)
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
BR syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
BR syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVD a1+8(FP), R2
|
||||
MOVD a2+16(FP), R3
|
||||
MOVD a3+24(FP), R4
|
||||
MOVD $0, R5
|
||||
MOVD $0, R6
|
||||
MOVD $0, R7
|
||||
MOVD trap+0(FP), R1 // syscall entry
|
||||
SYSCALL
|
||||
MOVD R2, r1+32(FP)
|
||||
MOVD R3, r2+40(FP)
|
||||
RET
|
||||
|
|
|
@ -6,97 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// readInt returns the size-bytes unsigned integer in native byte order at offset off.
|
||||
func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
|
||||
if len(b) < int(off+size) {
|
||||
return 0, false
|
||||
}
|
||||
if isBigEndian {
|
||||
return readIntBE(b[off:], size), true
|
||||
}
|
||||
return readIntLE(b[off:], size), true
|
||||
}
|
||||
|
||||
func readIntBE(b []byte, size uintptr) uint64 {
|
||||
switch size {
|
||||
case 1:
|
||||
return uint64(b[0])
|
||||
case 2:
|
||||
_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[1]) | uint64(b[0])<<8
|
||||
case 4:
|
||||
_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
|
||||
case 8:
|
||||
_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
|
||||
uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
|
||||
default:
|
||||
panic("syscall: readInt with unsupported size")
|
||||
}
|
||||
}
|
||||
|
||||
func readIntLE(b []byte, size uintptr) uint64 {
|
||||
switch size {
|
||||
case 1:
|
||||
return uint64(b[0])
|
||||
case 2:
|
||||
_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8
|
||||
case 4:
|
||||
_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
|
||||
case 8:
|
||||
_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
|
||||
uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
|
||||
default:
|
||||
panic("syscall: readInt with unsupported size")
|
||||
}
|
||||
}
|
||||
import "syscall"
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number of
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
count = 0
|
||||
for max != 0 && len(buf) > 0 {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok || reclen > uint64(len(buf)) {
|
||||
return origlen, count, names
|
||||
}
|
||||
rec := buf[:reclen]
|
||||
buf = buf[reclen:]
|
||||
ino, ok := direntIno(rec)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
if ino == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
|
||||
namlen, ok := direntNamlen(rec)
|
||||
if !ok || namoff+namlen > uint64(len(rec)) {
|
||||
break
|
||||
}
|
||||
name := rec[namoff : namoff+namlen]
|
||||
for i, c := range name {
|
||||
if c == 0 {
|
||||
name = name[:i]
|
||||
break
|
||||
}
|
||||
}
|
||||
// Check for useless names before allocating a string.
|
||||
if string(name) == "." || string(name) == ".." {
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, string(name))
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
return syscall.ParseDirent(buf, max, names)
|
||||
}
|
||||
|
|
|
@ -25,3 +25,7 @@ func Clearenv() {
|
|||
func Environ() []string {
|
||||
return syscall.Environ()
|
||||
}
|
||||
|
||||
func Unsetenv(key string) error {
|
||||
return syscall.Unsetenv(key)
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
// Copyright 2014 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 go1.4
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
func Unsetenv(key string) error {
|
||||
// This was added in Go 1.4.
|
||||
return syscall.Unsetenv(key)
|
||||
}
|
|
@ -1,27 +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
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// FIXME: unexported function from os
|
||||
// syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
|
||||
func syscallMode(i os.FileMode) (o uint32) {
|
||||
o |= uint32(i.Perm())
|
||||
if i&os.ModeSetuid != 0 {
|
||||
o |= syscall.S_ISUID
|
||||
}
|
||||
if i&os.ModeSetgid != 0 {
|
||||
o |= syscall.S_ISGID
|
||||
}
|
||||
if i&os.ModeSticky != 0 {
|
||||
o |= syscall.S_ISVTX
|
||||
}
|
||||
// No mapping for Go's ModeTemporary (plan9 only).
|
||||
return
|
||||
}
|
|
@ -11,9 +11,19 @@ import "syscall"
|
|||
// We can't use the gc-syntax .s files for gccgo. On the plus side
|
||||
// much of the functionality can be written directly in Go.
|
||||
|
||||
//extern gccgoRealSyscallNoError
|
||||
func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
|
||||
|
||||
//extern gccgoRealSyscall
|
||||
func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
|
||||
|
||||
func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
|
||||
syscall.Entersyscall()
|
||||
r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
|
||||
syscall.Exitsyscall()
|
||||
return r, 0
|
||||
}
|
||||
|
||||
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
|
||||
syscall.Entersyscall()
|
||||
r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
|
||||
|
@ -35,6 +45,11 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
return r, 0, syscall.Errno(errno)
|
||||
}
|
||||
|
||||
func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
|
||||
r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
|
||||
return r, 0
|
||||
}
|
||||
|
||||
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
|
||||
r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
|
||||
return r, 0, syscall.Errno(errno)
|
||||
|
|
|
@ -31,6 +31,12 @@ gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintp
|
|||
return r;
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
|
||||
{
|
||||
return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||
}
|
||||
|
||||
// Define the use function in C so that it is not inlined.
|
||||
|
||||
extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
|
||||
|
|
|
@ -352,6 +352,18 @@ func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
// GetsockoptString returns the string value of the socket option opt for the
|
||||
// socket associated with fd at the given socket level.
|
||||
func GetsockoptString(fd, level, opt int) (string, error) {
|
||||
buf := make([]byte, 256)
|
||||
vallen := _Socklen(len(buf))
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(buf[:vallen-1]), nil
|
||||
}
|
||||
|
||||
//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)
|
||||
|
@ -570,7 +582,12 @@ func UtimesNano(path string, ts []Timespec) error {
|
|||
if len(ts) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||
// Darwin setattrlist can set nanosecond timestamps
|
||||
err := setattrlistTimes(path, ts, 0)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
|
@ -590,6 +607,10 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
|||
if len(ts) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
err := setattrlistTimes(path, ts, flags)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ func Getwd() (string, error) {
|
|||
return "", ENOTSUP
|
||||
}
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
@ -76,18 +77,6 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
|
||||
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
|
||||
|
@ -187,6 +176,37 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
_p0, err := BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var attrList attrList
|
||||
attrList.bitmapCount = ATTR_BIT_MAP_COUNT
|
||||
attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
|
||||
|
||||
// order is mtime, atime: the opposite of Chtimes
|
||||
attributes := [2]Timespec{times[1], times[0]}
|
||||
options := 0
|
||||
if flags&AT_SYMLINK_NOFOLLOW != 0 {
|
||||
options |= FSOPT_NOFOLLOW
|
||||
}
|
||||
_, _, e1 := Syscall6(
|
||||
SYS_SETATTRLIST,
|
||||
uintptr(unsafe.Pointer(_p0)),
|
||||
uintptr(unsafe.Pointer(&attrList)),
|
||||
uintptr(unsafe.Pointer(&attributes)),
|
||||
uintptr(unsafe.Sizeof(attributes)),
|
||||
uintptr(options),
|
||||
0,
|
||||
)
|
||||
if e1 != 0 {
|
||||
return e1
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
|
||||
// Darwin doesn't support SYS_UTIMENSAT
|
||||
return ENOSYS
|
||||
|
@ -239,6 +259,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
|
|
@ -60,3 +60,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of darwin/arm the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
|
|
|
@ -14,6 +14,7 @@ package unix
|
|||
|
||||
import "unsafe"
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
@ -56,22 +57,6 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
namlen, ok := direntNamlen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return (16 + namlen + 1 + 7) &^ 7, true
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
@ -110,6 +95,23 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
||||
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
|
||||
|
||||
func Getwd() (string, error) {
|
||||
var buf [PathMax]byte
|
||||
_, err := Getcwd(buf[0:])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
n := clen(buf[:])
|
||||
if n < 1 {
|
||||
return "", EINVAL
|
||||
}
|
||||
return string(buf[:n]), nil
|
||||
}
|
||||
|
||||
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
var bufsize uintptr
|
||||
|
@ -125,6 +127,113 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
// 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) {
|
||||
var value int
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return value, err
|
||||
}
|
||||
|
||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||
var value Winsize
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
var value Termios
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
|
||||
err := sysctl(mib, old, oldlen, nil, 0)
|
||||
if err != nil {
|
||||
// Utsname members on Dragonfly are only 32 bytes and
|
||||
// the syscall returns ENOMEM in case the actual value
|
||||
// is longer.
|
||||
if err == ENOMEM {
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctlUname(mib, &uname.Sysname[0], &n); err != nil {
|
||||
return err
|
||||
}
|
||||
uname.Sysname[unsafe.Sizeof(uname.Sysname)-1] = 0
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctlUname(mib, &uname.Nodename[0], &n); err != nil {
|
||||
return err
|
||||
}
|
||||
uname.Nodename[unsafe.Sizeof(uname.Nodename)-1] = 0
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctlUname(mib, &uname.Release[0], &n); err != nil {
|
||||
return err
|
||||
}
|
||||
uname.Release[unsafe.Sizeof(uname.Release)-1] = 0
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctlUname(mib, &uname.Version[0], &n); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctlUname(mib, &uname.Machine[0], &n); err != nil {
|
||||
return err
|
||||
}
|
||||
uname.Machine[unsafe.Sizeof(uname.Machine)-1] = 0
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -225,7 +334,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Getlogin
|
||||
// Sigpending
|
||||
// Sigaltstack
|
||||
// Ioctl
|
||||
// Reboot
|
||||
// Execve
|
||||
// Vfork
|
||||
|
|
|
@ -14,6 +14,7 @@ package unix
|
|||
|
||||
import "unsafe"
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
@ -54,18 +55,6 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
@ -105,6 +94,23 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
||||
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
|
||||
|
||||
func Getwd() (string, error) {
|
||||
var buf [PathMax]byte
|
||||
_, err := Getcwd(buf[0:])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
n := clen(buf[:])
|
||||
if n < 1 {
|
||||
return "", EINVAL
|
||||
}
|
||||
return string(buf[:n]), nil
|
||||
}
|
||||
|
||||
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
var bufsize uintptr
|
||||
|
@ -120,6 +126,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
// Derive extattr namespace and attribute name
|
||||
|
||||
func xattrnamespace(fullattr string) (ns int, attr string, err error) {
|
||||
|
@ -271,7 +282,6 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
|
|||
|
||||
// FreeBSD won't allow you to list xattrs from multiple namespaces
|
||||
s := 0
|
||||
var e error
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
|
||||
|
||||
|
@ -283,7 +293,6 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
|
|||
* we don't have read permissions on, so don't ignore those errors
|
||||
*/
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
e = nil
|
||||
continue
|
||||
} else if e != nil {
|
||||
return s, e
|
||||
|
@ -297,7 +306,7 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
|
|||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, e
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
||||
|
@ -305,11 +314,9 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
|||
destsiz := len(dest)
|
||||
|
||||
s := 0
|
||||
var e error
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
e = nil
|
||||
continue
|
||||
} else if e != nil {
|
||||
return s, e
|
||||
|
@ -323,7 +330,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
|
|||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, e
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func Llistxattr(link string, dest []byte) (sz int, err error) {
|
||||
|
@ -331,11 +338,9 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
destsiz := len(dest)
|
||||
|
||||
s := 0
|
||||
var e error
|
||||
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
|
||||
stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
|
||||
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
|
||||
e = nil
|
||||
continue
|
||||
} else if e != nil {
|
||||
return s, e
|
||||
|
@ -349,7 +354,7 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
d = initxattrdest(dest, s)
|
||||
}
|
||||
|
||||
return s, e
|
||||
return s, nil
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
@ -391,6 +396,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -434,6 +485,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys Getdents(fd int, buf []byte) (n int, err error)
|
||||
//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -413,6 +413,7 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||
return unsafe.Pointer(&sa.raw), sl, nil
|
||||
}
|
||||
|
||||
// SockaddrLinklayer implements the Sockaddr interface for AF_PACKET type sockets.
|
||||
type SockaddrLinklayer struct {
|
||||
Protocol uint16
|
||||
Ifindex int
|
||||
|
@ -439,6 +440,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
|
||||
}
|
||||
|
||||
// SockaddrNetlink implements the Sockaddr interface for AF_NETLINK type sockets.
|
||||
type SockaddrNetlink struct {
|
||||
Family uint16
|
||||
Pad uint16
|
||||
|
@ -455,6 +457,8 @@ func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||
return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
|
||||
}
|
||||
|
||||
// SockaddrHCI implements the Sockaddr interface for AF_BLUETOOTH type sockets
|
||||
// using the HCI protocol.
|
||||
type SockaddrHCI struct {
|
||||
Dev uint16
|
||||
Channel uint16
|
||||
|
@ -468,6 +472,31 @@ func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||
return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
|
||||
}
|
||||
|
||||
// SockaddrL2 implements the Sockaddr interface for AF_BLUETOOTH type sockets
|
||||
// using the L2CAP protocol.
|
||||
type SockaddrL2 struct {
|
||||
PSM uint16
|
||||
CID uint16
|
||||
Addr [6]uint8
|
||||
AddrType uint8
|
||||
raw RawSockaddrL2
|
||||
}
|
||||
|
||||
func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
sa.raw.Family = AF_BLUETOOTH
|
||||
psm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm))
|
||||
psm[0] = byte(sa.PSM)
|
||||
psm[1] = byte(sa.PSM >> 8)
|
||||
for i := 0; i < len(sa.Addr); i++ {
|
||||
sa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i]
|
||||
}
|
||||
cid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid))
|
||||
cid[0] = byte(sa.CID)
|
||||
cid[1] = byte(sa.CID >> 8)
|
||||
sa.raw.Bdaddr_type = sa.AddrType
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil
|
||||
}
|
||||
|
||||
// SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
|
||||
// The RxID and TxID fields are used for transport protocol addressing in
|
||||
// (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with
|
||||
|
@ -808,6 +837,24 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
// GetsockoptString returns the string value of the socket option opt for the
|
||||
// socket associated with fd at the given socket level.
|
||||
func GetsockoptString(fd, level, opt int) (string, error) {
|
||||
buf := make([]byte, 256)
|
||||
vallen := _Socklen(len(buf))
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
|
||||
if err != nil {
|
||||
if err == ERANGE {
|
||||
buf = make([]byte, vallen)
|
||||
err = getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
|
||||
}
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
return string(buf[:vallen-1]), nil
|
||||
}
|
||||
|
||||
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
|
||||
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
||||
}
|
||||
|
@ -1125,6 +1172,10 @@ func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
|
|||
return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
|
||||
}
|
||||
|
||||
func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
|
||||
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
|
||||
}
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
@ -1168,22 +1219,6 @@ func ReadDirent(fd int, buf []byte) (n int, err error) {
|
|||
return Getdents(fd, buf)
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
|
||||
|
||||
func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
|
||||
|
@ -1289,6 +1324,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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
|
||||
//sys Sync()
|
||||
//sys Syncfs(fd int) (err error)
|
||||
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
||||
|
@ -1406,7 +1442,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
|||
// Msgget
|
||||
// Msgrcv
|
||||
// Msgsnd
|
||||
// Newfstatat
|
||||
// Nfsservctl
|
||||
// Personality
|
||||
// Pselect6
|
||||
|
@ -1427,11 +1462,9 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
|||
// RtSigtimedwait
|
||||
// SchedGetPriorityMax
|
||||
// SchedGetPriorityMin
|
||||
// SchedGetaffinity
|
||||
// SchedGetparam
|
||||
// SchedGetscheduler
|
||||
// SchedRrGetInterval
|
||||
// SchedSetaffinity
|
||||
// SchedSetparam
|
||||
// SchedYield
|
||||
// Security
|
||||
|
|
|
@ -54,6 +54,7 @@ func Pipe2(p []int, flags int) (err error) {
|
|||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
||||
//sysnb Getegid() (egid int) = SYS_GETEGID32
|
||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||
|
|
|
@ -11,6 +11,7 @@ package unix
|
|||
//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 Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -77,6 +77,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sysnb Getegid() (egid int) = SYS_GETEGID32
|
||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||
//sysnb Getgid() (gid int) = SYS_GETGID32
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// 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.
|
||||
|
||||
// +build linux,!gccgo
|
||||
|
||||
package unix
|
||||
|
||||
// SyscallNoError may be used instead of Syscall for syscalls that don't fail.
|
||||
func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
|
||||
|
||||
// RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
|
||||
// fail.
|
||||
func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
|
|
@ -10,6 +10,7 @@ package unix
|
|||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -65,6 +65,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
|
|
@ -11,6 +11,7 @@ package unix
|
|||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
//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 Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -10,6 +10,7 @@ package unix
|
|||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -17,6 +17,7 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
@ -55,7 +56,6 @@ func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
|
|||
}
|
||||
|
||||
func nametomib(name string) (mib []_C_int, err error) {
|
||||
|
||||
// Split name into components.
|
||||
var parts []string
|
||||
last := 0
|
||||
|
@ -93,18 +93,6 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return mib, nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (fd1 int, fd2 int, err error)
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
|
@ -119,11 +107,118 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|||
return getdents(fd, buf)
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
||||
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
|
||||
|
||||
func Getwd() (string, error) {
|
||||
var buf [PathMax]byte
|
||||
_, err := Getcwd(buf[0:])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
n := clen(buf[:])
|
||||
if n < 1 {
|
||||
return "", EINVAL
|
||||
}
|
||||
return string(buf[:n]), nil
|
||||
}
|
||||
|
||||
// TODO
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
// 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) {
|
||||
var value int
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return value, err
|
||||
}
|
||||
|
||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||
var value Winsize
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
var value Termios
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -384,7 +479,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
// getitimer
|
||||
// getvfsstat
|
||||
// getxattr
|
||||
// ioctl
|
||||
// ktrace
|
||||
// lchflags
|
||||
// lchmod
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// Copyright 2013 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build dragonfly freebsd netbsd openbsd
|
||||
|
||||
package unix
|
||||
|
||||
const ImplementsGetwd = false
|
||||
|
||||
func Getwd() (string, error) { return "", ENOTSUP }
|
|
@ -13,10 +13,12 @@
|
|||
package unix
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
@ -32,39 +34,15 @@ type SockaddrDatalink struct {
|
|||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func nametomib(name string) (mib []_C_int, err error) {
|
||||
|
||||
// Perform lookup via a binary search
|
||||
left := 0
|
||||
right := len(sysctlMib) - 1
|
||||
for {
|
||||
idx := left + (right-left)/2
|
||||
switch {
|
||||
case name == sysctlMib[idx].ctlname:
|
||||
return sysctlMib[idx].ctloid, nil
|
||||
case name > sysctlMib[idx].ctlname:
|
||||
left = idx + 1
|
||||
default:
|
||||
right = idx - 1
|
||||
}
|
||||
if left > right {
|
||||
break
|
||||
}
|
||||
i := sort.Search(len(sysctlMib), func(i int) bool {
|
||||
return sysctlMib[i].ctlname >= name
|
||||
})
|
||||
if i < len(sysctlMib) && sysctlMib[i].ctlname == name {
|
||||
return sysctlMib[i].ctloid, nil
|
||||
}
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
|
@ -82,6 +60,23 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|||
return getdents(fd, buf)
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
||||
//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
|
||||
|
||||
func Getwd() (string, error) {
|
||||
var buf [PathMax]byte
|
||||
_, err := Getcwd(buf[0:])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
n := clen(buf[:])
|
||||
if n < 1 {
|
||||
return "", EINVAL
|
||||
}
|
||||
return string(buf[:n]), nil
|
||||
}
|
||||
|
||||
// TODO
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
return -1, ENOSYS
|
||||
|
@ -102,6 +97,96 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
// 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) {
|
||||
var value int
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return value, err
|
||||
}
|
||||
|
||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||
var value Winsize
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
var value Termios
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -222,7 +307,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// getresuid
|
||||
// getrtable
|
||||
// getthrid
|
||||
// ioctl
|
||||
// ktrace
|
||||
// lfs_bmapv
|
||||
// lfs_markv
|
||||
|
|
|
@ -23,6 +23,7 @@ type syscallFunc uintptr
|
|||
func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Family uint16
|
||||
Index uint16
|
||||
|
@ -34,31 +35,6 @@ type SockaddrDatalink struct {
|
|||
raw RawSockaddrDatalink
|
||||
}
|
||||
|
||||
func clen(n []byte) int {
|
||||
for i := 0; i < len(n); i++ {
|
||||
if n[i] == 0 {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return len(n)
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (n int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
@ -139,6 +115,18 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
|
|||
return anyToSockaddr(&rsa)
|
||||
}
|
||||
|
||||
// GetsockoptString returns the string value of the socket option opt for the
|
||||
// socket associated with fd at the given socket level.
|
||||
func GetsockoptString(fd, level, opt int) (string, error) {
|
||||
buf := make([]byte, 256)
|
||||
vallen := _Socklen(len(buf))
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(buf[:vallen-1]), nil
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
||||
//sys Getcwd(buf []byte) (n int, err error)
|
||||
|
@ -655,6 +643,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Rmdir(path string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
|
||||
//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
|
||||
//sysnb Setegid(egid int) (err error)
|
||||
//sysnb Seteuid(euid int) (err error)
|
||||
//sysnb Setgid(gid int) (err error)
|
||||
|
|
|
@ -50,6 +50,16 @@ func errnoErr(e syscall.Errno) error {
|
|||
return e
|
||||
}
|
||||
|
||||
// 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 {
|
||||
for i := 0; i < len(n); i++ {
|
||||
if n[i] == 0 {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return len(n)
|
||||
}
|
||||
|
||||
// Mmap manager, for use by operating system-specific implementations.
|
||||
|
||||
type mmapper struct {
|
||||
|
@ -138,16 +148,19 @@ func Write(fd int, p []byte) (n int, err error) {
|
|||
// creation of IPv6 sockets to return EAFNOSUPPORT.
|
||||
var SocketDisableIPv6 bool
|
||||
|
||||
// Sockaddr represents a socket address.
|
||||
type Sockaddr interface {
|
||||
sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
|
||||
}
|
||||
|
||||
// SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets.
|
||||
type SockaddrInet4 struct {
|
||||
Port int
|
||||
Addr [4]byte
|
||||
raw RawSockaddrInet4
|
||||
}
|
||||
|
||||
// SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets.
|
||||
type SockaddrInet6 struct {
|
||||
Port int
|
||||
ZoneId uint32
|
||||
|
@ -155,6 +168,7 @@ type SockaddrInet6 struct {
|
|||
raw RawSockaddrInet6
|
||||
}
|
||||
|
||||
// SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets.
|
||||
type SockaddrUnix struct {
|
||||
Name string
|
||||
raw RawSockaddrUnix
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
package unix
|
||||
|
||||
import "time"
|
||||
|
||||
// TimespecToNsec converts a Timespec value into a number of
|
||||
// nanoseconds since the Unix epoch.
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
@ -22,6 +24,24 @@ func NsecToTimespec(nsec int64) Timespec {
|
|||
return setTimespec(sec, nsec)
|
||||
}
|
||||
|
||||
// TimeToTimespec converts t into a Timespec.
|
||||
// On some 32-bit systems the range of valid Timespec values are smaller
|
||||
// than that of time.Time values. So if t is out of the valid range of
|
||||
// Timespec, it returns a zero Timespec and ERANGE.
|
||||
func TimeToTimespec(t time.Time) (Timespec, error) {
|
||||
sec := t.Unix()
|
||||
nsec := int64(t.Nanosecond())
|
||||
ts := setTimespec(sec, nsec)
|
||||
|
||||
// Currently all targets have either int32 or int64 for Timespec.Sec.
|
||||
// If there were a new target with floating point type for it, we have
|
||||
// to consider the rounding error.
|
||||
if int64(ts.Sec) != sec {
|
||||
return Timespec{}, ERANGE
|
||||
}
|
||||
return ts, nil
|
||||
}
|
||||
|
||||
// TimevalToNsec converts a Timeval value into a number of nanoseconds
|
||||
// since the Unix epoch.
|
||||
func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -168,6 +168,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -353,6 +355,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -835,6 +838,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -351,6 +351,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -608,6 +610,7 @@ const (
|
|||
F_UNLCKSYS = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -944,6 +947,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -351,6 +351,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -608,6 +610,7 @@ const (
|
|||
F_UNLCKSYS = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -944,6 +947,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -351,6 +351,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -615,6 +617,7 @@ const (
|
|||
F_UNLCKSYS = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -951,6 +954,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1637,6 +1638,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1638,6 +1639,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1642,6 +1643,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -625,6 +625,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1628,6 +1629,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1640,6 +1641,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1640,6 +1641,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1640,6 +1641,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1640,6 +1641,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1695,6 +1696,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1695,6 +1696,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -623,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -1699,6 +1700,27 @@ const (
|
|||
SPLICE_F_MORE = 0x4
|
||||
SPLICE_F_MOVE = 0x1
|
||||
SPLICE_F_NONBLOCK = 0x2
|
||||
STATX_ALL = 0xfff
|
||||
STATX_ATIME = 0x20
|
||||
STATX_ATTR_APPEND = 0x20
|
||||
STATX_ATTR_AUTOMOUNT = 0x1000
|
||||
STATX_ATTR_COMPRESSED = 0x4
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MODE = 0x2
|
||||
STATX_MTIME = 0x40
|
||||
STATX_NLINK = 0x4
|
||||
STATX_SIZE = 0x200
|
||||
STATX_TYPE = 0x1
|
||||
STATX_UID = 0x8
|
||||
STATX__RESERVED = 0x80000000
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
S_IFBLK = 0x6000
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m32
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build 386,netbsd
|
||||
|
||||
|
@ -169,6 +169,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
CTL_QUERY = -0x2
|
||||
|
@ -581,6 +583,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -970,6 +973,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m64
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build amd64,netbsd
|
||||
|
||||
|
@ -169,6 +169,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
CTL_QUERY = -0x2
|
||||
|
@ -571,6 +573,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -960,6 +963,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -marm
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm,netbsd
|
||||
|
||||
|
@ -161,6 +161,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
CTL_QUERY = -0x2
|
||||
|
@ -563,6 +565,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -952,6 +955,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m32
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build 386,openbsd
|
||||
|
||||
|
@ -157,6 +157,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DIOCOSFPFLUSH = 0x2000444e
|
||||
|
@ -442,6 +444,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -860,6 +863,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LCNT_OVERLOAD_FLUSH = 0x6
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m64
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build amd64,openbsd
|
||||
|
||||
|
@ -157,6 +157,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DIOCOSFPFLUSH = 0x2000444e
|
||||
|
@ -442,6 +444,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -860,6 +863,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LCNT_OVERLOAD_FLUSH = 0x6
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs -- _const.go
|
||||
|
@ -157,6 +157,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DIOCOSFPFLUSH = 0x2000444e
|
||||
|
@ -441,6 +443,7 @@ const (
|
|||
F_UNLCK = 0x2
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -859,6 +862,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LCNT_OVERLOAD_FLUSH = 0x6
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
|||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -423,6 +423,33 @@ func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -389,6 +389,23 @@ func pipe() (r int, w int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
@ -937,6 +954,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -389,6 +389,23 @@ func pipe() (r int, w int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
@ -937,6 +954,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -389,6 +389,23 @@ func pipe() (r int, w int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
@ -937,6 +954,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1569,6 +1584,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Ftruncate(fd int, length int64) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
|
||||
if e1 != 0 {
|
||||
|
@ -1580,7 +1610,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1588,7 +1618,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1596,7 +1626,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1604,7 +1634,7 @@ func Getgid() (gid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1566,6 +1581,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1587,7 +1617,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1595,7 +1625,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1603,7 +1633,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1621,7 +1651,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1728,8 +1743,23 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1737,7 +1767,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1745,7 +1775,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1753,7 +1783,7 @@ func Getgid() (gid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1582,7 +1597,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1590,7 +1605,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1598,7 +1613,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1616,7 +1631,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1540,7 +1555,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1548,7 +1563,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1556,7 +1571,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1564,7 +1579,7 @@ func Getgid() (gid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -2014,6 +2029,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Stat(path string, stat *Stat_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1546,6 +1561,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1567,7 +1597,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1575,7 +1605,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1583,7 +1613,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1601,7 +1631,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1546,6 +1561,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1567,7 +1597,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1575,7 +1605,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1583,7 +1613,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1601,7 +1631,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1540,7 +1555,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1548,7 +1563,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1556,7 +1571,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1564,7 +1579,7 @@ func Getgid() (gid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -2014,6 +2029,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Stat(path string, stat *Stat_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1556,6 +1571,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1577,7 +1607,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1585,7 +1615,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1593,7 +1623,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1611,7 +1641,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1556,6 +1571,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1577,7 +1607,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1585,7 +1615,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1593,7 +1623,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1611,7 +1641,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getpid() (pid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ func Getpid() (pid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getppid() (ppid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
|
||||
ppid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
|
||||
tid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1238,8 +1238,23 @@ 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 Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sync() {
|
||||
Syscall(SYS_SYNC, 0, 0, 0)
|
||||
SyscallNoError(SYS_SYNC, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Umask(mask int) (oldmask int) {
|
||||
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
|
||||
oldmask = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1566,6 +1581,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1587,7 +1617,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1595,7 +1625,7 @@ func Getegid() (egid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Geteuid() (euid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
|
||||
euid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1603,7 +1633,7 @@ func Geteuid() (euid int) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getgid() (gid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
|
||||
gid = int(r0)
|
||||
return
|
||||
}
|
||||
|
@ -1621,7 +1651,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getuid() (uid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
|
||||
uid = int(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -406,6 +406,33 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -406,6 +406,33 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -406,6 +406,33 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -404,6 +404,33 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -404,6 +404,33 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -404,6 +404,33 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -95,6 +95,7 @@ import (
|
|||
//go:cgo_import_dynamic libc_renameat renameat "libc.so"
|
||||
//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
|
||||
//go:cgo_import_dynamic libc_lseek lseek "libc.so"
|
||||
//go:cgo_import_dynamic libc_select select "libc.so"
|
||||
//go:cgo_import_dynamic libc_setegid setegid "libc.so"
|
||||
//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
|
||||
//go:cgo_import_dynamic libc_setgid setgid "libc.so"
|
||||
|
@ -220,6 +221,7 @@ import (
|
|||
//go:linkname procRenameat libc_renameat
|
||||
//go:linkname procRmdir libc_rmdir
|
||||
//go:linkname proclseek libc_lseek
|
||||
//go:linkname procSelect libc_select
|
||||
//go:linkname procSetegid libc_setegid
|
||||
//go:linkname procSeteuid libc_seteuid
|
||||
//go:linkname procSetgid libc_setgid
|
||||
|
@ -346,6 +348,7 @@ var (
|
|||
procRenameat,
|
||||
procRmdir,
|
||||
proclseek,
|
||||
procSelect,
|
||||
procSetegid,
|
||||
procSeteuid,
|
||||
procSetgid,
|
||||
|
@ -1264,6 +1267,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Setegid(egid int) (err error) {
|
||||
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build 386,darwin
|
||||
|
||||
|
@ -121,13 +121,15 @@ const (
|
|||
SYS_CSOPS = 169
|
||||
SYS_CSOPS_AUDITTOKEN = 170
|
||||
SYS_WAITID = 173
|
||||
SYS_KDEBUG_TYPEFILTER = 177
|
||||
SYS_KDEBUG_TRACE_STRING = 178
|
||||
SYS_KDEBUG_TRACE64 = 179
|
||||
SYS_KDEBUG_TRACE = 180
|
||||
SYS_SETGID = 181
|
||||
SYS_SETEGID = 182
|
||||
SYS_SETEUID = 183
|
||||
SYS_SIGRETURN = 184
|
||||
SYS_CHUD = 185
|
||||
SYS_THREAD_SELFCOUNTS = 186
|
||||
SYS_FDATASYNC = 187
|
||||
SYS_STAT = 188
|
||||
SYS_FSTAT = 189
|
||||
|
@ -278,7 +280,6 @@ const (
|
|||
SYS_KQUEUE = 362
|
||||
SYS_KEVENT = 363
|
||||
SYS_LCHOWN = 364
|
||||
SYS_STACK_SNAPSHOT = 365
|
||||
SYS_BSDTHREAD_REGISTER = 366
|
||||
SYS_WORKQ_OPEN = 367
|
||||
SYS_WORKQ_KERNRETURN = 368
|
||||
|
@ -287,6 +288,8 @@ const (
|
|||
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
|
||||
SYS_THREAD_SELFID = 372
|
||||
SYS_LEDGER = 373
|
||||
SYS_KEVENT_QOS = 374
|
||||
SYS_KEVENT_ID = 375
|
||||
SYS___MAC_EXECVE = 380
|
||||
SYS___MAC_SYSCALL = 381
|
||||
SYS___MAC_GET_FILE = 382
|
||||
|
@ -298,11 +301,8 @@ const (
|
|||
SYS___MAC_GET_FD = 388
|
||||
SYS___MAC_SET_FD = 389
|
||||
SYS___MAC_GET_PID = 390
|
||||
SYS___MAC_GET_LCID = 391
|
||||
SYS___MAC_GET_LCTX = 392
|
||||
SYS___MAC_SET_LCTX = 393
|
||||
SYS_SETLCID = 394
|
||||
SYS_GETLCID = 395
|
||||
SYS_PSELECT = 394
|
||||
SYS_PSELECT_NOCANCEL = 395
|
||||
SYS_READ_NOCANCEL = 396
|
||||
SYS_WRITE_NOCANCEL = 397
|
||||
SYS_OPEN_NOCANCEL = 398
|
||||
|
@ -351,6 +351,7 @@ const (
|
|||
SYS_GUARDED_CLOSE_NP = 442
|
||||
SYS_GUARDED_KQUEUE_NP = 443
|
||||
SYS_CHANGE_FDGUARD_NP = 444
|
||||
SYS_USRCTL = 445
|
||||
SYS_PROC_RLIMIT_CONTROL = 446
|
||||
SYS_CONNECTX = 447
|
||||
SYS_DISCONNECTX = 448
|
||||
|
@ -367,6 +368,7 @@ const (
|
|||
SYS_COALITION_INFO = 459
|
||||
SYS_NECP_MATCH_POLICY = 460
|
||||
SYS_GETATTRLISTBULK = 461
|
||||
SYS_CLONEFILEAT = 462
|
||||
SYS_OPENAT = 463
|
||||
SYS_OPENAT_NOCANCEL = 464
|
||||
SYS_RENAMEAT = 465
|
||||
|
@ -392,7 +394,43 @@ const (
|
|||
SYS_GUARDED_WRITE_NP = 485
|
||||
SYS_GUARDED_PWRITE_NP = 486
|
||||
SYS_GUARDED_WRITEV_NP = 487
|
||||
SYS_RENAME_EXT = 488
|
||||
SYS_RENAMEATX_NP = 488
|
||||
SYS_MREMAP_ENCRYPTED = 489
|
||||
SYS_MAXSYSCALL = 490
|
||||
SYS_NETAGENT_TRIGGER = 490
|
||||
SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
|
||||
SYS_MICROSTACKSHOT = 492
|
||||
SYS_GRAB_PGO_DATA = 493
|
||||
SYS_PERSONA = 494
|
||||
SYS_WORK_INTERVAL_CTL = 499
|
||||
SYS_GETENTROPY = 500
|
||||
SYS_NECP_OPEN = 501
|
||||
SYS_NECP_CLIENT_ACTION = 502
|
||||
SYS___NEXUS_OPEN = 503
|
||||
SYS___NEXUS_REGISTER = 504
|
||||
SYS___NEXUS_DEREGISTER = 505
|
||||
SYS___NEXUS_CREATE = 506
|
||||
SYS___NEXUS_DESTROY = 507
|
||||
SYS___NEXUS_GET_OPT = 508
|
||||
SYS___NEXUS_SET_OPT = 509
|
||||
SYS___CHANNEL_OPEN = 510
|
||||
SYS___CHANNEL_GET_INFO = 511
|
||||
SYS___CHANNEL_SYNC = 512
|
||||
SYS___CHANNEL_GET_OPT = 513
|
||||
SYS___CHANNEL_SET_OPT = 514
|
||||
SYS_ULOCK_WAIT = 515
|
||||
SYS_ULOCK_WAKE = 516
|
||||
SYS_FCLONEFILEAT = 517
|
||||
SYS_FS_SNAPSHOT = 518
|
||||
SYS_TERMINATE_WITH_PAYLOAD = 520
|
||||
SYS_ABORT_WITH_PAYLOAD = 521
|
||||
SYS_NECP_SESSION_OPEN = 522
|
||||
SYS_NECP_SESSION_ACTION = 523
|
||||
SYS_SETATTRLISTAT = 524
|
||||
SYS_NET_QOS_GUIDELINE = 525
|
||||
SYS_FMOUNT = 526
|
||||
SYS_NTP_ADJTIME = 527
|
||||
SYS_NTP_GETTIME = 528
|
||||
SYS_OS_FAULT_WITH_PAYLOAD = 529
|
||||
SYS_MAXSYSCALL = 530
|
||||
SYS_INVALID = 63
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build amd64,darwin
|
||||
|
||||
|
@ -121,13 +121,15 @@ const (
|
|||
SYS_CSOPS = 169
|
||||
SYS_CSOPS_AUDITTOKEN = 170
|
||||
SYS_WAITID = 173
|
||||
SYS_KDEBUG_TYPEFILTER = 177
|
||||
SYS_KDEBUG_TRACE_STRING = 178
|
||||
SYS_KDEBUG_TRACE64 = 179
|
||||
SYS_KDEBUG_TRACE = 180
|
||||
SYS_SETGID = 181
|
||||
SYS_SETEGID = 182
|
||||
SYS_SETEUID = 183
|
||||
SYS_SIGRETURN = 184
|
||||
SYS_CHUD = 185
|
||||
SYS_THREAD_SELFCOUNTS = 186
|
||||
SYS_FDATASYNC = 187
|
||||
SYS_STAT = 188
|
||||
SYS_FSTAT = 189
|
||||
|
@ -278,7 +280,6 @@ const (
|
|||
SYS_KQUEUE = 362
|
||||
SYS_KEVENT = 363
|
||||
SYS_LCHOWN = 364
|
||||
SYS_STACK_SNAPSHOT = 365
|
||||
SYS_BSDTHREAD_REGISTER = 366
|
||||
SYS_WORKQ_OPEN = 367
|
||||
SYS_WORKQ_KERNRETURN = 368
|
||||
|
@ -287,6 +288,8 @@ const (
|
|||
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
|
||||
SYS_THREAD_SELFID = 372
|
||||
SYS_LEDGER = 373
|
||||
SYS_KEVENT_QOS = 374
|
||||
SYS_KEVENT_ID = 375
|
||||
SYS___MAC_EXECVE = 380
|
||||
SYS___MAC_SYSCALL = 381
|
||||
SYS___MAC_GET_FILE = 382
|
||||
|
@ -298,11 +301,8 @@ const (
|
|||
SYS___MAC_GET_FD = 388
|
||||
SYS___MAC_SET_FD = 389
|
||||
SYS___MAC_GET_PID = 390
|
||||
SYS___MAC_GET_LCID = 391
|
||||
SYS___MAC_GET_LCTX = 392
|
||||
SYS___MAC_SET_LCTX = 393
|
||||
SYS_SETLCID = 394
|
||||
SYS_GETLCID = 395
|
||||
SYS_PSELECT = 394
|
||||
SYS_PSELECT_NOCANCEL = 395
|
||||
SYS_READ_NOCANCEL = 396
|
||||
SYS_WRITE_NOCANCEL = 397
|
||||
SYS_OPEN_NOCANCEL = 398
|
||||
|
@ -351,6 +351,7 @@ const (
|
|||
SYS_GUARDED_CLOSE_NP = 442
|
||||
SYS_GUARDED_KQUEUE_NP = 443
|
||||
SYS_CHANGE_FDGUARD_NP = 444
|
||||
SYS_USRCTL = 445
|
||||
SYS_PROC_RLIMIT_CONTROL = 446
|
||||
SYS_CONNECTX = 447
|
||||
SYS_DISCONNECTX = 448
|
||||
|
@ -367,6 +368,7 @@ const (
|
|||
SYS_COALITION_INFO = 459
|
||||
SYS_NECP_MATCH_POLICY = 460
|
||||
SYS_GETATTRLISTBULK = 461
|
||||
SYS_CLONEFILEAT = 462
|
||||
SYS_OPENAT = 463
|
||||
SYS_OPENAT_NOCANCEL = 464
|
||||
SYS_RENAMEAT = 465
|
||||
|
@ -392,7 +394,43 @@ const (
|
|||
SYS_GUARDED_WRITE_NP = 485
|
||||
SYS_GUARDED_PWRITE_NP = 486
|
||||
SYS_GUARDED_WRITEV_NP = 487
|
||||
SYS_RENAME_EXT = 488
|
||||
SYS_RENAMEATX_NP = 488
|
||||
SYS_MREMAP_ENCRYPTED = 489
|
||||
SYS_MAXSYSCALL = 490
|
||||
SYS_NETAGENT_TRIGGER = 490
|
||||
SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
|
||||
SYS_MICROSTACKSHOT = 492
|
||||
SYS_GRAB_PGO_DATA = 493
|
||||
SYS_PERSONA = 494
|
||||
SYS_WORK_INTERVAL_CTL = 499
|
||||
SYS_GETENTROPY = 500
|
||||
SYS_NECP_OPEN = 501
|
||||
SYS_NECP_CLIENT_ACTION = 502
|
||||
SYS___NEXUS_OPEN = 503
|
||||
SYS___NEXUS_REGISTER = 504
|
||||
SYS___NEXUS_DEREGISTER = 505
|
||||
SYS___NEXUS_CREATE = 506
|
||||
SYS___NEXUS_DESTROY = 507
|
||||
SYS___NEXUS_GET_OPT = 508
|
||||
SYS___NEXUS_SET_OPT = 509
|
||||
SYS___CHANNEL_OPEN = 510
|
||||
SYS___CHANNEL_GET_INFO = 511
|
||||
SYS___CHANNEL_SYNC = 512
|
||||
SYS___CHANNEL_GET_OPT = 513
|
||||
SYS___CHANNEL_SET_OPT = 514
|
||||
SYS_ULOCK_WAIT = 515
|
||||
SYS_ULOCK_WAKE = 516
|
||||
SYS_FCLONEFILEAT = 517
|
||||
SYS_FS_SNAPSHOT = 518
|
||||
SYS_TERMINATE_WITH_PAYLOAD = 520
|
||||
SYS_ABORT_WITH_PAYLOAD = 521
|
||||
SYS_NECP_SESSION_OPEN = 522
|
||||
SYS_NECP_SESSION_ACTION = 523
|
||||
SYS_SETATTRLISTAT = 524
|
||||
SYS_NET_QOS_GUIDELINE = 525
|
||||
SYS_FMOUNT = 526
|
||||
SYS_NTP_ADJTIME = 527
|
||||
SYS_NTP_GETTIME = 528
|
||||
SYS_OS_FAULT_WITH_PAYLOAD = 529
|
||||
SYS_MAXSYSCALL = 530
|
||||
SYS_INVALID = 63
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
|
||||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm,darwin
|
||||
|
@ -129,6 +129,7 @@ const (
|
|||
SYS_SETEGID = 182
|
||||
SYS_SETEUID = 183
|
||||
SYS_SIGRETURN = 184
|
||||
SYS_THREAD_SELFCOUNTS = 186
|
||||
SYS_FDATASYNC = 187
|
||||
SYS_STAT = 188
|
||||
SYS_FSTAT = 189
|
||||
|
@ -288,6 +289,7 @@ const (
|
|||
SYS_THREAD_SELFID = 372
|
||||
SYS_LEDGER = 373
|
||||
SYS_KEVENT_QOS = 374
|
||||
SYS_KEVENT_ID = 375
|
||||
SYS___MAC_EXECVE = 380
|
||||
SYS___MAC_SYSCALL = 381
|
||||
SYS___MAC_GET_FILE = 382
|
||||
|
@ -421,6 +423,14 @@ const (
|
|||
SYS_FS_SNAPSHOT = 518
|
||||
SYS_TERMINATE_WITH_PAYLOAD = 520
|
||||
SYS_ABORT_WITH_PAYLOAD = 521
|
||||
SYS_MAXSYSCALL = 522
|
||||
SYS_NECP_SESSION_OPEN = 522
|
||||
SYS_NECP_SESSION_ACTION = 523
|
||||
SYS_SETATTRLISTAT = 524
|
||||
SYS_NET_QOS_GUIDELINE = 525
|
||||
SYS_FMOUNT = 526
|
||||
SYS_NTP_ADJTIME = 527
|
||||
SYS_NTP_GETTIME = 528
|
||||
SYS_OS_FAULT_WITH_PAYLOAD = 529
|
||||
SYS_MAXSYSCALL = 530
|
||||
SYS_INVALID = 63
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
|
||||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm64,darwin
|
||||
|
@ -129,6 +129,7 @@ const (
|
|||
SYS_SETEGID = 182
|
||||
SYS_SETEUID = 183
|
||||
SYS_SIGRETURN = 184
|
||||
SYS_THREAD_SELFCOUNTS = 186
|
||||
SYS_FDATASYNC = 187
|
||||
SYS_STAT = 188
|
||||
SYS_FSTAT = 189
|
||||
|
@ -288,6 +289,7 @@ const (
|
|||
SYS_THREAD_SELFID = 372
|
||||
SYS_LEDGER = 373
|
||||
SYS_KEVENT_QOS = 374
|
||||
SYS_KEVENT_ID = 375
|
||||
SYS___MAC_EXECVE = 380
|
||||
SYS___MAC_SYSCALL = 381
|
||||
SYS___MAC_GET_FILE = 382
|
||||
|
@ -421,6 +423,14 @@ const (
|
|||
SYS_FS_SNAPSHOT = 518
|
||||
SYS_TERMINATE_WITH_PAYLOAD = 520
|
||||
SYS_ABORT_WITH_PAYLOAD = 521
|
||||
SYS_MAXSYSCALL = 522
|
||||
SYS_NECP_SESSION_OPEN = 522
|
||||
SYS_NECP_SESSION_ACTION = 523
|
||||
SYS_SETATTRLISTAT = 524
|
||||
SYS_NET_QOS_GUIDELINE = 525
|
||||
SYS_FMOUNT = 526
|
||||
SYS_NTP_ADJTIME = 527
|
||||
SYS_NTP_GETTIME = 528
|
||||
SYS_OS_FAULT_WITH_PAYLOAD = 529
|
||||
SYS_MAXSYSCALL = 530
|
||||
SYS_INVALID = 63
|
||||
)
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2014 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 amd64,solaris
|
||||
|
||||
package unix
|
||||
|
||||
// TODO(aram): remove these before Go 1.3.
|
||||
const (
|
||||
SYS_EXECVE = 59
|
||||
SYS_FCNTL = 62
|
||||
)
|
|
@ -479,3 +479,11 @@ const (
|
|||
POLLWRBAND = 0x100
|
||||
POLLWRNORM = 0x4
|
||||
)
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [256]byte
|
||||
Nodename [256]byte
|
||||
Release [256]byte
|
||||
Version [256]byte
|
||||
Machine [256]byte
|
||||
}
|
||||
|
|
|
@ -489,3 +489,11 @@ const (
|
|||
POLLWRBAND = 0x100
|
||||
POLLWRNORM = 0x4
|
||||
)
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [256]byte
|
||||
Nodename [256]byte
|
||||
Release [256]byte
|
||||
Version [256]byte
|
||||
Machine [256]byte
|
||||
}
|
||||
|
|
|
@ -480,3 +480,11 @@ const (
|
|||
POLLWRBAND = 0x100
|
||||
POLLWRNORM = 0x4
|
||||
)
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [256]byte
|
||||
Nodename [256]byte
|
||||
Release [256]byte
|
||||
Version [256]byte
|
||||
Machine [256]byte
|
||||
}
|
||||
|
|
|
@ -489,3 +489,11 @@ const (
|
|||
POLLWRBAND = 0x100
|
||||
POLLWRNORM = 0x4
|
||||
)
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [256]byte
|
||||
Nodename [256]byte
|
||||
Release [256]byte
|
||||
Version [256]byte
|
||||
Machine [256]byte
|
||||
}
|
||||
|
|
|
@ -143,6 +143,10 @@ type Fsid struct {
|
|||
Val [2]int32
|
||||
}
|
||||
|
||||
const (
|
||||
PathMax = 0x400
|
||||
)
|
||||
|
||||
type RawSockaddrInet4 struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
|
@ -442,6 +446,13 @@ type Termios struct {
|
|||
Ospeed uint32
|
||||
}
|
||||
|
||||
type Winsize struct {
|
||||
Row uint16
|
||||
Col uint16
|
||||
Xpixel uint16
|
||||
Ypixel uint16
|
||||
}
|
||||
|
||||
const (
|
||||
AT_FDCWD = 0xfffafdcd
|
||||
AT_SYMLINK_NOFOLLOW = 0x1
|
||||
|
@ -465,3 +476,11 @@ const (
|
|||
POLLWRBAND = 0x100
|
||||
POLLWRNORM = 0x4
|
||||
)
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [32]byte
|
||||
Nodename [32]byte
|
||||
Release [32]byte
|
||||
Version [32]byte
|
||||
Machine [32]byte
|
||||
}
|
||||
|
|
|
@ -140,6 +140,10 @@ type Fsid struct {
|
|||
Val [2]int32
|
||||
}
|
||||
|
||||
const (
|
||||
PathMax = 0x400
|
||||
)
|
||||
|
||||
const (
|
||||
FADV_NORMAL = 0x0
|
||||
FADV_RANDOM = 0x1
|
||||
|
@ -539,3 +543,11 @@ const (
|
|||
type CapRights struct {
|
||||
Rights [2]uint64
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [256]byte
|
||||
Nodename [256]byte
|
||||
Release [256]byte
|
||||
Version [256]byte
|
||||
Machine [256]byte
|
||||
}
|
||||
|
|
|
@ -140,6 +140,10 @@ type Fsid struct {
|
|||
Val [2]int32
|
||||
}
|
||||
|
||||
const (
|
||||
PathMax = 0x400
|
||||
)
|
||||
|
||||
const (
|
||||
FADV_NORMAL = 0x0
|
||||
FADV_RANDOM = 0x1
|
||||
|
@ -542,3 +546,11 @@ const (
|
|||
type CapRights struct {
|
||||
Rights [2]uint64
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
Sysname [256]byte
|
||||
Nodename [256]byte
|
||||
Release [256]byte
|
||||
Version [256]byte
|
||||
Machine [256]byte
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue