mtd: improve check for TRX header being already fixed
authorRafał Miłecki <rafal@milecki.pl>
Sun, 15 Jul 2018 21:23:42 +0000 (23:23 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Sun, 15 Jul 2018 21:27:09 +0000 (23:27 +0200)
commit82498a7f7aa86ad0e93ef60d50dccaa0a9549e4c
tree16db1aab529e2d4fb3812ee250b1ae4df497505d
parent49bdd43da236af54b6b82d995b81532e7becf08f
mtd: improve check for TRX header being already fixed

First of all lengths should be compared after checking all blocks for
being good/bad. It's because requested length may differ from a final
one if there were some bad blocks.

Secondly it makes sense to also compare crc32 since we already have a
new one calculated.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
package/system/mtd/Makefile
package/system/mtd/src/trx.c