[source] ar71xx: fix platform_find_rootfspart()

LEDE Commits lede-commits at lists.infradead.org
Wed Mar 1 11:37:55 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/cff47cacd15a50f981689038fc154faf3d383abf

commit cff47cacd15a50f981689038fc154faf3d383abf
Author: Thibaut VARENE <hacks at slashdirt.org>
AuthorDate: Sat Feb 11 11:10:37 2017 +0100

    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 at slashdirt.org>
---
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a16812c..4f479ce 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -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
 }
 



More information about the lede-commits mailing list