[PATCH 1/4] freebsd: Implement I/O port API

Keith Packard keithp at keithp.com
Wed Sep 22 16:03:13 PDT 2010


On Wed, 22 Sep 2010 16:10:49 -0400, Adam Jackson <ajax at redhat.com> wrote:

> +static struct pci_io_handle *
> +pci_device_freebsd_open_legacy_io(struct pci_io_handle *ret,
> +                                  struct pci_device *dev, pciaddr_t base,
> +                                  pciaddr_t size)
> +{
> +    ret->fd = open("/dev/io", O_RDWR);
> +
> +    if (ret->fd < 0)
> +	return NULL;
> +
> +    ret->base = base;
> +    ret->size = size;
> +
> +    return ret;
> +}

That's a terrible API. Is this fixed in stone somewhere? Or can it just
return an error indication instead of NULL?

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100922/0af14e24/attachment.pgp>


More information about the xorg-devel mailing list