mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(vfs): FATFS mount immediately after format if mount failed
This commit is contained in:
parent
0a615a6783
commit
567cf951bd
@ -114,7 +114,7 @@ static esp_err_t mount_to_vfs_fat(const esp_vfs_fat_mount_config_t *mount_config
|
|||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGW(TAG, "mounting again");
|
ESP_LOGW(TAG, "mounting again");
|
||||||
res = f_mount(fs, drv, 0);
|
res = f_mount(fs, drv, 1);
|
||||||
if (res != FR_OK) {
|
if (res != FR_OK) {
|
||||||
err = ESP_FAIL;
|
err = ESP_FAIL;
|
||||||
ESP_LOGD(TAG, "f_mount failed after formatting (%d)", res);
|
ESP_LOGD(TAG, "f_mount failed after formatting (%d)", res);
|
||||||
|
@ -93,7 +93,7 @@ esp_err_t esp_vfs_fat_spiflash_mount_rw_wl(const char* base_path,
|
|||||||
free(workbuf);
|
free(workbuf);
|
||||||
workbuf = NULL;
|
workbuf = NULL;
|
||||||
ESP_LOGI(TAG, "Mounting again");
|
ESP_LOGI(TAG, "Mounting again");
|
||||||
fresult = f_mount(fs, drv, 0);
|
fresult = f_mount(fs, drv, 1);
|
||||||
if (fresult != FR_OK) {
|
if (fresult != FR_OK) {
|
||||||
result = ESP_FAIL;
|
result = ESP_FAIL;
|
||||||
ESP_LOGE(TAG, "f_mount failed after formatting (%d)", fresult);
|
ESP_LOGE(TAG, "f_mount failed after formatting (%d)", fresult);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user