#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched/signal.h>
#include <linux/tty.h>
#include <linux/timer.h>
#include <linux/kernel.h>
#include <linux/compat.h>
#include <linux/module.h>
#include <linux/kd.h>
#include <linux/vt.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/console.h>
#include <linux/consolemap.h>
#include <linux/signal.h>
#include <linux/suspend.h>
#include <linux/timex.h>
#include <asm/io.h>
#include <linux/uaccess.h>
#include <linux/nospec.h>
#include <linux/kbd_kern.h>
#include <linux/vt_kern.h>
#include <linux/kbd_diacr.h>
#include <linux/selection.h>
bool vt_dont_switch;
static inline bool vt_in_use(unsigned int i)
{ … }
static inline bool vt_busy(int i)
{ … }
#ifdef CONFIG_X86
#include <asm/syscalls.h>
#endif
static void complete_change_console(struct vc_data *vc);
struct vt_event_wait { … };
static LIST_HEAD(vt_events);
static DEFINE_SPINLOCK(vt_event_lock);
static DECLARE_WAIT_QUEUE_HEAD(vt_event_waitqueue);
void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
{ … }
static void __vt_event_queue(struct vt_event_wait *vw)
{ … }
static void __vt_event_wait(struct vt_event_wait *vw)
{ … }
static void __vt_event_dequeue(struct vt_event_wait *vw)
{ … }
static void vt_event_wait(struct vt_event_wait *vw)
{ … }
static int vt_event_wait_ioctl(struct vt_event __user *event)
{ … }
int vt_waitactive(int n)
{ … }
#define GPFIRST …
#define GPLAST …
#define GPNUM …
static int vt_kdsetmode(struct vc_data *vc, unsigned long mode)
{ … }
static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg, bool perm)
{ … }
static inline int do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud,
bool perm, struct vc_data *vc)
{ … }
static int vt_io_ioctl(struct vc_data *vc, unsigned int cmd, void __user *up,
bool perm)
{ … }
static int vt_reldisp(struct vc_data *vc, unsigned int swtch)
{ … }
static int vt_setactivate(struct vt_setactivate __user *sa)
{ … }
static int vt_disallocate(unsigned int vc_num)
{ … }
static void vt_disallocate_all(void)
{ … }
static int vt_resizex(struct vc_data *vc, struct vt_consize __user *cs)
{ … }
int vt_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{ … }
void reset_vc(struct vc_data *vc)
{ … }
void vc_SAK(struct work_struct *work)
{ … }
#ifdef CONFIG_COMPAT
struct compat_console_font_op { … };
static inline int
compat_kdfontop_ioctl(struct compat_console_font_op __user *fontop,
int perm, struct console_font_op *op, struct vc_data *vc)
{ … }
struct compat_unimapdesc { … };
static inline int
compat_unimap_ioctl(unsigned int cmd, struct compat_unimapdesc __user *user_ud,
int perm, struct vc_data *vc)
{ … }
long vt_compat_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{ … }
#endif
static void complete_change_console(struct vc_data *vc)
{ … }
void change_console(struct vc_data *new_vc)
{ … }
static int disable_vt_switch;
int vt_move_to_console(unsigned int vt, int alloc)
{ … }
void pm_set_vt_switch(int do_switch)
{ … }
EXPORT_SYMBOL(…);