Skip to content
Snippets Groups Projects
Commit b61b4474 authored by Gabor Juhos's avatar Gabor Juhos
Browse files

firmware-utils/trx: fix two bugs


 - fix crc32 calculation if -F was enabled.

 - don't convert the crc32 to little endian twice.

Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>

SVN-Revision: 38962
parent 2370126b
No related branches found
No related tags found
No related merge requests found
......@@ -273,11 +273,10 @@ int main(int argc, char **argv)
}
p->crc32 = crc32buf((char *) &p->flag_version,
(fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version));
((fsmark)?fsmark:cur_len) - offsetof(struct trx_header, flag_version));
p->crc32 = STORE32_LE(p->crc32);
p->len = STORE32_LE((fsmark) ? fsmark : cur_len);
p->len = STORE32_LE(p->len);
/* restore TRXv2 bin-header */
if (trx_version == 2) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment