Commit 3dc9d865 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Framebuffer: don't register useless signal handler

The signal handler currently does nothing anyway, so this was a waste.
(cherry picked from commit b1a700d1)
parent 24b6f4be
...@@ -108,7 +108,9 @@ static void Manage (vout_display_t *); ...@@ -108,7 +108,9 @@ static void Manage (vout_display_t *);
/* */ /* */
static int OpenDisplay (vout_display_t *, bool force_resolution); static int OpenDisplay (vout_display_t *, bool force_resolution);
static void CloseDisplay (vout_display_t *); static void CloseDisplay (vout_display_t *);
#if 0
static void SwitchDisplay(int i_signal); static void SwitchDisplay(int i_signal);
#endif
static void TextMode (int tty); static void TextMode (int tty);
static void GfxMode (int tty); static void GfxMode (int tty);
...@@ -123,8 +125,10 @@ struct vout_display_sys_t { ...@@ -123,8 +125,10 @@ struct vout_display_sys_t {
struct termios old_termios; struct termios old_termios;
/* Original configuration information */ /* Original configuration information */
#if 0
struct sigaction sig_usr1; /* USR1 previous handler */ struct sigaction sig_usr1; /* USR1 previous handler */
struct sigaction sig_usr2; /* USR2 previous handler */ struct sigaction sig_usr2; /* USR2 previous handler */
#endif
struct vt_mode vt_mode; /* previous VT mode */ struct vt_mode vt_mode; /* previous VT mode */
/* Framebuffer information */ /* Framebuffer information */
...@@ -455,6 +459,7 @@ static int TtyInit(vout_display_t *vd) ...@@ -455,6 +459,7 @@ static int TtyInit(vout_display_t *vd)
ioctl(sys->tty, VT_RELDISP, VT_ACKACQ); ioctl(sys->tty, VT_RELDISP, VT_ACKACQ);
#if 0
/* Set-up tty signal handler to be aware of tty changes */ /* Set-up tty signal handler to be aware of tty changes */
struct sigaction sig_tty; struct sigaction sig_tty;
memset(&sig_tty, 0, sizeof(sig_tty)); memset(&sig_tty, 0, sizeof(sig_tty));
...@@ -466,6 +471,7 @@ static int TtyInit(vout_display_t *vd) ...@@ -466,6 +471,7 @@ static int TtyInit(vout_display_t *vd)
/* FIXME SIGUSR1 could have succeed */ /* FIXME SIGUSR1 could have succeed */
goto error_signal; goto error_signal;
} }
#endif
/* Set-up tty according to new signal handler */ /* Set-up tty according to new signal handler */
if (-1 == ioctl(sys->tty, VT_GETMODE, &sys->vt_mode)) { if (-1 == ioctl(sys->tty, VT_GETMODE, &sys->vt_mode)) {
...@@ -485,9 +491,11 @@ static int TtyInit(vout_display_t *vd) ...@@ -485,9 +491,11 @@ static int TtyInit(vout_display_t *vd)
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
#if 0
sigaction(SIGUSR1, &sys->sig_usr1, NULL); sigaction(SIGUSR1, &sys->sig_usr1, NULL);
sigaction(SIGUSR2, &sys->sig_usr2, NULL); sigaction(SIGUSR2, &sys->sig_usr2, NULL);
error_signal: error_signal:
#endif
tcsetattr(0, 0, &sys->old_termios); tcsetattr(0, 0, &sys->old_termios);
TextMode(sys->tty); TextMode(sys->tty);
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -499,9 +507,11 @@ static void TtyExit(vout_display_t *vd) ...@@ -499,9 +507,11 @@ static void TtyExit(vout_display_t *vd)
/* Reset the terminal */ /* Reset the terminal */
ioctl(sys->tty, VT_SETMODE, &sys->vt_mode); ioctl(sys->tty, VT_SETMODE, &sys->vt_mode);
#if 0
/* Remove signal handlers */ /* Remove signal handlers */
sigaction(SIGUSR1, &sys->sig_usr1, NULL); sigaction(SIGUSR1, &sys->sig_usr1, NULL);
sigaction(SIGUSR2, &sys->sig_usr2, NULL); sigaction(SIGUSR2, &sys->sig_usr2, NULL);
#endif
/* Reset the keyboard state */ /* Reset the keyboard state */
tcsetattr(0, 0, &sys->old_termios); tcsetattr(0, 0, &sys->old_termios);
...@@ -700,6 +710,7 @@ static void CloseDisplay(vout_display_t *vd) ...@@ -700,6 +710,7 @@ static void CloseDisplay(vout_display_t *vd)
} }
} }
#if 0
/***************************************************************************** /*****************************************************************************
* SwitchDisplay: VT change signal handler * SwitchDisplay: VT change signal handler
***************************************************************************** *****************************************************************************
...@@ -708,8 +719,6 @@ static void CloseDisplay(vout_display_t *vd) ...@@ -708,8 +719,6 @@ static void CloseDisplay(vout_display_t *vd)
*****************************************************************************/ *****************************************************************************/
static void SwitchDisplay(int i_signal) static void SwitchDisplay(int i_signal)
{ {
VLC_UNUSED(i_signal);
#if 0
vout_display_t *vd; vout_display_t *vd;
vlc_mutex_lock(&p_vout_bank->lock); vlc_mutex_lock(&p_vout_bank->lock);
...@@ -737,8 +746,8 @@ static void SwitchDisplay(int i_signal) ...@@ -737,8 +746,8 @@ static void SwitchDisplay(int i_signal)
} }
vlc_mutex_unlock(&p_vout_bank->lock); vlc_mutex_unlock(&p_vout_bank->lock);
#endif
} }
#endif
/***************************************************************************** /*****************************************************************************
* TextMode and GfxMode : switch tty to text/graphic mode * TextMode and GfxMode : switch tty to text/graphic mode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment