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(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org