Module: SeccompTools::Const::Audit
- Defined in:
- lib/seccomp-tools/const.rb
Overview
Constant Summary collapse
- ARCH_NAME =
Maps arch name to ARCH's key.
{ amd64: 'ARCH_X86_64', i386: 'ARCH_I386', aarch64: 'ARCH_AARCH64', riscv64: 'ARCH_RISCV64', s390x: 'ARCH_S390X' }.freeze
- ARCH =
AUDIT_ARCH_*
{ 'ARCH_X86_64' => 0xc000003e, 'ARCH_I386' => 0x40000003, 'ARCH_AARCH64' => 0xc00000b7, 'ARCH_RISCV64' => 0xc00000f3, 'ARCH_S390X' => 0x80000016 }.freeze
Class Method Summary collapse
-
.arch_symbol(audit_val) ⇒ Symbol?
The architecture symbol (e.g.
:amd64) for anAUDIT_ARCH_*value, ornilwhen it is not one seccomp-tools knows.
Class Method Details
.arch_symbol(audit_val) ⇒ Symbol?
The architecture symbol (e.g. :amd64) for an AUDIT_ARCH_* value, or nil when it is
not one seccomp-tools knows.
225 226 227 228 |
# File 'lib/seccomp-tools/const.rb', line 225 def self.arch_symbol(audit_val) name = ARCH.invert[audit_val] name && ARCH_NAME.invert[name] end |