summaryrefslogtreecommitdiffstats
path: root/boot_control
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-11-22 21:25:12 +0100
committerandroid-build-merger <android-build-merger@google.com>2019-11-22 21:25:12 +0100
commit6199cb2aa84a061a0fc40631250f7f70a9e34fcb (patch)
treee71e0503c7b260d996b262ebe50843a609fef95b /boot_control
parentMerge "Clear the warm_reset flag after boot is successful" am: ca18e7fe5a am: 6ca0488c4a (diff)
parentMerge "bootloader_message: Add a magic header to the Virtual A/B message block." am: f78b7a7b94 (diff)
downloadandroid_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.tar
android_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.tar.gz
android_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.tar.bz2
android_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.tar.lz
android_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.tar.xz
android_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.tar.zst
android_bootable_recovery-6199cb2aa84a061a0fc40631250f7f70a9e34fcb.zip
Diffstat (limited to '')
-rw-r--r--boot_control/libboot_control.cpp4
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;