From 9b11b08bff0a119c4fe782c4993720b971eed2f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 9 May 2016 15:34:13 +0000 Subject: [PATCH] mtd: seama: exit with error if Seama header wasn't found MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki Backport of r49314 SVN-Revision: 49315 --- package/system/mtd/src/seama.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system/mtd/src/seama.c b/package/system/mtd/src/seama.c index e3c0e4d51e..ab24f03663 100644 --- a/package/system/mtd/src/seama.c +++ b/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); 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); -- 2.30.2