aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-05-09 15:34:13 +0000
committerLuka Perkov <luka@openwrt.org>2016-06-19 19:56:13 +0200
commitc9b3099b32bce52ac613bca453b9d39edff2eee6 (patch)
treea17d13f77f6085da8fcf6cd8325131de3120ae8d /package
parent1508cf8713d82c5269b98b749cac2fac1a34bc50 (diff)
downloadupstream-c9b3099b32bce52ac613bca453b9d39edff2eee6.tar.gz
upstream-c9b3099b32bce52ac613bca453b9d39edff2eee6.tar.bz2
upstream-c9b3099b32bce52ac613bca453b9d39edff2eee6.zip
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
Diffstat (limited to 'package')
-rw-r--r--package/system/mtd/src/seama.c2
1 files changed, 1 insertions, 1 deletions
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);