aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2015-05-22 15:30:13 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-06-01 17:24:59 +1000
commitb2fb681ef6ef92e9efb0e6ba47dedf3cbb2ad26f (patch)
tree7143661a9a2d3216487e5595e419d9e68bda4fca
parent5bc52050148a0399df73f7e8119b234767759700 (diff)
downloadskiboot-b2fb681ef6ef92e9efb0e6ba47dedf3cbb2ad26f.zip
skiboot-b2fb681ef6ef92e9efb0e6ba47dedf3cbb2ad26f.tar.gz
skiboot-b2fb681ef6ef92e9efb0e6ba47dedf3cbb2ad26f.tar.bz2
libffs: Add the offset of the TOC to partition entry addresses
The accessor for ffs partition entries should be adding the offset of the TOC to the absolute address of the partition entries as the TOC is not necessarily at 0 within in the flash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--libflash/libffs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libflash/libffs.c b/libflash/libffs.c
index 1f5cd94..55e6895 100644
--- a/libflash/libffs.c
+++ b/libflash/libffs.c
@@ -244,7 +244,7 @@ static struct ffs_entry *ffs_get_part(struct ffs_handle *ffs, uint32_t index,
if (index > ffs->hdr.entry_count)
return NULL;
if (out_offset)
- *out_offset = offset;
+ *out_offset = ffs->toc_offset + offset;
return (struct ffs_entry *)(ffs->cache + offset);
}