diff options
| author | Ingo Molnar <[email protected]> | 2016-07-27 12:35:35 +0200 | 
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2016-07-27 12:35:35 +0200 | 
| commit | df15929f8f5c69e987c31bf016eca4a38dba46f0 (patch) | |
| tree | cfb5fe5e8ebff4cabd70557a304f355546943cc9 /include/linux/console_struct.h | |
| parent | efaad554b4ffae1840a2759e09e21325ddbc8b05 (diff) | |
| parent | 37e13a1ebe32c4fbfbdb5413f42eb6e71d8b28a4 (diff) | |
Merge branch 'linus' into x86/microcode, to pick up merge window changes
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include/linux/console_struct.h')
| -rw-r--r-- | include/linux/console_struct.h | 38 | 
1 files changed, 36 insertions, 2 deletions
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index e329ee2667e1..6fd3c908a340 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -21,6 +21,38 @@ struct uni_pagedir;  #define NPAR 16 +/* + * Example: vc_data of a console that was scrolled 3 lines down. + * + *                              Console buffer + * vc_screenbuf ---------> +----------------------+-. + *                         | initializing W       |  \ + *                         | initializing X       |   | + *                         | initializing Y       |    > scroll-back area + *                         | initializing Z       |   | + *                         |                      |  / + * vc_visible_origin ---> ^+----------------------+-: + * (changes by scroll)    || Welcome to linux     |  \ + *                        ||                      |   | + *           vc_rows --->< | login: root          |   |  visible on console + *                        || password:            |    > (vc_screenbuf_size is + * vc_origin -----------> ||                      |   |   vc_size_row * vc_rows) + * (start when no scroll) || Last login: 12:28    |  / + *                        v+----------------------+-: + *                         | Have a lot of fun... |  \ + * vc_pos -----------------|--------v             |   > scroll-front area + *                         | ~ # cat_             |  / + * vc_scr_end -----------> +----------------------+-: + * (vc_origin +            |                      |  \ EMPTY, to be filled by + *  vc_screenbuf_size)     |                      |  / vc_video_erase_char + *                         +----------------------+-' + *                         <---- 2 * vc_cols -----> + *                         <---- vc_size_row -----> + * + * Note that every character in the console buffer is accompanied with an + * attribute in the buffer right after the character. This is not depicted + * in the figure. + */  struct vc_data {  	struct tty_port port;			/* Upper level data */ @@ -74,7 +106,6 @@ struct vc_data {  	unsigned int	vc_decawm	: 1;	/* Autowrap Mode */  	unsigned int	vc_deccm	: 1;	/* Cursor Visible */  	unsigned int	vc_decim	: 1;	/* Insert Mode */ -	unsigned int	vc_deccolm	: 1;	/* 80/132 Column Mode */  	/* attribute flags */  	unsigned int	vc_intensity	: 2;	/* 0=half-bright, 1=normal, 2=bold */  	unsigned int    vc_italic:1; @@ -136,6 +167,9 @@ extern void vc_SAK(struct work_struct *work);  #define CUR_DEFAULT CUR_UNDERLINE -#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) +static inline bool con_is_visible(const struct vc_data *vc) +{ +	return *vc->vc_display_fg == vc; +}  #endif /* _LINUX_CONSOLE_STRUCT_H */  |