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

Re: [libvirt] [PATCHv2 19/27] xenapi: reject unknown flags



2011/7/8 Eric Blake <eblake redhat com>:
> * src/xenapi/xenapi_driver.c (xenapiOpen, xenapiDomainReboot)
> (xenapiDomainGetXMLDesc): Reject unknown flags.
> ---
>  src/xenapi/xenapi_driver.c |   13 ++++++++++---
>  1 files changed, 10 insertions(+), 3 deletions(-)

> @@ -1309,6 +1314,8 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSED)
>     struct xen_vif_set *vif_set = NULL;
>     char *xml;
>
> +    virCheckFlags(0, NULL);
> +
>     if (!xen_vm_get_by_name_label(session, &vms, dom->name)) return NULL;
>     if (vms->size != 1) {
>         xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR,

You found a bug, but made it worse instead of fixing it.
xenapiDomainGetXMLDesc should pass the flags to virDomainDefFormat
instead of passing 0.

ACK, with passing flags to virDomainDefFormat instead of ignoring it.

-- 
Matthias Bolte
http://photron.blogspot.com


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