summaryrefslogtreecommitdiff
path: root/osinfo/osinfo_loader.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-03-11 20:30:19 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2013-03-14 11:00:37 +0100
commitc16c89223be1ebd2378899a75da54e71ff817420 (patch)
tree4359548b97c41f178b7839a131e3a919f8e5e9d0 /osinfo/osinfo_loader.c
parent3343d0f9c1b0937824bee2527612047bc2e75f84 (diff)
downloadlibosinfo-c16c89223be1ebd2378899a75da54e71ff817420.tar.gz
Don't ignore vendor/device name in pci/usb id parser
These values were parsed but ignored using ignore_value(), leading to very incomplete device information when using pci.ids/usb.ids. As generally this data comes from <device> nodes in libosinfo database, which takes precedence over the pci.ids/usb.ids data, this bug is not visible without removing the additional <device> data from the osinfo database.
Diffstat (limited to 'osinfo/osinfo_loader.c')
-rw-r--r--osinfo/osinfo_loader.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index 07af228..21a64b5 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -1495,7 +1495,6 @@ osinfo_loader_process_file_reg_ids(OsinfoLoader *loader,
WANT_ID(device_id);
WANT_REST(device);
SAVE_BUF(device_buf);
- ignore_value(device);
gchar *id = g_strdup_printf("%s/%s/%s",
baseURI, vendor_id, device_id);
@@ -1505,9 +1504,15 @@ osinfo_loader_process_file_reg_ids(OsinfoLoader *loader,
OSINFO_DEVICE_PROP_VENDOR_ID,
vendor_id);
osinfo_entity_set_param(OSINFO_ENTITY(dev),
+ OSINFO_DEVICE_PROP_VENDOR,
+ vendor);
+ osinfo_entity_set_param(OSINFO_ENTITY(dev),
OSINFO_DEVICE_PROP_PRODUCT_ID,
device_id);
osinfo_entity_set_param(OSINFO_ENTITY(dev),
+ OSINFO_DEVICE_PROP_PRODUCT,
+ device);
+ osinfo_entity_set_param(OSINFO_ENTITY(dev),
OSINFO_DEVICE_PROP_BUS_TYPE,
busType);
g_free(id);
@@ -1517,7 +1522,6 @@ osinfo_loader_process_file_reg_ids(OsinfoLoader *loader,
WANT_ID(vendor_id);
WANT_REST(vendor);
SAVE_BUF(vendor_buf);
- ignore_value(vendor);
}
done: