summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-07-11 11:16:49 -0700
committerStephen Hemminger <shemminger@vyatta.com>2011-07-11 11:16:49 -0700
commit429b4ca11b2757e0eb453f9f53bdb08cfe669f8e (patch)
treecc524b34ecbf1e38f50e430b7af35a969adee5d3 /src
parent7d6fa6728fb624348bce115ba3f90908887c061d (diff)
downloadvyatta-cfg-system-429b4ca11b2757e0eb453f9f53bdb08cfe669f8e.tar.gz
vyatta-cfg-system-429b4ca11b2757e0eb453f9f53bdb08cfe669f8e.zip
Fix duplicate detection of hypervisor
Bug 7314 If cpuid succeeds, don't need to print twice.
Diffstat (limited to 'src')
-rw-r--r--src/hypervisor_vendor.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/hypervisor_vendor.c b/src/hypervisor_vendor.c
index eade6c66..0a447565 100644
--- a/src/hypervisor_vendor.c
+++ b/src/hypervisor_vendor.c
@@ -159,12 +159,8 @@ int main(int argc, char **argv)
const char *hvm;
char buf[256];
- hvm = get_hypervisor_cpuid();
- if (hvm)
- printf("%s\n", hvm);
-
- hvm = get_hypervisor_dmi();
- if (hvm)
+ if ((hvm = get_hypervisor_cpuid()) != NULL ||
+ (hvm = get_hypervisor_dmi()) != NULL)
printf("%s\n", hvm);
/* Grotty code to look for old Xen */