mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-08 07:39:54 +00:00
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>
This commit is contained in:
parent
f938de7914
commit
33154eaf41
@ -46,7 +46,7 @@ platform_find_kernelpart() {
|
|||||||
platform_find_rootfspart() {
|
platform_find_rootfspart() {
|
||||||
local part
|
local part
|
||||||
for part in "${1%:*}" "${1#*:}"; do
|
for part in "${1%:*}" "${1#*:}"; do
|
||||||
[ "$part" != "$2" ] && echo "$part"; break
|
[ "$part" != "$2" ] && echo "$part" && break
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user