diff options
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r-- | drivers/char/n_tty.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 001d9d875387..e1518e17e09d 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -708,7 +708,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) | |||
708 | 708 | ||
709 | if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && | 709 | if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && |
710 | ((I_IXANY(tty) && c != START_CHAR(tty) && c != STOP_CHAR(tty)) || | 710 | ((I_IXANY(tty) && c != START_CHAR(tty) && c != STOP_CHAR(tty)) || |
711 | c == INTR_CHAR(tty) || c == QUIT_CHAR(tty))) | 711 | c == INTR_CHAR(tty) || c == QUIT_CHAR(tty) || c == SUSP_CHAR(tty))) |
712 | start_tty(tty); | 712 | start_tty(tty); |
713 | 713 | ||
714 | if (tty->closing) { | 714 | if (tty->closing) { |
@@ -746,13 +746,6 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) | |||
746 | return; | 746 | return; |
747 | } | 747 | } |
748 | 748 | ||
749 | if (c == '\r') { | ||
750 | if (I_IGNCR(tty)) | ||
751 | return; | ||
752 | if (I_ICRNL(tty)) | ||
753 | c = '\n'; | ||
754 | } else if (c == '\n' && I_INLCR(tty)) | ||
755 | c = '\r'; | ||
756 | if (I_IXON(tty)) { | 749 | if (I_IXON(tty)) { |
757 | if (c == START_CHAR(tty)) { | 750 | if (c == START_CHAR(tty)) { |
758 | start_tty(tty); | 751 | start_tty(tty); |
@@ -763,6 +756,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) | |||
763 | return; | 756 | return; |
764 | } | 757 | } |
765 | } | 758 | } |
759 | |||
766 | if (L_ISIG(tty)) { | 760 | if (L_ISIG(tty)) { |
767 | int signal; | 761 | int signal; |
768 | signal = SIGINT; | 762 | signal = SIGINT; |
@@ -792,6 +786,15 @@ send_signal: | |||
792 | return; | 786 | return; |
793 | } | 787 | } |
794 | } | 788 | } |
789 | |||
790 | if (c == '\r') { | ||
791 | if (I_IGNCR(tty)) | ||
792 | return; | ||
793 | if (I_ICRNL(tty)) | ||
794 | c = '\n'; | ||
795 | } else if (c == '\n' && I_INLCR(tty)) | ||
796 | c = '\r'; | ||
797 | |||
795 | if (tty->icanon) { | 798 | if (tty->icanon) { |
796 | if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) || | 799 | if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) || |
797 | (c == WERASE_CHAR(tty) && L_IEXTEN(tty))) { | 800 | (c == WERASE_CHAR(tty) && L_IEXTEN(tty))) { |