From 88ad4b5628d05109881a5cdd88dce7a10b28434b Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Thu, 22 Jun 2006 13:23:29 +0000 Subject: Update vendor table, include vendor information in input devices --- hardinfo2/arch/linux/common/inputdevices.h | 32 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'hardinfo2/arch') diff --git a/hardinfo2/arch/linux/common/inputdevices.h b/hardinfo2/arch/linux/common/inputdevices.h index 44a109ca..a3fb3e4a 100644 --- a/hardinfo2/arch/linux/common/inputdevices.h +++ b/hardinfo2/arch/linux/common/inputdevices.h @@ -103,14 +103,30 @@ scan_inputdevices(void) gchar *strhash = g_strdup_printf("[Device Information]\n" "Name=%s\n" "Type=%s\n" - "Bus=0x%x\n" - "Vendor=0x%x\n" - "Product=0x%x\n" - "Version=0x%x\n" - "Connected to=%s\n", - name, input_devices[d].name, - bus, vendor, product, - version, phys); + "Bus=0x%x\n", + name, + input_devices[d].name, + bus); + + const gchar *url = vendor_get_url(name); + if (url) { + strhash = g_strdup_printf("%s" + "Vendor=%s (%s)\n", + strhash, + vendor_get_name(name), + url); + } else { + strhash = g_strdup_printf("%s" + "Vendor=%x\n", + strhash, + vendor); + } + + strhash = g_strdup_printf("%s" + "Product=0x%x\n" + "Version=0x%x\n" + "Connected to=%s\n", + strhash, product, version, phys); g_hash_table_insert(devices, tmp, strhash); g_free(phys); -- cgit v1.2.3