aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch/linux/common/modules.h
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2007-01-02 15:32:50 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2007-01-02 15:32:50 +0000
commit4e082dd27545c503e6ee1440e45032f93216631a (patch)
tree3b0b64937a40e9b7256647455cada96b99fed96c /hardinfo2/arch/linux/common/modules.h
parent2ac586a621e9d20667838df367ce5c3b4b428500 (diff)
Cleanups, reorganization. Implemented foreign module calls.
Diffstat (limited to 'hardinfo2/arch/linux/common/modules.h')
-rw-r--r--hardinfo2/arch/linux/common/modules.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/hardinfo2/arch/linux/common/modules.h b/hardinfo2/arch/linux/common/modules.h
index 933823d7..3acf4aba 100644
--- a/hardinfo2/arch/linux/common/modules.h
+++ b/hardinfo2/arch/linux/common/modules.h
@@ -16,6 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#define GET_STR(field_name,ptr) \
+ if (!ptr && strstr(tmp[0], field_name)) { \
+ ptr = g_markup_escape_text(g_strstrip(tmp[1]), strlen(tmp[1])); \
+ g_strfreev(tmp); \
+ continue; \
+ }
+
static gboolean
remove_module_devices(gpointer key, gpointer value, gpointer data)
{
@@ -40,7 +47,7 @@ scan_modules(void)
module_list = NULL;
}
- g_hash_table_foreach_remove(devices, remove_module_devices, NULL);
+ g_hash_table_foreach_remove(moreinfo, remove_module_devices, NULL);
lsmod = popen("/sbin/lsmod", "r");
if (!lsmod)
@@ -137,7 +144,7 @@ scan_modules(void)
g_free(deps);
}
- g_hash_table_insert(devices, hashkey, strmodule);
+ g_hash_table_insert(moreinfo, hashkey, strmodule);
g_free(license);
g_free(description);