Skip to content

Commit

Permalink
UBI: bugfix: calculate data offset properly
Browse files Browse the repository at this point in the history
Data offset is VID header offset + VID header size aligned to
the min. I/O unit size up.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jan 25, 2008
1 parent ddc4939 commit d536058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ static int io_init(struct ubi_device *ubi)
}

/* Similar for the data offset */
ubi->leb_start = ubi->vid_hdr_offset + ubi->vid_hdr_alsize;
ubi->leb_start = ubi->vid_hdr_offset + UBI_EC_HDR_SIZE;
ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size);

dbg_msg("vid_hdr_offset %d", ubi->vid_hdr_offset);
Expand Down

0 comments on commit d536058

Please sign in to comment.