diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-06-30 17:35:58 -0300 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-06-30 17:35:58 -0300 |
commit | 47c10af317faae9184d5d9e1f1f37c2913a16ef7 (patch) | |
tree | 51caf0f6eeacc1745092a744f0f27df3686972c1 /hardinfo2/util.c | |
parent | 60a29a76b55ec3a075cc585f7bd707bc170afaf4 (diff) |
Make "Resources" information a little more meaningful.
If the resource is claimed by a kernel module, use its description.
If the resource is reserved by a PCI device, use its name.
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r-- | hardinfo2/util.c | 13 |
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; |