summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fastboot/fastboot.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 3f8bc8f3a..f970e683b 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -358,7 +358,7 @@ static void usage() {
358 " devices [-l] List all connected devices [with\n" 358 " devices [-l] List all connected devices [with\n"
359 " device paths].\n" 359 " device paths].\n"
360 " continue Continue with autoboot.\n" 360 " continue Continue with autoboot.\n"
361 " reboot [bootloader] Reboot device [into bootloader].\n" 361 " reboot [bootloader|emergency] Reboot device [into bootloader or emergency mode].\n"
362 " reboot-bootloader Reboot device into bootloader.\n" 362 " reboot-bootloader Reboot device into bootloader.\n"
363 " help Show this help message.\n" 363 " help Show this help message.\n"
364 "\n" 364 "\n"
@@ -1397,6 +1397,7 @@ int main(int argc, char **argv)
1397 bool wants_wipe = false; 1397 bool wants_wipe = false;
1398 bool wants_reboot = false; 1398 bool wants_reboot = false;
1399 bool wants_reboot_bootloader = false; 1399 bool wants_reboot_bootloader = false;
1400 bool wants_reboot_emergency = false;
1400 bool skip_reboot = false; 1401 bool skip_reboot = false;
1401 bool wants_set_active = false; 1402 bool wants_set_active = false;
1402 bool skip_secondary = false; 1403 bool skip_secondary = false;
@@ -1648,6 +1649,11 @@ int main(int argc, char **argv)
1648 wants_reboot_bootloader = true; 1649 wants_reboot_bootloader = true;
1649 skip(1); 1650 skip(1);
1650 } 1651 }
1652 if (!strcmp(*argv, "emergency")) {
1653 wants_reboot = false;
1654 wants_reboot_emergency = true;
1655 skip(1);
1656 }
1651 } 1657 }
1652 require(0); 1658 require(0);
1653 } else if(!strcmp(*argv, "reboot-bootloader")) { 1659 } else if(!strcmp(*argv, "reboot-bootloader")) {
@@ -1807,6 +1813,9 @@ int main(int argc, char **argv)
1807 } else if (wants_reboot_bootloader) { 1813 } else if (wants_reboot_bootloader) {
1808 fb_queue_command("reboot-bootloader", "rebooting into bootloader"); 1814 fb_queue_command("reboot-bootloader", "rebooting into bootloader");
1809 fb_queue_wait_for_disconnect(); 1815 fb_queue_wait_for_disconnect();
1816 } else if (wants_reboot_emergency) {
1817 fb_queue_command("reboot-emergency", "rebooting into emergency download (EDL) mode");
1818 fb_queue_wait_for_disconnect();
1810 } 1819 }
1811 1820
1812 return fb_execute_queue(transport) ? EXIT_FAILURE : EXIT_SUCCESS; 1821 return fb_execute_queue(transport) ? EXIT_FAILURE : EXIT_SUCCESS;