Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vt_kern.h File Reference
#include <linux/vt.h>
#include <linux/kd.h>
#include <linux/tty.h>
#include <linux/mutex.h>
#include <linux/console_struct.h>
#include <linux/mm.h>
#include <linux/consolemap.h>
#include <linux/notifier.h>

Go to the source code of this file.

Data Structures

struct  vt_spawn_console
 
struct  vt_notifier_param
 

Macros

#define update_screen(x)   redraw_screen(x, 0)
 
#define switch_screen(x)   redraw_screen(x, 1)
 
#define vc_translate(vc, c)   (c)
 

Functions

void kd_mksound (unsigned int hz, unsigned int ticks)
 
int kbd_rate (struct kbd_repeat *rep)
 
int vc_allocate (unsigned int console)
 
int vc_cons_allocated (unsigned int console)
 
int vc_resize (struct vc_data *vc, unsigned int cols, unsigned int lines)
 
void vc_deallocate (unsigned int console)
 
void reset_palette (struct vc_data *vc)
 
void do_blank_screen (int entering_gfx)
 
void do_unblank_screen (int leaving_gfx)
 
void unblank_screen (void)
 
void poke_blanked_console (void)
 
int con_font_op (struct vc_data *vc, struct console_font_op *op)
 
int con_set_cmap (unsigned char __user *cmap)
 
int con_get_cmap (unsigned char __user *cmap)
 
void scrollback (struct vc_data *vc, int lines)
 
void scrollfront (struct vc_data *vc, int lines)
 
void update_region (struct vc_data *vc, unsigned long start, int count)
 
void redraw_screen (struct vc_data *vc, int is_switch)
 
int tioclinux (struct tty_struct *tty, unsigned long arg)
 
void vt_event_post (unsigned int event, unsigned int old, unsigned int new)
 
int vt_waitactive (int n)
 
void change_console (struct vc_data *new_vc)
 
void reset_vc (struct vc_data *vc)
 
int unbind_con_driver (const struct consw *csw, int first, int last, int deflt)
 
int vty_init (const struct file_operations *console_fops)
 
int vt_move_to_console (unsigned int vt, int alloc)
 
int register_vt_notifier (struct notifier_block *nb)
 
int unregister_vt_notifier (struct notifier_block *nb)
 
void hide_boot_cursor (bool hide)
 
int vt_do_diacrit (unsigned int cmd, void __user *up, int eperm)
 
int vt_do_kdskbmode (int console, unsigned int arg)
 
int vt_do_kdskbmeta (int console, unsigned int arg)
 
int vt_do_kbkeycode_ioctl (int cmd, struct kbkeycode __user *user_kbkc, int perm)
 
int vt_do_kdsk_ioctl (int cmd, struct kbentry __user *user_kbe, int perm, int console)
 
int vt_do_kdgkb_ioctl (int cmd, struct kbsentry __user *user_kdgkb, int perm)
 
int vt_do_kdskled (int console, int cmd, unsigned long arg, int perm)
 
int vt_do_kdgkbmode (int console)
 
int vt_do_kdgkbmeta (int console)
 
void vt_reset_unicode (int console)
 
int vt_get_shift_state (void)
 
void vt_reset_keyboard (int console)
 
int vt_get_leds (int console, int flag)
 
int vt_get_kbd_mode_bit (int console, int bit)
 
void vt_set_kbd_mode_bit (int console, int bit)
 
void vt_clr_kbd_mode_bit (int console, int bit)
 
void vt_set_led_state (int console, int leds)
 
void vt_kbd_con_start (int console)
 
void vt_kbd_con_stop (int console)
 

Variables

int fg_console
 
int last_console
 
int want_console
 
char vt_dont_switch
 
int default_utf8
 
int global_cursor_default
 
struct vt_spawn_console vt_spawn_con
 

Macro Definition Documentation

#define switch_screen (   x)    redraw_screen(x, 1)

Definition at line 53 of file vt_kern.h.

#define update_screen (   x)    redraw_screen(x, 0)

Definition at line 52 of file vt_kern.h.

#define vc_translate (   vc,
  c 
)    (c)

Definition at line 125 of file vt_kern.h.

Function Documentation

void change_console ( struct vc_data new_vc)

