go.mod: github.com/opencontainers/runc v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
31
vendor/github.com/cilium/ebpf/internal/btf/syscalls.go
generated
vendored
Normal file
31
vendor/github.com/cilium/ebpf/internal/btf/syscalls.go
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
package btf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
"github.com/cilium/ebpf/internal"
|
||||
)
|
||||
|
||||
type bpfBTFInfo struct {
|
||||
btf internal.Pointer
|
||||
btfSize uint32
|
||||
id uint32
|
||||
name internal.Pointer
|
||||
nameLen uint32
|
||||
kernelBTF uint32
|
||||
}
|
||||
|
||||
func bpfGetBTFInfoByFD(fd *internal.FD, btf, name []byte) (*bpfBTFInfo, error) {
|
||||
info := bpfBTFInfo{
|
||||
btf: internal.NewSlicePointer(btf),
|
||||
btfSize: uint32(len(btf)),
|
||||
name: internal.NewSlicePointer(name),
|
||||
nameLen: uint32(len(name)),
|
||||
}
|
||||
if err := internal.BPFObjGetInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info)); err != nil {
|
||||
return nil, fmt.Errorf("can't get program info: %w", err)
|
||||
}
|
||||
|
||||
return &info, nil
|
||||
}
|
||||
Reference in New Issue
Block a user