Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96790
b: refs/heads/master
c: 487ad7e
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed May 15, 2008
1 parent 1986a6c commit a6ee60d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 8568dae21e186fbb111bbe6583033a33fe26f83d
refs/heads/master: 487ad7efbf6b0ec338cdfc2a7b0fbeb53f17a94c
13 changes: 10 additions & 3 deletions trunk/drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,20 @@ static int opost(unsigned char c, struct tty_struct *tty)
if (O_ONLRET(tty))
tty->column = 0;
if (O_ONLCR(tty)) {
if (space < 2)
if (space < 2) {
unlock_kernel();
return -1;
}
tty_put_char(tty, '\r');
tty->column = 0;
}
tty->canon_column = tty->column;
break;
case '\r':
if (O_ONOCR(tty) && tty->column == 0)
if (O_ONOCR(tty) && tty->column == 0) {
unlock_kernel();
return 0;
}
if (O_OCRNL(tty)) {
c = '\n';
if (O_ONLRET(tty))
Expand All @@ -303,10 +307,13 @@ static int opost(unsigned char c, struct tty_struct *tty)
case '\t':
spaces = 8 - (tty->column & 7);
if (O_TABDLY(tty) == XTABS) {
if (space < spaces)
if (space < spaces) {
unlock_kernel();
return -1;
}
tty->column += spaces;
tty->ops->write(tty, " ", spaces);
unlock_kernel();
return 0;
}
tty->column += spaces;
Expand Down

0 comments on commit a6ee60d

Please sign in to comment.