aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2009-11-13 15:14:11 -0500
committerH. Peter Anvin <hpa@zytor.com>2009-11-13 18:54:27 -0500
commitf6c06b6807ff9281295989ebad72523865325a4f (patch)
tree152182be618e67caa89f46ef05b14ad8c075540e /drivers/char/vt.c
parentd9b263528e01bfbaf716b51f38606b3dfe5ac1e9 (diff)
vc: Add support for hiding the cursor when creating VTs
Add support for setting a global default for whether or not a visible cursor should be enabled when creating VCs. The default will be to do so, unless overridden by the user at boot time or by a driver. Signed-off-by: Matthew Garrett <mjg@redhat.com> LKML-Reference: <1258143251-5818-1-git-send-email-mjg@redhat.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r--drivers/char/vt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 0c80c68cd047..1e3d728dbf7e 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -161,6 +161,8 @@ static void set_palette(struct vc_data *vc);
161static int printable; /* Is console ready for printing? */ 161static int printable; /* Is console ready for printing? */
162int default_utf8 = true; 162int default_utf8 = true;
163module_param(default_utf8, int, S_IRUGO | S_IWUSR); 163module_param(default_utf8, int, S_IRUGO | S_IWUSR);
164int global_cursor_default = -1;
165module_param(global_cursor_default, int, S_IRUGO | S_IWUSR);
164 166
165/* 167/*
166 * ignore_poke: don't unblank the screen when things are typed. This is 168 * ignore_poke: don't unblank the screen when things are typed. This is
@@ -775,6 +777,12 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
775 vc_cons[currcons].d = NULL; 777 vc_cons[currcons].d = NULL;
776 return -ENOMEM; 778 return -ENOMEM;
777 } 779 }
780
781 /* If no drivers have overridden us and the user didn't pass a
782 boot option, default to displaying the cursor */
783 if (global_cursor_default == -1)
784 global_cursor_default = 1;
785
778 vc_init(vc, vc->vc_rows, vc->vc_cols, 1); 786 vc_init(vc, vc->vc_rows, vc->vc_cols, 1);
779 vcs_make_sysfs(currcons); 787 vcs_make_sysfs(currcons);
780 atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, &param); 788 atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, &param);
@@ -1616,7 +1624,7 @@ static void reset_terminal(struct vc_data *vc, int do_clear)
1616 vc->vc_decscnm = 0; 1624 vc->vc_decscnm = 0;
1617 vc->vc_decom = 0; 1625 vc->vc_decom = 0;
1618 vc->vc_decawm = 1; 1626 vc->vc_decawm = 1;
1619 vc->vc_deccm = 1; 1627 vc->vc_deccm = global_cursor_default;
1620 vc->vc_decim = 0; 1628 vc->vc_decim = 0;
1621 1629
1622 set_kbd(vc, decarm); 1630 set_kbd(vc, decarm);
@@ -4078,6 +4086,7 @@ EXPORT_SYMBOL(fg_console);
4078EXPORT_SYMBOL(console_blank_hook); 4086EXPORT_SYMBOL(console_blank_hook);
4079EXPORT_SYMBOL(console_blanked); 4087EXPORT_SYMBOL(console_blanked);
4080EXPORT_SYMBOL(vc_cons); 4088EXPORT_SYMBOL(vc_cons);
4089EXPORT_SYMBOL(global_cursor_default);
4081#ifndef VT_SINGLE_DRIVER 4090#ifndef VT_SINGLE_DRIVER
4082EXPORT_SYMBOL(take_over_console); 4091EXPORT_SYMBOL(take_over_console);
4083EXPORT_SYMBOL(give_up_console); 4092EXPORT_SYMBOL(give_up_console);