summaryrefslogtreecommitdiffstats
path: root/recovery_main.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2019-05-28 18:17:51 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-05-28 18:17:51 +0200
commit7d0545f14a707584a50f8aa93eb73966cfabba4c (patch)
tree10cea79238aaa7329865c8fecc1ea50d3b4409b8 /recovery_main.cpp
parentMerge "Some clean ups to the updater" (diff)
parentMerge "recovery: report compliant reboot reason (Part Deux)" (diff)
downloadandroid_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.tar
android_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.tar.gz
android_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.tar.bz2
android_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.tar.lz
android_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.tar.xz
android_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.tar.zst
android_bootable_recovery-7d0545f14a707584a50f8aa93eb73966cfabba4c.zip
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r--recovery_main.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp
index aba9c5d75..7fbdf9a08 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("userrequested,recovery");
+ break;
+
+ case Device::SHUTDOWN_FROM_FASTBOOT:
+ ui->Print("Shutting down...\n");
+ Shutdown("userrequested,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("userrequested,recovery");
+ break;
+
+ case Device::REBOOT_FROM_FASTBOOT:
+ ui->Print("Rebooting...\n");
+ Reboot("userrequested,fastboot");
+ break;
+
default:
ui->Print("Rebooting...\n");
- Reboot("");
+ Reboot("unknown" + std::to_string(ret));
break;
}
}