[Libosinfo] [PATCHv2] install-config: Document hostname limitations

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed May 21 12:06:02 UTC 2014


Since Microsoft Windows has several limitations on allowed characters and
number of characters in ComputerName (which is what hostname is
translated to), lets inform the app developers about these limitations.

http://technet.microsoft.com/en-us/library/ff715676.aspx
---
 osinfo/osinfo_install_config.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index de4ee42..af0f007 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -343,6 +343,19 @@ const gchar *osinfo_install_config_get_reg_product_key(OsinfoInstallConfig *conf
                                          OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY);
 }
 
+/**
+ * osinfo_install_config_set_hostname:
+ * @config: the install config
+ * @hostname: the desired hostname
+ *
+ * Sets the #OSINFO_INSTALL_CONFIG_PROP_HOSTNAME parameter.
+ *
+ * Note that some operating systems have restrictions on maximum number of, and
+ * allowed characters in hostname (or its equivalent) so it is highly
+ * recommended that you keep the actual hostname less than or equal to 15
+ * characters long and make sure that it does not contain any characters other
+ * than ASCII alphanumeric and '-'.
+ */
 void osinfo_install_config_set_hostname(OsinfoInstallConfig *config,
                                         const gchar *hostname)
 {
-- 
1.9.0




More information about the Libosinfo mailing list