Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
libvirt-gconfig/libvirt-gconfig-domain-os.c | 7 +++++++
libvirt-gconfig/libvirt-gconfig-domain-os.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 1 +
3 files changed, 9 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.c
b/libvirt-gconfig/libvirt-gconfig-domain-os.c
index f12e1e7..ecbf5b3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-os.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-os.c
@@ -306,6 +306,13 @@ void gvir_config_domain_os_set_arch(GVirConfigDomainOs *os, const
char *arch)
xmlNewProp(os_type_node, (xmlChar*)"arch", (xmlChar*)arch);
}
+const char *gvir_config_domain_os_get_machine(GVirConfigDomainOs *os)
+{
+ return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(os),
+ "type",
+ "machine");
+}
+
void gvir_config_domain_os_set_machine(GVirConfigDomainOs *os, const char *machine)
{
xmlNodePtr os_node;
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.h
b/libvirt-gconfig/libvirt-gconfig-domain-os.h
index b9b93a6..fe17dd4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-os.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-os.h
@@ -85,6 +85,7 @@ GVirConfigDomainOs *gvir_config_domain_os_new_from_xml(const gchar *xml,
GError
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);
+const char *gvir_config_domain_os_get_machine(GVirConfigDomainOs *os);
void gvir_config_domain_os_set_arch(GVirConfigDomainOs *os, const char *arch);
GList *gvir_config_domain_os_get_boot_devices(GVirConfigDomainOs *os);
void gvir_config_domain_os_set_boot_devices(GVirConfigDomainOs *os, GList
*boot_devices);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index db69cba..1e4611e 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -768,6 +768,7 @@ global:
LIBVIRT_GCONFIG_1.0.1 {
global:
+ gvir_config_domain_os_get_machine;
gvir_config_domain_set_custom_xml_ns_children;
} LIBVIRT_GCONFIG_0.2.4;
--
2.19.1