Re: [libvirt-glib 1/5] Correct gvir_config_domain_source_pty_set_path()

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

 



ACK

On Wed, May 09, 2012 at 03:54:34AM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> 
> 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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: pgp01VlQNYVVP.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]