diff options
author | Martin Szulecki | 2014-05-16 15:03:21 +0200 |
---|---|---|
committer | Martin Szulecki | 2014-05-16 15:03:21 +0200 |
commit | 704afa39c66a6e912f509112f543010b8234ec4d (patch) | |
tree | 0cd4e00d09342da96557323976f512dc17e7dedf | |
parent | 4533d9e4571da67e1a442581cbc2bef7e4e2338d (diff) | |
download | idevicerestore-704afa39c66a6e912f509112f543010b8234ec4d.tar.gz idevicerestore-704afa39c66a6e912f509112f543010b8234ec4d.tar.bz2 |
restore: Prevent disturbing error message due to missing SEP related components
-rw-r--r-- | src/idevicerestore.c | 3 | ||||
-rw-r--r-- | src/restore.c | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 7f545ed..8625176 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -1793,8 +1793,7 @@ int build_identity_get_component_path(plist_t build_identity, const char* compon return 0; } -const char* get_component_name(const char* filename) -{ +const char* get_component_name(const char* filename) { if (!strncmp(filename, "LLB", 3)) { return "LLB"; } else if (!strncmp(filename, "iBoot", 5)) { diff --git a/src/restore.c b/src/restore.c index f60bec1..7e23bd2 100644 --- a/src/restore.c +++ b/src/restore.c @@ -952,8 +952,8 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* unsigned char* personalized_data = NULL; unsigned int personalized_size = 0; - - if (build_identity_get_component_path(build_identity, "RestoreSEP", &restore_sep_path) == 0) { + + if (!build_identity_has_component(build_identity, "RestoreSEP") && build_identity_get_component_path(build_identity, "RestoreSEP", &restore_sep_path) == 0) { component = "RestoreSEP"; if (extract_component(client->ipsw, restore_sep_path, &component_data, &component_size) < 0) { error("ERROR: Unable to extract component: %s\n", component); @@ -961,7 +961,6 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* return -1; } - if (personalize_component(component, component_data, component_size, client->tss, &personalized_data, &personalized_size) < 0) { error("ERROR: Unable to get personalized component: %s\n", component); free(component_data); @@ -978,7 +977,7 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* personalized_size = 0; } - if (build_identity_get_component_path(build_identity, "SEP", &sep_path) == 0) { + if (!build_identity_has_component(build_identity, "SEP") && build_identity_get_component_path(build_identity, "SEP", &sep_path) == 0) { component = "SEP"; if (extract_component(client->ipsw, sep_path, &component_data, &component_size) < 0) { error("ERROR: Unable to extract component: %s\n", component); @@ -986,7 +985,6 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* return -1; } - if (personalize_component(component, component_data, component_size, client->tss, &personalized_data, &personalized_size) < 0) { error("ERROR: Unable to get personalized component: %s\n", component); free(component_data); |