diff options
author | Martin Szulecki | 2012-07-17 16:18:24 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 16:18:24 +0200 |
commit | 603f4cfca644c3afc75a4615f4b837e0bc6f3abf (patch) | |
tree | 56eca8f382291d43916695412bcfced1bfdba26b | |
parent | bc4e8ec23a60e6936497826f29cbed39da4f964b (diff) | |
download | idevicerestore-603f4cfca644c3afc75a4615f4b837e0bc6f3abf.tar.gz idevicerestore-603f4cfca644c3afc75a4615f4b837e0bc6f3abf.tar.bz2 |
ipsw: Use different error codes in ipsw_download_latest_fw() for handling
-rw-r--r-- | src/ipsw.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -405,7 +405,7 @@ int ipsw_download_latest_fw(plist_t version_data, const char* product, const cha char* fwfn = strrchr(fwurl, '/'); if (!fwfn) { error("ERROR: can't get local filename for firmware ipsw\n"); - return -1; + return -2; } fwfn++; @@ -445,7 +445,7 @@ int ipsw_download_latest_fw(plist_t version_data, const char* product, const cha if (need_dl) { if (strncmp(fwurl, "protected:", 10) == 0) { error("ERROR: Can't download '%s' because it needs a purchase.\n", fwfn); - res = -1; + res = -3; } else { remove(fwlfn); info("Downloading latest firmware (%s)\n", fwurl); @@ -458,7 +458,7 @@ int ipsw_download_latest_fw(plist_t version_data, const char* product, const cha info("Checksum matches.\n"); } else { error("ERROR: File download failed (checksum mismatch).\n"); - res = -1; + res = -4; } fclose(f); @@ -467,7 +467,7 @@ int ipsw_download_latest_fw(plist_t version_data, const char* product, const cha remove(fwlfn); } else { error("ERROR: Can't open '%s' for checksum verification\n", fwlfn); - res = -1; + res = -5; } } } |