vt: introduce enum vc_intensity for intensity
Introduce names (en enum) for 0, 1, and 2 constants. We now have VCI_HALF_BRIGHT, VCI_NORMAL, and VCI_BOLD instead. Apart from the cleanup, 1) the enum allows for better type checking, and 2) this saves some code. No more fiddling with bits is needed in assembly now. (OTOH, the structure is larger.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200615074910.19267-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
28bc24fc46
commit
b84ae3dc70
@@ -35,6 +35,8 @@ enum con_scroll {
|
||||
SM_DOWN,
|
||||
};
|
||||
|
||||
enum vc_intensity;
|
||||
|
||||
/**
|
||||
* struct consw - callbacks for consoles
|
||||
*
|
||||
@@ -74,7 +76,8 @@ struct consw {
|
||||
void (*con_scrolldelta)(struct vc_data *vc, int lines);
|
||||
int (*con_set_origin)(struct vc_data *vc);
|
||||
void (*con_save_screen)(struct vc_data *vc);
|
||||
u8 (*con_build_attr)(struct vc_data *vc, u8 color, u8 intensity,
|
||||
u8 (*con_build_attr)(struct vc_data *vc, u8 color,
|
||||
enum vc_intensity intensity,
|
||||
u8 blink, u8 underline, u8 reverse, u8 italic);
|
||||
void (*con_invert_region)(struct vc_data *vc, u16 *p, int count);
|
||||
u16 *(*con_screen_pos)(struct vc_data *vc, int offset);
|
||||
|
Reference in New Issue
Block a user