From 38c965c16625d26915b3d4998a8a7e790c834d89 Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Tue, 22 Jun 2010 15:06:55 -0400 Subject: Reverted rcg4u merge, didn't realize this was actually from posixninja branch --- src/ipsw.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/ipsw.c') diff --git a/src/ipsw.c b/src/ipsw.c index adbaea0..ca28596 100644 --- a/src/ipsw.c +++ b/src/ipsw.c @@ -20,7 +20,6 @@ */ #include -#include #include #include @@ -95,10 +94,8 @@ 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) { + for (i = zstat.size; i > 0; i -= count) { if (i < BUFSIZE) size = i; else @@ -111,11 +108,9 @@ int ipsw_extract_to_file(const char* ipsw, const char* infile, const char* outfi return -1; } fwrite(buffer, 1, count, fd); - - bytes += size; - progress = ((double) bytes/ (double) zstat.size) * 100.0; - print_progress_bar("Extracting", progress); + debug("."); } + debug("\n"); fclose(fd); zip_fclose(zfile); @@ -124,7 +119,7 @@ int ipsw_extract_to_file(const char* ipsw, const char* infile, const char* outfi return 0; } -int ipsw_extract_to_memory(const char* ipsw, const char* infile, char** pbuffer, uint32_t* psize) { +int ipsw_extract_to_memory(const char* ipsw, const char* infile, char** pbuffer, int* psize) { ipsw_archive* archive = ipsw_open(ipsw); if (archive == NULL || archive->zip == NULL) { error("ERROR: Invalid archive\n"); -- cgit v1.1-32-gdbae