[libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Mon Jan 23 21:31:57 UTC 2012


On Mon, Jan 23, 2012 at 7:19 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> Based on a patch from Zeeshan Ali (Khattak) <zeeshanak at gnome.org>

Looks good! I'll test it later. Some minor issues:

> +    gvir_config_object_set_namespace(custom_xml, ns, ns_uri, TRUE);

You meant to pass 'FALSE' in the last arg?

> +    g_return_val_if_fail(GVIR_CONFIG_IS_OBJECT(object), FALSE);
> +    g_return_val_if_fail(ns != NULL, FALSE);
> +    g_return_val_if_fail(ns_uri != NULL, FALSE);
> +
> +    namespace = xmlNewNs(object->priv->node,
> +                         (xmlChar *)ns_uri, (xmlChar *)ns);
> +    if (namespace == NULL)
> +        return FALSE;
> +    if (recursive) {
> +        set_namespace_on_tree(object->priv->node, namespace);
> +    } else {
> +        xmlSetNs(object->priv->node, namespace);
> +    }

You don't need the curly braces here.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the libvir-list mailing list