summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-05-16 15:03:21 +0200
committerGravatar Martin Szulecki2014-05-16 15:03:21 +0200
commit704afa39c66a6e912f509112f543010b8234ec4d (patch)
tree0cd4e00d09342da96557323976f512dc17e7dedf /src
parent4533d9e4571da67e1a442581cbc2bef7e4e2338d (diff)
downloadidevicerestore-704afa39c66a6e912f509112f543010b8234ec4d.tar.gz
idevicerestore-704afa39c66a6e912f509112f543010b8234ec4d.tar.bz2
restore: Prevent disturbing error message due to missing SEP related components
Diffstat (limited to 'src')
-rw-r--r--src/idevicerestore.c3
-rw-r--r--src/restore.c8
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);