[Libosinfo] [PATCH 4/6] Revert "OsinfoInstallConfig: Use config-params if set"

Daniel P. Berrange berrange at redhat.com
Wed Jan 9 12:37:47 UTC 2013


From: "Daniel P. Berrange" <berrange at redhat.com>

This reverts commit 72f00ce4673d1f3cc18f8dddd73f75a2a05a306a.
---
 osinfo/osinfo_install_config.c         | 50 ----------------------------------
 osinfo/osinfo_install_config_private.h |  1 -
 2 files changed, 51 deletions(-)

diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index a650014..d395ee9 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -736,56 +736,6 @@ OsinfoInstallConfigParamList *osinfo_install_config_get_config_params(OsinfoInst
     return config->priv->config_params;
 }
 
-
-static OsinfoDatamap *
-osinfo_install_config_get_param_datamap(OsinfoInstallConfig *config,
-                                        const gchar *param_name)
-{
-    OsinfoEntity *entity;
-    OsinfoInstallConfigParam *param;
-
-    if (!config->priv->config_params)
-        return NULL;
-
-    entity = osinfo_list_find_by_id(OSINFO_LIST(config->priv->config_params),
-                                    param_name);
-    if (entity == NULL) {
-        g_debug("%s is not a known parameter for this config", param_name);
-        return NULL;
-    }
-
-    param = OSINFO_INSTALL_CONFIG_PARAM(entity);;
-    return osinfo_install_config_param_get_value_map(param);
-}
-
-
-GList *
-osinfo_install_config_get_param_value_list(OsinfoInstallConfig *config,
-                                           const gchar *key)
-{
-    GList *values;
-    GList *it;
-    OsinfoDatamap *map;
-
-    values = osinfo_entity_get_param_value_list(OSINFO_ENTITY(config), key);
-    if (values == NULL)
-        return NULL;
-
-    map = osinfo_install_config_get_param_datamap(config, key);
-    if (map != NULL) {
-        for (it = values; it != NULL; it = it->next) {
-            const char *transformed_value;
-            transformed_value = osinfo_datamap_lookup(map, it->data);
-            if (transformed_value == NULL) {
-                continue;
-            }
-            it->data = (gpointer)transformed_value;
-        }
-    }
-
-    return values;
-}
-
 /*
  * Local variables:
  *  indent-tabs-mode: nil
diff --git a/osinfo/osinfo_install_config_private.h b/osinfo/osinfo_install_config_private.h
index 5ad2162..5a1edd3 100644
--- a/osinfo/osinfo_install_config_private.h
+++ b/osinfo/osinfo_install_config_private.h
@@ -28,7 +28,6 @@
 
 void osinfo_install_config_set_config_params(OsinfoInstallConfig *config,
                                              OsinfoInstallConfigParamList *config_params);
-GList *osinfo_install_config_get_param_value_list(OsinfoInstallConfig *config, const gchar *key);
 
 #endif /* __OSINFO_INSTALL_CONFIG_PRIVATE_H__ */
 /*
-- 
1.8.1




More information about the Libosinfo mailing list