diff options
Diffstat (limited to 'package/system/mtd/src/fis.c')
-rw-r--r-- | package/system/mtd/src/fis.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/system/mtd/src/fis.c b/package/system/mtd/src/fis.c index b50411cfeb..e314c10258 100644 --- a/package/system/mtd/src/fis.c +++ b/package/system/mtd/src/fis.c @@ -243,14 +243,14 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new) memset(desc, 0, sizeof(struct fis_image_desc)); memcpy(desc->hdr.name, part->name, sizeof(desc->hdr.name)); desc->crc.desc = 0; - desc->crc.file = 0; + desc->crc.file = part->crc; desc->hdr.flash_base = offset; desc->hdr.mem_base = part->loadaddr; desc->hdr.entry_point = part->loadaddr; desc->hdr.size = (part->size > 0) ? part->size : size; - desc->hdr.data_length = desc->hdr.size; - + desc->hdr.data_length = (part->length > 0) ? part->length : + desc->hdr.size; offset += desc->hdr.size; size -= desc->hdr.size; } |