[PATCH libevdev 1/2] uinput: check errno against the positive value
David Herrmann
dh.herrmann at gmail.com
Thu Aug 14 04:43:04 PDT 2014
Hi
On Tue, Aug 12, 2014 at 8:00 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> We use the negative errno internally, but the proper errno is always positive.
>
> Fixes device creation failures on kernels that don't support UI_SET_PROPBIT.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Nice catch.
Reviewed-by: David Herrmann <dh.herrmann at gmail.com>
Thanks
David
> ---
> libevdev/libevdev-uinput.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libevdev/libevdev-uinput.c b/libevdev/libevdev-uinput.c
> index e8419e6..4446b45 100644
> --- a/libevdev/libevdev-uinput.c
> +++ b/libevdev/libevdev-uinput.c
> @@ -147,7 +147,7 @@ set_props(const struct libevdev *dev, int fd, struct uinput_user_dev *uidev)
> * ioctl is called on an already created device. The
> * last two can't happen here.
> */
> - if (errno == -EINVAL)
> + if (errno == EINVAL)
> rc = 0;
> break;
> }
> --
> 1.9.3
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools
More information about the Input-tools
mailing list