[PATCH libdrm] Export drmCompareDevices

Eric Anholt eric at anholt.net
Thu May 4 17:15:37 UTC 2017


Adam Jackson <ajax at redhat.com> writes:

> drmCompareBusInfo was almost this already, but it wasn't exported, its
> name didn't match its functionality, and while it almost looks like it
> was usable for sorting due to memcmp it wouldn't work if you had
> multiple bus types. I don't really want to think about defining a
> sensible sort order for bus types, so let's at least make it less of a
> trap for the caller.
>
> Invert its boolean sense to be 'true if equal', rename it to describe
> the type it actually operates on, and export.

I love flipping the comparison, but my only request would be to name it
drmDevicesEqual() instead, as Compare sounds a bit like memcmp() to me.
With that changed,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170504/5d715394/attachment.sig>


More information about the dri-devel mailing list