diff options
Diffstat (limited to 'drivers/tty/vt/vt.c')
-rw-r--r-- | drivers/tty/vt/vt.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index b7bde54db138..3ad0b61e35b4 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
@@ -1592,7 +1592,7 @@ static void restore_cur(struct vc_data *vc) | |||
1592 | 1592 | ||
1593 | enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey, | 1593 | enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey, |
1594 | EShash, ESsetG0, ESsetG1, ESpercent, ESignore, ESnonstd, | 1594 | EShash, ESsetG0, ESsetG1, ESpercent, ESignore, ESnonstd, |
1595 | ESpalette }; | 1595 | ESpalette, ESosc }; |
1596 | 1596 | ||
1597 | /* console_lock is held (except via vc_init()) */ | 1597 | /* console_lock is held (except via vc_init()) */ |
1598 | static void reset_terminal(struct vc_data *vc, int do_clear) | 1598 | static void reset_terminal(struct vc_data *vc, int do_clear) |
@@ -1652,11 +1652,15 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) | |||
1652 | * Control characters can be used in the _middle_ | 1652 | * Control characters can be used in the _middle_ |
1653 | * of an escape sequence. | 1653 | * of an escape sequence. |
1654 | */ | 1654 | */ |
1655 | if (vc->vc_state == ESosc && c>=8 && c<=13) /* ... except for OSC */ | ||
1656 | return; | ||
1655 | switch (c) { | 1657 | switch (c) { |
1656 | case 0: | 1658 | case 0: |
1657 | return; | 1659 | return; |
1658 | case 7: | 1660 | case 7: |
1659 | if (vc->vc_bell_duration) | 1661 | if (vc->vc_state == ESosc) |
1662 | vc->vc_state = ESnormal; | ||
1663 | else if (vc->vc_bell_duration) | ||
1660 | kd_mksound(vc->vc_bell_pitch, vc->vc_bell_duration); | 1664 | kd_mksound(vc->vc_bell_pitch, vc->vc_bell_duration); |
1661 | return; | 1665 | return; |
1662 | case 8: | 1666 | case 8: |
@@ -1767,7 +1771,9 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) | |||
1767 | } else if (c=='R') { /* reset palette */ | 1771 | } else if (c=='R') { /* reset palette */ |
1768 | reset_palette(vc); | 1772 | reset_palette(vc); |
1769 | vc->vc_state = ESnormal; | 1773 | vc->vc_state = ESnormal; |
1770 | } else | 1774 | } else if (c>='0' && c<='9') |
1775 | vc->vc_state = ESosc; | ||
1776 | else | ||
1771 | vc->vc_state = ESnormal; | 1777 | vc->vc_state = ESnormal; |
1772 | return; | 1778 | return; |
1773 | case ESpalette: | 1779 | case ESpalette: |
@@ -2021,6 +2027,8 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) | |||
2021 | vc->vc_translate = set_translate(vc->vc_G1_charset, vc); | 2027 | vc->vc_translate = set_translate(vc->vc_G1_charset, vc); |
2022 | vc->vc_state = ESnormal; | 2028 | vc->vc_state = ESnormal; |
2023 | return; | 2029 | return; |
2030 | case ESosc: | ||
2031 | return; | ||
2024 | default: | 2032 | default: |
2025 | vc->vc_state = ESnormal; | 2033 | vc->vc_state = ESnormal; |
2026 | } | 2034 | } |