mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 09:44:28 +00:00
Trigger read error handling if len is <= 0.
Red Hat Bug 494245 <https://bugzilla.redhat.com/show_bug.cgi?id=494245> Reported-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -565,7 +565,7 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
while (len == sizeof(ev))
|
||||
{
|
||||
len = read(pInfo->fd, &ev, sizeof(ev));
|
||||
if (len == 0)
|
||||
if (len <= 0)
|
||||
{
|
||||
if (errno == ENODEV) /* May happen after resume */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user