Revert "write_bootloader_message(<options>) should not reset stage field."

This reverts commit 7e31f421a5.

Bug: 33534933
Change-Id: Ib173f6b1e36a79deafc3592785195693a6779471
This commit is contained in:
Tao Bao
2016-12-13 01:06:24 +00:00
parent 7e31f421a5
commit 26d5ae741e
2 changed files with 2 additions and 9 deletions

View File

@@ -164,13 +164,7 @@ bool clear_bootloader_message(std::string* err) {
}
bool write_bootloader_message(const std::vector<std::string>& options, std::string* err) {
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));
bootloader_message boot = {};
strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
for (const auto& s : options) {