[PATCH 5/5] Weston: fix drmModeRmFB

Pekka Paalanen ppaalanen at gmail.com
Sat Mar 31 07:34:26 PDT 2012


On Sat, 31 Mar 2012 16:00:59 +0200
Andreas Ericsson <ae at op5.se> wrote:

> On 03/31/2012 12:58 PM, Martin Minarik wrote:
> > fb_id is unsigned integer, we are assigning -1 to it. Changed
> > to 0xFFFF should be better.
> > 
> 
> 0xffff is within the range for the maximum usable filedescriptor
> on Linux, and not even very uncommon a setting, at that. Use ~0
> instead, or change fb_id to be an int instead of an unsigned.

The proper fix here, as krh explained in irc, is to replace
all -1 with 0. Zero is an invalid fb_id. Keep fb_id type as it is.

Martin, your patches 1 and 2 are obviously good. Patches 3 and 4 I
didn't check yet as I was only reading email this time, not
applying patches.


Thanks,
pq


More information about the wayland-devel mailing list