1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 05:57:32 +02:00

firmware-utils/mkzynfw: don't use next_offset twice (closes #7273)

The test if a file can fit in an image considers the current offset
twice. So a image that would fit is too big.

Thanks-to: Michael Kurz <michi.kurz@googlemail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21445 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2010-05-14 09:20:34 +00:00
parent 0ba3851aa6
commit d757b8b0b4

View File

@ -983,7 +983,7 @@ calc_block_offsets(int type, uint32_t *offset)
next_offs = ALIGN(*offset, block->align); next_offs = ALIGN(*offset, block->align);
avail = board->flash_size - board->romio_offs - next_offs; avail = board->flash_size - board->romio_offs - next_offs;
if (next_offs + block->file_size > avail) { if (block->file_size > avail) {
ERR("file %s is too big, offset = %u, size=%u," ERR("file %s is too big, offset = %u, size=%u,"
" align = %u", block->file_name, " align = %u", block->file_name,
(unsigned)next_offs, (unsigned)next_offs,