diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-08-14 23:25:50 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-08-14 23:25:50 +0200 |
commit | 19a531641298c9722f0c9a82e3f1e37d9d9ce99c (patch) | |
tree | de86583ed092366d56b5f4f7ba4a6db5b03bb28d /recovery.cpp | |
parent | Merge "recovery uses IHealth::getService" (diff) | |
parent | Add fastboot mode to recovery (diff) | |
download | android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.tar android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.tar.gz android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.tar.bz2 android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.tar.lz android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.tar.xz android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.tar.zst android_bootable_recovery-19a531641298c9722f0c9a82e3f1e37d9d9ce99c.zip |
Diffstat (limited to '')
-rw-r--r-- | recovery.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp index 129909549..01bd83b5e 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -779,6 +779,8 @@ static Device::BuiltinAction prompt_and_wait(Device* device, int status) { case Device::REBOOT: case Device::SHUTDOWN: case Device::REBOOT_BOOTLOADER: + case Device::ENTER_FASTBOOT: + case Device::ENTER_RECOVERY: return chosen_action; case Device::WIPE_DATA: @@ -995,6 +997,7 @@ static void log_failure_code(ErrorCode code, const std::string& update_package) Device::BuiltinAction start_recovery(Device* device, const std::vector<std::string>& args) { static constexpr struct option OPTIONS[] = { + { "fastboot", no_argument, nullptr, 0 }, { "fsck_unshare_blocks", no_argument, nullptr, 0 }, { "just_exit", no_argument, nullptr, 'x' }, { "locale", required_argument, nullptr, 0 }, @@ -1049,7 +1052,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri std::string option = OPTIONS[option_index].name; if (option == "fsck_unshare_blocks") { fsck_unshare_blocks = true; - } else if (option == "locale") { + } else if (option == "locale" || option == "fastboot") { // Handled in recovery_main.cpp } else if (option == "prompt_and_wipe_data") { should_prompt_and_wipe_data = true; |