diff options
author | toni <matzeton@googlemail.com> | 2016-07-24 01:54:45 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-07-24 01:54:45 +0200 |
commit | 44a90d9c8cf8f19c0eeb1598498055e76aa37c01 (patch) | |
tree | 49b01124b2b7979d8e59546e6d9b54c854c3a4a2 | |
parent | 0a52b28eb7c834d7351dc68967557f623c21b490 (diff) |
succeed if cryptsetup succeeded
-rw-r--r-- | src/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -98,6 +98,7 @@ main(int argc, char **argv) pid_t child; char pbuf[IPC_MQSIZ+1]; struct timespec ts_sem_input; + bool csetup_ok = false; signal(SIGINT, SIG_IGN); signal(SIGTERM, sigfunc); @@ -165,6 +166,7 @@ main(int argc, char **argv) logs_dbg("%s\n", "cryptcreate error"); ui_ipc_msgsend(MQ_IF, MSG(MSG_CRYPTCMD_ERR)); } else { + csetup_ok = true; logs_dbg("%s\n", "cryptcreate success, trywait SEM_UI"); ui_ipc_semtrywait(SEM_UI); } @@ -190,7 +192,10 @@ main(int argc, char **argv) goto error; } - ret = EXIT_SUCCESS; + if (csetup_ok) + ret = EXIT_SUCCESS; + else + ret = EXIT_FAILURE; ui_ipc_free(1); error: logs("%s\n", "exiting .."); |