aboutsummaryrefslogtreecommitdiff
path: root/src/display.c
diff options
context:
space:
mode:
authorpk33 <pk33@email.com>2024-11-03 03:41:54 +0100
committerpk33 <pk33@email.com>2024-11-03 03:41:54 +0100
commit0f23d50c8291b23799e55c8653c15f16c0d752d0 (patch)
tree0fad70720f1bf647448a26636d51fdbd80bfc640 /src/display.c
parentee7cd3e6b622a8c40236ac26270e369bc28af007 (diff)
downloadengine33-0f23d50c8291b23799e55c8653c15f16c0d752d0.tar.gz
VT switcher fix
Diffstat (limited to 'src/display.c')
-rw-r--r--src/display.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/display.c b/src/display.c
index 1e68f89..25c6437 100644
--- a/src/display.c
+++ b/src/display.c
@@ -52,7 +52,7 @@ typedef struct {
static DRMData_d drmData = {0,};
-static Size vtPipe[2] = { -1, -1 };
+static int vtPipe[2] = { -1, -1 };
static struct termios termOldConfig;
@@ -538,11 +538,10 @@ static Size _init_vt_switch( void )
struct vt_mode vt_mode = {0,};
sigset_t set;
- __display.ttyfd = -1;
+ __display.ttyfd = -1;
- /* Init VT pipes */
- if (pipe(vtPipe) != 0)
+ if( pipe(vtPipe) == -1 )
{
vtPipe[0] = vtPipe[1] = -1;
loge( "Could not set VT pipes");
@@ -557,7 +556,6 @@ static Size _init_vt_switch( void )
loge( "Could not set VT write pipe" );
return E33_EXIT_FAILURE;
}
- /**/
if( __display.ttyfd = open("/dev/tty", O_RDWR ) < 0 ) {
@@ -566,7 +564,6 @@ static Size _init_vt_switch( void )
}
- /* Setup signals */
if( _has_signal(REL_SIGNAL) ) {
loge( "VT release signal is already in use");
return E33_EXIT_FAILURE;
@@ -584,8 +581,6 @@ static Size _init_vt_switch( void )
loge( "Could not set acquire signal handler");
return E33_EXIT_FAILURE;
}
- /**/
-
if( ioctl(__display.ttyfd, VT_GETMODE, &vt_mode) < 0 ) {