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

Commit 29c42c67 authored by Vineela Tummalapalli's avatar Vineela Tummalapalli Committed by android-build-merger
Browse files

Merge "Implement Reboot bootloader via bootloader_message" am: e759c83b am:...

Merge "Implement Reboot bootloader via bootloader_message" am: e759c83b am: d1b560c6 am: 5cd910ac
am: 98a2556d

Change-Id: Iba7ad15a8d6626dbc453e96751433da750fbc796
parents 89af3b4d 98a2556d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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] << "'";