From: Eric Anholt Date: Thu, 1 Mar 2007 00:25:07 +0000 (-0800) Subject: FreeBSD: When mapping regions, use the region's base address, not 0. X-Git-Tag: libpciaccess-0.9.1~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6502eee20205ec14ce6499251a28962cc36fdd6;p=platform%2Fupstream%2Flibpciaccess.git FreeBSD: When mapping regions, use the region's base address, not 0. --- diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 4790afb..a7d5c05 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -78,7 +78,8 @@ pci_device_freebsd_map( struct pci_device *dev, unsigned region, prot = write_enable ? (PROT_READ | PROT_WRITE) : PROT_READ; dev->regions[ region ].memory = mmap( NULL, dev->regions[ region ].size, - prot, MAP_SHARED, fd, 0 ); + prot, MAP_SHARED, fd, + dev->regions[ region ].base_addr); if ( dev->regions[ region ].memory == MAP_FAILED ) { dev->regions[ region ].memory = NULL;