[virt-tools-list] [PATCH 07/10] Add "hostname" property to install-script-config

Daniel P. Berrange berrange at redhat.com
Wed Jun 13 10:33:09 UTC 2012


On Mon, Jun 11, 2012 at 11:23:08PM -0300, Fabiano Fidêncio wrote:
>     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);


s/key/name/

> +}
> +
> +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);

s/key/name/

> +const gchar *osinfo_install_config_get_hostname(OsinfoInstallConfig *config);
> +
>  
>  #endif /* __OSINFO_INSTALL_CONFIG_H__ */
>  /*


ACK, I'll do the renames mentioned above when applying to my branch


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list