Merge "Bugfix:updater always retry apply patch failed,when memcpy failed." am: e81719dde3 am: b0337774b2 am: 88bd5d59de

am: 794075c575

Change-Id: Ic26d6041fb77e1969ad37a691b7d7cd422e9e9e9
This commit is contained in:
Tao Bao
2016-12-19 19:33:37 +00:00
committed by android-build-merger
+11
View File
@@ -332,6 +332,17 @@ int WriteToPartition(const unsigned char* data, size_t len, const std::string& t
success = true;
break;
}
if (ota_close(fd) != 0) {
printf("failed to close %s: %s\n", partition, strerror(errno));
return -1;
}
fd.reset(ota_open(partition, O_RDWR));
if (fd == -1) {
printf("failed to reopen %s for retry write && verify: %s\n", partition, strerror(errno));
return -1;
}
}
if (!success) {