X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/f0c31da5a21302a7f25fbb818d24100f0ad3d4e3..e7b2bb9b51a34fb9946f9e4af2d787255757cb96:/package/mtd/src/jffs2.c diff --git a/package/mtd/src/jffs2.c b/package/mtd/src/jffs2.c index 49a7d5612..aaf9be5a9 100644 --- a/package/mtd/src/jffs2.c +++ b/package/mtd/src/jffs2.c @@ -244,10 +244,10 @@ 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 - return 0; + if (trx_fixup) { + trx_fixup(outfd, mtd); + } + return (mtdofs - ofs); } void mtd_parse_jffs2data(const char *buf, const char *dir) @@ -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);