public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make unicode default
@ 2007-09-29  8:36 Jan Engelhardt
  2007-09-30  1:17 ` Antonino A. Daplas
  2007-10-01 18:39 ` Bill Nottingham
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Engelhardt @ 2007-09-29  8:36 UTC (permalink / raw)
  To: H. Peter Anvin, Antonino Daplas
  Cc: Bill Nottingham, Linux Kernel Mailing List


Make the vt return to the system default when it is reset.
Also make UTF-8 the system default.
Derived from http://lkml.org/lkml/2007/8/31/246

Tested and works as expected.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>

---
 drivers/char/keyboard.c |    2 +-
 drivers/char/sysrq.c    |    4 ++--
 drivers/char/vt.c       |    2 +-
 drivers/char/vt_ioctl.c |    2 +-
 include/linux/vt_kern.h |    1 +
 5 files changed, 6 insertions(+), 5 deletions(-)

Index: linux-2.6.23/drivers/char/keyboard.c
===================================================================
--- linux-2.6.23.orig/drivers/char/keyboard.c
+++ linux-2.6.23/drivers/char/keyboard.c
@@ -1366,7 +1366,7 @@ int __init kbd_init(void)
 		kbd_table[i].lockstate = KBD_DEFLOCK;
 		kbd_table[i].slockstate = 0;
 		kbd_table[i].modeflags = KBD_DEFMODE;
-		kbd_table[i].kbdmode = VC_XLATE;
+		kbd_table[i].kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
 	}
 
 	error = input_register_handler(&kbd_handler);
Index: linux-2.6.23/drivers/char/sysrq.c
===================================================================
--- linux-2.6.23.orig/drivers/char/sysrq.c
+++ linux-2.6.23/drivers/char/sysrq.c
@@ -107,12 +107,12 @@ static void sysrq_handle_unraw(int key, 
 	struct kbd_struct *kbd = &kbd_table[fg_console];
 
 	if (kbd)
-		kbd->kbdmode = VC_XLATE;
+		kbd->kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
 }
 static struct sysrq_key_op sysrq_unraw_op = {
 	.handler	= sysrq_handle_unraw,
 	.help_msg	= "unRaw",
-	.action_msg	= "Keyboard mode set to XLATE",
+	.action_msg	= "Keyboard mode set to system default",
 	.enable_mask	= SYSRQ_ENABLE_KEYBOARD,
 };
 #else
Index: linux-2.6.23/drivers/char/vt.c
===================================================================
--- linux-2.6.23.orig/drivers/char/vt.c
+++ linux-2.6.23/drivers/char/vt.c
@@ -158,7 +158,7 @@ static void blank_screen_t(unsigned long
 static void set_palette(struct vc_data *vc);
 
 static int printable;		/* Is console ready for printing? */
-static int default_utf8;
+int default_utf8 = true;
 module_param(default_utf8, int, S_IRUGO | S_IWUSR);
 
 /*
Index: linux-2.6.23/drivers/char/vt_ioctl.c
===================================================================
--- linux-2.6.23.orig/drivers/char/vt_ioctl.c
+++ linux-2.6.23/drivers/char/vt_ioctl.c
@@ -1070,7 +1070,7 @@ int vt_waitactive(int vt)
 void reset_vc(struct vc_data *vc)
 {
 	vc->vc_mode = KD_TEXT;
-	kbd_table[vc->vc_num].kbdmode = VC_XLATE;
+	kbd_table[vc->vc_num].kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
 	vc->vt_mode.mode = VT_AUTO;
 	vc->vt_mode.waitv = 0;
 	vc->vt_mode.relsig = 0;
Index: linux-2.6.23/include/linux/vt_kern.h
===================================================================
--- linux-2.6.23.orig/include/linux/vt_kern.h
+++ linux-2.6.23/include/linux/vt_kern.h
@@ -87,6 +87,7 @@ extern int unbind_con_driver(const struc
 extern char con_buf[CON_BUF_SIZE];
 extern struct mutex con_buf_mtx;
 extern char vt_dont_switch;
+extern int default_utf8;
 
 struct vt_spawn_console {
 	spinlock_t lock;


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

* Re: [PATCH] make unicode default
  2007-09-29  8:36 [PATCH] make unicode default Jan Engelhardt
@ 2007-09-30  1:17 ` Antonino A. Daplas
  2007-10-01 18:39 ` Bill Nottingham
  1 sibling, 0 replies; 4+ messages in thread
From: Antonino A. Daplas @ 2007-09-30  1:17 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: H. Peter Anvin, Bill Nottingham, Linux Kernel Mailing List

On Sat, 2007-09-29 at 10:36 +0200, Jan Engelhardt wrote:
> Make the vt return to the system default when it is reset.
> Also make UTF-8 the system default.

It's about time we do, so this is fine with me.

Tony



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

* Re: [PATCH] make unicode default
  2007-09-29  8:36 [PATCH] make unicode default Jan Engelhardt
  2007-09-30  1:17 ` Antonino A. Daplas
@ 2007-10-01 18:39 ` Bill Nottingham
  2007-10-01 19:29   ` Jan Engelhardt
  1 sibling, 1 reply; 4+ messages in thread
From: Bill Nottingham @ 2007-10-01 18:39 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: H. Peter Anvin, Antonino Daplas, Linux Kernel Mailing List

Jan Engelhardt (jengelh@computergmbh.de) said: 
> 
> Make the vt return to the system default when it is reset.
> Also make UTF-8 the system default.
> Derived from http://lkml.org/lkml/2007/8/31/246
> 
> Tested and works as expected.

Fine with me. I believe the original patch I sent went to -mm, so you 
may need rediffing/changing to go with that.

Bill

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

* Re: [PATCH] make unicode default
  2007-10-01 18:39 ` Bill Nottingham
@ 2007-10-01 19:29   ` Jan Engelhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2007-10-01 19:29 UTC (permalink / raw)
  To: Bill Nottingham
  Cc: H. Peter Anvin, Antonino Daplas, Andrew Morton,
	Linux Kernel Mailing List

On Oct 1 2007 14:39, Bill Nottingham wrote:
>Jan Engelhardt (jengelh@computergmbh.de) said: 
>> 
>> Make the vt return to the system default when it is reset.
>> Also make UTF-8 the system default.
>> Derived from http://lkml.org/lkml/2007/8/31/246
>> 
>> Tested and works as expected.
>
>Fine with me. I believe the original patch I sent went to -mm, so you 
>may need rediffing/changing to go with that.

My patch is based on a pure 2.6.23; i.e. it is assumed that your 
original patch is dropped / not-applied before patching this one (my 
variant) in.

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

end of thread, other threads:[~2007-10-01 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-29  8:36 [PATCH] make unicode default Jan Engelhardt
2007-09-30  1:17 ` Antonino A. Daplas
2007-10-01 18:39 ` Bill Nottingham
2007-10-01 19:29   ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox