Skip to content
Snippets Groups Projects
Commit 13354559 authored by Ronny Nilsson's avatar Ronny Nilsson
Browse files

brcm_fw_tool: print an error if can't guess what to do.

parent 7dbdc0d8
No related branches found
No related tags found
No related merge requests found
...@@ -411,11 +411,16 @@ generate_image(const char *in_file, char *sequence_number) ...@@ -411,11 +411,16 @@ generate_image(const char *in_file, char *sequence_number)
res = read(inFd, buf, probeSize); res = read(inFd, buf, probeSize);
if(res == -1) { if(res == -1) {
perror("Error reading file"); perror("Error reading file");
free(buf);
close(inFd);
exit(1); exit(1);
} }
else if(res == 0) { else if(res == 0) {
// EOF // EOF
break; if(verbose) printf("Error, can't find image type!\n");
free(buf);
close(inFd);
exit(1);
} }
/* Broadcom UBI METADATA volume format has no "magic"(!!). /* Broadcom UBI METADATA volume format has no "magic"(!!).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment