aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-09-19 16:13:24 -0400
committerLive-CD User <linux@linux.site>2009-09-19 16:13:24 -0400
commit8b92e87d39bfd046e7581e1fe0f40eac40f88608 (patch)
treeb558f69f2a9875ea6029546f9f70d268fd3ebaf6 /drivers/char/vt.c
parent4455e344959a217ffc28de2ab1af87541322b343 (diff)
vt: add an event interface
This is needed and requested in various forms for ConsoleKit, screenblank handling and the like so do the job with a single interface. Also build the interface so that unlike VT_WAITACTIVE and friends it won't miss events. FIXME: Should this be a waitactive ioctl or a new device file you can poll and read events from. We need the code anyway to fix up the existing broken wait for console switch logic but the ConsoleKit people would prefer the new device to the ioctl we have here Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r--drivers/char/vt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index e47a4c88976b..33214d92ca4c 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -252,7 +252,6 @@ static void notify_update(struct vc_data *vc)
252 struct vt_notifier_param param = { .vc = vc }; 252 struct vt_notifier_param param = { .vc = vc };
253 atomic_notifier_call_chain(&vt_notifier_list, VT_UPDATE, &param); 253 atomic_notifier_call_chain(&vt_notifier_list, VT_UPDATE, &param);
254} 254}
255
256/* 255/*
257 * Low-Level Functions 256 * Low-Level Functions
258 */ 257 */
@@ -935,6 +934,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
935 934
936 if (CON_IS_VISIBLE(vc)) 935 if (CON_IS_VISIBLE(vc))
937 update_screen(vc); 936 update_screen(vc);
937 vt_event_post(VT_EVENT_RESIZE, vc->vc_num, vc->vc_num);
938 return err; 938 return err;
939} 939}
940 940
@@ -3637,6 +3637,7 @@ void do_blank_screen(int entering_gfx)
3637 blank_state = blank_vesa_wait; 3637 blank_state = blank_vesa_wait;
3638 mod_timer(&console_timer, jiffies + vesa_off_interval); 3638 mod_timer(&console_timer, jiffies + vesa_off_interval);
3639 } 3639 }
3640 vt_event_post(VT_EVENT_BLANK, vc->vc_num, vc->vc_num);
3640} 3641}
3641EXPORT_SYMBOL(do_blank_screen); 3642EXPORT_SYMBOL(do_blank_screen);
3642 3643
@@ -3681,6 +3682,7 @@ void do_unblank_screen(int leaving_gfx)
3681 console_blank_hook(0); 3682 console_blank_hook(0);
3682 set_palette(vc); 3683 set_palette(vc);
3683 set_cursor(vc); 3684 set_cursor(vc);
3685 vt_event_post(VT_EVENT_UNBLANK, vc->vc_num, vc->vc_num);
3684} 3686}
3685EXPORT_SYMBOL(do_unblank_screen); 3687EXPORT_SYMBOL(do_unblank_screen);
3686 3688