summaryrefslogtreecommitdiffstats
path: root/otautil/sysutil.cpp
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-15 00:45:53 +0100
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-15 00:45:53 +0100
commit4b4739467cca06d8ff31301d67ab6eeb12eca7a4 (patch)
treeceb1f2b9782fe6be040a97bcb9cc92b25667b590 /otautil/sysutil.cpp
parentMerge "recovery: Remove HOST_OS guard for f2fs tools" am: 95101e7fca am: a233cb1261 am: b28d0cdbfa am: 0cd00c21be (diff)
parentMerge "Consolidate the wait in recovery's reboot" am: a69c69b26f am: 737a2e41bd am: 2bc65f82f6 (diff)
downloadandroid_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.tar
android_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.tar.gz
android_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.tar.bz2
android_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.tar.lz
android_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.tar.xz
android_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.tar.zst
android_bootable_recovery-4b4739467cca06d8ff31301d67ab6eeb12eca7a4.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) {