diff options
Diffstat (limited to 'drivers/tty/vt/vt_ioctl.c')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index 937d1721998..5e096f43bce 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/char/vt_ioctl.c | ||
3 | * | ||
4 | * Copyright (C) 1992 obz under the linux copyright | 2 | * Copyright (C) 1992 obz under the linux copyright |
5 | * | 3 | * |
6 | * Dynamic diacritical handling - aeb@cwi.nl - Dec 1993 | 4 | * Dynamic diacritical handling - aeb@cwi.nl - Dec 1993 |
@@ -698,10 +696,23 @@ int vt_ioctl(struct tty_struct *tty, | |||
698 | break; | 696 | break; |
699 | 697 | ||
700 | case KDGKBMODE: | 698 | case KDGKBMODE: |
701 | uival = ((kbd->kbdmode == VC_RAW) ? K_RAW : | 699 | switch (kbd->kbdmode) { |
702 | (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW : | 700 | case VC_RAW: |
703 | (kbd->kbdmode == VC_UNICODE) ? K_UNICODE : | 701 | uival = K_RAW; |
704 | K_XLATE); | 702 | break; |
703 | case VC_MEDIUMRAW: | ||
704 | uival = K_MEDIUMRAW; | ||
705 | break; | ||
706 | case VC_UNICODE: | ||
707 | uival = K_UNICODE; | ||
708 | break; | ||
709 | case VC_OFF: | ||
710 | uival = K_OFF; | ||
711 | break; | ||
712 | default: | ||
713 | uival = K_XLATE; | ||
714 | break; | ||
715 | } | ||
705 | goto setint; | 716 | goto setint; |
706 | 717 | ||
707 | /* this could be folded into KDSKBMODE, but for compatibility | 718 | /* this could be folded into KDSKBMODE, but for compatibility |
@@ -1499,7 +1510,6 @@ long vt_compat_ioctl(struct tty_struct *tty, | |||
1499 | { | 1510 | { |
1500 | struct vc_data *vc = tty->driver_data; | 1511 | struct vc_data *vc = tty->driver_data; |
1501 | struct console_font_op op; /* used in multiple places here */ | 1512 | struct console_font_op op; /* used in multiple places here */ |
1502 | struct kbd_struct *kbd; | ||
1503 | unsigned int console; | 1513 | unsigned int console; |
1504 | void __user *up = (void __user *)arg; | 1514 | void __user *up = (void __user *)arg; |
1505 | int perm; | 1515 | int perm; |
@@ -1522,7 +1532,6 @@ long vt_compat_ioctl(struct tty_struct *tty, | |||
1522 | if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG)) | 1532 | if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG)) |
1523 | perm = 1; | 1533 | perm = 1; |
1524 | 1534 | ||
1525 | kbd = kbd_table + console; | ||
1526 | switch (cmd) { | 1535 | switch (cmd) { |
1527 | /* | 1536 | /* |
1528 | * these need special handlers for incompatible data structures | 1537 | * these need special handlers for incompatible data structures |