aboutsummaryrefslogtreecommitdiff
path: root/sysutils/pciutils
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2005-04-13 19:13:46 +0000
committerBruce M Simpson <bms@FreeBSD.org>2005-04-13 19:13:46 +0000
commit00e64ba0558a6f80e43793656f7b2c78b11b208d (patch)
tree8e58ed02f46c4eaaa5d3af7b91e5aa90991d5d03 /sysutils/pciutils
parent663231a0362ed33ae5737f2e227960219beddb1c (diff)
downloadports-00e64ba0558a6f80e43793656f7b2c78b11b208d.tar.gz
ports-00e64ba0558a6f80e43793656f7b2c78b11b208d.zip
Fix pciutils for recent pci changes in src/sys/dev/pci/pci_user.c.
This fix is backwards compatible. Reviewed by: imp, maintainer
Notes
Notes: svn path=/head/; revision=133264
Diffstat (limited to 'sysutils/pciutils')
-rw-r--r--sysutils/pciutils/files/patch-lib::fbsd-device.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/sysutils/pciutils/files/patch-lib::fbsd-device.c b/sysutils/pciutils/files/patch-lib::fbsd-device.c
index 1f168f55def1..5558cdd99578 100644
--- a/sysutils/pciutils/files/patch-lib::fbsd-device.c
+++ b/sysutils/pciutils/files/patch-lib::fbsd-device.c
@@ -1,8 +1,10 @@
---- lib/fbsd-device.c.orig Fri Jun 13 11:11:29 2003
-+++ lib/fbsd-device.c Fri Jun 13 11:21:52 2003
-@@ -14,9 +14,19 @@
+--- lib/fbsd-device.c.orig Tue Jul 20 07:01:31 1999
++++ lib/fbsd-device.c Tue Apr 12 10:49:09 2005
+@@ -13,10 +13,21 @@
+
#include <fcntl.h>
#include <string.h>
++#include <errno.h>
#include <unistd.h>
+#include <osreldate.h>
@@ -22,3 +24,18 @@
#include "internal.h"
+@@ -75,8 +86,12 @@
+ pi.pi_reg = pos;
+ pi.pi_width = len;
+
+- if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0)
+- d->access->error("fbsd_read: ioctl(PCIOCREAD) failed");
++ if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) {
++ if (errno == ENODEV)
++ return 0;
++ else
++ d->access->error("fbsd_read: ioctl(PCIOCREAD) failed");
++ }
+
+ switch (len)
+ {