[PATCH 2/2] install-config: Document implicit hostname changes

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

 



Since we need to chop the hostname for windows, lets warn the app
developers about this in the API documentation.
---
 osinfo/osinfo_install_config.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index de4ee42..c7d41d0 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -343,6 +343,20 @@ 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
+ * characters in hostname (or its equivalent) so the actual hostname set might
+ * be different from the value you specified here. For example if you specify
+ * 'my-not-so-long-hostname' as hostname for Microsoft Windows, the actual
+ * hostname will be 'my-not-so-long-' since Microsoft Window does not allow more
+ * than 15 characters in hostnames.
+ */
 void osinfo_install_config_set_hostname(OsinfoInstallConfig *config,
                                         const gchar *hostname)
 {
-- 
1.9.0

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux