Skip to content

Commit

Permalink
Merge tag 'tty-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/gregkh/tty

Pull tty fix from Greg KH:
 "Here is a single n_tty fix for 3.13-rc3 that resolves a regression in
  3.12 that has been reported"

* tag 'tty-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  n_tty: Fix missing newline echo
  • Loading branch information
Linus Torvalds committed Dec 9, 2013
2 parents 2d4d4a8 + 39434ab commit 3f02ff5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/tty/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,8 @@ static void process_echoes(struct tty_struct *tty)
struct n_tty_data *ldata = tty->disc_data;
size_t echoed;

if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_tail)
if ((!L_ECHO(tty) && !L_ECHONL(tty)) ||
ldata->echo_commit == ldata->echo_tail)
return;

mutex_lock(&ldata->output_lock);
Expand All @@ -825,7 +826,8 @@ static void flush_echoes(struct tty_struct *tty)
{
struct n_tty_data *ldata = tty->disc_data;

if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_head)
if ((!L_ECHO(tty) && !L_ECHONL(tty)) ||
ldata->echo_commit == ldata->echo_head)
return;

mutex_lock(&ldata->output_lock);
Expand Down

0 comments on commit 3f02ff5

Please sign in to comment.