summaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index 153b32b8..2cf37291 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -489,6 +489,19 @@ gchar *module_call_method(gchar * method)
g_strdup_printf("{Unknown method: \"%s\"}", method);
}
+gchar *module_call_method_param(gchar * method, gchar * parameter)
+{
+ gchar *(*function) (gchar *param);
+
+ if (__module_methods == NULL) {
+ return NULL;
+ }
+
+ function = g_hash_table_lookup(__module_methods, method);
+ return function ? g_strdup(function(parameter)) :
+ g_strdup_printf("{Unknown method: \"%s\"}", method);
+}
+
static ShellModule *module_load(gchar * filename)
{
ShellModule *module;