]> git.ipfire.org Git - thirdparty/pciutils.git/blobdiff - lib/filter.c
Use symbol versioning for our new member of struct pci_dev
[thirdparty/pciutils.git] / lib / filter.c
index e66a470e075dc2617edb12b0a281d09e13b2c472..f321b0f57b7bf007ac12626d4ce4611e8434a8fd 100644 (file)
@@ -39,7 +39,7 @@ pci_filter_parse_slot(struct pci_filter *f, char *str)
          bus = colon2;
          if (str[0] && strcmp(str, "*"))
            {
-             long int x = strtol(bus, &e, 16);
+             long int x = strtol(str, &e, 16);
              if ((e && *e) || (x < 0 || x > 0xffff))
                return "Invalid domain number";
              f->domain = x;
@@ -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_v32(d, PCI_FILL_IDENT);
       if ((f->device >= 0 && f->device != d->device_id) ||
          (f->vendor >= 0 && f->vendor != d->vendor_id))
        return 0;