OSDN Git Service

Merge "report MPKI instead of hit-rate"
[android-x86/system-extras.git] / boot_control_copy / bootinfo.c
index e3c2412..82a134f 100644 (file)
@@ -116,12 +116,12 @@ int boot_info_open_partition(const char *name, uint64_t *out_size, int flags)
   return fd;
 }
 
-// As per struct bootloader_message which is defined in
+// As per struct bootloader_message_ab which is defined in
 // bootable/recovery/bootloader.h we can use the 32 bytes in the
 // bootctrl_suffix field provided that they start with the active slot
 // suffix terminated by NUL. It just so happens that BrilloBootInfo is
 // laid out this way.
-#define BOOTINFO_OFFSET offsetof(struct bootloader_message, slot_suffix)
+#define BOOTINFO_OFFSET offsetof(struct bootloader_message_ab, slot_suffix)
 
 bool boot_info_load(BrilloBootInfo *out_info)
 {
@@ -180,7 +180,6 @@ bool boot_info_validate(BrilloBootInfo* info)
 
 void boot_info_reset(BrilloBootInfo* info)
 {
-  size_t n;
   memset(info, '\0', sizeof(BrilloBootInfo));
   info->magic[0] = 'B';
   info->magic[1] = 'C';