summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-11-03 23:22:38 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-11-03 23:22:38 +0000
commita5a9c618e3e101a594ee68c89a967b431a64bec7 (patch)
tree1197ab7b2522ff99db635795bf0d34db2a0c8220 /lib
parent0c63b67bd2da63054d5876c0aa0ca86abcd8315e (diff)
When trying to map a piece of device memory with a cacheability attribue
(e.g. the graphics aperture on most video cards), don't error if we failed to set the mtrr but the map succeeded. Instead print a warning (other osen handle this case similarly). Libraries shouldn't use fprintf(stderr, ...); but libpciaccess is really quite poorly designed. This diff means that mine and drahn's laptops work with xserver 1.5. ok kettenis@
Diffstat (limited to 'lib')
-rw-r--r--lib/libpciaccess/src/openbsd_pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libpciaccess/src/openbsd_pci.c b/lib/libpciaccess/src/openbsd_pci.c
index 7a59cb12a..356074152 100644
--- a/lib/libpciaccess/src/openbsd_pci.c
+++ b/lib/libpciaccess/src/openbsd_pci.c
@@ -149,7 +149,8 @@ pci_device_openbsd_map_range(struct pci_device *dev,
mo.mo_arg[0] = MEMRANGE_SET_UPDATE;
if (ioctl(aperturefd, MEMRANGE_SET, &mo))
- return errno;
+ (void)fprintf(stderr, "mtrr set failed: %s\n",
+ strerror(errno));
}
#endif
return 0;