Commit 9ea9a886b0e8630e12cff515955e7f0f5be32cb1
Committed by
Linus Torvalds
1 parent
135d5655dc
Exists in
master
and in
4 other branches
vt: make the default cursor shape configurable
For embedded systems, the blinking cursor at startup time can be annoying and unintended. Add a new kernel parameter to change the default cursor shape. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: David Newall <davidn@davidnewall.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 10 additions and 2 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
... | ... | @@ -2729,6 +2729,11 @@ |
2729 | 2729 | vmpoff= [KNL,S390] Perform z/VM CP command after power off. |
2730 | 2730 | Format: <command> |
2731 | 2731 | |
2732 | + vt.cur_default= [VT] Default cursor shape. | |
2733 | + Format: 0xCCBBAA, where AA, BB, and CC are the same as | |
2734 | + the parameters of the <Esc>[?A;B;Cc escape sequence; | |
2735 | + see VGA-softcursor.txt. Default: 2 = underline. | |
2736 | + | |
2732 | 2737 | vt.default_blu= [VT] |
2733 | 2738 | Format: <blue0>,<blue1>,<blue2>,...,<blue15> |
2734 | 2739 | Change the default blue palette of the console. |
drivers/char/vt.c
... | ... | @@ -164,6 +164,9 @@ |
164 | 164 | int global_cursor_default = -1; |
165 | 165 | module_param(global_cursor_default, int, S_IRUGO | S_IWUSR); |
166 | 166 | |
167 | +static int cur_default = CUR_DEFAULT; | |
168 | +module_param(cur_default, int, S_IRUGO | S_IWUSR); | |
169 | + | |
167 | 170 | /* |
168 | 171 | * ignore_poke: don't unblank the screen when things are typed. This is |
169 | 172 | * mainly for the privacy of braille terminal users. |
... | ... | @@ -1636,7 +1639,7 @@ |
1636 | 1639 | /* do not do set_leds here because this causes an endless tasklet loop |
1637 | 1640 | when the keyboard hasn't been initialized yet */ |
1638 | 1641 | |
1639 | - vc->vc_cursor_type = CUR_DEFAULT; | |
1642 | + vc->vc_cursor_type = cur_default; | |
1640 | 1643 | vc->vc_complement_mask = vc->vc_s_complement_mask; |
1641 | 1644 | |
1642 | 1645 | default_attr(vc); |
... | ... | @@ -1838,7 +1841,7 @@ |
1838 | 1841 | if (vc->vc_par[0]) |
1839 | 1842 | vc->vc_cursor_type = vc->vc_par[0] | (vc->vc_par[1] << 8) | (vc->vc_par[2] << 16); |
1840 | 1843 | else |
1841 | - vc->vc_cursor_type = CUR_DEFAULT; | |
1844 | + vc->vc_cursor_type = cur_default; | |
1842 | 1845 | return; |
1843 | 1846 | } |
1844 | 1847 | break; |