diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-02-12 20:50:35 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-02-25 20:58:40 -0800 |
commit | 410df54dde8dca29f58ce99a2147a3722b2c7d76 (patch) | |
tree | b7547562498881f69b3df512f81859f9f2bf641a /com32/lib/pci | |
parent | 14da03c72deb60186bb26196b99ab181cef5aa1a (diff) | |
download | syslinux-410df54dde8dca29f58ce99a2147a3722b2c7d76.tar.gz |
hdt: No need to only copy vendor name
Diffstat (limited to 'com32/lib/pci')
-rw-r--r-- | com32/lib/pci/scan.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c index dea29481..7d11399d 100644 --- a/com32/lib/pci/scan.c +++ b/com32/lib/pci/scan.c @@ -306,12 +306,6 @@ int get_name_from_pci_ids(struct pci_domain *domain) /* ffff is an invalid vendor id */ if (strstr(vendor_id,"ffff")) break; - int int_vendor_id=hex_to_int(vendor_id); - /* assign the vendor_name to any matching pci device */ - for_each_pci_func(dev, domain) { - if (int_vendor_id == dev->vendor) - strlcpy(dev->dev_info->vendor_name,vendor,255); - } /* if we have a tab + a char, it means this is a product id */ } else if ((line[0] == '\t') && (line[1] != '\t')) { @@ -332,8 +326,10 @@ int get_name_from_pci_ids(struct pci_domain *domain) /* assign the product_name to any matching pci device */ for_each_pci_func(dev, domain) { if (int_vendor_id == dev->vendor && - int_product_id == dev->product) + int_product_id == dev->product) { + strlcpy(dev->dev_info->vendor_name,vendor,255); strlcpy(dev->dev_info->product_name,product,255); + } } /* if we have two tabs, it means this is a sub product */ @@ -361,8 +357,10 @@ int get_name_from_pci_ids(struct pci_domain *domain) if (int_vendor_id == dev->vendor && int_product_id == dev->product && int_sub_product_id == dev->sub_product && - int_sub_vendor_id == dev->sub_vendor) + int_sub_vendor_id == dev->sub_vendor) { + strlcpy(dev->dev_info->vendor_name,vendor,255); strlcpy(dev->dev_info->product_name,product,255); + } } } } |