ar71xx: fix platform_find_rootfspart()

platform_find_rootfspart() fails if the kernel partition comes before the
rootfs partition. The proposed patch fixes this while preserving what I
understand was the original idea: stop at first match.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
lede-17.01
Thibaut VARENE 2017-02-11 11:10:37 +01:00 committed by Jo-Philipp Wich
parent e1e9d27655
commit cff47cacd1
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ platform_find_kernelpart() {
platform_find_rootfspart() {
local part
for part in "${1%:*}" "${1#*:}"; do
[ "$part" != "$2" ] && echo "$part"; break
[ "$part" != "$2" ] && echo "$part" && break
done
}