Re: [PATCH v2 02/11] Add stub virDomainDefineXMLFlags impls

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

 



On Thu, Jan 08, 2015 at 15:48:13 +0000, Daniel Berrange wrote:
> Make sure every virt driver implements virDomainDefineXMLFlags
> by adding a trivial passthrough from the existing impl with
> no flags set.
> ---
>  src/bhyve/bhyve_driver.c         | 12 ++++++++++--
>  src/esx/esx_driver.c             | 10 ++++++++--
>  src/libxl/libxl_driver.c         | 12 ++++++++++--
>  src/lxc/lxc_driver.c             | 13 +++++++++++--
>  src/openvz/openvz_driver.c       | 10 +++++++++-
>  src/parallels/parallels_driver.c | 11 ++++++++++-
>  src/qemu/qemu_driver.c           | 12 ++++++++++--
>  src/test/test_driver.c           | 13 +++++++++++--
>  src/uml/uml_driver.c             | 13 +++++++++++--
>  src/vbox/vbox_common.c           | 11 ++++++++++-
>  src/vmware/vmware_driver.c       | 10 +++++++++-
>  src/xen/xen_driver.c             | 12 ++++++++++--
>  src/xenapi/xenapi_driver.c       | 11 ++++++++++-
>  13 files changed, 129 insertions(+), 21 deletions(-)
> 
> diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
> index 664e631..601ad71 100644
> --- a/src/bhyve/bhyve_driver.c
> +++ b/src/bhyve/bhyve_driver.c
> @@ -485,7 +485,7 @@ bhyveDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
>  }
>  
>  static virDomainPtr
> -bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
> +bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
>  {
>      bhyveConnPtr privconn = conn->privateData;
>      virDomainPtr dom = NULL;
> @@ -495,6 +495,8 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
>      virObjectEventPtr event = NULL;
>      virCapsPtr caps = NULL;
>  
> +    virCheckFlags(0, NULL);
> +
>      caps = bhyveDriverGetCapabilities(privconn);
>      if (!caps)
>          return NULL;
> @@ -504,7 +506,7 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
>                                         VIR_DOMAIN_XML_INACTIVE)) == NULL)
>          goto cleanup;
>  
> -    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
> +    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
>          goto cleanup;
>  
>      if (bhyveDomainAssignAddresses(def, NULL) < 0)
> @@ -546,6 +548,11 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
>      return dom;
>  }
>  
> +static virDomainPtr bhyveDomainDefineXML(virConnectPtr conn, const char *xml)

We usually add a line break between the type and function name. This
applies to all *DomainDefineXML functions you created.

...

Except for the cosmetic issues, the patch looks good. ACK.

Jirka

--
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]