mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	base-files: trim unnecessary nand sysupgrade code
Remove unnecessary sync commands during nand sysupgrade. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
This commit is contained in:
		
							parent
							
								
									bfd9afc38d
								
							
						
					
					
						commit
						9a2f08f6e7
					
				@ -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}"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user