base-files: trim unnecessary nand sysupgrade code
authorRodrigo Balerdi <lanchon@gmail.com>
Fri, 15 Apr 2022 13:15:02 +0000 (10:15 -0300)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 19 Apr 2022 15:28:25 +0000 (16:28 +0100)
Remove unnecessary sync commands during nand sysupgrade.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
package/base-files/files/lib/upgrade/nand.sh

index d85b2aa24147984c3cdef725c901f0154168dc5e..371bdf7d77ec71561eb5b52a10dfcae68efd4b6b 100644 (file)
@@ -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}"