cros-ec: Store image_idx in section

Makes it a bit easier to retrieve the image later.
This commit is contained in:
Benson Leung 2020-06-30 15:12:23 -07:00 committed by Richard Hughes
parent 9326e19118
commit 4ed2400cab
2 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,7 @@ fu_cros_ec_firmware_parse (FuFirmware *firmware,
section->offset = fu_firmware_image_get_addr (img);
section->size = g_bytes_get_size (payload_bytes);
fu_firmware_image_set_version (img, section->version);
section->image_idx = fu_firmware_image_get_idx (img);
if (rw) {
if (!fu_cros_ec_parse_version (section->version,

View File

@ -36,6 +36,7 @@ typedef struct {
gchar version[FU_FMAP_FIRMWARE_STRLEN];
gint32 rollback;
guint32 key_version;
guint64 image_idx;
} FuCrosEcFirmwareSection;
gboolean fu_cros_ec_firmware_pick_sections (FuCrosEcFirmware *self,