Re: [PATCH] Fix NR_KEYS off-by-one error

From: Vojtech Pavlik
Date: Fri Jul 30 2004 - 03:50:30 EST


On Fri, Jul 30, 2004 at 10:41:03AM +0200, Andries Brouwer wrote:

> > Let me summarize.
> >
> > In the past, the kernel had various different values of NR_KEYS, in this
> > order: 128, 512, 256, 255.
> >
> > 128 was not enough, 512 didn't fit in a byte (while allowed to address
> > all keycodes the input layer uses), 256 broke some apps that relied on
> > unsigned char counters,
>
> Can you elaborate on this part? Which applications broke?

Unfortunately I don't remember. I'll dig my mailbox to see if I can find
anything.

> > BUT some binaries are still compiled with 256 and try to set up a
> > mapping for keycode 255 (although there is _no_ such keycode), and
> > break. IMO it's a bug in the app.
> >
> > Now I believe that simply adding the check back by reverting the old
> > Andrew's patch and recompiling/fixing what breaks is the right way to
> > go.
>
> Revert Andrew's patch: yes.
> Choosing 255/256 - I have no opinion yet, my opinion will depend
> on your answer to the above "Which applications broke?".


--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/