diff options
author | Hridya Valsaraju <hridya@google.com> | 2018-08-15 02:25:21 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-08-15 02:25:21 +0200 |
commit | 95d7e47d0112134481d1a7cd3782ffd747b023bb (patch) | |
tree | de86583ed092366d56b5f4f7ba4a6db5b03bb28d /recovery.cpp | |
parent | Merge "recovery uses IHealth::getService" am: ce2f0d85fb am: c7c56f0e90 (diff) | |
parent | Merge "Add fastboot mode to recovery" am: 19a5316412 (diff) | |
download | android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.tar android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.tar.gz android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.tar.bz2 android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.tar.lz android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.tar.xz android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.tar.zst android_bootable_recovery-95d7e47d0112134481d1a7cd3782ffd747b023bb.zip |
Diffstat (limited to 'recovery.cpp')
-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; |