diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-08-07 00:08:18 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-08-07 00:08:18 +0000 |
commit | c30a75a00717cefa35de93e0aa50bb48d5f7a5c3 (patch) | |
tree | 32d4c912d52119f02e2e8c8ca62e3b249879078f /fastboot/fastboot.cpp | |
parent | 0e947189c5a9493e9f2038446d880038024d184b (diff) | |
parent | dea91b4b5354af2f9470845cb05cca1207142c98 (diff) |
Merge "Add fastbootd."
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r-- | fastboot/fastboot.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 321e6bad7..fb06d19ee 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -1333,6 +1333,8 @@ int FastBootTool::Main(int argc, char* argv[]) { bool wants_wipe = false; bool wants_reboot = false; bool wants_reboot_bootloader = false; + bool wants_reboot_recovery = false; + bool wants_reboot_fastboot = false; bool skip_reboot = false; bool wants_set_active = false; bool skip_secondary = false; @@ -1555,6 +1557,12 @@ int FastBootTool::Main(int argc, char* argv[]) { if (what == "bootloader") { wants_reboot = false; wants_reboot_bootloader = true; + } else if (what == "recovery") { + wants_reboot = false; + wants_reboot_recovery = true; + } else if (what == "fastboot") { + wants_reboot = false; + wants_reboot_fastboot = true; } else { syntax_error("unknown reboot target %s", what.c_str()); } @@ -1563,6 +1571,10 @@ int FastBootTool::Main(int argc, char* argv[]) { if (!args.empty()) syntax_error("junk after reboot command"); } else if (command == "reboot-bootloader") { wants_reboot_bootloader = true; + } else if (command == "reboot-recovery") { + wants_reboot_recovery = true; + } else if (command == "reboot-fastboot") { + wants_reboot_fastboot = true; } else if (command == "continue") { fb_queue_command("continue", "resuming boot"); } else if (command == "boot") { @@ -1680,6 +1692,12 @@ int FastBootTool::Main(int argc, char* argv[]) { } else if (wants_reboot_bootloader) { fb_queue_command("reboot-bootloader", "rebooting into bootloader"); fb_queue_wait_for_disconnect(); + } else if (wants_reboot_recovery) { + fb_queue_command("reboot-recovery", "rebooting into recovery"); + fb_queue_wait_for_disconnect(); + } else if (wants_reboot_fastboot) { + fb_queue_command("reboot-fastboot", "rebooting into fastboot"); + fb_queue_wait_for_disconnect(); } int status = fb_execute_queue() ? EXIT_FAILURE : EXIT_SUCCESS; |