Re: [PATCH] make unicode default

2007-10-01 Thread Jan Engelhardt
On Oct 1 2007 14:39, Bill Nottingham wrote:
>Jan Engelhardt ([EMAIL PROTECTED]) 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] make unicode default

2007-10-01 Thread Bill Nottingham
Jan Engelhardt ([EMAIL PROTECTED]) 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] make unicode default

2007-09-29 Thread Antonino A. Daplas
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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] make unicode default

2007-09-29 Thread Jan Engelhardt

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 <[EMAIL PROTECTED]>

---
 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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/