forked from Minki/linux
vt: switch vt_dont_switch to bool
vt_dont_switch is pure boolean, no need for whole char. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200219073951.16151-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9256d09f1d
commit
f400991bf8
@ -39,7 +39,7 @@
|
|||||||
#include <linux/kbd_diacr.h>
|
#include <linux/kbd_diacr.h>
|
||||||
#include <linux/selection.h>
|
#include <linux/selection.h>
|
||||||
|
|
||||||
char vt_dont_switch;
|
bool vt_dont_switch;
|
||||||
|
|
||||||
static inline bool vt_in_use(unsigned int i)
|
static inline bool vt_in_use(unsigned int i)
|
||||||
{
|
{
|
||||||
@ -1026,12 +1026,12 @@ int vt_ioctl(struct tty_struct *tty,
|
|||||||
case VT_LOCKSWITCH:
|
case VT_LOCKSWITCH:
|
||||||
if (!capable(CAP_SYS_TTY_CONFIG))
|
if (!capable(CAP_SYS_TTY_CONFIG))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
vt_dont_switch = 1;
|
vt_dont_switch = true;
|
||||||
break;
|
break;
|
||||||
case VT_UNLOCKSWITCH:
|
case VT_UNLOCKSWITCH:
|
||||||
if (!capable(CAP_SYS_TTY_CONFIG))
|
if (!capable(CAP_SYS_TTY_CONFIG))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
vt_dont_switch = 0;
|
vt_dont_switch = false;
|
||||||
break;
|
break;
|
||||||
case VT_GETHIFONTMASK:
|
case VT_GETHIFONTMASK:
|
||||||
ret = put_user(vc->vc_hi_font_mask,
|
ret = put_user(vc->vc_hi_font_mask,
|
||||||
|
@ -135,7 +135,7 @@ extern int do_unbind_con_driver(const struct consw *csw, int first, int last,
|
|||||||
int deflt);
|
int deflt);
|
||||||
int vty_init(const struct file_operations *console_fops);
|
int vty_init(const struct file_operations *console_fops);
|
||||||
|
|
||||||
extern char vt_dont_switch;
|
extern bool vt_dont_switch;
|
||||||
extern int default_utf8;
|
extern int default_utf8;
|
||||||
extern int global_cursor_default;
|
extern int global_cursor_default;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user