From d323e9ccdf3919de51513d291982d3c002528f0f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 30 Sep 2019 00:52:57 +0200 Subject: idevicebackup2: Only print device reboot message if restore was successful --- tools/idevicebackup2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 3a4de67..10fad81 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -1409,7 +1409,7 @@ static void print_usage(int argc, char **argv) printf(" --full\t\tforce full backup from device.\n"); printf(" restore\trestore last backup to the device\n"); printf(" --system\t\trestore system files, too.\n"); - printf(" --no-reboot\t\tdo NOT reboot the system when done (default: yes).\n"); + printf(" --no-reboot\t\tdo NOT reboot the device when done (default: yes).\n"); printf(" --copy\t\tcreate a copy of backup folder before restoring.\n"); printf(" --settings\t\trestore device settings from the backup.\n"); printf(" --remove\t\tremove items which are not being restored\n"); @@ -2499,9 +2499,9 @@ files_out: } break; case CMD_RESTORE: - if ((cmd_flags & CMD_FLAG_RESTORE_NO_REBOOT) == 0) - PRINT_VERBOSE(1, "The device should reboot now.\n"); if (operation_ok) { + if ((cmd_flags & CMD_FLAG_RESTORE_NO_REBOOT) == 0) + PRINT_VERBOSE(1, "The device should reboot now.\n"); PRINT_VERBOSE(1, "Restore Successful.\n"); } else { PRINT_VERBOSE(1, "Restore Failed (Error Code %d).\n", -result_code); -- cgit v1.1-32-gdbae