diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-27 12:08:02 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-27 12:08:02 +0100 |
commit | e772b065d85445049854d806cd06943dbd58d619 (patch) | |
tree | e4600b370704775a0ee71ba91fc4ef79bf3021fb | |
parent | 135c11a9e5ff2244cb215ab14798769d859ec998 (diff) | |
download | fbida-e772b065d85445049854d806cd06943dbd58d619.tar.gz |
drop dead code
-rw-r--r-- | vt.c | 39 | ||||
-rw-r--r-- | vt.h | 2 |
2 files changed, 0 insertions, 41 deletions
@@ -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) { @@ -5,6 +5,4 @@ int console_switch_init(void (*suspend)(void), void console_switch_cleanup(void); int check_console_switch(void); -int console_aquire_vt(void); -void console_restore_vt(void); int console_activate_current(void); |