mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
tty: vt: use switch+case in the ESnonstd case
To be uniform in the 'c' handling, use switch-case (with ranges) even in the ESnonstd case in do_con_trol(). Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20240202065608.14019-20-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
798d8b1cfe
commit
3d5f5b9711
@ -2573,17 +2573,19 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, u8 c)
|
||||
handle_esc(tty, vc, c);
|
||||
return;
|
||||
case ESnonstd: /* ESC ] aka OSC */
|
||||
if (c=='P') { /* palette escape sequence */
|
||||
switch (c) {
|
||||
case 'P': /* palette escape sequence */
|
||||
vc_reset_params(vc);
|
||||
vc->vc_state = ESpalette;
|
||||
return;
|
||||
} else if (c=='R') { /* reset palette */
|
||||
case 'R': /* reset palette */
|
||||
reset_palette(vc);
|
||||
vc->vc_state = ESnormal;
|
||||
} else if (c>='0' && c<='9')
|
||||
break;
|
||||
case '0' ... '9':
|
||||
vc->vc_state = ESosc;
|
||||
else
|
||||
vc->vc_state = ESnormal;
|
||||
return;
|
||||
}
|
||||
vc->vc_state = ESnormal;
|
||||
return;
|
||||
case ESpalette: /* ESC ] P aka OSC P */
|
||||
if (isxdigit(c)) {
|
||||
|
Loading…
Reference in New Issue
Block a user