summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-10-07 02:33:03 +0200
committerGravatar Nikias Bassen2023-10-07 02:33:03 +0200
commit503bdd01f5e9f16c583ebff343edee8bfaf3f572 (patch)
treebd9a70ebf1b98ee6fdcc2fbfbdda093a11586ba0 /src/idevicerestore.c
parent6806495ca7df744f635be515c5cdf938ad49ea82 (diff)
downloadidevicerestore-503bdd01f5e9f16c583ebff343edee8bfaf3f572.tar.gz
idevicerestore-503bdd01f5e9f16c583ebff343edee8bfaf3f572.tar.bz2
Improve debug output by suppressing libimobiledevice and libirecovery debug output by default
To get libimobiledevice and libirecovery output, add -d or --debug twice.
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 7b69a9f..56207a0 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -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);
@@ -1483,6 +1485,7 @@ int main(int argc, char* argv[]) {
case 'd':
client->flags |= FLAG_DEBUG;
+ client->debug_level++;
break;
case 'e':