]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
fbsd-device: Hopefully fixed a bug in fbsd_scan()
authorMartin Mares <mj@ucw.cz>
Sun, 31 Dec 2017 17:24:15 +0000 (18:24 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 31 Dec 2017 17:24:15 +0000 (18:24 +0100)
The previous version was obviously wrong: as Andriy Gapon pointed
out, we assign twice to t->dev, but never to t->func.

Not tested, though, as I have no FreeBSD system at hand.

lib/fbsd-device.c

index 78067dcdbb497b40aa1411ea586359dbcbe45dd5..62a335a96f6aed0d4139ec8642220a98828f063a 100644 (file)
@@ -143,7 +143,7 @@ fbsd_scan(struct pci_access *a)
          t = pci_alloc_dev(a);
          t->bus = matches[i].pc_sel.pc_bus;
          t->dev = matches[i].pc_sel.pc_dev;
-         t->dev = matches[i].pc_sel.pc_dev;
+         t->func = matches[i].pc_sel.pc_func;
          t->domain = matches[i].pc_sel.pc_domain;
          t->domain_16 = matches[i].pc_sel.pc_domain;
          t->vendor_id = matches[i].pc_vendor;