Merge "Revert "write_bootloader_message(<options>) should not reset stage field."" am: c908f4f0e3
am: 09197c47e2
Change-Id: Ic9156da53b0f07ecd794e4a5c4f948387d76e701
This commit is contained in:
@@ -164,13 +164,7 @@ bool clear_bootloader_message(std::string* err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool write_bootloader_message(const std::vector<std::string>& options, std::string* err) {
|
bool write_bootloader_message(const std::vector<std::string>& options, std::string* err) {
|
||||||
bootloader_message boot;
|
bootloader_message boot = {};
|
||||||
if (!read_bootloader_message(&boot, err)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Zero out the entire fields.
|
|
||||||
memset(boot.command, 0, sizeof(boot.command));
|
|
||||||
memset(boot.recovery, 0, sizeof(boot.recovery));
|
|
||||||
strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
|
strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
|
||||||
strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
|
strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
|
||||||
for (const auto& s : options) {
|
for (const auto& s : options) {
|
||||||
|
|||||||
@@ -193,8 +193,7 @@ bool write_bootloader_message(const bootloader_message& boot, std::string* err);
|
|||||||
bool write_bootloader_message_to(const bootloader_message& boot,
|
bool write_bootloader_message_to(const bootloader_message& boot,
|
||||||
const std::string& misc_blk_device, std::string* err);
|
const std::string& misc_blk_device, std::string* err);
|
||||||
|
|
||||||
// Write bootloader message (boots into recovery with the options) to BCB. Will
|
// Write bootloader message (boots into recovery with the options) to BCB.
|
||||||
// set command and recovery fields only.
|
|
||||||
bool write_bootloader_message(const std::vector<std::string>& options, std::string* err);
|
bool write_bootloader_message(const std::vector<std::string>& options, std::string* err);
|
||||||
|
|
||||||
// Clear BCB.
|
// Clear BCB.
|
||||||
|
|||||||
Reference in New Issue
Block a user