aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2005-04-14 03:13:46 +0800
committerbms <bms@FreeBSD.org>2005-04-14 03:13:46 +0800
commitaec4e1cfa3246269a5e9db524aafe64485ebdacd (patch)
tree27c96d0c30f63a3e46ef83229d5d1200264decc2 /sysutils
parenteb1cdfffe24c1a846ad7ce84bcbce93702009c91 (diff)
downloadfreebsd-ports-graphics-aec4e1cfa3246269a5e9db524aafe64485ebdacd.tar.gz
freebsd-ports-graphics-aec4e1cfa3246269a5e9db524aafe64485ebdacd.tar.zst
freebsd-ports-graphics-aec4e1cfa3246269a5e9db524aafe64485ebdacd.zip
Fix pciutils for recent pci changes in src/sys/dev/pci/pci_user.c.
This fix is backwards compatible. Reviewed by: imp, maintainer
Diffstat (limited to 'sysutils')
-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 1f168f55def..5558cdd9957 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)
+ {