Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95177
b: refs/heads/master
c: 575537b
h: refs/heads/master
i:
  95175: e71f17e
v: v3
  • Loading branch information
Joe Peterson authored and Linus Torvalds committed Apr 30, 2008
1 parent e0303ab commit 379ddaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47f86834bbd4193139d61d659bebf9ab9d691e37
refs/heads/master: 575537b3248ee9b7578a3bb3df33fcdda2bfc4d5
19 changes: 11 additions & 8 deletions trunk/drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)

if (tty->stopped && !tty->flow_stopped && I_IXON(tty) &&
((I_IXANY(tty) && c != START_CHAR(tty) && c != STOP_CHAR(tty)) ||
c == INTR_CHAR(tty) || c == QUIT_CHAR(tty)))
c == INTR_CHAR(tty) || c == QUIT_CHAR(tty) || c == SUSP_CHAR(tty)))
start_tty(tty);

if (tty->closing) {
Expand Down Expand Up @@ -746,13 +746,6 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
return;
}

if (c == '\r') {
if (I_IGNCR(tty))
return;
if (I_ICRNL(tty))
c = '\n';
} else if (c == '\n' && I_INLCR(tty))
c = '\r';
if (I_IXON(tty)) {
if (c == START_CHAR(tty)) {
start_tty(tty);
Expand All @@ -763,6 +756,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
return;
}
}

if (L_ISIG(tty)) {
int signal;
signal = SIGINT;
Expand Down Expand Up @@ -792,6 +786,15 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
return;
}
}

if (c == '\r') {
if (I_IGNCR(tty))
return;
if (I_ICRNL(tty))
c = '\n';
} else if (c == '\n' && I_INLCR(tty))
c = '\r';

if (tty->icanon) {
if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) ||
(c == WERASE_CHAR(tty) && L_IEXTEN(tty))) {
Expand Down

0 comments on commit 379ddaf

Please sign in to comment.