diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-07-25 17:28:32 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-07-25 17:28:32 +0000 |
commit | 6136a078e94a7a2f3d64960cb0720bf4aa358c0a (patch) | |
tree | cfd322af9842ff436e0e083ba050881b7854ce64 /package/mtd/src/jffs2.c | |
parent | 61d613b7f4beb979e812534b3b473966ad465d9b (diff) | |
download | upstream-6136a078e94a7a2f3d64960cb0720bf4aa358c0a.tar.gz upstream-6136a078e94a7a2f3d64960cb0720bf4aa358c0a.tar.bz2 upstream-6136a078e94a7a2f3d64960cb0720bf4aa358c0a.zip |
mtd: fix trx_fixup
With the BRCM47xx image I have built (Linksys E3000), there are additional
writes following the completion of "mtd_replace_jffs2" which invalidate the
'trx_fixup' performed by 'mtd_replace_jffs2'. Moving the 'trx_fixup' to somewhere
after all writes have completed fixes the problem. I also noticed that 'erasesize'
used to compute 'block_offset' in 'mtd_fixtrx' is used before it is computed by
'mtd_check_open'; moving the call to 'mtd_check_open' up a few lines fixes this.
Unlike 'mtd_fixtrx', 'trx_fixup' appears to assume that the TRX header is always at
offset 0; which may be the cause of the problem described in Ticket #8960.
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32866 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mtd/src/jffs2.c')
-rw-r--r-- | package/mtd/src/jffs2.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/package/mtd/src/jffs2.c b/package/mtd/src/jffs2.c index aaf9be5a92..2a83bd47f4 100644 --- a/package/mtd/src/jffs2.c +++ b/package/mtd/src/jffs2.c @@ -244,9 +244,6 @@ int mtd_replace_jffs2(const char *mtd, int fd, int ofs, const char *filename) pad(erasesize); free(buf); - if (trx_fixup) { - trx_fixup(outfd, mtd); - } return (mtdofs - ofs); } |