From b3bcc483b2d075e1151ea814d5e4f5b458b0e1f7 Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Sun, 26 Dec 2010 04:18:08 +0000 Subject: mtd: Added trx_fixup for brcm63xx imagetag, and made references to fix_trx use the weak reference rather than the brcm47xx ifdef. This fixes a bug in which sysupgrade failed due to changing bad CRC on reboot. Signed-off-by: Daniel Dickinson SVN-Revision: 24837 --- package/mtd/src/jffs2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'package/mtd/src/jffs2.c') diff --git a/package/mtd/src/jffs2.c b/package/mtd/src/jffs2.c index 512f22278c..aaf9be5a92 100644 --- a/package/mtd/src/jffs2.c +++ b/package/mtd/src/jffs2.c @@ -244,9 +244,9 @@ int mtd_replace_jffs2(const char *mtd, int fd, int ofs, const char *filename) pad(erasesize); free(buf); -#ifdef target_brcm - trx_fixup(outfd, mtd); -#endif + if (trx_fixup) { + trx_fixup(outfd, mtd); + } return (mtdofs - ofs); } @@ -347,9 +347,9 @@ int mtd_write_jffs2(const char *mtd, const char *filename, const char *dir) err = 0; -#ifdef target_brcm - trx_fixup(outfd, mtd); -#endif + if (trx_fixup) { + trx_fixup(outfd, mtd); + } done: close(outfd); -- cgit v1.2.3