qemu: Fixed default machine detection in qemuCapsParseMachineTypesStr

The machine in the last output line of <qemu-binary> -M ?
was always reported as default machine even if this wasn't the
actual default. Trivial fix.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
Viktor Mihajlovski 2012-10-17 16:48:42 +02:00 committed by Eric Blake
parent ba63d8f7d8
commit 1916679506

View File

@ -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)) {