Snap for 11685790 from 95d43b9f77 to 24Q3-release

Change-Id: Ib924bea17e0483c1cc06216bef0b4eaefad33700
This commit is contained in:
Android Build Coastguard Worker 2024-04-08 23:00:50 +00:00
commit 29baf0bfb8

View file

@ -155,9 +155,13 @@ static std::vector<std::string> get_args(const int argc, char** const argv, std:
// Write the arguments (excluding the filename in args[0]) back into the
// bootloader control block. So the device will always boot into recovery to
// finish the pending work, until FinishRecovery() is called.
std::vector<std::string> options(args.cbegin() + 1, args.cend());
if (!update_bootloader_message(options, &err)) {
LOG(ERROR) << "Failed to set BCB message: " << err;
// This should only be done for boot-recovery command so that other commands
// won't be overwritten.
if (boot_command == "boot-recovery") {
std::vector<std::string> options(args.cbegin() + 1, args.cend());
if (!update_bootloader_message(options, &err)) {
LOG(ERROR) << "Failed to set BCB message: " << err;
}
}
// Finally, if no arguments were specified, check whether we should boot