aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2022-04-14 14:17:07 +0200
committerMartin Mares <mj@ucw.cz>2022-04-14 14:17:07 +0200
commit5c649bdcedfd823670dcbd74e9c38849d068db80 (patch)
treeb988c0849521d23ae344e129d292d5c0b2a4e790
parent60be9345be266524ffa5fd50ac0df4ee12a7b4bd (diff)
downloadpciutils-5c649bdcedfd823670dcbd74e9c38849d068db80.tar.gz
Tried to fix the fbsd-device back-end
It was left broken by the fill_info reform.
-rw-r--r--lib/fbsd-device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c
index 396ff1d..91d391b 100644
--- a/lib/fbsd-device.c
+++ b/lib/fbsd-device.c
@@ -160,7 +160,7 @@ fbsd_scan(struct pci_access *a)
}
static void
-fbsd_fill_info(struct pci_dev *d, int flags)
+fbsd_fill_info(struct pci_dev *d, unsigned int flags)
{
struct pci_conf_io conf;
struct pci_bar_io bar;
@@ -195,9 +195,9 @@ fbsd_fill_info(struct pci_dev *d, int flags)
if (ioctl(d->access->fd, PCIOCGETCONF, &conf) < 0)
{
- if (errno == ENODEV)
- return 0;
- d->access->error("fbsd_fill_info: ioctl(PCIOCGETCONF) failed: %s", strerror(errno));
+ if (errno != ENODEV)
+ d->access->error("fbsd_fill_info: ioctl(PCIOCGETCONF) failed: %s", strerror(errno));
+ return;
}
if (want_fill(d, flags, PCI_FILL_IDENT))
@@ -207,7 +207,7 @@ fbsd_fill_info(struct pci_dev *d, int flags)
}
if (want_fill(d, flags, PCI_FILL_CLASS))
d->device_class = (match.pc_class << 8) | match.pc_subclass;
- if (want_fill(d, flags PCI_FILL_BASES | PCI_FILL_SIZES))
+ if (want_fill(d, flags, PCI_FILL_BASES | PCI_FILL_SIZES))
{
d->rom_base_addr = 0;
d->rom_size = 0;