mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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;
|
goto no_memory;
|
||||||
|
|
||||||
p = t;
|
p = t;
|
||||||
if (!(t = strstr(p, "(default)")) && (!next || t < next))
|
if ((t = strstr(p, "(default)")) && (!next || t < next))
|
||||||
defIdx = caps->nmachineTypes;
|
defIdx = caps->nmachineTypes;
|
||||||
|
|
||||||
if ((t = strstr(p, "(alias of ")) && (!next || t < next)) {
|
if ((t = strstr(p, "(alias of ")) && (!next || t < next)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user