diff options
| author | 2011-04-28 00:41:11 +0200 | |
|---|---|---|
| committer | 2011-04-28 00:41:11 +0200 | |
| commit | ae730c3c9105f6a9b9bc2fe0944edce45c05071e (patch) | |
| tree | bd973e2b6a907d45dfc5c74c8228476653fb54c5 /tools | |
| parent | bb342d792c06be6968b2b14fd24bec39ee00fc51 (diff) | |
| download | libimobiledevice-ae730c3c9105f6a9b9bc2fe0944edce45c05071e.tar.gz libimobiledevice-ae730c3c9105f6a9b9bc2fe0944edce45c05071e.tar.bz2 | |
idevicebackup2: Invert restore --nocopy argument to --copy
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicebackup2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 9d7c5fc..fbe02f8 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -74,7 +74,7 @@ enum plist_format_t { | |||
| 74 | enum cmd_flags { | 74 | enum cmd_flags { |
| 75 | CMD_FLAG_RESTORE_SYSTEM_FILES = 0, | 75 | CMD_FLAG_RESTORE_SYSTEM_FILES = 0, |
| 76 | CMD_FLAG_RESTORE_REBOOT = (1 << 1), | 76 | CMD_FLAG_RESTORE_REBOOT = (1 << 1), |
| 77 | CMD_FLAG_RESTORE_DONT_COPY_BACKUP = (1 << 2), | 77 | CMD_FLAG_RESTORE_COPY_BACKUP = (1 << 2), |
| 78 | CMD_FLAG_RESTORE_SETTINGS = (1 << 3) | 78 | CMD_FLAG_RESTORE_SETTINGS = (1 << 3) |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| @@ -1067,7 +1067,7 @@ static void print_usage(int argc, char **argv) | |||
| 1067 | printf(" restore\trestore last backup to the device\n"); | 1067 | printf(" restore\trestore last backup to the device\n"); |
| 1068 | printf(" --system\trestore system files, too.\n"); | 1068 | printf(" --system\trestore system files, too.\n"); |
| 1069 | printf(" --reboot\treboot the system when done.\n"); | 1069 | printf(" --reboot\treboot the system when done.\n"); |
| 1070 | printf(" --nocopy\tdo not copy backup folder before restoring.\n"); | 1070 | printf(" --copy\tcreate a copy of backup folder before restoring.\n"); |
| 1071 | printf(" --settings\trestore device settings from the backup.\n"); | 1071 | printf(" --settings\trestore device settings from the backup.\n"); |
| 1072 | printf(" info\t\tshow details about last completed backup of device\n"); | 1072 | printf(" info\t\tshow details about last completed backup of device\n"); |
| 1073 | printf(" list\t\tlist files of last completed backup in CSV format\n"); | 1073 | printf(" list\t\tlist files of last completed backup in CSV format\n"); |
| @@ -1133,8 +1133,8 @@ int main(int argc, char *argv[]) | |||
| 1133 | else if (!strcmp(argv[i], "--reboot")) { | 1133 | else if (!strcmp(argv[i], "--reboot")) { |
| 1134 | cmd_flags |= CMD_FLAG_RESTORE_REBOOT; | 1134 | cmd_flags |= CMD_FLAG_RESTORE_REBOOT; |
| 1135 | } | 1135 | } |
| 1136 | else if (!strcmp(argv[i], "--nocopy")) { | 1136 | else if (!strcmp(argv[i], "--copy")) { |
| 1137 | cmd_flags |= CMD_FLAG_RESTORE_DONT_COPY_BACKUP; | 1137 | cmd_flags |= CMD_FLAG_RESTORE_COPY_BACKUP; |
| 1138 | } | 1138 | } |
| 1139 | else if (!strcmp(argv[i], "--settings")) { | 1139 | else if (!strcmp(argv[i], "--settings")) { |
| 1140 | cmd_flags |= CMD_FLAG_RESTORE_SETTINGS; | 1140 | cmd_flags |= CMD_FLAG_RESTORE_SETTINGS; |
| @@ -1390,9 +1390,9 @@ checkpoint: | |||
| 1390 | if ((cmd_flags & CMD_FLAG_RESTORE_REBOOT) == 0) | 1390 | if ((cmd_flags & CMD_FLAG_RESTORE_REBOOT) == 0) |
| 1391 | plist_dict_insert_item(opts, "RestoreShouldReboot", plist_new_bool(0)); | 1391 | plist_dict_insert_item(opts, "RestoreShouldReboot", plist_new_bool(0)); |
| 1392 | PRINT_VERBOSE(1, "Rebooting after restore: %s\n", (cmd_flags & CMD_FLAG_RESTORE_REBOOT ? "Yes":"No")); | 1392 | PRINT_VERBOSE(1, "Rebooting after restore: %s\n", (cmd_flags & CMD_FLAG_RESTORE_REBOOT ? "Yes":"No")); |
| 1393 | if (cmd_flags & CMD_FLAG_RESTORE_DONT_COPY_BACKUP) | 1393 | if ((cmd_flags & CMD_FLAG_RESTORE_COPY_BACKUP) == 0) |
| 1394 | plist_dict_insert_item(opts, "RestoreDontCopyBackup", plist_new_bool(1)); | 1394 | plist_dict_insert_item(opts, "RestoreDontCopyBackup", plist_new_bool(1)); |
| 1395 | PRINT_VERBOSE(1, "Don't copy backup: %s\n", (cmd_flags & CMD_FLAG_RESTORE_DONT_COPY_BACKUP ? "Yes":"No")); | 1395 | PRINT_VERBOSE(1, "Don't copy backup: %s\n", ((cmd_flags & CMD_FLAG_RESTORE_COPY_BACKUP) == 0 ? "Yes":"No")); |
| 1396 | plist_dict_insert_item(opts, "RestorePreserveSettings", plist_new_bool((cmd_flags & CMD_FLAG_RESTORE_SETTINGS) == 0)); | 1396 | plist_dict_insert_item(opts, "RestorePreserveSettings", plist_new_bool((cmd_flags & CMD_FLAG_RESTORE_SETTINGS) == 0)); |
| 1397 | PRINT_VERBOSE(1, "Preserve settings of device: %s\n", ((cmd_flags & CMD_FLAG_RESTORE_SETTINGS) == 0 ? "Yes":"No")); | 1397 | PRINT_VERBOSE(1, "Preserve settings of device: %s\n", ((cmd_flags & CMD_FLAG_RESTORE_SETTINGS) == 0 ? "Yes":"No")); |
| 1398 | 1398 | ||
