summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot2016-11-09 20:43:08 -0600
committerGerrit Code Review2016-11-09 20:43:08 -0600
commite759c83bdec4fd773c63e3e162b45f29740f024e (patch)
tree2d14c10f3993714a12bd79894c1377f54659b3da
parent5782f7271179fbdd0e0f027aa67fbff4a526d6f0 (diff)
parent039734c7deba32a5f6d27a31dcfdc0a9fa19b0fb (diff)
downloadplatform-system-core-e759c83bdec4fd773c63e3e162b45f29740f024e.tar.gz
platform-system-core-e759c83bdec4fd773c63e3e162b45f29740f024e.tar.xz
platform-system-core-e759c83bdec4fd773c63e3e162b45f29740f024e.zip
Merge "Implement Reboot bootloader via bootloader_message"
-rw-r--r--init/builtins.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index f37ccc2fe..3e50f4da8 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -703,6 +703,15 @@ static int do_powerctl(const std::vector<std::string>& args) {
703 callback_on_ro_remount = unmount_and_fsck; 703 callback_on_ro_remount = unmount_and_fsck;
704 } else if (cmd == ANDROID_RB_RESTART2) { 704 } else if (cmd == ANDROID_RB_RESTART2) {
705 reboot_target = &command[len + 1]; 705 reboot_target = &command[len + 1];
706 // When rebooting to the bootloader notify the bootloader writing
707 // also the BCB.
708 if (strcmp(reboot_target, "bootloader") == 0) {
709 std::string err;
710 if (!write_reboot_bootloader(&err)) {
711 LOG(ERROR) << "reboot-bootloader: Error writing "
712 "bootloader_message: " << err;
713 }
714 }
706 } 715 }
707 } else if (command[len] != '\0') { 716 } else if (command[len] != '\0') {
708 LOG(ERROR) << "powerctl: unrecognized reboot target '" << &command[len] << "'"; 717 LOG(ERROR) << "powerctl: unrecognized reboot target '" << &command[len] << "'";