drivers/tty/vt/vt_ioctl.c: repair insane ?: expression

Cc: Arthur Taylor <art@ified.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Andrew Morton 2011-04-07 16:13:01 -07:00 committed by Greg Kroah-Hartman
parent 60680f97d7
commit 6da9e95f73
1 changed files with 17 additions and 5 deletions

View File

@ -698,11 +698,23 @@ int vt_ioctl(struct tty_struct *tty,
break; break;
case KDGKBMODE: case KDGKBMODE:
uival = ((kbd->kbdmode == VC_RAW) ? K_RAW : switch (kbd->kbdmode) {
(kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW : case VC_RAW:
(kbd->kbdmode == VC_UNICODE) ? K_UNICODE : uival = K_RAW;
(kbd->kbdmode == VC_OFF) ? K_OFF : break;
K_XLATE); case VC_MEDIUMRAW:
uival = K_MEDIUMRAW;
break;
case VC_UNICODE:
uival = K_UNICODE;
break;
case VC_OFF:
uival = K_OFF;
break;
default:
uival = K_XLATE;
break;
}
goto setint; goto setint;
/* this could be folded into KDSKBMODE, but for compatibility /* this could be folded into KDSKBMODE, but for compatibility