mtd: detect image format when writing
authorrmilecki <rmilecki@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 6 Feb 2016 16:29:12 +0000 (16:29 +0000)
committerrmilecki <rmilecki@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 6 Feb 2016 16:29:12 +0000 (16:29 +0000)
commitd1573d0b2728fc409e50556101509cd2f8ea202d
tree6b08e767d4de86f17bb14efb8639d1bc597ddd3d
parentf00d9058ce20aa5e98d6ff1fc9123391d7b15be1
mtd: detect image format when writing

Recently TRX checking code was changed to detect Seama format and don't
abort whole writing operation because of it. This isn't a good long-term
solution. It's a poor idea to teach every format handler recognizing all
possible formats. Instead it should be handled in a generic code which
should run check depending on the detected format.

This will also allow further improvements like fixing formats other than
TRX after replacing JFFS2.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48639 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/system/mtd/src/mtd.c
package/system/mtd/src/mtd.h
package/system/mtd/src/trx.c