[libvirt] [PATCHv2 16/21] fix fallout from adding new parameter to internal APIs

Michal Privoznik mprivozn at redhat.com
Thu Mar 7 16:35:24 UTC 2013


On 06.03.2013 16:38, Peter Krempa wrote:
> ---
>  src/conf/domain_conf.c     |  4 +++-
>  src/conf/domain_conf.h     |  2 ++
>  src/lxc/lxc_driver.c       |  6 ++++--
>  src/openvz/openvz_driver.c |  4 ++--
>  src/phyp/phyp_driver.c     |  4 ++--
>  src/qemu/qemu_driver.c     | 11 +++++++----
>  src/uml/uml_driver.c       |  4 ++--
>  src/vbox/vbox_tmpl.c       |  8 ++++----
>  src/xen/xend_internal.c    |  6 +++---
>  src/xen/xm_internal.c      |  2 ++
>  10 files changed, 31 insertions(+), 20 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index ad1e2a4..2bafdd2 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -8370,6 +8370,7 @@ virDomainPMStateParseXML(xmlXPathContextPtr ctxt,
> 
>  virDomainDeviceDefPtr
>  virDomainDeviceDefParse(virCapsPtr caps,
> +                        virDomainXMLConfPtr xmlconf,
>                          virDomainDefPtr def,
>                          const char *xmlStr,
>                          unsigned int flags)
> @@ -16374,6 +16375,7 @@ virDomainNetFind(virDomainDefPtr def, const char *device)
>   */
>  virDomainDeviceDefPtr
>  virDomainDeviceDefCopy(virCapsPtr caps,
> +                       virDomainXMLConfPtr xmlconf,
>                         const virDomainDefPtr def,
>                         virDomainDeviceDefPtr src)
>  {
> @@ -16442,7 +16444,7 @@ virDomainDeviceDefCopy(virCapsPtr caps,
>          goto cleanup;
> 
>      xmlStr = virBufferContentAndReset(&buf);
> -    ret = virDomainDeviceDefParse(caps, def, xmlStr, flags);
> +    ret = virDomainDeviceDefParse(caps, xmlconf, def, xmlStr, flags);

Ewww. This shows hos naughty our DefCopy functions is ... But it's not
your fault.

> 
>  cleanup:
>      VIR_FREE(xmlStr);

> ...

Anyway, you say after this patch I should be able to compile. But you
forgot about aa-helper:
security/virt-aa-helper.c: In function 'get_definition':
security/virt-aa-helper.c:726:40: error: passing argument 2 of
'virDomainDefParseString' from incompatible pointer type [-Werror]
In file included from security/security_driver.h:26:0,
                 from security/virt-aa-helper.c:48:
../src/conf/domain_conf.h:2090:17: note: expected 'virDomainXMLConfPtr'
but argument is of type 'const char *'


etc.





More information about the libvir-list mailing list