From: Rodrigo Balerdi Date: Fri, 15 Apr 2022 13:15:02 +0000 (-0300) Subject: base-files: trim unnecessary nand sysupgrade code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9a2f08f6e704d733fea88b6b511f2fa06b8039f4;p=openwrt%2Fstaging%2Fdedeckeh.git base-files: trim unnecessary nand sysupgrade code Remove unnecessary sync commands during nand sysupgrade. Signed-off-by: Rodrigo Balerdi --- 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}"