Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218490
b: refs/heads/master
c: 1e0ad28
h: refs/heads/master
v: v3
  • Loading branch information
Graham Gower authored and Linus Torvalds committed Oct 28, 2010
1 parent 3f7199a commit 386d33a
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 8881cdceb25b4fcebfb17a9548ed80c22cf8b066
refs/heads/master: 1e0ad2881d50becaeea70ec696a80afeadf944d2
11 changes: 6 additions & 5 deletions trunk/drivers/char/vt_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
struct kbd_struct * kbd;
unsigned int console;
unsigned char ucval;
unsigned int uival;
void __user *up = (void __user *)arg;
int i, perm;
int ret = 0;
Expand Down Expand Up @@ -657,7 +658,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
break;

case KDGETMODE:
ucval = vc->vc_mode;
uival = vc->vc_mode;
goto setint;

case KDMAPDISP:
Expand Down Expand Up @@ -695,7 +696,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
break;

case KDGKBMODE:
ucval = ((kbd->kbdmode == VC_RAW) ? K_RAW :
uival = ((kbd->kbdmode == VC_RAW) ? K_RAW :
(kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW :
(kbd->kbdmode == VC_UNICODE) ? K_UNICODE :
K_XLATE);
Expand All @@ -717,9 +718,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
break;

case KDGKBMETA:
ucval = (vc_kbd_mode(kbd, VC_META) ? K_ESCPREFIX : K_METABIT);
uival = (vc_kbd_mode(kbd, VC_META) ? K_ESCPREFIX : K_METABIT);
setint:
ret = put_user(ucval, (int __user *)arg);
ret = put_user(uival, (int __user *)arg);
break;

case KDGETKEYCODE:
Expand Down Expand Up @@ -949,7 +950,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
for (i = 0; i < MAX_NR_CONSOLES; ++i)
if (! VT_IS_IN_USE(i))
break;
ucval = i < MAX_NR_CONSOLES ? (i+1) : -1;
uival = i < MAX_NR_CONSOLES ? (i+1) : -1;
goto setint;

/*
Expand Down

0 comments on commit 386d33a

Please sign in to comment.