aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-05-08 03:38:09 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:28 -0400
commit042f10ec6533e53181284c96d22ae051e49ac707 (patch)
tree25e01489eda8c2ffddc722ddba08499d1f0d8e9b /drivers/char
parentd1e2306681ad3cbbe63a2bfcc37ac22a21b0f0eb (diff)
vt: expose system-wide UTF-8 default setting via sysfs
Create a variable, default_utf8, that defines the system-wide default UTF-8 setting. This variable can be altered via sysfs. If the variable is properly set, this should mimimize breakage of UTF-8 encoded consoles when doing a reset or echo -e '\033c' and of newly opened/allocated consoles. This is based from patches by Jan Engelhardt and Paul LeoNerd Evans. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Cc: Paul LeoNerd Evans <leonerd@leonerd.org.uk> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/vt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 4818327180ac..0edbbc3fa9d8 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -157,6 +157,8 @@ static void blank_screen_t(unsigned long dummy);
157static void set_palette(struct vc_data *vc); 157static void set_palette(struct vc_data *vc);
158 158
159static int printable; /* Is console ready for printing? */ 159static int printable; /* Is console ready for printing? */
160static int default_utf8;
161module_param(default_utf8, int, S_IRUGO | S_IWUSR);
160 162
161/* 163/*
162 * ignore_poke: don't unblank the screen when things are typed. This is 164 * ignore_poke: don't unblank the screen when things are typed. This is
@@ -1517,7 +1519,7 @@ static void reset_terminal(struct vc_data *vc, int do_clear)
1517 vc->vc_charset = 0; 1519 vc->vc_charset = 0;
1518 vc->vc_need_wrap = 0; 1520 vc->vc_need_wrap = 0;
1519 vc->vc_report_mouse = 0; 1521 vc->vc_report_mouse = 0;
1520 vc->vc_utf = 0; 1522 vc->vc_utf = default_utf8;
1521 vc->vc_utf_count = 0; 1523 vc->vc_utf_count = 0;
1522 1524
1523 vc->vc_disp_ctrl = 0; 1525 vc->vc_disp_ctrl = 0;