[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libosinfo] [PATCH 1/2] install-config: Document hostname limitations



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 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index de4ee42..4fc8b35 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -343,6 +343,22 @@ 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 does not contain non-ASCII, spaces or any of the
+ * following characters to ensure the generated install script using @config
+ * works as expected:
+ *
+ * { | } ~ [ \ ] ^ ' : ; < = > ? @ ! " # $ % ` ( ) + / . , * &
+ */
 void osinfo_install_config_set_hostname(OsinfoInstallConfig *config,
                                         const gchar *hostname)
 {
-- 
1.9.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]