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

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

Backport of r49314

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@49315 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Rafał Miłecki 2016-05-09 15:34:13 +00:00 committed by Luka Perkov
parent 1508cf8713
commit c9b3099b32
1 changed files with 1 additions and 1 deletions

View File

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