aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-06-25 09:39:30 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-06-25 09:39:30 +0000
commit9a2d1d712888b1a3d4d14357d59f14f528d014fc (patch)
tree95b1db578a0258fe4ce99a6775279634f7c65f1d /tools/firmware-utils
parent60bb2235b37acd66b4382fc7f2d3f9d21f0eefc1 (diff)
downloadmaster-187ad058-9a2d1d712888b1a3d4d14357d59f14f528d014fc.tar.gz
master-187ad058-9a2d1d712888b1a3d4d14357d59f14f528d014fc.tar.bz2
master-187ad058-9a2d1d712888b1a3d4d14357d59f14f528d014fc.zip
[tools] firmware-utils/mkcsysimg: minor bugfix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16556 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/firmware-utils')
-rw-r--r--tools/firmware-utils/src/mkcsysimg.c2
1 files changed, 1 insertions, 1 deletions
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);