summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/idevicerestore.h')
-rw-r--r--src/idevicerestore.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index af66892..f92aad2 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -111,4 +111,18 @@ inline static void debug_plist(plist_t plist) {
free(data);
}
+inline static void print_progress_bar(const char* operation, double progress) {
+ int i = 0;
+ if(progress < 0) return;
+ if(progress > 100) progress = 100;
+ info("\r%s [", operation);
+ for(i = 0; i < 50; i++) {
+ if(i < progress / 2) info("=");
+ else info(" ");
+ }
+ info("] %3.1f%%", progress);
+ if(progress == 100) info("\n");
+ fflush(stdout);
+}
+
#endif