From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> --- 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; -- 1.7.10.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list