recovery: allow the user to cancel the recovery process
https://jira.digi.com/browse/DEL-6982 Signed-off-by: Francisco Gil Martinez <francisco.gilmartinez@digi.com>
This commit is contained in:
parent
2e30987a7e
commit
f99ae24162
|
|
@ -175,6 +175,12 @@ int reboot_recovery(unsigned int reboot_timeout)
|
|||
|
||||
sync();
|
||||
|
||||
printf("\nThe recovery commands have been properly configured and "
|
||||
"the system will reboot into recovery mode in %d seconds "
|
||||
"(^C to cancel).\n\n", reboot_timeout);
|
||||
fflush(stdout);
|
||||
sleep(reboot_timeout);
|
||||
|
||||
/* Configure system to boot into recovery mode */
|
||||
ret = uboot_setenv("boot_recovery", "yes");
|
||||
if (ret) {
|
||||
|
|
@ -182,11 +188,6 @@ int reboot_recovery(unsigned int reboot_timeout)
|
|||
goto err;
|
||||
}
|
||||
|
||||
printf("\nThe recovery commands have been properly configured and "
|
||||
"the system will reboot into recovery mode in %d seconds "
|
||||
"(^C to cancel).\n\n", reboot_timeout);
|
||||
fflush(stdout);
|
||||
sleep(reboot_timeout);
|
||||
reboot(RB_AUTOBOOT);
|
||||
|
||||
err:
|
||||
|
|
|
|||
Loading…
Reference in New Issue