diff options
author | Nikias Bassen | 2023-10-04 14:39:20 +0200 |
---|---|---|
committer | Nikias Bassen | 2023-10-04 14:39:20 +0200 |
commit | 7e5860d249441d0b45e50de2b46475432e3fc908 (patch) | |
tree | 898a73544865e7c0e386fe2e0622a876dd1040ba /src | |
parent | 1405a9f501e023b7edaa2829c0a2254235332703 (diff) | |
download | idevicerestore-7e5860d249441d0b45e50de2b46475432e3fc908.tar.gz idevicerestore-7e5860d249441d0b45e50de2b46475432e3fc908.tar.bz2 |
restore: Improve checkpoint log output again, make sure to always check for errors
Turns out even with a CHECKPOINT_RESULT of 0 we can still have a
CHECKPOINT_ERROR string.
Diffstat (limited to 'src')
-rw-r--r-- | src/restore.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/restore.c b/src/restore.c index 320d5f0..26a93a0 100644 --- a/src/restore.c +++ b/src/restore.c @@ -4465,11 +4465,14 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit plist_get_bool_val(node, &ckpt_complete); } - info("Checkpoint %s id: 0x%" PRIX64 " (%s)\n", (ckpt_complete) ? "completed" : "started ", ckpt_id, ckpt_name); - if (ckpt_res != 0) { - node = plist_dict_get_item(message, "CHECKPOINT_ERROR"); - const char* ckpt_error = (node) ? plist_get_string_ptr(node, NULL) : "(unknown)"; - info("Checkpoint FAILED id: 0x%" PRIX64 " error %"PRIi64": %s\n", ckpt_id, ckpt_res, ckpt_error); + if (ckpt_complete) { + info("Checkpoint completed id: 0x%" PRIX64 " (%s) result=%" PRIi64 "\n", ckpt_id, ckpt_name, ckpt_res); + } else { + info("Checkpoint started id: 0x%" PRIX64 " (%s)\n", ckpt_id, ckpt_name); + } + node = plist_dict_get_item(message, "CHECKPOINT_ERROR"); + if (node) { + info("Checkpoint FAILURE id: 0x%" PRIX64 " result=%" PRIi64 ": %s\n", ckpt_id, ckpt_res, plist_get_string_ptr(node, NULL)); } } |