]> granicus.if.org Git - esp-idf/commitdiff
spi_flash: fix partitions order
authorIvan Grokhotkov <ivan@espressif.com>
Sat, 4 Mar 2017 07:34:03 +0000 (15:34 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Sat, 4 Mar 2017 07:34:03 +0000 (15:34 +0800)
Pointer to the tail of linked list was never set, so partitions were
added to the head, instead of adding them to the tail.

components/spi_flash/partition.c

index 89ad9807e92a452e13a47a589b28e0b5297f2a57..94d6ff6a66c34780a58d7b9bab52870ff4baeb38 100644 (file)
@@ -184,6 +184,7 @@ static esp_err_t load_partitions()
         } else {
             SLIST_INSERT_AFTER(last, item, next);
         }
+        last = item;
     }
     spi_flash_munmap(handle);
     return ESP_OK;