generic: make mtdsplit-tplink.c honor rootfs offset
authorThibaut VARÈNE <hacks@slashdirt.org>
Sat, 28 Oct 2017 12:48:08 +0000 (14:48 +0200)
committerMathias Kresin <dev@kresin.me>
Wed, 8 Nov 2017 22:18:22 +0000 (23:18 +0100)
commit74f891752b617a9f17f675f341160458c055b301
treeb9d53df5e1c5159df17bb2360590285eab970099
parent050fb3b55cde4348f4ed12ab98f451c4c56a695b
generic: make mtdsplit-tplink.c honor rootfs offset

The splitter ignored the rootfs offset from the header, probably
because until c1e6e61 it was invalid.

This patch fixes the splitter to use the now correct header data.

Regarding target/linux/ar71xx/files/drivers/mtd/tplinkpart.c,
this particular splitter "falls back" to the correct rootfs offset
reading and as such it doesn't need to be updated, although it will
report a kernel partition length that can be larger than the actual
length as it assumes that partition fills the entire segment up to
the rootfs partition.

Tested-by: Mathias Kresin <dev@kresin.me>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Tested-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c