aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/pci.c
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2012-01-26 22:14:43 -0200
committerLeandro Pereira <leandro@hardinfo.org>2012-01-26 22:14:43 -0200
commitd3b9aa19f04e6be78afb8497e7808a3d42042bf2 (patch)
tree340e9be8f863e1ad29e1da91cd87a66409d6f706 /modules/devices/pci.c
parentd9e242117b7a73dd3057af25956027a361f7999f (diff)
Better manage moreinfo hashes
Have only one for the whole program and use per-module namespaces/prefixes so that each module can clear its own information easily.
Diffstat (limited to 'modules/devices/pci.c')
-rw-r--r--modules/devices/pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/devices/pci.c b/modules/devices/pci.c
index a8439019..91ff914d 100644
--- a/modules/devices/pci.c
+++ b/modules/devices/pci.c
@@ -166,7 +166,8 @@ scan_pci_do(void)
gpointer start, end;
if (strdevice != NULL && strhash != NULL) {
- g_hash_table_insert(moreinfo, strhash, strdevice);
+ moreinfo_add_with_prefix("DEV", strhash, strdevice);
+ g_free(strhash);
g_free(category);
g_free(name);
}
@@ -235,7 +236,8 @@ pci_error:
pci_list = g_strconcat(pci_list, "No PCI devices found=\n", NULL);
} else if (strhash) {
/* insert the last device */
- g_hash_table_insert(moreinfo, strhash, strdevice);
+ moreinfo_add_with_prefix("DEV", strhash, strdevice);
+ g_free(strhash);
g_free(category);
g_free(name);
}