From 0ff877570c8265f9cfd1ea1488cc9543e49ddcf1 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 16 Jul 2014 18:02:51 +0200 Subject: Skip finding hypervisor vendor if cpu is other than x86_64. --- src/hypervisor_vendor.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3