]> granicus.if.org Git - esp-idf/commitdiff
Allow writes to encrypted partitions
authorDeomid Ryabkov <rojer@cesanta.com>
Mon, 16 Jan 2017 22:03:58 +0000 (22:03 +0000)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 17 Jan 2017 04:32:01 +0000 (12:32 +0800)
There is a size alignment requirement but it is checked by
spi_flash_write_encrypted. However, this check flat-out bans encrypted
writes.

components/spi_flash/partition.c

index 490efbb32ca6c4270d2c4d5e02f5d017195a9d0d..45f66d696b9d51cb005d2c530b94293a2e758f8f 100644 (file)
@@ -230,10 +230,6 @@ esp_err_t esp_partition_write(const esp_partition_t* partition,
                              size_t dst_offset, const void* src, size_t size)
 {
     assert(partition != NULL);
-    //todo : need add ecrypt write support ,size must be 32-bytes align 
-    if(partition->encrypted == true) {
-        return ESP_FAIL;
-    }
     if (dst_offset > partition->size) {
         return ESP_ERR_INVALID_ARG;
     }