[libvirt] [PATCH] Fix error reporting when machine type probe fails
Eric Blake
eblake at redhat.com
Tue Jan 18 18:20:52 UTC 2011
On 01/18/2011 11:04 AM, Daniel P. Berrange wrote:
> Avoid overwriting the real error message with a generic
> OOM failure message, when machine type probe fails
>
> * src/qemu/qemu_driver.c: Don't overwrite error
> ---
> src/qemu/qemu_driver.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index a1b9d2a..90429e5 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6322,10 +6322,8 @@ qemudCanonicalizeMachineDirect(virDomainDefPtr def, char **canonical)
> virCapsGuestMachinePtr *machines = NULL;
> int i, nmachines = 0;
>
> - if (qemuCapsProbeMachineTypes(def->emulator, &machines, &nmachines) < 0) {
> - virReportOOMError();
> + if (qemuCapsProbeMachineTypes(def->emulator, &machines, &nmachines) < 0)
> return -1;
ACK - qemuCapsProbeMachineTypes can fail for more than just OOM, and
outputs a reasonable error message on all failure paths.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110118/479b25b3/attachment-0001.sig>
More information about the libvir-list
mailing list