]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/filter.c
Fix inconsistent bus centric view between the sysfs and proc methods
[pciutils.git] / lib / filter.c
index eb375c49022d4e3e7b347befda47de3e0a318b08..0b7ce6e6e9bb6df8500683caf2001d2e0f07b3c1 100644 (file)
@@ -90,14 +90,14 @@ pci_filter_parse_id(struct pci_filter *f, char *str)
   if (str[0] && strcmp(str, "*"))
     {
       long int x = strtol(str, &e, 16);
-      if ((e && *e) || (x < 0 || x >= 0xffff))
+      if ((e && *e) || (x < 0 || x > 0xffff))
        return "Invalid vendor ID";
       f->vendor = x;
     }
   if (s[0] && strcmp(s, "*"))
     {
       long int x = strtol(s, &e, 16);
-      if ((e && *e) || (x < 0 || x >= 0xffff))
+      if ((e && *e) || (x < 0 || x > 0xffff))
        return "Invalid device ID";
       f->device = x;
     }
@@ -114,7 +114,7 @@ pci_filter_match(struct pci_filter *f, struct pci_dev *d)
     return 0;
   if (f->device >= 0 || f->vendor >= 0)
     {
-      pci_fill_info(d, PCI_FILL_IDENT);
+      pci_fill_info_v31(d, PCI_FILL_IDENT);
       if ((f->device >= 0 && f->device != d->device_id) ||
          (f->vendor >= 0 && f->vendor != d->vendor_id))
        return 0;