diff options
author | Joshua Hill | 2010-06-07 02:24:08 -0400 |
---|---|---|
committer | Joshua Hill | 2010-06-07 02:24:08 -0400 |
commit | a91e336c24a0d741e47be7adf0cd0b2beb20e5ab (patch) | |
tree | b114cc3ab2369805ece1c169684a7f95ffdf7d3b /src/idevicerestore.h | |
parent | 255b285d22056dde283d33511c14387ea92e28c0 (diff) | |
download | idevicerestore-a91e336c24a0d741e47be7adf0cd0b2beb20e5ab.tar.gz idevicerestore-a91e336c24a0d741e47be7adf0cd0b2beb20e5ab.tar.bz2 |
I really need to put more descriptive messages here, but im doing stuff all over the place
Diffstat (limited to 'src/idevicerestore.h')
-rw-r--r-- | src/idevicerestore.h | 14 |
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 |