mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 07:39:47 +00:00
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:
parent
566cf5b6e3
commit
e90f869cae
@ -412,6 +412,9 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
|
||||
retval += input_event_size();
|
||||
}
|
||||
|
||||
if (retval == 0 && (file->f_flags & O_NONBLOCK))
|
||||
return -EAGAIN;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user