virt: do not define vm_from_string() for non-x86 architecture

Fixes #14615.
This commit is contained in:
Yu Watanabe 2020-01-21 18:10:46 +09:00 committed by Lennart Poettering
parent 898820edb5
commit 680120bb20
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include "string-util.h"
#include "virt.h"
#if defined(__i386__) || defined(__x86_64__)
static const char *const vm_table[_VIRTUALIZATION_MAX] = {
[VIRTUALIZATION_XEN] = "XenVMMXenVMM",
[VIRTUALIZATION_KVM] = "KVMKVMKVM",
@ -36,6 +37,7 @@ static const char *const vm_table[_VIRTUALIZATION_MAX] = {
};
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(vm, int);
#endif
static int detect_vm_cpuid(void) {