summaryrefslogtreecommitdiff
path: root/src/common_init.c
diff options
context:
space:
mode:
authorMark Kettenis <mark.kettenis@xs4all.nl>2008-03-12 21:29:58 +0100
committerMatthieu Herrb <matthieu@reactor.herrb.net>2008-03-12 21:29:58 +0100
commitd898072e28ac35f5b3569f48f2e90a9ef8eee2ca (patch)
treef4c193a27127a7485e5fed232b5829ea95eedb3a /src/common_init.c
parent4224ff23794500e1455f28fd5689bd0549b72367 (diff)
OpenBSD support for libpciaccess.
xserver and libpciaccess both need to open /dev/xf86, which can only be opened once. I implemented pci_system_init_dev_mem() like Ian suggested. This requires some minor changes to the BSD-specific os-support code. Since pci_system_init_dev_mem() is a no-op on FreeBSD this should be no problem.
Diffstat (limited to 'src/common_init.c')
-rw-r--r--src/common_init.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/common_init.c b/src/common_init.c
index 1092faf..7429518 100644
--- a/src/common_init.c
+++ b/src/common_init.c
@@ -56,13 +56,22 @@ pci_system_init( void )
err = pci_system_linux_sysfs_create();
#elif defined(__FreeBSD__)
err = pci_system_freebsd_create();
+#elif defined(__OpenBSD__)
+ err = pci_system_openbsd_create();
#elif defined(__sun)
- err = pci_system_solx_devfs_create();
+ err = pci_system_solx_devfs_create();
#endif
return err;
}
+void
+pci_system_init_dev_mem(int fd)
+{
+#ifdef __OpenBSD__
+ pci_system_openbsd_init_dev_mem(fd);
+#endif
+}
/**
* Shutdown all access to the PCI subsystem.