Remove unnecessary sync commands during nand sysupgrade.
Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
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
fi
fi
fi
- sync
+
return 0
}
local mtddev="/dev/mtd${mtdnum}"
ubidetach -p "${mtddev}" || :
- sync
ubiformat "${mtddev}" -y -f "${ubi_file}"
ubiattach -p "${mtddev}"