summaryrefslogtreecommitdiffstats
path: root/src/ipsw.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-11-09 01:56:08 +0100
committerGravatar Nikias Bassen2023-11-09 01:56:08 +0100
commit6085ed7429986c7dec579fe1f1303ae6651ea1f2 (patch)
tree716d0e76618553589d43d1b2fe19e1330ef379df /src/ipsw.c
parentf87ab8baee1c78ba5d3ab6dde4da44ecb93086c4 (diff)
downloadidevicerestore-6085ed7429986c7dec579fe1f1303ae6651ea1f2.tar.gz
idevicerestore-6085ed7429986c7dec579fe1f1303ae6651ea1f2.tar.bz2
Print progress for large components (e.g. Cryptex)
Diffstat (limited to 'src/ipsw.c')
-rw-r--r--src/ipsw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipsw.c b/src/ipsw.c
index 5b1d732..c25f61d 100644
--- a/src/ipsw.c
+++ b/src/ipsw.c
@@ -737,7 +737,7 @@ int ipsw_extract_send(ipsw_archive_t ipsw, const char* infile, int blocksize, ip
// EOF
break;
}
- if (send_callback(ctx, buffer, zr) < 0) {
+ if (send_callback(ctx, buffer, zr, done, total_size) < 0) {
error("ERROR: %s: send failed\n", __func__);
break;
}
@@ -773,7 +773,7 @@ int ipsw_extract_send(ipsw_archive_t ipsw, const char* infile, int blocksize, ip
free(buffer);
return -1;
}
- send_callback(ctx, buffer, (size_t)rl);
+ send_callback(ctx, buffer, (size_t)rl, 0, 0);
} else {
#endif
FILE *f = fopen(filepath, "rb");
@@ -792,7 +792,7 @@ int ipsw_extract_send(ipsw_archive_t ipsw, const char* infile, int blocksize, ip
error("ERROR: %s: fread failed for %s: %s\n", __func__, filepath, strerror(errno));
break;
}
- if (send_callback(ctx, buffer, fr) < 0) {
+ if (send_callback(ctx, buffer, fr, done, total_size) < 0) {
error("ERROR: %s: send failed\n", __func__);
break;
}
@@ -812,7 +812,7 @@ int ipsw_extract_send(ipsw_archive_t ipsw, const char* infile, int blocksize, ip
}
// send a NULL buffer to mark end of transfer
- send_callback(ctx, NULL, 0);
+ send_callback(ctx, NULL, 0, done, total_size);
return 0;
}