aboutsummaryrefslogtreecommitdiff
path: root/arch/linux/common/modules.h
diff options
context:
space:
mode:
authorAgney Lopes Roth Ferraz <agney@debian.org>2007-09-11 14:53:15 -0300
committerSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:43 -0500
commit99a9c2a16af89bceed1f90c58faefd555a3268c3 (patch)
tree1e92d5f8160b4445b2459044400120e430f1fc23 /arch/linux/common/modules.h
parent0afab9fd83ec42e082ffa61f037519f3e1262e39 (diff)
parent7aeb5ac87c6105bd8fcc9b1fd12e37ba1550f587 (diff)
Import Debian changes 0.4.2.2-1
hardinfo (0.4.2.2-1) unstable; urgency=low * New upstream release. * hardinfo now suggests mesa-utils (Closes: #435793)
Diffstat (limited to 'arch/linux/common/modules.h')
-rw-r--r--arch/linux/common/modules.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/linux/common/modules.h b/arch/linux/common/modules.h
index 9b895ee8..6fbe13bd 100644
--- a/arch/linux/common/modules.h
+++ b/arch/linux/common/modules.h
@@ -26,12 +26,7 @@
static gboolean
remove_module_devices(gpointer key, gpointer value, gpointer data)
{
- if (!strncmp((gchar *) key, "MOD", 3)) {
- g_free((gchar *) key);
- g_free((GtkTreeIter *) value);
- return TRUE;
- }
- return FALSE;
+ return g_str_has_prefix(key, "MOD");
}
static void
@@ -42,9 +37,9 @@ scan_modules_do(void)
if (module_list) {
g_free(module_list);
- module_list = NULL;
}
-
+
+ module_list = NULL;
g_hash_table_foreach_remove(moreinfo, remove_module_devices, NULL);
lsmod = popen("/sbin/lsmod", "r");
@@ -103,8 +98,8 @@ scan_modules_do(void)
}
/* append this module to the list of modules */
- module_list = g_strdup_printf("%s$%s$%s=%s\n",
- module_list ? module_list : "",
+ module_list = h_strdup_cprintf("$%s$%s=%s\n",
+ module_list,
hashkey,
modname,
description ? description : "");
@@ -134,7 +129,7 @@ scan_modules_do(void)
if (deps && strlen(deps)) {
gchar **tmp = g_strsplit(deps, ",", 0);
- strmodule = g_strconcat(strmodule,
+ strmodule = h_strconcat(strmodule,
"\n[Dependencies]\n",
g_strjoinv("=\n", tmp),
"=\n", NULL);