]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/obsd-device.c
Fix versioned symbol aliases when used with link-time optimization
[pciutils.git] / lib / obsd-device.c
index dc68422abf1ef02385c0b25145509ee6a1feeed3..71cde5eb32c48bcb2fdec7c439c5409fd36c1b36 100644 (file)
@@ -65,7 +65,7 @@ obsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_read(d, pos, buf, len);
 
-  if (pos >= 256)
+  if (d->domain || pos >= 256)
     return 0;
 
   pi.pi_sel.pc_bus = d->bus;
@@ -106,7 +106,7 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_write(d, pos, buf, len);
 
-  if (pos >= 256)
+  if (d->domain || pos >= 256)
     return 0;
 
   pi.pi_sel.pc_bus = d->bus;