summaryrefslogtreecommitdiffstats
path: root/twinstall.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--twinstall.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/twinstall.cpp b/twinstall.cpp
index e7d23ecaf..041c78d63 100644
--- a/twinstall.cpp
+++ b/twinstall.cpp
@@ -87,37 +87,37 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
child_data = fdopen(pipe_fd[0], "r");
while (fgets(buffer, sizeof(buffer), child_data) != NULL) {
char* command = strtok(buffer, " \n");
- if (command == NULL) {
- continue;
- } else if (strcmp(command, "progress") == 0) {
- char* fraction_char = strtok(NULL, " \n");
- char* seconds_char = strtok(NULL, " \n");
+ if (command == NULL) {
+ continue;
+ } else if (strcmp(command, "progress") == 0) {
+ char* fraction_char = strtok(NULL, " \n");
+ char* seconds_char = strtok(NULL, " \n");
- float fraction_float = strtof(fraction_char, NULL);
- int seconds_float = strtol(seconds_char, NULL, 10);
+ float fraction_float = strtof(fraction_char, NULL);
+ int seconds_float = strtol(seconds_char, NULL, 10);
- if (zip_verify)
+ if (zip_verify)
DataManager::ShowProgress(fraction_float * (1 - VERIFICATION_PROGRESS_FRACTION), seconds_float);
else
DataManager::ShowProgress(fraction_float, seconds_float);
- } else if (strcmp(command, "set_progress") == 0) {
- char* fraction_char = strtok(NULL, " \n");
- float fraction_float = strtof(fraction_char, NULL);
- DataManager::SetProgress(fraction_float);
- } else if (strcmp(command, "ui_print") == 0) {
- char* display_value = strtok(NULL, "\n");
- if (display_value) {
- gui_print("%s", display_value);
- } else {
- gui_print("\n");
- }
- } else if (strcmp(command, "wipe_cache") == 0) {
- *wipe_cache = 1;
- } else if (strcmp(command, "clear_display") == 0) {
- // Do nothing, not supported by TWRP
- } else {
- LOGERR("unknown command [%s]\n", command);
- }
+ } else if (strcmp(command, "set_progress") == 0) {
+ char* fraction_char = strtok(NULL, " \n");
+ float fraction_float = strtof(fraction_char, NULL);
+ DataManager::SetProgress(fraction_float);
+ } else if (strcmp(command, "ui_print") == 0) {
+ char* display_value = strtok(NULL, "\n");
+ if (display_value) {
+ gui_print("%s", display_value);
+ } else {
+ gui_print("\n");
+ }
+ } else if (strcmp(command, "wipe_cache") == 0) {
+ *wipe_cache = 1;
+ } else if (strcmp(command, "clear_display") == 0) {
+ // Do nothing, not supported by TWRP
+ } else {
+ LOGERR("unknown command [%s]\n", command);
+ }
}
fclose(child_data);