diff options
author | Joshua Hill | 2010-06-07 14:24:08 +0800 |
---|---|---|
committer | rcg4u | 2010-06-09 17:17:29 +0800 |
commit | a274554b753880dd7042b6013d0158a0b81124c7 (patch) | |
tree | b114cc3ab2369805ece1c169684a7f95ffdf7d3b /src/ipsw.c | |
parent | 9279f889d7e296880fd7ea9d6c7cec499db62ea4 (diff) | |
download | idevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.gz idevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.bz2 |
I really need to put more descriptive messages here, but im doing stuff all over the place
Diffstat (limited to 'src/ipsw.c')
-rw-r--r-- | src/ipsw.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -95,7 +95,9 @@ int ipsw_extract_to_file(const char* ipsw, const char* infile, const char* outfi int i = 0; int size = 0; + int bytes = 0; int count = 0; + double progress = 0; for (i = zstat.size; i > 0; i -= count) { if (i < BUFSIZE) size = i; @@ -109,9 +111,11 @@ int ipsw_extract_to_file(const char* ipsw, const char* infile, const char* outfi return -1; } fwrite(buffer, 1, count, fd); - debug("."); + + bytes += size; + progress = ((double) bytes/ (double) zstat.size) * 100.0; + print_progress_bar("Extracting", progress); } - debug("\n"); fclose(fd); zip_fclose(zfile); |