From: Ján Tomko Date: Mon, 29 Apr 2013 18:01:19 +0000 (+0200) Subject: qemu: report an error if memballoon has wrong address type X-Git-Tag: v1.0.5~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29bd350bf6a99c61176699d60a827595a471f6e1;p=thirdparty%2Flibvirt.git qemu: report an error if memballoon has wrong address type qemuBuildMemballoonDevStr returns NULL if memballoon doesn't have the right address type, but it doesn't report an error, leading to: error: An error occurred, but the cause is unknown Report a helpful error message instead, e.g.: error: XML error: memballoon unsupported with address type 'usb' --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d161b5672c..3184e5b9c3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4175,6 +4175,9 @@ qemuBuildMemballoonDevStr(virDomainMemballoonDefPtr dev, virBufferAddLit(&buf, "virtio-balloon-ccw"); break; default: + virReportError(VIR_ERR_XML_ERROR, + _("memballoon unsupported with address type '%s'"), + virDomainDeviceAddressTypeToString(dev->info.type)); goto error; }