diff options
author | Nikias Bassen | 2011-01-08 14:41:28 +0100 |
---|---|---|
committer | Martin Szulecki | 2011-04-11 19:42:19 +0200 |
commit | 850df2c4188541109b2d08a6b8ae2c627da21d78 (patch) | |
tree | 3f0950c04572d3e5365afa936d39611c9461a6d7 /tools/idevicebackup4.c | |
parent | 8bfed346a7b7349fe8f4d405ab5b1971ffba33c7 (diff) | |
download | libimobiledevice-850df2c4188541109b2d08a6b8ae2c627da21d78.tar.gz libimobiledevice-850df2c4188541109b2d08a6b8ae2c627da21d78.tar.bz2 |
idevicebackup4: improve error handling a bit
Diffstat (limited to 'tools/idevicebackup4.c')
-rw-r--r-- | tools/idevicebackup4.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/idevicebackup4.c b/tools/idevicebackup4.c index 519b511..af798c0 100644 --- a/tools/idevicebackup4.c +++ b/tools/idevicebackup4.c @@ -1544,7 +1544,6 @@ checkpoint: printf("Full backup mode.\n"); else printf("Incremental backup mode.\n"); - //printf("Please wait. Device is preparing backup data...\n"); } else { if (err == MOBILEBACKUP2_E_BAD_VERSION) { printf("ERROR: Could not start backup process: backup protocol version mismatch!\n"); @@ -1553,7 +1552,7 @@ checkpoint: } else { printf("ERROR: Could not start backup process: unspecified error occured\n"); } - break; + cmd = CMD_LEAVE; } break; case CMD_RESTORE: @@ -1573,6 +1572,13 @@ checkpoint: err = mobilebackup2_send_request(mobilebackup2, "Restore", uuid, uuid, opts); plist_free(opts); if (err != MOBILEBACKUP2_E_SUCCESS) { + if (err == MOBILEBACKUP2_E_BAD_VERSION) { + printf("ERROR: Could not start restore process: backup protocol version mismatch!\n"); + } else if (err == MOBILEBACKUP2_E_REPLY_NOT_OK) { + printf("ERROR: Could not start restore process: device refused to start the restore process.\n"); + } else { + printf("ERROR: Could not start restore process: unspecified error occured\n"); + } cmd = CMD_LEAVE; } break; @@ -1580,6 +1586,7 @@ checkpoint: printf("Requesting backup info from device...\n"); err = mobilebackup2_send_request(mobilebackup2, "Info", uuid, NULL, NULL); if (err != MOBILEBACKUP2_E_SUCCESS) { + printf("Error requesting backup info from device, error code %d\n", err); cmd = CMD_LEAVE; } break; @@ -1587,6 +1594,7 @@ checkpoint: printf("Requesting backup list from device...\n"); err = mobilebackup2_send_request(mobilebackup2, "List", uuid, NULL, NULL); if (err != MOBILEBACKUP2_E_SUCCESS) { + printf("Error requesting backup list from device, error code %d\n", err); cmd = CMD_LEAVE; } break; |