mtd: seama: exit with error if Seama header wasn't found
authorRafał Miłecki <zajec5@gmail.com>
Mon, 9 May 2016 15:33:42 +0000 (15:33 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Mon, 9 May 2016 15:33:42 +0000 (15:33 +0000)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 49314

package/system/mtd/src/seama.c

index e3c0e4d51ec9487c2457d1bdc0d98cf8e39c014a..ab24f0366355cff014538a87a51f2a87c136f5a8 100644 (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);