diff options
| author | 2010-01-25 15:40:47 +0100 | |
|---|---|---|
| committer | 2010-01-25 15:40:47 +0100 | |
| commit | 3e4694043b0767acede31102f403b4ee8cbb076e (patch) | |
| tree | 569a69375a0aea6b2b4f55275ff1e0faa69477bd /tools | |
| parent | e5d42da1321fa6c29363c97188d7e6148083ae64 (diff) | |
| download | libimobiledevice-3e4694043b0767acede31102f403b4ee8cbb076e.tar.gz libimobiledevice-3e4694043b0767acede31102f403b4ee8cbb076e.tar.bz2 | |
Use backup_ok to depict final backup success status in iphonebackup
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/iphonebackup.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/iphonebackup.c b/tools/iphonebackup.c index f7f1ff1..3fe3a3f 100644 --- a/tools/iphonebackup.c +++ b/tools/iphonebackup.c | |||
| @@ -420,6 +420,9 @@ int main(int argc, char *argv[]) | |||
| 420 | break; | 420 | break; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | /* reset backup status */ | ||
| 424 | backup_ok = 0; | ||
| 425 | |||
| 423 | /* receive and save DLSendFile files and metadata, ACK each */ | 426 | /* receive and save DLSendFile files and metadata, ACK each */ |
| 424 | int file_index = 0; | 427 | int file_index = 0; |
| 425 | uint64_t backup_real_size = 0; | 428 | uint64_t backup_real_size = 0; |
| @@ -600,13 +603,19 @@ int main(int argc, char *argv[]) | |||
| 600 | printf("Storing Manifest.plist...\n"); | 603 | printf("Storing Manifest.plist...\n"); |
| 601 | plist_write_to_filename(manifest_plist, manifest_path, PLIST_FORMAT_XML); | 604 | plist_write_to_filename(manifest_plist, manifest_path, PLIST_FORMAT_XML); |
| 602 | } | 605 | } |
| 603 | 606 | ||
| 604 | /* create: Status.plist (Info on how the backup process turned out) */ | 607 | backup_ok = 1; |
| 605 | printf("Backup Successful.\n"); | ||
| 606 | mobilebackup_write_status(backup_directory, 1); | ||
| 607 | } | 608 | } |
| 608 | } | 609 | } |
| 609 | 610 | ||
| 611 | if (backup_ok) { | ||
| 612 | /* create: Status.plist (Info on how the backup process turned out) */ | ||
| 613 | printf("Backup Successful.\n"); | ||
| 614 | mobilebackup_write_status(backup_directory, 1); | ||
| 615 | } else { | ||
| 616 | printf("Backup Failed.\n"); | ||
| 617 | } | ||
| 618 | |||
| 610 | if (manifest_path) | 619 | if (manifest_path) |
| 611 | g_free(manifest_path); | 620 | g_free(manifest_path); |
| 612 | 621 | ||
