Pārlūkot izejas kodu

spi_flash: fix partitions order

Pointer to the tail of linked list was never set, so partitions were
added to the head, instead of adding them to the tail.
Ivan Grokhotkov 9 gadi atpakaļ
vecāks
revīzija
fa09c8af61
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      components/spi_flash/partition.c

+ 1 - 0
components/spi_flash/partition.c

@@ -184,6 +184,7 @@ static esp_err_t load_partitions()
         } else {
         } else {
             SLIST_INSERT_AFTER(last, item, next);
             SLIST_INSERT_AFTER(last, item, next);
         }
         }
+        last = item;
     }
     }
     spi_flash_munmap(handle);
     spi_flash_munmap(handle);
     return ESP_OK;
     return ESP_OK;