vt: document vc_data by example
All those members of vc_data are each explained in short. But it needs an example for one to understand the whole picture. So add an ascii art depicting the most important vc_data members. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1b0ec88ac1
commit
a4bedd019e
1 changed files with 32 additions and 0 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue