From: Viktor Mihajlovski Date: Wed, 17 Oct 2012 14:48:42 +0000 (+0200) Subject: qemu: Fixed default machine detection in qemuCapsParseMachineTypesStr X-Git-Tag: v1.0.0-rc1~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19166795066a375b7a6f98f15dfc2271e0e549f1;p=thirdparty%2Flibvirt.git qemu: Fixed default machine detection in qemuCapsParseMachineTypesStr The machine in the last output line of -M ? was always reported as default machine even if this wasn't the actual default. Trivial fix. Signed-off-by: Viktor Mihajlovski --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fb0fe54546..985d4def3b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -284,7 +284,7 @@ qemuCapsParseMachineTypesStr(const char *output, goto no_memory; p = t; - if (!(t = strstr(p, "(default)")) && (!next || t < next)) + if ((t = strstr(p, "(default)")) && (!next || t < next)) defIdx = caps->nmachineTypes; if ((t = strstr(p, "(alias of ")) && (!next || t < next)) {