summaryrefslogtreecommitdiffstats
path: root/twinstall.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2013-07-25 22:53:02 +0200
committerGerrit Code Review <gerrit@198.50.184.117>2013-08-24 14:56:48 +0200
commitfafb0c541bb4b24515c57251a44d87825eec90fb (patch)
tree9cddb55ceef8912c8fafe618c98147ff6df19ef6 /twinstall.cpp
parentClean-up in partitions.hpp (diff)
downloadandroid_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.gz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.bz2
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.lz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.xz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.zst
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.zip
Diffstat (limited to 'twinstall.cpp')
-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);