Failure to extract version info (e.g., because qemu binary is so ancient
that it doesn't even support -help) shouldn't be considered fatal since
we only need it to detect whether qemu supports bootindex option.
---
src/qemu/qemu_capabilities.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f86e7f5..6d2a3f6 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -554,9 +554,10 @@ qemuCapsInitGuest(virCapsPtr caps,
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
goto error;
- if (qemuCapsExtractVersionInfo(binary, info->arch, NULL, &qemuCaps) < 0 ||
- (qemuCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) &&
- !virCapabilitiesAddGuestFeature(guest, "deviceboot", 1, 0)))
+ if (qemuCapsExtractVersionInfo(binary, info->arch,
+ NULL, &qemuCaps) == 0 &&
+ qemuCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) &&
+ !virCapabilitiesAddGuestFeature(guest, "deviceboot", 1, 0))
goto error;
if (hvm) {
--
1.7.4.1