mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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:
parent
ba63d8f7d8
commit
1916679506
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user