[virt-tools-list] [PATCH 07/10] Add "hostname" property to install-script-config
Fabiano Fidêncio
fabiano at fidencio.org
Tue Jun 12 02:23:08 UTC 2012
Will be used, at least, by boxes
---
osinfo/libosinfo.syms | 1 +
osinfo/osinfo_install_config.c | 13 +++++++++++++
osinfo/osinfo_install_config.h | 6 ++++++
3 files changed, 20 insertions(+)
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index bf28f74..7b62067 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -238,6 +238,7 @@ LIBOSINFO_0.1.0 {
osinfo_install_config_set_user_realname;
osinfo_install_config_set_user_administrator;
osinfo_install_config_set_user_autologin;
+ osinfo_install_config_set_hostname;
osinfo_install_datamap_get_type;
osinfo_install_datamap_new;
osinfo_install_datamap_insert;
diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index 80643b1..173059d 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -314,6 +314,19 @@ const gchar *osinfo_install_config_get_reg_product_key(OsinfoInstallConfig *conf
OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY);
}
+void osinfo_install_config_set_hostname(OsinfoInstallConfig *config,
+ const gchar *key)
+{
+ osinfo_entity_set_param(OSINFO_ENTITY(config),
+ OSINFO_INSTALL_CONFIG_PROP_HOSTNAME,
+ key);
+}
+
+const gchar *osinfo_install_config_get_hostname(OsinfoInstallConfig *config)
+{
+ return osinfo_entity_get_param_value(OSINFO_ENTITY(config),
+ OSINFO_INSTALL_CONFIG_PROP_HOSTNAME);
+}
/*
diff --git a/osinfo/osinfo_install_config.h b/osinfo/osinfo_install_config.h
index 2d1c065..e758c62 100644
--- a/osinfo/osinfo_install_config.h
+++ b/osinfo/osinfo_install_config.h
@@ -54,6 +54,8 @@
#define OSINFO_INSTALL_CONFIG_PROP_REG_PASSWORD "reg-password"
#define OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY "reg-product-key"
+#define OSINFO_INSTALL_CONFIG_PROP_HOSTNAME "hostname"
+
typedef struct _OsinfoInstallConfig OsinfoInstallConfig;
typedef struct _OsinfoInstallConfigClass OsinfoInstallConfigClass;
@@ -146,6 +148,10 @@ void osinfo_install_config_set_reg_product_key(OsinfoInstallConfig *config,
const gchar *key);
const gchar *osinfo_install_config_get_reg_product_key(OsinfoInstallConfig *config);
+void osinfo_install_config_set_hostname(OsinfoInstallConfig *config,
+ const gchar *key);
+const gchar *osinfo_install_config_get_hostname(OsinfoInstallConfig *config);
+
#endif /* __OSINFO_INSTALL_CONFIG_H__ */
/*
--
1.7.10.2
More information about the virt-tools-list
mailing list