Commit 5445447b authored by Martin Hostettler's avatar Martin Hostettler Committed by Greg Kroah-Hartman
Browse files

vt: Implement parsing for >, =, < private sequences.



Private sequences can start with '>', '=' and (in theory) '<'.
Implement correct parsing for these. The newly parsable sequences are
cleanly ignored as it is customary with terminal emulators.

This allows the vt to ignore various sequences used by more capable
terminal implementations such as "Secondary Device Attributes",
"Tertiary Device Attributes" and various advanced configuration commands
that don't have dedicated terminfo entries.

Signed-off-by: default avatarMartin Hostettler <textshell@uchuujin.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ff5c5a1
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -2236,9 +2236,21 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
			vc->vc_state=ESfunckey;
			return;
		}
		vc->vc_priv = (c == '?') ? EPdec : EPecma;
		if (vc->vc_priv != EPecma)
		switch (c) {
		case '?':
			vc->vc_priv = EPdec;
			return;
		case '>':
			vc->vc_priv = EPgt;
			return;
		case '=':
			vc->vc_priv = EPeq;
			return;
		case '<':
			vc->vc_priv = EPlt;
			return;
		}
		vc->vc_priv = EPecma;
		/* fall through */
	case ESgetpars:
		if (c == ';' && vc->vc_npar < NPAR - 1) {
@@ -2252,9 +2264,11 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
		vc->vc_state = ESnormal;
		switch(c) {
		case 'h':
			if (vc->vc_priv <= EPdec)
				set_mode(vc, 1);
			return;
		case 'l':
			if (vc->vc_priv <= EPdec)
				set_mode(vc, 0);
			return;
		case 'c':