From c9b3099b32bce52ac613bca453b9d39edff2eee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki Backport of r49314 git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@49315 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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);