X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/b61fd707efdbe0622db6ab525a900378a48113f9..6e0a5bf7fa9d955e7b939eae37d7fd2000ed5196:/package/openwrt/jffs2root.c diff --git a/package/openwrt/jffs2root.c b/package/openwrt/jffs2root.c index aa718da59..36b928ff4 100644 --- a/package/openwrt/jffs2root.c +++ b/package/openwrt/jffs2root.c @@ -99,7 +99,7 @@ int main(int argc, char **argv) printf("Partition already moved outside trx\n"); } else { init_crc32(); - ptr->offsets[2] += mtdInfo.erasesize; + ptr->offsets[2] += (mtdInfo.erasesize - 1); ptr->offsets[2] &= ~(mtdInfo.erasesize - 1); ptr->len = ptr->offsets[2]; ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version));