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

Re: [libvirt] [libvirt-glib] Add getter for GVirConfigDomainOs.os_type



On Sat, Jun 16, 2012 at 05:14:12AM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> 
> ---
>  libvirt-gconfig/libvirt-gconfig-domain-os.c |   12 ++++++++++++
>  libvirt-gconfig/libvirt-gconfig-domain-os.h |    1 +
>  libvirt-gconfig/libvirt-gconfig.sym         |    1 +
>  3 files changed, 14 insertions(+)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.c b/libvirt-gconfig/libvirt-gconfig-domain-os.c
> index 2e4a69a..c91936f 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-os.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-os.c
> @@ -81,6 +81,18 @@ void gvir_config_domain_os_set_os_type(GVirConfigDomainOs *os,
>                                          "type", type_str);
>  }
>  
> +GVirConfigDomainOsType gvir_config_domain_os_get_os_type(GVirConfigDomainOs *os)
> +{
> +    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_OS(os),
> +                         GVIR_CONFIG_DOMAIN_OS_TYPE_HVM);
> +
> +    return gvir_config_object_get_node_content_genum
> +            (GVIR_CONFIG_OBJECT(os),
> +             "type",
> +             GVIR_CONFIG_TYPE_DOMAIN_OS_TYPE,
> +             GVIR_CONFIG_DOMAIN_OS_TYPE_HVM);
> +}
> +
>  /**
>   * gvir_config_domain_os_set_kernel:
>   * @os: a #GVirConfigDomainOs
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.h b/libvirt-gconfig/libvirt-gconfig-domain-os.h
> index 62c1fbe..6a8a8d3 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-os.h
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-os.h
> @@ -83,6 +83,7 @@ GVirConfigDomainOs *gvir_config_domain_os_new(void);
>  GVirConfigDomainOs *gvir_config_domain_os_new_from_xml(const gchar *xml, GError **error);
>  
>  void gvir_config_domain_os_set_os_type(GVirConfigDomainOs *os, GVirConfigDomainOsType type);
> +GVirConfigDomainOsType gvir_config_domain_os_get_os_type(GVirConfigDomainOs *os);
>  const char *gvir_config_domain_os_get_arch(GVirConfigDomainOs *os);
>  void gvir_config_domain_os_set_arch(GVirConfigDomainOs *os, const char *arch);
>  GList *gvir_config_domain_os_get_boot_devices(GVirConfigDomainOs *os);
> diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
> index 761a96b..5473148 100644
> --- a/libvirt-gconfig/libvirt-gconfig.sym
> +++ b/libvirt-gconfig/libvirt-gconfig.sym
> @@ -383,6 +383,7 @@ LIBVIRT_GCONFIG_0.0.9 {
>  
>  	gvir_config_domain_os_get_arch;
>  	gvir_config_domain_os_get_boot_devices;
> +	gvir_config_domain_os_get_os_type;
>  
>  	gvir_config_capabilities_get_host;
>  	gvir_config_capabilities_get_guests;


ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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