Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 039734c7 authored by Vineela Tummalapalli's avatar Vineela Tummalapalli Committed by Alex Deymo
Browse files

Implement Reboot bootloader via bootloader_message

 - Write reboot bootloader message to misc
 - Clarify naming for reboot to recovery

BUG: https://issuetracker.google.com/issues/32474515



Change-Id: I4e42509bfcf572e37c8fc070d6571afe406a48b6
Signed-off-by: default avatarVineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>
Reviewed-on: https://android.intel.com/548494
parent 84767043
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -703,6 +703,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] << "'";