From efd00b498ec4571c186abf9bf9f32d6f3eb7c143 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 27 Jun 2022 02:36:45 +0200 Subject: Don't print an error message when RestoreBehavior is missing --- src/idevicerestore.c | 19 ++++++------------- 1 file 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); -- cgit v1.1-32-gdbae