From 1c15165f9688a344c6f68af2a8c5874d2ed307b7 Mon Sep 17 00:00:00 2001 From: hydazz Date: Thu, 26 Nov 2026 23:44:34 +1100 Subject: restore: Allow the caller to select the post-restore action --- src/idevicerestore.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/idevicerestore.c') diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 61fa1be..23db769 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -1657,6 +1657,7 @@ void idevicerestore_client_free(struct idevicerestore_client_t* client) if (client->restore_boot_args) { free(client->restore_boot_args); } + free(client->post_restore_action); if (client->cache_dir) { free(client->cache_dir); } @@ -1716,6 +1717,14 @@ void idevicerestore_set_ipsw(struct idevicerestore_client_t* client, const char* } } +void idevicerestore_set_post_restore_action(struct idevicerestore_client_t* client, const char* action) +{ + if (!client) + return; + free(client->post_restore_action); + client->post_restore_action = action ? strdup(action) : NULL; +} + void idevicerestore_set_cache_path(struct idevicerestore_client_t* client, const char* path) { if (!client) -- cgit v1.1-32-gdbae