}
//Considering EMMC partition by default
- if (ua_dataSS->update_cfg->update_type == DELTA_IMG) {
- blk_cnt = ((ua_dataSS->update_cfg->target_img_size - 1) / SECTOR_SIZE) + 1;
- result = write_to_blkdev((char *)ua_dataSS->parti_info->ua_blk_name, blk_start, blk_cnt, (char *)msi.buffer);
- if (result != S_SS_SUCCESS) {
- LOGE("write of patched data to %s failed\n", ua_dataSS->parti_info->ua_blk_name); // All returns should go to CLEAN UP.
- SS_SetUpgradeState(E_SS_IMGFLASHWRITEFAIL);
- goto Cleanup;
- }
- } else if (ua_dataSS->update_cfg->update_type == EXTRA && ua_dataSS->update_data->ua_temp_path) {
+ if (ua_dataSS->update_cfg->update_type == EXTRA && ua_dataSS->update_data->ua_temp_path) {
fd = open(ua_dataSS->update_data->ua_temp_path, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
if (fd < 0) {
strerror_r(errno, buf, sizeof(buf));
}
/*
- * If ab_update is set it means it is a DELTA_IMG_AB update, where the patch
+ * If ab_update is set it means it is a DELTA_IMAGE update, where the patch
* is applied to data directly read from a partition in the previous slot
*/
SS_CalculateFileSha(src_blk_name, ua_dataSS->update_cfg->soure_img_size, calculated_sha1);
if (ua_dataSS->ui_progress)
ua_dataSS->ui_progress(ua_dataSS, 40);
- if (update_type == FULL_IMG && ua_dataSS->update_data->ua_temp_path)
+ if (update_type == FULL_IMAGE && ua_dataSS->update_data->ua_temp_path)
ulResult = SS_MoveFile(SS_PATCHFILE_SOURCE, ua_dataSS->update_data->ua_temp_path);
- else if ((ua_dataSS->update_cfg->update_type == DELTA_IMG && ua_dataSS->write_data_to_blkdev)
- || ua_dataSS->update_cfg->update_type == EXTRA || ua_dataSS->update_cfg->update_type == DELTA_IMG_AB) {
+ else if (ua_dataSS->update_cfg->update_type == EXTRA || ua_dataSS->update_cfg->update_type == DELTA_IMAGE) {
FILE *fp = NULL;
char buf[14] = { 0, }; //to store zImage-delta magic keyword
LOGL(LOG_SSENGINE, "short read of \"%s\" (%ld bytes of %ld)\n", SS_PATCHFILE_SOURCE, (long)bytes_read, (long)13);
fclose(fp);
- if (update_type == DELTA_IMG_AB)
+ if (update_type == DELTA_IMAGE)
ulResult = SS_UpdateDeltaIMGAB(ua_dataSS);
else if (strncmp(buf, SS_KERNEL_MAGIC, sizeof(buf) / sizeof(char)) == 0)
ulResult = SS_UpdateDeltaKernel(ua_dataSS, ua_dataSS->write_data_to_blkdev);
- else
- ulResult = SS_UpdateDeltaIMG(ua_dataSS, ua_dataSS->write_data_to_blkdev);
} else {
LOGE("Update type is INVALID - Exit \n");
ulResult = E_SS_FAILURE;