[openwrt/openwrt] base-files: trim unnecessary nand sysupgrade code

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 19 09:08:29 PDT 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9a2f08f6e704d733fea88b6b511f2fa06b8039f4

commit 9a2f08f6e704d733fea88b6b511f2fa06b8039f4
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Fri Apr 15 10:15:02 2022 -0300

    base-files: trim unnecessary nand sysupgrade code
    
    Remove unnecessary sync commands during nand sysupgrade.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
---
 package/base-files/files/lib/upgrade/nand.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index d85b2aa241..371bdf7d77 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -158,13 +158,11 @@ nand_upgrade_prepare_ubi() {
 	local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
 	if [ ! "$ubidev" ]; then
 		ubiattach -m "$mtdnum"
-		sync
 		ubidev="$( nand_find_ubi "$CI_UBIPART" )"
 
 		if [ ! "$ubidev" ]; then
 			ubiformat /dev/mtd$mtdnum -y
 			ubiattach -m "$mtdnum"
-			sync
 			ubidev="$( nand_find_ubi "$CI_UBIPART" )"
 
 			if [ ! "$ubidev" ]; then
@@ -229,7 +227,7 @@ nand_upgrade_prepare_ubi() {
 			fi
 		fi
 	fi
-	sync
+
 	return 0
 }
 
@@ -255,7 +253,6 @@ nand_upgrade_ubinized() {
 
 	local mtddev="/dev/mtd${mtdnum}"
 	ubidetach -p "${mtddev}" || :
-	sync
 	ubiformat "${mtddev}" -y -f "${ubi_file}"
 	ubiattach -p "${mtddev}"
 




More information about the lede-commits mailing list