diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /drivers/char/n_tty.c | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r-- | drivers/char/n_tty.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 19105ec203f7..8096389b0dc2 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -282,16 +282,20 @@ static int opost(unsigned char c, struct tty_struct *tty) | |||
282 | if (O_ONLRET(tty)) | 282 | if (O_ONLRET(tty)) |
283 | tty->column = 0; | 283 | tty->column = 0; |
284 | if (O_ONLCR(tty)) { | 284 | if (O_ONLCR(tty)) { |
285 | if (space < 2) | 285 | if (space < 2) { |
286 | unlock_kernel(); | ||
286 | return -1; | 287 | return -1; |
288 | } | ||
287 | tty_put_char(tty, '\r'); | 289 | tty_put_char(tty, '\r'); |
288 | tty->column = 0; | 290 | tty->column = 0; |
289 | } | 291 | } |
290 | tty->canon_column = tty->column; | 292 | tty->canon_column = tty->column; |
291 | break; | 293 | break; |
292 | case '\r': | 294 | case '\r': |
293 | if (O_ONOCR(tty) && tty->column == 0) | 295 | if (O_ONOCR(tty) && tty->column == 0) { |
296 | unlock_kernel(); | ||
294 | return 0; | 297 | return 0; |
298 | } | ||
295 | if (O_OCRNL(tty)) { | 299 | if (O_OCRNL(tty)) { |
296 | c = '\n'; | 300 | c = '\n'; |
297 | if (O_ONLRET(tty)) | 301 | if (O_ONLRET(tty)) |
@@ -303,10 +307,13 @@ static int opost(unsigned char c, struct tty_struct *tty) | |||
303 | case '\t': | 307 | case '\t': |
304 | spaces = 8 - (tty->column & 7); | 308 | spaces = 8 - (tty->column & 7); |
305 | if (O_TABDLY(tty) == XTABS) { | 309 | if (O_TABDLY(tty) == XTABS) { |
306 | if (space < spaces) | 310 | if (space < spaces) { |
311 | unlock_kernel(); | ||
307 | return -1; | 312 | return -1; |
313 | } | ||
308 | tty->column += spaces; | 314 | tty->column += spaces; |
309 | tty->ops->write(tty, " ", spaces); | 315 | tty->ops->write(tty, " ", spaces); |
316 | unlock_kernel(); | ||
310 | return 0; | 317 | return 0; |
311 | } | 318 | } |
312 | tty->column += spaces; | 319 | tty->column += spaces; |