Commit 2355757b authored by Linus Torvalds's avatar Linus Torvalds

vt: don't bother doing UTF translation in control states.

And don't accept UTF translations as the start of a control
state either.
parent 23fa3656
...@@ -1981,12 +1981,16 @@ static int do_con_write(struct tty_struct *tty, int from_user, ...@@ -1981,12 +1981,16 @@ static int do_con_write(struct tty_struct *tty, int from_user,
hide_cursor(currcons); hide_cursor(currcons);
while (!tty->stopped && count) { while (!tty->stopped && count) {
c = *buf; int orig = *buf;
c = orig;
buf++; buf++;
n++; n++;
count--; count--;
if (utf) { /* Do no translation at all in control states */
if (vc_state != ESnormal) {
tc = c;
} else if (utf) {
/* Combine UTF-8 into Unicode */ /* Combine UTF-8 into Unicode */
/* Incomplete characters silently ignored */ /* Incomplete characters silently ignored */
if(c > 0x7f) { if(c > 0x7f) {
...@@ -2086,7 +2090,7 @@ static int do_con_write(struct tty_struct *tty, int from_user, ...@@ -2086,7 +2090,7 @@ static int do_con_write(struct tty_struct *tty, int from_user,
continue; continue;
} }
FLUSH FLUSH
do_con_trol(tty, currcons, c); do_con_trol(tty, currcons, orig);
} }
FLUSH FLUSH
console_conditional_schedule(); console_conditional_schedule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment