diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-02-10 17:02:30 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-02-10 17:02:30 +0000 | 
| commit | eab4dfc94c17cf685f386c025c6adb7090afcaea (patch) | |
| tree | 6f13d34d96fe746d22f64f16d4d630d6e0b71f4e /hardinfo2/arch/linux/common/usb.h | |
| parent | 9cd3afcc20418ebc615de64f1bf76fc340b93f6f (diff) | |
Applied berlios developer patches #2299, #2300, #2286 (all by user esin).
Diffstat (limited to 'hardinfo2/arch/linux/common/usb.h')
| -rw-r--r-- | hardinfo2/arch/linux/common/usb.h | 39 | 
1 files changed, 22 insertions, 17 deletions
| diff --git a/hardinfo2/arch/linux/common/usb.h b/hardinfo2/arch/linux/common/usb.h index f2592648..5cb31729 100644 --- a/hardinfo2/arch/linux/common/usb.h +++ b/hardinfo2/arch/linux/common/usb.h @@ -94,28 +94,33 @@ __scan_usb(void)                  const gchar *url = vendor_get_url(manuf);                  if (url) { -                    gchar *tmp = g_strdup_printf("%s (%s)", manuf, url); +                    gchar *tmp = g_strdup_printf("%s (%s)", vendor_get_name(manuf), url);                      g_free(manuf);                      manuf = tmp;                  }                  gchar *strhash = g_strdup_printf("[Device Information]\n" -                                                 "Product=%s\n" -                                                 "Manufacturer=%s\n" -                                                 "[Port #%d]\n" -                                                 "Speed=%.2fMbit/s\n" -                                                 "Max Current=%s\n" -                                                 "[Misc]\n" -                                                 "USB Version=%.2f\n" -                                                 "Revision=%.2f\n" -                                                 "Class=0x%x\n" -                                                 "Vendor=0x%x\n" -                                                 "Product ID=0x%x\n" -                                                 "Bus=%d\n" "Level=%d\n", -                                                 product, manuf, -                                                 port, speed, mxpwr, -                                                 ver, rev, classid, -                                                 vendor, prodid, bus, level); +                                                 "Product=%s\n", +						  product); +		if (manuf && strlen(manuf)) +                      strhash = h_strdup_cprintf("Manufacturer=%s\n", +						  strhash, +						  manuf); + +                strhash = h_strdup_cprintf("[Port #%d]\n" +                                           "Speed=%.2fMbit/s\n" +                                           "Max Current=%s\n" +                                           "[Misc]\n" +                                           "USB Version=%.2f\n" +                                           "Revision=%.2f\n" +                                           "Class=0x%x\n" +                                           "Vendor=0x%x\n" +                                           "Product ID=0x%x\n" +                                           "Bus=%d\n" "Level=%d\n", +                                           strhash, +                                           port, speed, mxpwr, +                                           ver, rev, classid, +                                           vendor, prodid, bus, level);                  g_hash_table_insert(moreinfo, tmp, strhash);              } | 
