diff options
author | Jiri Slaby <jslaby@suse.cz> | 2020-02-19 08:39:43 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-02 15:11:00 +0200 |
commit | 383c71b7314f407815e71d6aa09d594ebe46e14c (patch) | |
tree | dca75a6dd80457d9376d8155a439f9ace5f3919b /drivers/tty/vt/vt_ioctl.c | |
parent | 125dd8c48b1970360884140886b2a6d5b6b47a3f (diff) | |
download | linux-stable-383c71b7314f407815e71d6aa09d594ebe46e14c.tar.gz linux-stable-383c71b7314f407815e71d6aa09d594ebe46e14c.tar.bz2 linux-stable-383c71b7314f407815e71d6aa09d594ebe46e14c.zip |
vt: selection, introduce vc_is_sel
commit dce05aa6eec977f1472abed95ccd71276b9a3864 upstream.
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 'drivers/tty/vt/vt_ioctl.c')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index ee6c91ef1f6c..bf4daa0c7930 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -43,7 +43,7 @@ char vt_dont_switch; extern struct tty_driver *console_driver; #define VT_IS_IN_USE(i) (console_driver->ttys[i] && console_driver->ttys[i]->count) -#define VT_BUSY(i) (VT_IS_IN_USE(i) || i == fg_console || vc_cons[i].d == sel_cons) +#define VT_BUSY(i) (VT_IS_IN_USE(i) || i == fg_console || vc_is_sel(vc_cons[i].d)) /* * Console (vt and kd) routines, as defined by USL SVR4 manual, and by |