diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2017-06-21 16:34:36 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-21 17:24:47 +1000 |
commit | 73e1e8a727a9e7179719eb7844bd4248d9890114 (patch) | |
tree | 6d157f8c351f8b51be59cce9956a71a8d5cb1e87 | |
parent | 396b940371cf471612d947d8b22fc8143d866dc9 (diff) | |
download | skiboot-73e1e8a727a9e7179719eb7844bd4248d9890114.zip skiboot-73e1e8a727a9e7179719eb7844bd4248d9890114.tar.gz skiboot-73e1e8a727a9e7179719eb7844bd4248d9890114.tar.bz2 |
libflash/libffs: Correctly update the actual size of the partition
libffs has been updating FFS partition information in the wrong place
which leads to incomplete erases and corruption.
Fixes: 602dee45 libflash/libffs: Rework libffs
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | libflash/libffs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libflash/libffs.c b/libflash/libffs.c index 763e061..7ae9050 100644 --- a/libflash/libffs.c +++ b/libflash/libffs.c @@ -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); |