From d3b9aa19f04e6be78afb8497e7808a3d42042bf2 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Thu, 26 Jan 2012 22:14:43 -0200 Subject: 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. --- modules/devices/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/devices/pci.c') 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); } -- cgit v1.2.3