aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/computer.c
diff options
context:
space:
mode:
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}
};