]> git.karo-electronics.de Git - linux-beck.git/commitdiff
UBI: bugfix: calculate data offset properly
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 17 Jan 2008 13:41:14 +0000 (15:41 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 25 Jan 2008 14:41:24 +0000 (16:41 +0200)
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>
drivers/mtd/ubi/build.c

index 51bff88342af8c50b2e870a2c71e965a5395975d..6ac81e35355cd39fc8232698b790de75f077e59b 100644 (file)
@@ -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);