X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Finit.c;h=064c9324a4e3f49cdfbc7cb3ba202f61912a6d68;hb=7ef7f3ec9830ebc3266da7d7bce1fe86ba04032a;hp=be45f81dd5888a99038767bb8e773a59d5503568;hpb=90f8c88626289b0a713abc41759e8bebe6c20ddb;p=pciutils.git diff --git a/lib/init.c b/lib/init.c index be45f81..064c932 100644 --- a/lib/init.c +++ b/lib/init.c @@ -57,6 +57,11 @@ static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = { #else NULL, #endif +#ifdef PCI_HAVE_PM_DARWIN_DEVICE + &pm_darwin, +#else + NULL, +#endif }; void * @@ -77,7 +82,7 @@ pci_mfree(void *x) } char * -pci_strdup(struct pci_access *a, char *s) +pci_strdup(struct pci_access *a, const char *s) { int len = strlen(s) + 1; char *t = pci_malloc(a, len); @@ -158,7 +163,10 @@ pci_alloc(void) pci_define_param(a, "net.cache_name", "~/.pciids-cache", "Name of the ID cache file"); a->id_lookup_mode = PCI_LOOKUP_CACHE; #endif - for(i=0; iconfig) pci_methods[i]->config(a); return a; @@ -185,7 +193,7 @@ pci_init(struct pci_access *a) else { unsigned int i; - for(i=0; idebug("Trying method %d...", i); @@ -210,7 +218,7 @@ pci_cleanup(struct pci_access *a) { struct pci_dev *d, *e; - for(d=a->devices; d; d=e) + for (d=a->devices; d; d=e) { e = d->next; pci_free_dev(d);