projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc6449a
)
mkenvimage: Really set the redundant byte when applicable
author
David Wagner
<david.wagner@free-electrons.com>
Fri, 13 Jan 2012 13:27:40 +0000
(13:27 +0000)
committer
Anatolij Gustschin
<agust@denx.de>
Tue, 27 Mar 2012 08:19:00 +0000
(10:19 +0200)
Signed-off-by: David Wagner <david.wagner@free-electrons.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
tools/mkenvimage.c
patch
|
blob
|
history
diff --git
a/tools/mkenvimage.c
b/tools/mkenvimage.c
index 3a20b23ed16eb856613b4f571c6c257eb31a4732..9dbb3b210b4b4bcccbcb713cfa2bad8020a33349 100644
(file)
--- a/
tools/mkenvimage.c
+++ b/
tools/mkenvimage.c
@@
-285,7
+285,9
@@
int main(int argc, char **argv)
crc = crc32(0, envptr, envsize);
targetendian_crc = bigendian ? cpu_to_be32(crc) : cpu_to_le32(crc);
- memcpy(dataptr, &targetendian_crc, sizeof(uint32_t));
+ memcpy(dataptr, &targetendian_crc, sizeof(targetendian_crc));
+ if (redundant)
+ dataptr[sizeof(targetendian_crc)] = 1;
if (!bin_filename || strcmp(bin_filename, "-") == 0) {
bin_fd = STDOUT_FILENO;