Input: evdev - if no events and non-block, return EAGAIN not 0
Signed-off-by: Dima Zavin <dima@android.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
committed by
Dmitry Torokhov
parent
566cf5b6e3
commit
e90f869cae
@@ -412,6 +412,9 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
|
|||||||
retval += input_event_size();
|
retval += input_event_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (retval == 0 && (file->f_flags & O_NONBLOCK))
|
||||||
|
return -EAGAIN;
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user