summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 1e7cd6f..7f545ed 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -1739,6 +1739,20 @@ void build_identity_print_information(plist_t build_identity) {
node = NULL;
}
+int build_identity_has_component(plist_t build_identity, const char* component) {
+ plist_t manifest_node = plist_dict_get_item(build_identity, "Manifest");
+ if (!manifest_node || plist_get_node_type(manifest_node) != PLIST_DICT) {
+ return -1;
+ }
+
+ plist_t component_node = plist_dict_get_item(manifest_node, component);
+ if (!component_node || plist_get_node_type(component_node) != PLIST_DICT) {
+ return -1;
+ }
+
+ return 0;
+}
+
int build_identity_get_component_path(plist_t build_identity, const char* component, char** path) {
char* filename = NULL;