Re: input system: EVIOCSABS(abs) ioctl disabled, why?
From: Vojtech Pavlik
Date: Wed Jul 28 2004 - 08:42:26 EST
On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:
> When trying to feed calibration information to a touchscreen driver with
> the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
> in 2.6.7. Only after the modification given in the patch below it was
> possible to use this ioctl command.
>
> Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
It's a bug. I'll fix it.
> or needs it.
Nobody uses it, surprisingly.
> The touchscreen drivers have no good way of determining the
> absolute limits themselves, do they?
Many do.
> Thanks in advance,
> Olav
>
> --- linux-2.6.7/drivers/input/evdev.c.or 2004-07-21 13:27:03.000000000 +0300
> +++ linux-2.6.7/drivers/input/evdev.c 2004-07-21 15:53:46.000000000 +0300
> @@ -284,7 +284,7 @@
>
> default:
>
> - if (_IOC_TYPE(cmd) != 'E' || _IOC_DIR(cmd) != _IOC_READ)
> + if (_IOC_TYPE(cmd) != 'E' || (_IOC_DIR(cmd) != _IOC_READ && (cmd & ~ABS_MAX) != EVIOCSABS(0)))
> return -EINVAL;
>
> if ((_IOC_NR(cmd) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0,0))) {
--
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/