diff options
author | David Anderson <dvander@google.com> | 2019-11-22 21:02:36 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-11-22 21:02:36 +0100 |
commit | f78b7a7b94d3ccf415d97fd2ec3350410aedfe88 (patch) | |
tree | 9d2c83c32caf346061fd81cc7e390c513dad4dc3 /boot_control/libboot_control.cpp | |
parent | Merge "Clear the warm_reset flag after boot is successful" (diff) | |
parent | bootloader_message: Add a magic header to the Virtual A/B message block. (diff) | |
download | android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.tar android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.tar.gz android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.tar.bz2 android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.tar.lz android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.tar.xz android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.tar.zst android_bootable_recovery-f78b7a7b94d3ccf415d97fd2ec3350410aedfe88.zip |
Diffstat (limited to 'boot_control/libboot_control.cpp')
-rw-r--r-- | boot_control/libboot_control.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/boot_control/libboot_control.cpp b/boot_control/libboot_control.cpp index 702183979..ab9ce971b 100644 --- a/boot_control/libboot_control.cpp +++ b/boot_control/libboot_control.cpp @@ -365,13 +365,15 @@ bool InitMiscVirtualAbMessageIfNeeded() { return false; } - if (message.version == MISC_VIRTUAL_AB_MESSAGE_VERSION) { + if (message.version == MISC_VIRTUAL_AB_MESSAGE_VERSION && + message.magic == MISC_VIRTUAL_AB_MAGIC_HEADER) { // Already initialized. return true; } message = {}; message.version = MISC_VIRTUAL_AB_MESSAGE_VERSION; + message.magic = MISC_VIRTUAL_AB_MAGIC_HEADER; if (!WriteMiscVirtualAbMessage(message, &err)) { LOG(ERROR) << "Could not write merge status: " << err; return false; |