mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
qemu: ignore failure of qemu -M ? on older qemu
https://bugzilla.redhat.com/show_bug.cgi?id=676563
Regression introduced in commit 2211518
.
* src/qemu/qemu_capabilities.c (qemuCapsProbeMachineTypes): Allow
non-zero exit status.
This commit is contained in:
parent
83a0489a21
commit
e046d41f72
@ -171,6 +171,7 @@ qemuCapsProbeMachineTypes(const char *binary,
|
||||
char *output;
|
||||
int ret = -1;
|
||||
virCommandPtr cmd;
|
||||
int status;
|
||||
|
||||
/* Make sure the binary we are about to try exec'ing exists.
|
||||
* Technically we could catch the exec() failure, but that's
|
||||
@ -186,7 +187,8 @@ qemuCapsProbeMachineTypes(const char *binary,
|
||||
virCommandSetOutputBuffer(cmd, &output);
|
||||
virCommandClearCaps(cmd);
|
||||
|
||||
if (virCommandRun(cmd, NULL) < 0)
|
||||
/* Ignore failure from older qemu that did not understand '-M ?'. */
|
||||
if (virCommandRun(cmd, &status) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuCapsParseMachineTypesStr(output, machines, nmachines) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user