From 5adea9ba8c08dd406d9fc833612859ecedfaf5ec Mon Sep 17 00:00:00 2001 From: hydazz Date: Thu, 26 Nov 2026 23:55:58 +1100 Subject: restore: Expose the final status received from restored --- src/idevicerestore.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/idevicerestore.c') diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 23db769..c1162a9 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -370,6 +370,8 @@ int idevicerestore_start(struct idevicerestore_client_t* client) return -1; } + client->final_status_received = 0; + if ((client->flags & FLAG_LATEST) && (client->flags & FLAG_CUSTOM)) { logger(LL_ERROR, "FLAG_LATEST cannot be used with FLAG_CUSTOM.\n"); return -1; @@ -1717,6 +1719,14 @@ void idevicerestore_set_ipsw(struct idevicerestore_client_t* client, const char* } } +int idevicerestore_get_final_status(struct idevicerestore_client_t* client, uint64_t* status) +{ + if (!client || !status || !client->final_status_received) + return -1; + *status = client->final_status; + return 0; +} + void idevicerestore_set_post_restore_action(struct idevicerestore_client_t* client, const char* action) { if (!client) -- cgit v1.1-32-gdbae