diff options
author | Jiri Slaby <jslaby@suse.cz> | 2020-02-19 08:39:43 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-21 10:31:18 +0100 |
commit | dce05aa6eec977f1472abed95ccd71276b9a3864 (patch) | |
tree | 8b48ff19cf4255022f7454b74dd900206ca99691 /include/linux/selection.h | |
parent | 80967ff2d15fb91f5046118d1de3ef32a151e30a (diff) | |
download | linux-dce05aa6eec977f1472abed95ccd71276b9a3864.tar.gz linux-dce05aa6eec977f1472abed95ccd71276b9a3864.tar.bz2 linux-dce05aa6eec977f1472abed95ccd71276b9a3864.zip |
vt: selection, introduce vc_is_sel
Avoid global variables (namely sel_cons) by introducing vc_is_sel. It
checks whether the parameter is the current selection console. This will
help putting sel_cons to a struct later.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219073951.16151-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/selection.h')
-rw-r--r-- | include/linux/selection.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/selection.h b/include/linux/selection.h index e2c1f96bf059..5b890ef5b59f 100644 --- a/include/linux/selection.h +++ b/include/linux/selection.h @@ -11,8 +11,8 @@ #include <linux/tiocl.h> #include <linux/vt_buffer.h> -extern struct vc_data *sel_cons; struct tty_struct; +struct vc_data; extern void clear_selection(void); extern int set_selection_user(const struct tiocl_selection __user *sel, @@ -24,6 +24,8 @@ extern int sel_loadlut(char __user *p); extern int mouse_reporting(void); extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry); +bool vc_is_sel(struct vc_data *vc); + extern int console_blanked; extern const unsigned char color_table[]; |