Skip to content

Commit

Permalink
libflash/libffs: Correctly update the actual size of the partition
Browse files Browse the repository at this point in the history
libffs has been updating FFS partition information in the wrong place
which leads to incomplete erases and corruption.

Fixes: 602dee4 libflash/libffs: Rework libffs
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
cyrilbur-ibm authored and stewartsmith committed Jun 21, 2017
1 parent 396b940 commit 73e1e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libflash/libffs.c
Expand Up @@ -781,7 +781,7 @@ int ffs_update_act_size(struct ffs_handle *ffs, uint32_t part_idx,
FL_DBG("FFS: Entry not found\n");
return FFS_ERR_PART_NOT_FOUND;
}
offset = ent->base;
offset = ffs->toc_offset + ffs_hdr_raw_size(part_idx);
FL_DBG("FFS: part index %d at offset 0x%08x\n",
part_idx, offset);

Expand Down

0 comments on commit 73e1e8a

Please sign in to comment.