mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-26 11:42:27 +02:00
fix rounding error
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1058 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
445e1eb6bc
commit
9bc301c151
@ -99,7 +99,7 @@ int main(int argc, char **argv)
|
|||||||
printf("Partition already moved outside trx\n");
|
printf("Partition already moved outside trx\n");
|
||||||
} else {
|
} else {
|
||||||
init_crc32();
|
init_crc32();
|
||||||
ptr->offsets[2] += mtdInfo.erasesize;
|
ptr->offsets[2] += (mtdInfo.erasesize - 1);
|
||||||
ptr->offsets[2] &= ~(mtdInfo.erasesize - 1);
|
ptr->offsets[2] &= ~(mtdInfo.erasesize - 1);
|
||||||
ptr->len = ptr->offsets[2];
|
ptr->len = ptr->offsets[2];
|
||||||
ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version));
|
ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version));
|
||||||
|
Loading…
Reference in New Issue
Block a user