[libvirt] [PATCH v2 2/2] qemu: report an error if memballoon has wrong address type
Eric Blake
eblake at redhat.com
Mon Apr 29 22:14:36 UTC 2013
On 04/29/2013 12:20 PM, Ján Tomko wrote:
> 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'
> ---
> src/qemu/qemu_command.c | 3 +++
> 1 file changed, 3 insertions(+)
ACK. Both worth including in 1.0.5
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index d161b56..3184e5b 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;
> }
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130429/449b7561/attachment-0001.sig>
More information about the libvir-list
mailing list