aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/display.c11
-rw-r--r--src/main.c2
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 ) {
diff --git a/src/main.c b/src/main.c
index 2d345ba..150f16c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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[])