From: Gabor Juhos Date: Thu, 25 Jun 2009 09:39:30 +0000 (+0000) Subject: firmware-utils/mkcsysimg: minor bugfix X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d14e512f00773d75a32b700503ed4d9b113c2519;p=openwrt%2Fstaging%2Fdangole.git firmware-utils/mkcsysimg: minor bugfix SVN-Revision: 16556 --- diff --git a/tools/firmware-utils/src/mkcsysimg.c b/tools/firmware-utils/src/mkcsysimg.c index 0e9392dde8..4f2352a60e 100644 --- a/tools/firmware-utils/src/mkcsysimg.c +++ b/tools/firmware-utils/src/mkcsysimg.c @@ -577,7 +577,7 @@ block_writeout_hdr(FILE *outfile, struct csys_block *block) /* setup header fields */ memcpy(hdr.sig, block->sig, 4); hdr.addr = HOST_TO_LE32(block->addr); - hdr.size = HOST_TO_LE32(block->align-block->size_hdr); + hdr.size = HOST_TO_LE32(block->size - block->size_hdr - block->size_csum); DBG(1,"writing header for block"); res = write_out_data(outfile, (uint8_t *)&hdr, sizeof(hdr),NULL);