Re: [PATCH v3 14/20] conf: introduce a virNWFilterBindingObjPtr struct

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

 




On 06/14/2018 08:33 AM, Daniel P. Berrangé wrote:
> Introduce a new struct to act as the stateful owner of the
> virNWFilterBindingDefPtr objects.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/conf/Makefile.inc.am         |   2 +
>  src/conf/virnwfilterbindingobj.c | 299 +++++++++++++++++++++++++++++++
>  src/conf/virnwfilterbindingobj.h |  69 +++++++
>  src/libvirt_private.syms         |  14 ++
>  4 files changed, 384 insertions(+)
>  create mode 100644 src/conf/virnwfilterbindingobj.c
>  create mode 100644 src/conf/virnwfilterbindingobj.h
> 

While continuing, I tripped across this:

> +
> +static virNWFilterBindingObjPtr
> +virNWFilterBindingObjParseNode(xmlDocPtr doc,
> +                               xmlNodePtr root)
> +{
> +    xmlXPathContextPtr ctxt = NULL;
> +    virNWFilterBindingObjPtr obj = NULL;
> +
> +    if (STRNEQ((const char *)root->name, "filterbinding")) {

"filterbindingstatus"

> +        virReportError(VIR_ERR_XML_ERROR, "%s",
> +                       _("unknown root element for filter binding"));

Found by adding the '%s' here to print the root->name...


> +        goto cleanup;
> +    }
> +
> +    ctxt = xmlXPathNewContext(doc);
> +    if (ctxt == NULL) {
> +        virReportOOMError();
> +        goto cleanup;
> +    }
> +
> +    ctxt->node = root;
> +    obj = virNWFilterBindingObjParseXML(doc, ctxt);
> +
> + cleanup:
> +    xmlXPathFreeContext(ctxt);
> +    return obj;
> +}
> +
> +

John

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

  Powered by Linux