[PATCH libpciaccess 2/2 v3] linux: Implement map_legacy

Guillem Jover guillem at hadrons.org
Fri Oct 7 14:35:57 PDT 2011


Hi!

On Fri, 2011-10-07 at 10:18:20 -0700, Jeremy Huddleston wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
> Changes in v3:
>  Style cleanup
> 
> Changes in v2:
>  Added pci_device_unmap_legacy
>  Moved to map_flags rather than write_enabled
>  open with flags rather than O_RDWR 

> diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
> index 0ed6862..876abb1 100644
> --- a/src/linux_sysfs.c
> +++ b/src/linux_sysfs.c
> @@ -840,6 +840,55 @@ pci_device_linux_sysfs_write8(struct pci_io_handle *handle, uint32_t port,
[...]
> +static int
> +pci_device_linux_sysfs_map_legacy(struct pci_device *dev, pciaddr_t base,
> +				  pciaddr_t size, unsigned map_flags, void **addr)
> +{
> +    char name[PATH_MAX];
> +    int flags = O_RDONLY;
> +    int prot = PROT_READ;
> +    int fd;
> +    int ret=0;

A minor style nit, missing spaces around =. In any case:

Reviewed-by: Guillem Jover <guillem at hadrons.org>

regards,
guillem


More information about the xorg-devel mailing list