From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
This function should set 'path' as attribute of 'source' node rather
than as child node.
---
.../libvirt-gconfig-domain-chardev-source-pty.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
index ad47bc4..201e123 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.c
@@ -82,13 +82,10 @@ GVirConfigDomainChardevSourcePty
*gvir_config_domain_chardev_source_pty_new_from
void gvir_config_domain_source_pty_set_path(GVirConfigDomainChardevSourcePty *pty,
const char *path)
{
- GVirConfigObject *source;
g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_CHARDEV_SOURCE_PTY(pty));
- source = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(pty),
- "source");
- g_return_if_fail(GVIR_CONFIG_IS_OBJECT(source));
- gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(source),
- "path", path);
- g_object_unref(G_OBJECT(source));
+ gvir_config_object_replace_child_with_attribute(GVIR_CONFIG_OBJECT(pty),
+ "source",
+ "path",
+ path);
}
--
1.7.7.6
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list