summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKim Hagen <khagen@multi-development.com>2014-07-16 18:02:51 +0200
committerKim Hagen <khagen@multi-development.com>2014-07-16 18:02:51 +0200
commit0ff877570c8265f9cfd1ea1488cc9543e49ddcf1 (patch)
tree1a7dd418f2a580b37cc71b6e828a20672d7395e2 /src
parente8f38ad6ca5b06acb12cd7c9e7801276838c3c0e (diff)
downloadvyatta-cfg-system-0ff877570c8265f9cfd1ea1488cc9543e49ddcf1.tar.gz
vyatta-cfg-system-0ff877570c8265f9cfd1ea1488cc9543e49ddcf1.zip
Skip finding hypervisor vendor if cpu is other than x86_64.
Diffstat (limited to 'src')
-rw-r--r--src/hypervisor_vendor.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hypervisor_vendor.c b/src/hypervisor_vendor.c
index 0a447565..934ac39b 100644
--- a/src/hypervisor_vendor.c
+++ b/src/hypervisor_vendor.c
@@ -36,6 +36,8 @@
#define SYS_HYPERVISOR "/sys/hypervisor/type"
#define SYS_DMI_VENDOR "/sys/class/dmi/id/sys_vendor"
+#if defined(__x86_64__) || defined(__i386__)
+
/*
* This CPUID leaf returns the information about the hypervisor.
* EAX : maximum input value for CPUID supported by the hypervisor.
@@ -98,6 +100,13 @@ static const char *get_hypervisor_cpuid(void)
return NULL;
}
+#else /* ! __x86_64__ */
+static const char *get_hypervisor_cpuid(void)
+{
+return NULL;
+}
+#endif
+
/* Use DMI vendor information */
static const char *get_hypervisor_dmi(void)
{