diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2009-11-10 08:44:30 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2009-11-10 08:44:30 +0900 |
commit | b6d8992cbbe5f04c11f7e6e09c09ae1a031d8720 (patch) | |
tree | 38d607f78f33bcd41d8da448f4da7d5c220b4f93 /tools | |
parent | f9000d975b5f2550defd5fe5b57392a72fc77201 (diff) | |
parent | b91b8f74fe9ded18344c3d03080a4abc07254502 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'tools')
-rw-r--r-- | tools/envcrc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/envcrc.c b/tools/envcrc.c index 5b0f7cd4ec..c8c50d7196 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include <errno.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> @@ -121,7 +122,8 @@ int main (int argc, char **argv) } for (i = start; i != end; i += step) printf("%c", (crc & (0xFF << (i * 8))) >> (i * 8)); - fwrite(dataptr, 1, datasize, stdout); + if (fwrite(dataptr, 1, datasize, stdout) != datasize) + fprintf(stderr, "fwrite() failed: %s\n", strerror(errno)); } else { printf("CRC32 from offset %08X to %08X of environment = %08X\n", (unsigned int) (dataptr - envptr), |