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

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

 



On Mon, Jan 23, 2012 at 11:31:57PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Jan 23, 2012 at 7:19 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> > Based on a patch from Zeeshan Ali (Khattak) <zeeshanak@xxxxxxxxx>
> 
> Looks good! I'll test it later

I've only compile-tested it, if it doesn't work, don't waste time on it,
just tell me to test my stuff

> 
> > +    gvir_config_object_set_namespace(custom_xml, ns, ns_uri, TRUE);
> 
> You meant to pass 'FALSE' in the last arg?

Dunno, depends on what we decide to do :) I prefer FALSE, your initial
patch uses TRUE so I kept that for now.

> 
> > +    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.

I know, but I like them :) I don't mind dropping them

Christophe

Attachment: pgp3GhjJ95t0k.pgp
Description: PGP signature

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