X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fnames-hash.c;h=2f5bc3cf21e9bd807753f93d8b206c10877ec065;hb=0766bfa0f557430a6dd3256d45a5b756499f9f7b;hp=d0748c7b9e16550b2a5b345f933d4fe0b5e2d079;hpb=523d37617c95f9b2814067e3ce4b86cc12851684;p=pciutils.git diff --git a/lib/names-hash.c b/lib/names-hash.c index d0748c7..2f5bc3c 100644 --- a/lib/names-hash.c +++ b/lib/names-hash.c @@ -103,6 +103,8 @@ char continue; if (n->src == SRC_CACHE && !(flags & PCI_LOOKUP_CACHE)) continue; + if (n->src == SRC_HWDB && (flags & (PCI_LOOKUP_SKIP_LOCAL | PCI_LOOKUP_NO_HWDB))) + continue; if (!best || best->src < n->src) best = n; } @@ -112,12 +114,11 @@ char return NULL; } -static void +void pci_id_hash_free(struct pci_access *a) { pci_mfree(a->id_hash); a->id_hash = NULL; - a->id_cache_status = 0; while (a->current_id_bucket) { struct id_bucket *buck = a->current_id_bucket; @@ -125,10 +126,3 @@ pci_id_hash_free(struct pci_access *a) pci_mfree(buck); } } - -void -pci_free_name_list(struct pci_access *a) -{ - pci_id_cache_flush(a); - pci_id_hash_free(a); -}