[PATCH 06/62] UBI: Fastmap: Calc fastmap size correctly
Teresa Remmet
t.remmet at phytec.de
Mon May 23 01:25:54 PDT 2016
From: Richard Weinberger <richard at nod.at>
We need to add fm_sb too.
Signed-off-by: Richard Weinberger <richard at nod.at>
Reviewed-by: Tanya Brokhman <tlinder at codeaurora.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
drivers/mtd/ubi/fastmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index a3e9069..52b8c47 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -24,7 +24,8 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi)
{
size_t size;
- size = sizeof(struct ubi_fm_hdr) + \
+ size = sizeof(struct ubi_fm_sb) + \
+ sizeof(struct ubi_fm_hdr) + \
sizeof(struct ubi_fm_scan_pool) + \
sizeof(struct ubi_fm_scan_pool) + \
(ubi->peb_count * sizeof(struct ubi_fm_ec)) + \
--
1.9.1
More information about the barebox
mailing list