From 9a2f08f6e704d733fea88b6b511f2fa06b8039f4 Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Fri, 15 Apr 2022 10:15:02 -0300 Subject: [PATCH] base-files: trim unnecessary nand sysupgrade code Remove unnecessary sync commands during nand sysupgrade. Signed-off-by: Rodrigo Balerdi --- 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}" -- 2.30.2