esp_err_t esp_ota_end(esp_ota_handle_t handle)
{
- esp_err_t ret;
ota_ops_entry_t *it;
- size_t image_size;
for (it = LIST_FIRST(&s_ota_ops_entries_head); it != NULL; it = LIST_NEXT(it, entries)) {
if (it->handle == handle) {
// an ota handle need to be ended after erased and wrote data in it
}
#ifdef CONFIG_SECUREBOOTLOADER
+ esp_err_t ret;
+ size_t image_size;
if (esp_image_basic_verify(it->part.address, &image_size) != ESP_OK) {
return ESP_ERR_OTA_VALIDATE_FAILED;
}
esp_err_t esp_ota_set_boot_partition(const esp_partition_t *partition)
{
const esp_partition_t *find_partition = NULL;
- size_t image_size;
if (partition == NULL) {
return ESP_ERR_INVALID_ARG;
}
#ifdef CONFIG_SECUREBOOTLOADER
+ size_t image_size;
if (esp_image_basic_verify(partition->address, &image_size) != ESP_OK) {
return ESP_ERR_OTA_VALIDATE_FAILED;
}