Re: [PATCH libvirt-glib] gobject: add GVir.DomainShutdownFlags binding

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

 



Hey,

On Thu, Jul 19, 2012 at 07:36:50PM +0200, Marc-André Lureau wrote:
> ---
>  libvirt-gobject/libvirt-gobject-domain.c |    2 +-
>  libvirt-gobject/libvirt-gobject-domain.h |   13 +++++++++++++
>  libvirt-gobject/libvirt-gobject.sym      |    1 +
>  3 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
> index ba8e12b..d12ac97 100644
> --- a/libvirt-gobject/libvirt-gobject-domain.c
> +++ b/libvirt-gobject/libvirt-gobject-domain.c
> @@ -509,7 +509,7 @@ gboolean gvir_domain_delete(GVirDomain *dom,
>  /**
>   * gvir_domain_shutdown:
>   * @dom: the domain
> - * @flags:  the flags
> + * @flags:  the %GVirDomainShutdownFlags flags
>   */
>  gboolean gvir_domain_shutdown(GVirDomain *dom,
>                                guint flags G_GNUC_UNUSED,
> diff --git a/libvirt-gobject/libvirt-gobject-domain.h b/libvirt-gobject/libvirt-gobject-domain.h
> index 70e7e37..c61a2f5 100644
> --- a/libvirt-gobject/libvirt-gobject-domain.h
> +++ b/libvirt-gobject/libvirt-gobject-domain.h
> @@ -116,6 +116,19 @@ typedef enum {
>      GVIR_DOMAIN_XML_UPDATE_CPU      = VIR_DOMAIN_XML_UPDATE_CPU,
>  } GVirDomainXMLFlags;
>  
> +/**
> + * GVirDomainShutdownFlags:
> + * @GVIR_DOMAIN_SHUTDOWN_NONE: No flags, hypervisor choice
> + * @GVIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN: Send ACPI event
> + * @GVIR_DOMAIN_SHUTDOWN_GUEST_AGENT: Use guest agent
> + *
> + */
> +typedef enum {
> +    GVIR_DOMAIN_SHUTDOWN_NONE           = 0,

I was looking again at this patch, and I was wondering why it's not doing
this instead of using SHUTDOWN_NONE:

diff --git a/libvirt-gobject/libvirt-gobject-domain.h
b/libvirt-gobject/libvirt-gobject-domain.h
index c61a2f5..248a75f 100644
--- a/libvirt-gobject/libvirt-gobject-domain.h
+++ b/libvirt-gobject/libvirt-gobject-domain.h
@@ -118,13 +118,13 @@ typedef enum {

 /**
  * GVirDomainShutdownFlags:
- * @GVIR_DOMAIN_SHUTDOWN_NONE: No flags, hypervisor choice
+ * @GVIR_DOMAIN_SHUTDOWN_DEFAULT: hypervisor choice
  * @GVIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN: Send ACPI event
  * @GVIR_DOMAIN_SHUTDOWN_GUEST_AGENT: Use guest agent
  *
  */
 typedef enum {
-    GVIR_DOMAIN_SHUTDOWN_NONE           = 0,
+    GVIR_DOMAIN_SHUTDOWN_DEFAULT        = VIR_DOMAIN_SHUTDOWN_DEFAULT,
     GVIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN =
VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN,
     GVIR_DOMAIN_SHUTDOWN_GUEST_AGENT    = VIR_DOMAIN_SHUTDOWN_GUEST_AGENT,
 } GVirDomainShutdownFlags;

Should I send a patch to send this before this API appears in a release?

Christophe

> +    GVIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN,
> +    GVIR_DOMAIN_SHUTDOWN_GUEST_AGENT    = VIR_DOMAIN_SHUTDOWN_GUEST_AGENT,
> +} GVirDomainShutdownFlags;
> +
>  typedef struct _GVirDomainInfo GVirDomainInfo;
>  struct _GVirDomainInfo
>  {
> diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
> index cc602d3..fe3de97 100644
> --- a/libvirt-gobject/libvirt-gobject.sym
> +++ b/libvirt-gobject/libvirt-gobject.sym
> @@ -177,6 +177,7 @@ LIBVIRT_GOBJECT_0.0.9 {
>  
>  LIBVIRT_GOBJECT_0.1.1 {
>    global:
> +	gvir_domain_shutdown_flags_get_type;
>  	gvir_domain_xml_flags_get_type;
>  } LIBVIRT_GOBJECT_0.0.9;
>  
> -- 
> 1.7.10.4
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

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