Recovery: When updating from SD card, update can't resume automatically
after a power loss Submitted on behalf of Hong-Bin Wang <hong-binwang@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
This commit is contained in:
		
				
					committed by
					
						
						Doug Zongker
					
				
			
			
				
	
			
			
			
						parent
						
							50a8a71f0b
						
					
				
				
					commit
					c2d666bd4f
				
			
							
								
								
									
										10
									
								
								recovery.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								recovery.c
									
									
									
									
									
								
							@@ -208,6 +208,15 @@ get_args(int *argc, char ***argv) {
 | 
			
		||||
    set_bootloader_message(&boot);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
set_sdcard_update_bootloader_message()
 | 
			
		||||
{
 | 
			
		||||
    struct bootloader_message boot;
 | 
			
		||||
    memset(&boot, 0, sizeof(boot));
 | 
			
		||||
    strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
 | 
			
		||||
    strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
 | 
			
		||||
    set_bootloader_message(&boot);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// clear the recovery command and prepare to boot a (hopefully working) system,
 | 
			
		||||
// copy our log file to cache as well (for the system to read), and
 | 
			
		||||
@@ -352,6 +361,7 @@ prompt_and_wait()
 | 
			
		||||
 | 
			
		||||
                case ITEM_APPLY_SDCARD:
 | 
			
		||||
                    ui_print("\n-- Install from sdcard...\n");
 | 
			
		||||
                    set_sdcard_update_bootloader_message();
 | 
			
		||||
                    int status = install_package(SDCARD_PACKAGE_FILE);
 | 
			
		||||
                    if (status != INSTALL_SUCCESS) {
 | 
			
		||||
                        ui_set_background(BACKGROUND_ICON_ERROR);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user