mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 06:39:05 +00:00
vt: ignore csi sequences with intermediate characters.
Various csi sequences contain intermediate characters between the parameters and the final character. Introduce a additional state that cleanly ignores these sequences. This allows the vt to ignore these sequences used by more capable terminal implementations such as "request mode", etc. Signed-off-by: Martin Hostettler <textshell@uchuujin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5445447b62
commit
7a99565f87
@ -2023,7 +2023,7 @@ static void restore_cur(struct vc_data *vc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey,
|
enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey,
|
||||||
EShash, ESsetG0, ESsetG1, ESpercent, ESignore, ESnonstd,
|
EShash, ESsetG0, ESsetG1, ESpercent, EScsiignore, ESnonstd,
|
||||||
ESpalette, ESosc };
|
ESpalette, ESosc };
|
||||||
|
|
||||||
/* console_lock is held (except via vc_init()) */
|
/* console_lock is held (except via vc_init()) */
|
||||||
@ -2261,6 +2261,10 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
|
|||||||
vc->vc_par[vc->vc_npar] += c - '0';
|
vc->vc_par[vc->vc_npar] += c - '0';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (c >= 0x20 && c <= 0x2f) {
|
||||||
|
vc->vc_state = EScsiignore;
|
||||||
|
return;
|
||||||
|
}
|
||||||
vc->vc_state = ESnormal;
|
vc->vc_state = ESnormal;
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'h':
|
case 'h':
|
||||||
@ -2423,6 +2427,11 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
case EScsiignore:
|
||||||
|
if (c >= 20 && c <= 0x3f)
|
||||||
|
return;
|
||||||
|
vc->vc_state = ESnormal;
|
||||||
|
return;
|
||||||
case ESpercent:
|
case ESpercent:
|
||||||
vc->vc_state = ESnormal;
|
vc->vc_state = ESnormal;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user