n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0
Commit eafbe67f, n_tty: Refactor input_available_p() by call site broke poll() when TIME_CHAR(tty) and MIN_CHAR(tty) are both 0. When TIME_CHAR and MIN_CHAR are both 0, input is available if the read_cnt is 1 (not 0). Reported-by: NEric Dumazet <edumazet@google.com> Tested-by: NEric Dumazet <edumazet@google.com> Reported-by: NStephane Eranian <eranian@google.com> Tested-by: NDavid Ahern <dsahern@gmail.com> Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录