diff options
author | Martin Szulecki | 2010-07-09 23:35:13 +0200 |
---|---|---|
committer | Martin Szulecki | 2010-07-09 23:35:13 +0200 |
commit | 9a404feafc3a738d5aad999491c6c0fd23b4da01 (patch) | |
tree | b7c1c4d5f79c8a5ce8b7d90da59a23970940af96 /src/restore.c | |
parent | 333b7b972a52162de00940dfa75a2cbd87efd9de (diff) | |
download | idevicerestore-9a404feafc3a738d5aad999491c6c0fd23b4da01.tar.gz idevicerestore-9a404feafc3a738d5aad999491c6c0fd23b4da01.tar.bz2 |
Add more known status messages and report them
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/restore.c b/src/restore.c index 40b24d3..4b5d0fd 100644 --- a/src/restore.c +++ b/src/restore.c @@ -348,8 +348,27 @@ int restore_handle_progress_msg(restored_client_t client, plist_t msg) { } int restore_handle_status_msg(restored_client_t client, plist_t msg) { + uint64_t value = 0; info("Got status message\n"); debug_plist(msg); + + plist_t node = plist_dict_get_item(msg, "Status"); + plist_get_uint_val(node, &value); + + switch(value) { + case 0: + info("Status: Restore Finished\n"); + break; + case 6: + info("Status: Disk Failure\n"); + break; + case 14: + info("Status: Fail\n"); + break; + default: + info("Unknown status message.\n"); + } + return 0; } @@ -366,8 +385,7 @@ int restore_send_filesystem(idevice_t device, const char* filesystem) { } info("Connected to ASR\n"); - // we don't really need to do anything with this, - // we're just clearing the output buffer + /* receive Initiate command message */ if (asr_receive(asr, &data) < 0) { error("ERROR: Unable to receive data from ASR\n"); asr_close(asr); |