Fix capturing exit status to properly display libtar results

Error conditions were always showing successful in the TWRP GUI
making it much more difficult to determine if a backup or restore
was actually successful.
This commit is contained in:
Dees_Troy
2013-03-02 08:49:37 -06:00
parent 1148c99790
commit 50d63be580
+2 -2
View File
@@ -107,7 +107,7 @@ int twrpTar::createTarFork() {
LOGI("Child process ended with signal: %d\n", WTERMSIG(status));
return -1;
}
else if (WIFEXITED(status) != 0)
else if (WEXITSTATUS(status) == 0)
LOGI("Tar creation successful\n");
else {
LOGI("Tar creation failed\n");
@@ -141,7 +141,7 @@ int twrpTar::extractTarFork() {
LOGI("Child process ended with signal: %d\n", WTERMSIG(status));
return -1;
}
else if (WIFEXITED(status) != 0)
else if (WEXITSTATUS(status) == 0)
LOGI("Tar extraction successful\n");
else {
LOGI("Tar extraction failed\n");