summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar hydazz2026-11-26 23:55:58 +1100
committerGravatar hydazz2026-11-27 11:35:37 +1100
commit5adea9ba8c08dd406d9fc833612859ecedfaf5ec (patch)
tree630bb51c992afac88e983547447becc5388d6365 /src/idevicerestore.c
parent1c15165f9688a344c6f68af2a8c5874d2ed307b7 (diff)
downloadidevicerestore-5adea9ba8c08dd406d9fc833612859ecedfaf5ec.tar.gz
idevicerestore-5adea9ba8c08dd406d9fc833612859ecedfaf5ec.tar.bz2
restore: Expose the final status received from restored
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c10
1 files changed, 10 insertions, 0 deletions
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)