diff options
author | Nikias Bassen | 2022-06-27 02:36:45 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-06-27 02:36:45 +0200 |
commit | efd00b498ec4571c186abf9bf9f32d6f3eb7c143 (patch) | |
tree | b1d328798da129202e71c67fe6bfff0492451848 /src | |
parent | 170a17e6b8c577a59dc0a001c09cfd7a02347720 (diff) | |
download | idevicerestore-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.c | 19 |
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); |