From e772b065d85445049854d806cd06943dbd58d619 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 27 Mar 2019 12:08:02 +0100 Subject: drop dead code --- vt.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'vt.c') diff --git a/vt.c b/vt.c index 9978ccb..9b5a2d7 100644 --- a/vt.c +++ b/vt.c @@ -30,7 +30,6 @@ static bool console_switching_active; static int kd_mode; static struct vt_mode vt_mode; static struct vt_mode vt_omode; -static int orig_vt_no = -1; static void (*console_suspend)(void); static void (*console_resume)(void); @@ -149,44 +148,6 @@ int check_console_switch(void) return 1; } -int console_aquire_vt(void) -{ - struct vt_stat vts; - int vtno = -1; - - if (-1 == ioctl(STDIN_FILENO, VT_OPENQRY, &vtno) || vtno == -1) { - perror("ioctl VT_OPENQRY"); - return -1; - } - fprintf(stderr, "using vt %d\n", vtno); - - if (-1 == ioctl(STDIN_FILENO,VT_GETSTATE, &vts)) { - perror("ioctl VT_GETSTATE"); - exit(1); - } - orig_vt_no = vts.v_active; - if (-1 == ioctl(STDIN_FILENO,VT_ACTIVATE, vtno)) { - perror("ioctl VT_ACTIVATE"); - exit(1); - } - if (-1 == ioctl(STDIN_FILENO,VT_WAITACTIVE, vtno)) { - perror("ioctl VT_WAITACTIVE"); - exit(1); - } - return 0; -} - -void console_restore_vt(void) -{ - if (orig_vt_no < 0) - return; - - if (ioctl(STDIN_FILENO, VT_ACTIVATE, orig_vt_no) < 0) - perror("ioctl VT_ACTIVATE"); - if (ioctl(STDIN_FILENO, VT_WAITACTIVE, orig_vt_no) < 0) - perror("ioctl VT_WAITACTIVE"); -} - /* Hmm. radeonfb needs this. matroxfb doesn't. */ int console_activate_current(void) { -- cgit