]> git.hungrycats.org Git - linux/commitdiff
vt: don't bother doing UTF translation in control states.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 25 Aug 2004 10:28:57 +0000 (03:28 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 25 Aug 2004 10:28:57 +0000 (03:28 -0700)
And don't accept UTF translations as the start of a control
state either.

drivers/char/vt.c

index 7956dda02f601dd104d8e0fbf122d0bbd7bc0267..3cd02b60371c0047557e015072e2b9f08e1d2b7f 100644 (file)
@@ -1981,12 +1981,16 @@ again:
                hide_cursor(currcons);
 
        while (!tty->stopped && count) {
-               c = *buf;
+               int orig = *buf;
+               c = orig;
                buf++;
                n++;
                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 */
                    /* Incomplete characters silently ignored */
                    if(c > 0x7f) {
@@ -2086,7 +2090,7 @@ again:
                        continue;
                }
                FLUSH
-               do_con_trol(tty, currcons, c);
+               do_con_trol(tty, currcons, orig);
        }
        FLUSH
        console_conditional_schedule();