diff options
author | pk33 <pk33@email.com> | 2024-11-03 03:41:54 +0100 |
---|---|---|
committer | pk33 <pk33@email.com> | 2024-11-03 03:41:54 +0100 |
commit | 0f23d50c8291b23799e55c8653c15f16c0d752d0 (patch) | |
tree | 0fad70720f1bf647448a26636d51fdbd80bfc640 /src | |
parent | ee7cd3e6b622a8c40236ac26270e369bc28af007 (diff) | |
download | engine33-0f23d50c8291b23799e55c8653c15f16c0d752d0.tar.gz |
VT switcher fix
Diffstat (limited to 'src')
-rw-r--r-- | src/display.c | 11 | ||||
-rw-r--r-- | src/main.c | 2 |
2 files changed, 4 insertions, 9 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 ) { @@ -1,7 +1,7 @@ #include "display.h" #include "clock.h" #include "logger.h" -#include "options.h" +#include "system.h" int main(int argc, char *argv[]) |