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

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



On Mon, May 12, 2014 at 04:38:35PM +0100, Zeeshan Ali (Khattak) wrote:
> Since we need to chop the hostname for windows, lets warn the app
> developers about this in the API documentation.

Do we want to make the limitation programmatically queriable? Silently
truncating the hostname in some cases feels a bit unnice.

ACK to the doc change.

Christophe

> ---
>  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 redhat com
> https://www.redhat.com/mailman/listinfo/libosinfo


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