Re: [PATCH 1/2] util: new function virXMLNodeSanitizeNamespaces()

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

 



On Fri, Jun 24, 2016 at 11:33:50 -0400, Laine Stump wrote:
> This is a generic version of virDomainDefMetadataSanitize() - the same
> functionality is now needed for network metadata.
> ---
>  src/libvirt_private.syms |  1 +
>  src/util/virxml.c        | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/virxml.h        |  2 ++
>  3 files changed, 55 insertions(+)

[...]

> diff --git a/src/util/virxml.c b/src/util/virxml.c
> index aa97940..37f0817 100644
> --- a/src/util/virxml.c
> +++ b/src/util/virxml.c
> @@ -1083,6 +1083,58 @@ virXMLInjectNamespace(xmlNodePtr node,
>      return 0;
>  }
>  
> +/**
> + * virXMLNodeSanitizeNamespaces()
> + * @node: Sanitize the namespaces for this node
> + *
> + * This function removes subnodes in node that share the namespace.
> + * The first metadata entry of every duplicate namespace is kept. Additionally

This is a little inconsistent since the sentence still hints to
'metadata'.

> + * nodes with no namespace are deleted.

Maybe you can state here that this is mostly used to sanitize metadata.

> + */
> +void
> +virXMLNodeSanitizeNamespaces(xmlNodePtr node)
> +{

ACK

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