Definition at line 1332 of file vt_ioctl.c.

int con_font_op ( struct vc_data vc,
struct console_font_op op 
)

Definition at line 4116 of file vt.c.

int con_get_cmap ( unsigned char __user cmap)

Definition at line 3909 of file vt.c.

int con_set_cmap ( unsigned char __user cmap)

Definition at line 3880 of file vt.c.

void do_blank_screen ( int  entering_gfx)

Definition at line 3704 of file vt.c.

void do_unblank_screen ( int  leaving_gfx)

Definition at line 3765 of file vt.c.

void hide_boot_cursor ( bool  hide)
int kbd_rate ( struct kbd_repeat rep)

Definition at line 295 of file keyboard.c.

void kd_mksound ( unsigned int  hz,
unsigned int  ticks 
)

Definition at line 259 of file keyboard.c.

void poke_blanked_console ( void  )

Definition at line 3835 of file vt.c.

void redraw_screen ( struct vc_data vc,
int  is_switch 
)

Definition at line 652 of file vt.c.

int register_vt_notifier ( struct notifier_block nb)

Definition at line 247 of file vt.c.

void reset_palette ( struct vc_data vc)

Definition at line 3928 of file vt.c.

void reset_vc ( struct vc_data vc)

Definition at line 1020 of file vt_ioctl.c.

void scrollback ( struct vc_data vc,
int  lines 
)

Definition at line 1083 of file vt.c.

void scrollfront ( struct vc_data vc,
int  lines 
)

Definition at line 1090 of file vt.c.

int tioclinux ( struct tty_struct tty,
unsigned long  arg 
)

Definition at line 2552 of file vt.c.

int unbind_con_driver ( const struct consw csw,
int  first,
int  last,
int  deflt 
)
void unblank_screen ( void  )

Definition at line 3815 of file vt.c.

int unregister_vt_notifier ( struct notifier_block nb)

Definition at line 253 of file vt.c.

void update_region ( struct vc_data vc,
unsigned long  start,
int  count 
)

Definition at line 390 of file vt.c.

int vc_allocate ( unsigned int  console)

Definition at line 751 of file vt.c.

int vc_cons_allocated ( unsigned int  console)

Definition at line 719 of file vt.c.

void vc_deallocate ( unsigned int  console)

Definition at line 988 of file vt.c.

int vc_resize ( struct vc_data vc,
unsigned int  cols,
unsigned int  rows 
)

vc_resize - resize a VT : virtual console : columns : rows

Resize a virtual console as seen from the console end of things. We use the common vc_do_resize methods to update the structures. The caller must hold the console sem to protect console internals and vc->port.tty

Definition at line 960 of file vt.c.

void vt_clr_kbd_mode_bit ( int  console,
int  bit 
)

vt_clr_kbd_mode_bit - read keyboard status bits : console to read from : mode bit to read

Report back a vt mode bit. We do this without locking so the caller must be sure that there are no synchronization needs

Definition at line 2189 of file keyboard.c.

int vt_do_diacrit ( unsigned int  cmd,
void __user up,
int  perm 
)

vt_do_diacrit - diacritical table updates : ioctl request : pointer to user data for ioctl : permissions check computed by caller

Update the diacritical tables atomically and safely. Lock them against simultaneous keypresses

Definition at line 1553 of file keyboard.c.

int vt_do_kbkeycode_ioctl ( int  cmd,
struct kbkeycode __user user_kbkc,
int  perm 
)

Definition at line 1773 of file keyboard.c.

int vt_do_kdgkb_ioctl ( int  cmd,
struct kbsentry __user user_kdgkb,
int  perm 
)

Definition at line 1906 of file keyboard.c.

int vt_do_kdgkbmeta ( int  console)

vt_do_kdgkbmeta - report meta status : console to report

Report the meta flag status of this console

Definition at line 2084 of file keyboard.c.

int vt_do_kdgkbmode ( int  console)

Definition at line 2060 of file keyboard.c.

int vt_do_kdsk_ioctl ( int  cmd,
struct kbentry __user user_kbe,
int  perm,
int  console 
)

Definition at line 1800 of file keyboard.c.

int vt_do_kdskbmeta ( int  console,
unsigned int  arg 
)

