[libvirt] [libvirt-glib 12/37] Add more GVirConfigOs setters

Christophe Fergeau cfergeau at redhat.com
Tue Nov 15 14:24:29 UTC 2011


On Fri, Nov 11, 2011 at 04:20:05PM +0100, Marc-André Lureau wrote:
> Hi
> 
> Please merge with previous patch.
> 
> > +    if (enable)
> > +        xmlNewProp(node, (xmlChar*)"enable", (xmlChar*)"yes");
> > +    else
> > +        xmlNewProp(node, (xmlChar*)"enable", (xmlChar*)"no");
> > +}
> 
> might be useful to have use a gchar * gvir_config_yes_no (bool condition)

This is factored in a helper function in one of the patches that hasn't
been sent yet.

> 
> > +        if (strcmp("boot", (char *)node->name) == 0) {
> 
> It could use the safer g_strcmp0.

Ah indeed, didn't know about this function, changed.

Christophe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111115/b66eab5b/attachment-0001.sig>


More information about the libvir-list mailing list