Re: [libvirt-glib] Add gvir_domain_get_saved()

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

 



On Thu, Feb 16, 2012 at 02:26:02AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> 
> Binding for virDomainHasManagedSaveImage().
> ---
>  libvirt-gobject/libvirt-gobject-domain.c |   13 +++++++++++++
>  libvirt-gobject/libvirt-gobject-domain.h |    1 +
>  libvirt-gobject/libvirt-gobject.sym      |    1 +
>  3 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
> index d9e4c00..5f26dcd 100644
> --- a/libvirt-gobject/libvirt-gobject-domain.c
> +++ b/libvirt-gobject/libvirt-gobject-domain.c
> @@ -854,3 +854,16 @@ gboolean gvir_domain_get_persistent(GVirDomain *dom)
>  
>      return virDomainIsPersistent(dom->priv->handle) == 1;
>  }
> +
> +/**
> + * gvir_domain_get_saved:
> + * @dom: the domain
> + *
> + * Returns: TRUE if domain is in a saved state, FALSE otherwise.
                                      ^^^^^^^^^^^

I'd reword this a bit, when reading this, I'm wondering why it's not in
GVirDomainState.



> + */
> +gboolean gvir_domain_get_saved(GVirDomain *dom)

The naming needs to be more explicit, libvirt will suspend the domain after
a call to virDomainSave or virDomainManagedSave, the current name only
checks for the latter state. I'd go for
gvir_domain_has_managed_save_image();

Christophe

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