X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/0b110378300c2924c8a4f17099f33bd68f4e691c..a4742fd304e198913fd10256e87934435e44fc45:/tools/firmware-utils/src/mkcsysimg.c diff --git a/tools/firmware-utils/src/mkcsysimg.c b/tools/firmware-utils/src/mkcsysimg.c index 0e9392dde..4f2352a60 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);