diff options
| author | 2026-12-03 09:47:42 +0100 | |
|---|---|---|
| committer | 2026-12-03 09:47:42 +0100 | |
| commit | 1e04e19a4d3832cfadd3aaaefdba1531fa212b27 (patch) | |
| tree | 431a4a8d3606a1819788a2347cc2dceb05c90395 /src/ipsw.c | |
| parent | 749ec61b5c2f94af0ab2b5e09579fe0ea6fdd27f (diff) | |
| download | idevicerestore-1e04e19a4d3832cfadd3aaaefdba1531fa212b27.tar.gz idevicerestore-1e04e19a4d3832cfadd3aaaefdba1531fa212b27.tar.bz2 | |
Diffstat (limited to 'src/ipsw.c')
| -rw-r--r-- | src/ipsw.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -467,10 +467,8 @@ int ipsw_extract_to_file_with_progress(ipsw_archive_t ipsw, const char* infile, size = i; count = zip_fread(zfile, buffer, size); if (count < 0) { - int zep = 0; - int sep = 0; - zip_file_error_get(zfile, &zep, &sep); - logger(LL_ERROR, "zip_fread: %s %d %d\n", infile, zep, sep); + zip_error_t *zerr = zip_file_get_error(zfile); + logger(LL_ERROR, "zip_fread: %s %d %d\n", infile, zip_error_code_zip(zerr), zip_error_code_system(zerr)); ret = -1; break; } @@ -683,16 +681,15 @@ int ipsw_extract_to_memory(ipsw_archive_t ipsw, const char* infile, void** pbuff } zip_int64_t zr = zip_fread(zfile, buffer, size); - int zep = 0; - int sep = 0; + zip_error_t *zerr = NULL; if (zr < 0) { - zip_file_error_get(zfile, &zep, &sep); + zerr = zip_file_get_error(zfile); } zip_fclose(zfile); zip_unchange_all(zip); zip_close(zip); if (zr < 0) { - logger(LL_ERROR, "zip_fread: %s %d %d\n", infile, zep, sep); + logger(LL_ERROR, "zip_fread: %s %d %d\n", infile, zip_error_code_zip(zerr), zip_error_code_system(zerr)); free(buffer); return -1; } else if (zr != size) { @@ -1302,7 +1299,7 @@ static int sha1_verify_fp(FILE* f, unsigned char* expected_sha1) int ipsw_download_fw(const char *fwurl, unsigned char* isha1, const char* todir, char** ipswfile) { - char* fwfn = strrchr(fwurl, '/'); + const char* fwfn = strrchr(fwurl, '/'); if (!fwfn) { logger(LL_ERROR, "can't get local filename for firmware ipsw\n"); return -2; |
