summaryrefslogtreecommitdiff
path: root/lib/libpciaccess/src/freebsd_pci.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-04-09 18:50:46 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-04-09 18:50:46 +0000
commit7cb966a1f57ce3031eef2275cb36c2c9ebe95b5a (patch)
tree04633e1be18007c1d5691319680803f078199567 /lib/libpciaccess/src/freebsd_pci.c
parent26ce9f8a1b463f08a75aa655783071e25b931e78 (diff)
Update to libpciaccess 0.13.1
Diffstat (limited to 'lib/libpciaccess/src/freebsd_pci.c')
-rw-r--r--lib/libpciaccess/src/freebsd_pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpciaccess/src/freebsd_pci.c b/lib/libpciaccess/src/freebsd_pci.c
index d11535d83..cc50e91cc 100644
--- a/lib/libpciaccess/src/freebsd_pci.c
+++ b/lib/libpciaccess/src/freebsd_pci.c
@@ -108,7 +108,7 @@ pci_device_freebsd_map_range(struct pci_device *dev,
int fd, err = 0;
- fd = open("/dev/mem", O_RDWR);
+ fd = open("/dev/mem", O_RDWR | O_CLOEXEC);
if (fd == -1)
return errno;
@@ -153,7 +153,7 @@ pci_device_freebsd_unmap_range( struct pci_device *dev,
if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) ||
(map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE))
{
- fd = open("/dev/mem", O_RDWR);
+ fd = open("/dev/mem", O_RDWR | O_CLOEXEC);
if (fd != -1) {
mrd.mr_base = map->base;
mrd.mr_len = map->size;
@@ -293,7 +293,7 @@ pci_device_freebsd_read_rom( struct pci_device * dev, void * buffer )
}
printf("Using rom_base = 0x%lx\n", (long)rom_base);
- memfd = open( "/dev/mem", O_RDONLY );
+ memfd = open( "/dev/mem", O_RDONLY | O_CLOEXEC );
if ( memfd == -1 )
return errno;
@@ -585,7 +585,7 @@ pci_system_freebsd_create( void )
int i;
/* Try to open the PCI device */
- pcidev = open( "/dev/pci", O_RDWR );
+ pcidev = open( "/dev/pci", O_RDWR | O_CLOEXEC );
if ( pcidev == -1 )
return ENXIO;