ar71xx: Move OpenMesh image target validation into subfunction
authorSven Eckelmann <sven.eckelmann@open-mesh.com>
Tue, 17 May 2016 15:51:35 +0000 (17:51 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 May 2016 10:19:23 +0000 (12:19 +0200)
commitd1b4a8cfcfb8f3965b79d199993bc847004a7419
tree851a2794282536bacbeaabdb9d746270b26db99f
parent6150c15ad109e49958cb393915679afa1bf12368
ar71xx: Move OpenMesh image target validation into subfunction

The platform_check_image_openmesh function used break statements to signal
that the board name matched the image target. This worked because the
sysupgrade binary checked the image inside a loop. The break statement
stopped the loop and skipped any additional check.

Instead the check should be done without such sideeffects by simply
combining the board names and image targets. Only a mismatch should cause a
negative result for the caller and skipping of the additional checks.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh