[libvirt] [PATCH 14/21] util: introduce virXMLNamespaceFormatNS
Jiri Denemark
jdenemar at redhat.com
Wed Aug 21 07:11:48 UTC 2019
On Wed, Aug 21, 2019 at 01:15:36 +0200, Ján Tomko wrote:
> A function to automatically format the xmlns:<prefix>='<uri>'
> attribute for per-driver namespaces.
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> src/util/virxml.c | 7 +++++++
> src/util/virxml.h | 4 ++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/src/util/virxml.c b/src/util/virxml.c
> index f55b9a362c..11b6031b09 100644
> --- a/src/util/virxml.c
> +++ b/src/util/virxml.c
> @@ -1408,3 +1408,10 @@ virXPathContextNodeRestore(virXPathContextNodeSavePtr save)
>
> save->ctxt->node = save->node;
> }
> +
Two empty lines between functions, please.
> +void
> +virXMLNamespaceFormatNS(virBufferPtr buf,
> + virXMLNamespace const *ns)
> +{
> + virBufferAsprintf(buf, " xmlns:%s='%s'", ns->prefix, ns->href());
> +}
Reviewed-by: Jiri Denemark <jdenemar at redhat.com>
More information about the libvir-list
mailing list