summaryrefslogtreecommitdiffstats
path: root/src/basic/virt.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-01-21 10:10:46 +0100
committerLennart Poettering <lennart@poettering.net>2020-01-21 13:47:08 +0100
commit680120bb20f04fd275657e520c4cb2c525abed27 (patch)
tree60770115e76b4b8efe17f0c4ca857169c571d91d /src/basic/virt.c
parentjson: lower maximum allowed recursion to 2K (diff)
downloadsystemd-680120bb20f04fd275657e520c4cb2c525abed27.tar.xz
systemd-680120bb20f04fd275657e520c4cb2c525abed27.zip
virt: do not define vm_from_string() for non-x86 architecture
Fixes #14615.
Diffstat (limited to '')
-rw-r--r--src/basic/virt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 12bf77e701..07831634da 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -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) {