tty: vt: handle CSI+[ inside preexisting switch-case
In do_con_trol()'s ESsquare case, there is already a switch (c). It is preceded by an 'if (c == '[')'. Despite this 'if' handles a state transition and not a modifier, move it as one of the switch cases. This makes all the 'c' decision making more obvious there. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20240202065608.14019-18-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fd5b40251a
commit
bc9d077a8d
+3
-4
@@ -2603,11 +2603,10 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, u8 c)
|
||||
vc->vc_par[vc->vc_npar] = 0;
|
||||
vc->vc_npar = 0;
|
||||
vc->vc_state = ESgetpars;
|
||||
if (c == '[') { /* Function key */
|
||||
vc->vc_state=ESfunckey;
|
||||
return;
|
||||
}
|
||||
switch (c) {
|
||||
case '[': /* Function key */
|
||||
vc->vc_state = ESfunckey;
|
||||
return;
|
||||
case '?':
|
||||
vc->vc_priv = EPdec;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user