vt_do_kdskbmeta - set keyboard meta state : the console to use

  • : the requested meta state

Update the keyboard meta bits while holding the correct locks. Return 0 for success or an error code.

Definition at line 1752 of file keyboard.c.

int vt_do_kdskbmode ( int  console,
unsigned int  arg 
)

vt_do_kdskbmode - set keyboard mode ioctl : the console to use

  • : the requested mode

Update the keyboard mode bits while holding the correct locks. Return 0 for success or an error code.

Definition at line 1712 of file keyboard.c.

int vt_do_kdskled ( int  console,
int  cmd,
unsigned long  arg,
int  perm 
)

Definition at line 2018 of file keyboard.c.

void vt_event_post ( unsigned int  event,
unsigned int  old,
unsigned int  new 
)

vt_event_post : the event that occurred : old console : new console

Post an VT event to interested VT handlers

Definition at line 86 of file vt_ioctl.c.

int vt_get_kbd_mode_bit ( int  console,
int  bit 
)

vt_get_kbd_mode_bit - read keyboard status bits : console to read from : mode bit to read

Report back a vt mode bit. We do this without locking so the caller must be sure that there are no synchronization needs

Definition at line 2155 of file keyboard.c.

int vt_get_leds ( int  console,
int  flag 
)

vt_get_leds - helper for braille console : console to read : flag we want to check

Check the status of a keyboard led flag and report it back

Definition at line 1051 of file keyboard.c.

int vt_get_shift_state ( void  )

vt_get_shiftstate - shift bit state

Report the shift bits from the keyboard state. We have to export this to support some oddities in the vt layer.

Definition at line 2112 of file keyboard.c.

void vt_kbd_con_start ( int  console)

vt_kbd_con_start - Keyboard side of console start : console

Handle console start. This is a wrapper for the VT layer so that we can keep kbd knowledge internal

FIXME: We eventually need to hold the kbd lock here to protect the LED updating. We can't do it yet because fn_hold calls stop_tty and start_tty under the kbd_event_lock, while normal tty paths don't hold the lock. We probably need to split out an LED lock but not during an -rc release!

Definition at line 1092 of file keyboard.c.

void vt_kbd_con_stop ( int  console)

vt_kbd_con_stop - Keyboard side of console stop : console

Handle console stop. This is a wrapper for the VT layer so that we can keep kbd knowledge internal

Definition at line 1109 of file keyboard.c.

int vt_move_to_console ( unsigned int  vt,
int  alloc 
)

Definition at line 1403 of file vt_ioctl.c.

void vt_reset_keyboard ( int  console)

vt_reset_keyboard - reset keyboard state : console to reset

Reset the keyboard bits for a console as part of a general console reset event

Definition at line 2125 of file keyboard.c.

void vt_reset_unicode ( int  console)

vt_reset_unicode - reset the unicode status : console being reset

Restore the unicode console state to its default

Definition at line 2097 of file keyboard.c.

void vt_set_kbd_mode_bit ( int  console,
int  bit 
)

vt_set_kbd_mode_bit - read keyboard status bits : console to read from : mode bit to read

Set a vt mode bit. We do this without locking so the caller must be sure that there are no synchronization needs

Definition at line 2170 of file keyboard.c.

void vt_set_led_state ( int  console,
int  leds 
)

vt_set_led_state - set LED state of a console : console to set : LED bits

Set the LEDs on a console. This is a wrapper for the VT layer so that we can keep kbd knowledge internal

Definition at line 1073 of file keyboard.c.

int vt_waitactive ( int  n)

vt_waitactive - active console wait : event code
: new console

Helper for event waits. Used to implement the legacy event waiting ioctls in terms of events

Definition at line 193 of file vt_ioctl.c.

int vty_init ( const struct file_operations console_fops)

Definition at line 2945 of file vt.c.

Variable Documentation

int default_utf8

Definition at line 160 of file vt.c.

int fg_console

Definition at line 190 of file vt.c.

int global_cursor_default

Definition at line 162 of file vt.c.

int last_console

Definition at line 191 of file vt.c.

char vt_dont_switch

Definition at line 38 of file vt_ioctl.c.

struct vt_spawn_console vt_spawn_con

Definition at line 97 of file keyboard.c.

int want_console

Definition at line 192 of file vt.c.