mtd: seama: exit with error if Seama header wasn't found

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
master
rmilecki 9 years ago committed by Rafał Miłecki
parent 06a3241c27
commit 6de401b1f8
  1. 2
      package/system/mtd/src/seama.c

@ -148,7 +148,7 @@ mtd_fixseama(const char *mtd, size_t offset)
shdr = (struct seama_entity_header *)(first_block + offset); shdr = (struct seama_entity_header *)(first_block + offset);
if (shdr->magic != htonl(SEAMA_MAGIC)) { if (shdr->magic != htonl(SEAMA_MAGIC)) {
fprintf(stderr, "No SEAMA header found\n"); fprintf(stderr, "No SEAMA header found\n");
return -1; exit(1);
} else if (!ntohl(shdr->size)) { } else if (!ntohl(shdr->size)) {
fprintf(stderr, "Seama entity with empty image\n"); fprintf(stderr, "Seama entity with empty image\n");
exit(1); exit(1);

Loading…
Cancel
Save