---
libvirt-gconfig/libvirt-gconfig-os.c | 32 ++++++++++++++++++++++++++++++++
libvirt-gconfig/libvirt-gconfig-os.h | 2 ++
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-os.c b/libvirt-gconfig/libvirt-gconfig-os.c
index cfe827e..3e23493 100644
--- a/libvirt-gconfig/libvirt-gconfig-os.c
+++ b/libvirt-gconfig/libvirt-gconfig-os.c
@@ -177,3 +177,35 @@ void gvir_config_os_set_boot_devices(GVirConfigOs *os, GList
*boot_devices)
}
}
}
+
+void gvir_config_os_set_arch(GVirConfigOs *os, const char *arch)
+{
+ xmlNodePtr os_node;
+ xmlNodePtr os_type_node;
+
+ os_node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(os));
+ if (os_node == NULL)
+ return;
+
+ os_type_node = gvir_config_xml_get_element(os_node, "type", NULL);
+ if (os_type_node == NULL)
+ return;
+
+ xmlNewProp(os_type_node, (xmlChar*)"arch", (xmlChar*)arch);
+}
+
+void gvir_config_os_set_machine(GVirConfigOs *os, const char *machine)
+{
+ xmlNodePtr os_node;
+ xmlNodePtr os_type_node;
+
+ os_node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(os));
+ if (os_node == NULL)
+ return;
+
+ os_type_node = gvir_config_xml_get_element(os_node, "type", NULL);
+ if (os_type_node == NULL)
+ return;
+
+ xmlNewProp(os_type_node, (xmlChar*)"machine", (xmlChar*)machine);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-os.h b/libvirt-gconfig/libvirt-gconfig-os.h
index 87027da..b789eb3 100644
--- a/libvirt-gconfig/libvirt-gconfig-os.h
+++ b/libvirt-gconfig/libvirt-gconfig-os.h
@@ -80,8 +80,10 @@ GVirConfigOs *gvir_config_os_new(void);
GVirConfigOs *gvir_config_os_new_from_xml(const gchar *xml, GError **error);
void gvir_config_os_set_os_type(GVirConfigOs *os, GVirConfigOsType type);
+void gvir_config_os_set_arch(GVirConfigOs *os, const char *arch);
void gvir_config_os_set_boot_devices(GVirConfigOs *os, GList *boot_devices);
void gvir_config_os_set_loader(GVirConfigOs *os, const char * loader);
+void gvir_config_os_set_machine(GVirConfigOs *os, const char *machine);
void gvir_config_os_set_smbios_mode(GVirConfigOs *os,
GVirConfigOsSmBiosMode mode);
void gvir_config_os_enable_boot_menu(GVirConfigOs *os, gboolean enable);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 3466129..20b0150 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -63,6 +63,8 @@ LIBVIRT_GOBJECT_0.0.1 {
gvir_config_os_set_smbios_mode;
gvir_config_os_enable_boot_menu;
gvir_config_os_bios_enable_serial;
+ gvir_config_os_set_machine;
+ gvir_config_os_set_arch;
gvir_config_secret_get_type;
gvir_config_secret_new;
--
1.7.7