summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-06-27 02:36:45 +0200
committerGravatar Nikias Bassen2022-06-27 02:36:45 +0200
commitefd00b498ec4571c186abf9bf9f32d6f3eb7c143 (patch)
treeb1d328798da129202e71c67fe6bfff0492451848 /src
parent170a17e6b8c577a59dc0a001c09cfd7a02347720 (diff)
downloadidevicerestore-efd00b498ec4571c186abf9bf9f32d6f3eb7c143.tar.gz
idevicerestore-efd00b498ec4571c186abf9bf9f32d6f3eb7c143.tar.bz2
Don't print an error message when RestoreBehavior is missing
Diffstat (limited to 'src')
-rw-r--r--src/idevicerestore.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 51e7ce1..40c7d5c 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -2660,20 +2660,13 @@ void build_identity_print_information(plist_t build_identity)
plist_get_string_val(node, &value);
info("Variant: %s\n", value);
- free(value);
-
- node = plist_dict_get_item(info_node, "RestoreBehavior");
- if (!node || plist_get_node_type(node) != PLIST_STRING) {
- error("ERROR: Unable to find RestoreBehavior node\n");
- return;
- }
- plist_get_string_val(node, &value);
- if (!strcmp(value, "Erase"))
- info("This restore will erase your device data.\n");
-
- if (!strcmp(value, "Update"))
- info("This restore will update your device without erasing user data.\n");
+ if (strstr(value, RESTORE_VARIANT_UPGRADE_INSTALL))
+ info("This restore will update the device without erasing user data.\n");
+ else if (strstr(value, RESTORE_VARIANT_ERASE_INSTALL))
+ info("This restore will erase all device data.\n");
+ else
+ info("Unknown Variant '%s'\n", value);
free(value);