Merge "Implement Reboot bootloader via bootloader_message" am: e759c83bde

am: d1b560c6f9

Change-Id: Ie57df293a41803c62cc8a9226c238047236b4592
This commit is contained in:
Vineela Tummalapalli 2016-11-10 02:58:22 +00:00 committed by android-build-merger
commit 5cd910acfc

View file

@ -708,6 +708,15 @@ static int do_powerctl(const std::vector<std::string>& args) {
callback_on_ro_remount = unmount_and_fsck;
} else if (cmd == ANDROID_RB_RESTART2) {
reboot_target = &command[len + 1];
// When rebooting to the bootloader notify the bootloader writing
// also the BCB.
if (strcmp(reboot_target, "bootloader") == 0) {
std::string err;
if (!write_reboot_bootloader(&err)) {
LOG(ERROR) << "reboot-bootloader: Error writing "
"bootloader_message: " << err;
}
}
}
} else if (command[len] != '\0') {
LOG(ERROR) << "powerctl: unrecognized reboot target '" << &command[len] << "'";