summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-05-25 18:31:13 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-05-25 18:31:13 +0000
commit9bc301c151e685b26b220bd21f2c4ee8ef15e8d0 (patch)
tree9a6854ac507f4bc3a90c223baadeed4b2b379069 /openwrt
parent445e1eb6bc22489a271a5fcd999424a34e8fdbef (diff)
fix rounding error
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1058 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/package/openwrt/jffs2root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openwrt/package/openwrt/jffs2root.c b/openwrt/package/openwrt/jffs2root.c
index aa718da593..36b928ff46 100644
--- a/openwrt/package/openwrt/jffs2root.c
+++ b/openwrt/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));