Re: [PATCH v2 2/2] qemu: report an error if memballoon has wrong address type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]