aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/computer.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2008-06-30 17:35:58 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2008-06-30 17:35:58 -0300
commit47c10af317faae9184d5d9e1f1f37c2913a16ef7 (patch)
tree51caf0f6eeacc1745092a744f0f27df3686972c1 /hardinfo2/computer.c
parent60a29a76b55ec3a075cc585f7bd707bc170afaf4 (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/computer.c')
-rw-r--r--hardinfo2/computer.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c
index 573db3d6..0ae68be3 100644
--- a/hardinfo2/computer.c
+++ b/hardinfo2/computer.c
@@ -365,10 +365,27 @@ gchar *get_os_kernel(void)
return computer->os->kernel;
}
+gchar *get_kernel_module_description(gchar *module)
+{
+ gchar *description;
+
+ if (!_module_hash_table) {
+ scan_modules(FALSE);
+ }
+
+ description = g_hash_table_lookup(_module_hash_table, module);
+ if (!description) {
+ return g_strdup(module);
+ }
+
+ return g_strdup(description);
+}
+
ShellModuleMethod *hi_exported_methods(void)
{
static ShellModuleMethod m[] = {
{"getOSKernel", get_os_kernel},
+ {"getKernelModuleDescription", get_kernel_module_description},
{NULL}
};