summaryrefslogtreecommitdiffstats
path: root/otautil/sysutil.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2020-03-19 00:49:15 +0100
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-19 00:49:15 +0100
commit32d28f90f08c8f151d7c018b1921e3672da7f8c6 (patch)
tree00ee997b3bfb0ea0243b38de336eec8593ac3f2c /otautil/sysutil.cpp
parentMerge "Add more mounting options to updater mount function." into rvc-dev am: 342e53d045 (diff)
parentConsolidate the wait in recovery's reboot (diff)
downloadandroid_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.tar
android_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.tar.gz
android_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.tar.bz2
android_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.tar.lz
android_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.tar.xz
android_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.tar.zst
android_bootable_recovery-32d28f90f08c8f151d7c018b1921e3672da7f8c6.zip
Diffstat (limited to 'otautil/sysutil.cpp')
-rw-r--r--otautil/sysutil.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/otautil/sysutil.cpp b/otautil/sysutil.cpp
index 6cd46c6a9..b3ead9736 100644
--- a/otautil/sysutil.cpp
+++ b/otautil/sysutil.cpp
@@ -219,14 +219,18 @@ MemMapping::~MemMapping() {
ranges_.clear();
}
-bool Reboot(std::string_view target) {
+void Reboot(std::string_view target) {
std::string cmd = "reboot," + std::string(target);
// Honor the quiescent mode if applicable.
if (target != "bootloader" && target != "fastboot" &&
android::base::GetBoolProperty("ro.boot.quiescent", false)) {
cmd += ",quiescent";
}
- return android::base::SetProperty(ANDROID_RB_PROPERTY, cmd);
+ if (!android::base::SetProperty(ANDROID_RB_PROPERTY, cmd)) {
+ LOG(FATAL) << "Reboot failed";
+ }
+
+ while (true) pause();
}
bool Shutdown(std::string_view target) {