diff options
author | Mark Salyzyn <salyzyn@google.com> | 2019-05-21 22:32:30 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-05-21 22:32:30 +0200 |
commit | d77641069efa9735185edc09dc58d6d7ec400290 (patch) | |
tree | 8819e4f59cb4b5b0932d909fd299bcc955ef986c /recovery_main.cpp | |
parent | Merge "Add UpdaterRuntime class" am: e7b3c5698e (diff) | |
parent | Merge "recovery: report compliant reboot reason" (diff) | |
download | android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.tar android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.tar.gz android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.tar.bz2 android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.tar.lz android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.tar.xz android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.tar.zst android_bootable_recovery-d77641069efa9735185edc09dc58d6d7ec400290.zip |
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r-- | recovery_main.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp index aba9c5d75..f78c1c788 100644 --- a/recovery_main.cpp +++ b/recovery_main.cpp @@ -471,7 +471,12 @@ int main(int argc, char** argv) { switch (ret) { case Device::SHUTDOWN: ui->Print("Shutting down...\n"); - Shutdown(); + Shutdown("recovery"); + break; + + case Device::SHUTDOWN_FROM_FASTBOOT: + ui->Print("Shutting down...\n"); + Shutdown("fastboot"); break; case Device::REBOOT_BOOTLOADER: @@ -520,9 +525,19 @@ int main(int argc, char** argv) { fastboot = false; break; + case Device::REBOOT: + ui->Print("Rebooting...\n"); + Reboot("recovery_menu"); + break; + + case Device::REBOOT_FROM_FASTBOOT: + ui->Print("Rebooting...\n"); + Reboot("fastboot_menu"); + break; + default: ui->Print("Rebooting...\n"); - Reboot(""); + Reboot("unknown" + std::to_string(ret)); break; } } |