From 4e082dd27545c503e6ee1440e45032f93216631a Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Tue, 2 Jan 2007 15:32:50 +0000 Subject: Cleanups, reorganization. Implemented foreign module calls. --- hardinfo2/arch/linux/common/modules.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'hardinfo2/arch/linux/common/modules.h') 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); -- cgit v1.2.3