[PATCH synaptics] eventcomm: don't ever probe if a device is set

Hans de Goede hdegoede at redhat.com
Wed Aug 17 09:04:57 UTC 2016


Hi,

On 17-08-16 04:09, Peter Hutterer wrote:
> If opening the fd fails we still need to fail the device. This is particularly
> the case when a device disappears before we can open it - the current code
> wouldn't exit but instead switch to auto-probe touchpad devices on the system.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

LGTM:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans



> ---
>  src/eventcomm.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/eventcomm.c b/src/eventcomm.c
> index 9c9a036..f65d532 100644
> --- a/src/eventcomm.c
> +++ b/src/eventcomm.c
> @@ -1009,13 +1009,13 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
>
>              if (!(pInfo->flags & XI86_SERVER_FD))
>                  SYSCALL(close(fd));
> -
> -            /* if a device is set and not a touchpad (or already grabbed),
> -             * we must return FALSE.  Otherwise, we'll add a device that
> -             * wasn't requested for and repeat
> -             * f5687a6741a19ef3081e7fd83ac55f6df8bcd5c2. */
> -            return touchpad_found;
>          }
> +
> +        /* if a device is set and not a touchpad (or already grabbed),
> +         * we must return FALSE.  Otherwise, we'll add a device that
> +         * wasn't requested for and repeat
> +         * f5687a6741a19ef3081e7fd83ac55f6df8bcd5c2. */
> +        return touchpad_found;
>      }
>
>      i = scandir(DEV_INPUT_EVENT, &namelist, EventDevOnly, alphasort);
>


More information about the xorg-devel mailing list