Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70665
b: refs/heads/master
c: 2e8ecb9
h: refs/heads/master
i:
  70663: d92f23f
v: v3
  • Loading branch information
Bill Nottingham authored and Linus Torvalds committed Oct 17, 2007
1 parent 0452335 commit 747f9d4
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 430d275a399175c7c0673459738979287ec1fd22
refs/heads/master: 2e8ecb9db0bcc19e1cc8bb51e9252fe6a86a9863
17 changes: 17 additions & 0 deletions trunk/drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ config VT
If unsure, say Y, or else you won't be able to do much with your new
shiny Linux system :-)

config VT_UNICODE
bool "Virtual console is Unicode by default"
depends on VT
default n
---help---
If you say Y here, the virtual terminal will be in UTF-8 by default,
and the keyboard will run in unicode mode.

If you say N here, the virtual terminal will not be in UTF-8 by
default, and the keyboard will run in XLATE mode.

This can also be changed by passing 'default_utf8=<0|1>' on the
kernel command line.

Historically, the kernel has defaulted to non-UTF8 and XLATE mode.
If unsure, say N here.

config VT_CONSOLE
bool "Support for console on virtual terminal" if EMBEDDED
depends on VT
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,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);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/char/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ static void sysrq_handle_unraw(int key, struct tty_struct *tty)
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
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ static void blank_screen_t(unsigned long dummy);
static void set_palette(struct vc_data *vc);

static int printable; /* Is console ready for printing? */
static int default_utf8;
#ifdef CONFIG_VT_UNICODE
int default_utf8 = 1;
#else
int default_utf8;
#endif
module_param(default_utf8, int, S_IRUGO | S_IWUSR);

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/vt_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,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;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/vt_kern.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ extern int unbind_con_driver(const struct consw *csw, int first, int last,
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;
Expand Down

0 comments on commit 747f9d4

Please sign in to comment.