From 78517a7df8d15480cdac22682b8b071c511f19cc Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 17:52:27 +0200 Subject: main: Return -2 error code if error might be fixed by running restore again --- src/idevicerestore.c | 8 ++++---- src/restore.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 59d4a14..b53ebbd 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -373,7 +373,7 @@ int main(int argc, char* argv[]) { if (client->mode->index == MODE_RESTORE) { if (restore_reboot(client) < 0) { error("ERROR: Unable to exit restore mode\n"); - return -1; + return -2; } // we need to refresh the current mode again @@ -700,7 +700,7 @@ int main(int argc, char* argv[]) { plist_free(client->tss); if (filesystem) unlink(filesystem); - return -1; + return -2; } } @@ -712,7 +712,7 @@ int main(int argc, char* argv[]) { error("ERROR: Unable to send iBEC\n"); if (filesystem) unlink(filesystem); - return -1; + return -2; } recovery_client_free(client); @@ -786,7 +786,7 @@ int main(int argc, char* argv[]) { plist_free(client->tss); if (filesystem) unlink(filesystem); - return -1; + return -2; } info("waiting for device...\n"); diff --git a/src/restore.c b/src/restore.c index fc02a2c..f0e79c6 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1382,7 +1382,7 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit // open our connection to the device and verify we're in restore mode if (restore_open_with_timeout(client) < 0) { error("ERROR: Unable to open device in restore mode\n"); - return -1; + return -2; } info("Device has successfully entered restore mode\n"); -- cgit v1.1-32-gdbae