aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/mtd/src
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-09-02 17:13:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-09-02 17:13:42 +0000
commit72dd8201d2fc3ffcc1c24cc08c1e956b87680bac (patch)
treed2595ee61be6a24d876a7bd82ab6aa1aee4cc660 /package/system/mtd/src
parent98af9706175242ad0a39db12777b59c24a01994f (diff)
downloadmaster-187ad058-72dd8201d2fc3ffcc1c24cc08c1e956b87680bac.tar.gz
master-187ad058-72dd8201d2fc3ffcc1c24cc08c1e956b87680bac.tar.bz2
master-187ad058-72dd8201d2fc3ffcc1c24cc08c1e956b87680bac.zip
mtd: Fix trx check after partition rename ("linux" to "firmware")
On brcm47xx (Huawei E970), I noticed that sysupgrade now tries to flash trx images which don't fit into the flash, resulting in non-booting system. I found that mtd does trx size checking only when flashing to a partition called "linux". This patch changes this to be "firmware". This matches the following patch which changed partition name in bcm47xxpart.c driver to "firmware": commit 86b4d5ef68ca77ff6724ebb9bddd6b93239c87fc Author: hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> Date: Sun Dec 1 16:32:32 2013 +0000 brcm47xx: use "firmware" partition name ... Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38973 3c298f89-4303-0410-b956-a3cf2f4a3e73 Signed-off-by: Mathias Adam <m.adam--openwrt@adamis.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42403 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/system/mtd/src')
-rw-r--r--package/system/mtd/src/trx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c
index 65c24404c2..86d62fc19e 100644
--- a/package/system/mtd/src/trx.c
+++ b/package/system/mtd/src/trx.c
@@ -107,7 +107,7 @@ trx_check(int imagefd, const char *mtd, char *buf, int *len)
const struct trx_header *trx = (const struct trx_header *) buf;
int fd;
- if (strcmp(mtd, "linux") != 0)
+ if (strcmp(mtd, "firmware") != 0)
return 1;
*len = read(imagefd, buf, 32);