linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the tty tree with the  tree
@ 2009-09-07  9:13 Stephen Rothwell
  2009-09-07 18:22 ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2009-09-07  9:13 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Linus Torvalds, Joe Peterson

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/char/n_tty.c between commit
37f81fa1f63ad38e16125526bb2769ae0ea8d332 ("n_tty: do O_ONLCR translation
as a single write") from Linus' tree and commit
bb2d17d83926bf9d70b922031aeb49ca896e0b3d ("tty: n_tty: honor opost flag
for echoes") from the tty tree.

I fixed it up (see below) and can carry the fix for a while.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/char/n_tty.c
index 4e28b35,71308b6..0000000
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@@ -292,53 -292,56 +292,55 @@@ static int do_output_char(unsigned cha
  	if (!space)
  		return -1;
  
- 	switch (c) {
- 	case '\n':
- 		if (O_ONLRET(tty))
- 			tty->column = 0;
- 		if (O_ONLCR(tty)) {
- 			if (space < 2)
- 				return -1;
- 			tty->canon_column = tty->column = 0;
- 			tty->ops->write(tty, "\r\n", 2);
- 			return 2;
- 		}
- 		tty->canon_column = tty->column;
- 		break;
- 	case '\r':
- 		if (O_ONOCR(tty) && tty->column == 0)
- 			return 0;
- 		if (O_OCRNL(tty)) {
- 			c = '\n';
+ 	if (O_OPOST(tty)) {
+ 		switch (c) {
+ 		case '\n':
  			if (O_ONLRET(tty))
+ 				tty->column = 0;
+ 			if (O_ONLCR(tty)) {
+ 				if (space < 2)
+ 					return -1;
  				tty->canon_column = tty->column = 0;
 -				tty_put_char(tty, '\r');
 -				tty_put_char(tty, c);
++				tty->ops->write(tty, "\r\n", 2);
+ 				return 2;
+ 			}
+ 			tty->canon_column = tty->column;
  			break;
- 		}
- 		tty->canon_column = tty->column = 0;
- 		break;
- 	case '\t':
- 		spaces = 8 - (tty->column & 7);
- 		if (O_TABDLY(tty) == XTABS) {
- 			if (space < spaces)
- 				return -1;
+ 		case '\r':
+ 			if (O_ONOCR(tty) && tty->column == 0)
+ 				return 0;
+ 			if (O_OCRNL(tty)) {
+ 				c = '\n';
+ 				if (O_ONLRET(tty))
+ 					tty->canon_column = tty->column = 0;
+ 				break;
+ 			}
+ 			tty->canon_column = tty->column = 0;
+ 			break;
+ 		case '\t':
+ 			spaces = 8 - (tty->column & 7);
+ 			if (O_TABDLY(tty) == XTABS) {
+ 				if (space < spaces)
+ 					return -1;
+ 				tty->column += spaces;
+ 				tty->ops->write(tty, "        ", spaces);
+ 				return spaces;
+ 			}
  			tty->column += spaces;
- 			tty->ops->write(tty, "        ", spaces);
- 			return spaces;
- 		}
- 		tty->column += spaces;
- 		break;
- 	case '\b':
- 		if (tty->column > 0)
- 			tty->column--;
- 		break;
- 	default:
- 		if (!iscntrl(c)) {
- 			if (O_OLCUC(tty))
- 				c = toupper(c);
- 			if (!is_continuation(c, tty))
- 				tty->column++;
+ 			break;
+ 		case '\b':
+ 			if (tty->column > 0)
+ 				tty->column--;
+ 			break;
+ 		default:
+ 			if (!iscntrl(c)) {
+ 				if (O_OLCUC(tty))
+ 					c = toupper(c);
+ 				if (!is_continuation(c, tty))
+ 					tty->column++;
+ 			}
+ 			break;
  		}
- 		break;
  	}
  
  	tty_put_char(tty, c);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-09 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-07  9:13 linux-next: manual merge of the tty tree with the tree Stephen Rothwell
2009-09-07 18:22 ` Linus Torvalds
2009-09-07 21:55   ` Joe Peterson
2009-09-08 16:06     ` Greg KH
2009-09-09 21:05       ` Joe Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).