diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-07-11 11:16:49 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2011-07-11 11:16:49 -0700 |
commit | 429b4ca11b2757e0eb453f9f53bdb08cfe669f8e (patch) | |
tree | cc524b34ecbf1e38f50e430b7af35a969adee5d3 | |
parent | 7d6fa6728fb624348bce115ba3f90908887c061d (diff) | |
download | vyatta-cfg-quagga-429b4ca11b2757e0eb453f9f53bdb08cfe669f8e.tar.gz vyatta-cfg-quagga-429b4ca11b2757e0eb453f9f53bdb08cfe669f8e.zip |
Fix duplicate detection of hypervisor
Bug 7314
If cpuid succeeds, don't need to print twice.
-rw-r--r-- | src/hypervisor_vendor.c | 8 |
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 */ |