]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/access.c
Updated display of power management information to PCI PM specs 1.1.
[pciutils.git] / lib / access.c
index 343abd8446855282cca1264bb679d1704970e36e..b80969e023c08fbd29d340ffcf3352de5bdd00d8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     $Id: access.c,v 1.2 1999/01/24 21:35:35 mj Exp $
+ *     $Id: access.c,v 1.7 2000/04/21 11:58:00 mj Exp $
  *
  *     The PCI Library -- User Access
  *
@@ -34,6 +34,16 @@ static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = {
   NULL,
   NULL,
 #endif
+#ifdef HAVE_PM_FBSD_DEVICE
+  &pm_fbsd_device,
+#else
+  NULL,
+#endif
+#ifdef HAVE_PM_AIX_DEVICE
+  &pm_aix_device,
+#else
+  NULL,
+#endif
 #ifdef HAVE_PM_DUMP
   &pm_dump,
 #else
@@ -139,6 +149,7 @@ pci_init(struct pci_access *a)
              {
                a->debug("...OK\n");
                a->methods = pci_methods[i];
+               a->method = i;
                break;
              }
            a->debug("...No.\n");
@@ -294,7 +305,7 @@ pci_write_block(struct pci_dev *d, int pos, byte *buf, int len)
   return d->methods->write(d, pos, buf, len);
 }
 
-void
+int
 pci_fill_info(struct pci_dev *d, int flags)
 {
   if (flags & PCI_FILL_RESCAN)
@@ -303,8 +314,8 @@ pci_fill_info(struct pci_dev *d, int flags)
       d->known_fields = 0;
     }
   if (flags & ~d->known_fields)
-    d->methods->fill_info(d, flags & ~d->known_fields);
-  d->known_fields |= flags;
+    d->known_fields |= d->methods->fill_info(d, flags & ~d->known_fields);
+  return d->known_fields;
 }
 
 void