NVS: partition name is copied now

Closes IDF-1231
This commit is contained in:
Jakob Hasse
2019-12-06 16:16:07 +08:00
parent 2cb7534bc5
commit c31c45cae7
5 changed files with 91 additions and 20 deletions

View File

@@ -102,6 +102,8 @@ extern "C" esp_err_t nvs_flash_init_custom(const char *partName, uint32_t baseSe
{
ESP_LOGD(TAG, "nvs_flash_init_custom partition=%s start=%d count=%d", partName, baseSector, sectorCount);
if (strlen(partName) > NVS_PART_NAME_MAX_SIZE) return ESP_ERR_INVALID_ARG;
nvs::Storage* new_storage = NULL;
nvs::Storage* storage = lookup_storage_from_name(partName);
if (storage == NULL) {