mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-07 00:12:53 +08:00

The implementation is based on https://github.com/containers/crun/blob/0.10.2/src/libcrun/ebpf.c Although ebpf.c is originally licensed under LGPL-3.0-or-later, the author Giuseppe Scrivano agreed to relicense the file in Apache License 2.0: https://github.com/opencontainers/runc/issues/2144#issuecomment-543116397 See libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go for tested configurations. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
39 lines
842 B
Go
39 lines
842 B
Go
// Code generated by "stringer -output opcode_string.go -type=Class"; DO NOT EDIT.
|
|
|
|
package asm
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[LdClass-0]
|
|
_ = x[LdXClass-1]
|
|
_ = x[StClass-2]
|
|
_ = x[StXClass-3]
|
|
_ = x[ALUClass-4]
|
|
_ = x[JumpClass-5]
|
|
_ = x[ALU64Class-7]
|
|
}
|
|
|
|
const (
|
|
_Class_name_0 = "LdClassLdXClassStClassStXClassALUClassJumpClass"
|
|
_Class_name_1 = "ALU64Class"
|
|
)
|
|
|
|
var (
|
|
_Class_index_0 = [...]uint8{0, 7, 15, 22, 30, 38, 47}
|
|
)
|
|
|
|
func (i Class) String() string {
|
|
switch {
|
|
case 0 <= i && i <= 5:
|
|
return _Class_name_0[_Class_index_0[i]:_Class_index_0[i+1]]
|
|
case i == 7:
|
|
return _Class_name_1
|
|
default:
|
|
return "Class(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
}
|