[PATCH 3/4] input: switch InputOption to use XF86OptionRec storage.

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 18 01:56:39 PDT 2011


On 17/08/11 22:56 , Dan Nicholson wrote:
> On Wed, Aug 10, 2011 at 8:20 PM, Peter Hutterer
> <peter.hutterer at who-t.net>  wrote:
>> Use the same struct for both InputOption and XF86OptionRec so we don't need
>> to convert to and fro the two in the config backends.
>>
>> Signed-off-by: Peter Hutterer<peter.hutterer at who-t.net>
>
> Now that I see this, I'm wondering why the generic structure isn't
> called Option since it clearly isn't input configuration specific.

Good point, I'll think of some better name, I think Option may be a bit 
too generic.

> It
> would be really nice if we could just kill XF86OptionRec/Ptr, drop the
> awkward GenericListRec, and use a generic Option with nt_list*
> everywhere in the code. I realize this would break the xf86 API,
> though. Maybe another day.

It's not breaking the API that's the problem. it's testing the changes.
I had the patch to switch XF86OptionRec to use struct list but once I 
started running it, virtually every test configuration crashed in other 
interesting ways. There's so much code using XF86OptionRec that testing 
every combination is really really hard.

Admittedly, using the nt_list functions this becomes a bit easier but 
still, testing it is a nightmare.

> Anyway,
>
> Reviewed-by: Dan Nicholson<dbn.lists at gmail.com>

Thanks.

Cheers,
   Peter


More information about the xorg-devel mailing list