Skip to content

Commit

Permalink
Improve debug output by suppressing libimobiledevice and libirecovery…
Browse files Browse the repository at this point in the history
… debug output by default

To get libimobiledevice and libirecovery output, add -d or --debug twice.
  • Loading branch information
nikias committed Oct 7, 2023
1 parent 6806495 commit 503bdd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct idevicerestore_entry_t {

struct idevicerestore_client_t {
int flags;
int debug_level;
plist_t tss;
plist_t tss_localpolicy;
plist_t tss_recoveryos_root_ticket;
Expand Down
9 changes: 6 additions & 3 deletions src/idevicerestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,12 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
return -1;
}

if (client->flags & FLAG_DEBUG) {
idevice_set_debug_level(1);
irecv_set_debug_level(1);
if (client->debug_level > 0) {
idevicerestore_debug = 1;
if (client->debug_level > 1) {
idevice_set_debug_level(1);
irecv_set_debug_level(1);
}
}

idevicerestore_progress(client, RESTORE_STEP_DETECT, 0.0);
Expand Down Expand Up @@ -1483,6 +1485,7 @@ int main(int argc, char* argv[]) {

case 'd':
client->flags |= FLAG_DEBUG;
client->debug_level++;
break;

case 'e':
Expand Down

0 comments on commit 503bdd0

Please sign in to comment.