mirror of
https://github.com/espressif/esp-idf
synced 2025-04-01 20:30:09 -04:00
Merge branch 'fix/fatfs_f_mount_immediately_after_formatting_v5.3_backport' into 'release/v5.3'
fix(vfs): FATFS mount immediately after format if mount failed (v5.3) See merge request espressif/esp-idf!32379
This commit is contained in:
commit
55069a785e
@ -140,7 +140,7 @@ static esp_err_t s_f_mount(sdmmc_card_t *card, FATFS *fs, const char *drv, uint8
|
|||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
@ -104,7 +104,7 @@ static esp_err_t s_f_mount_rw(FATFS *fs, const char *drv, const esp_vfs_fat_moun
|
|||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGI(TAG, "Mounting again");
|
ESP_LOGI(TAG, "Mounting again");
|
||||||
fresult = f_mount(fs, drv, 0);
|
fresult = f_mount(fs, drv, 1);
|
||||||
ESP_RETURN_ON_FALSE(fresult == FR_OK, ESP_FAIL, TAG, "f_mount failed after formatting (%d)", fresult);
|
ESP_RETURN_ON_FALSE(fresult == FR_OK, ESP_FAIL, TAG, "f_mount failed after formatting (%d)", fresult);
|
||||||
} else {
|
} else {
|
||||||
if (out_flags) {
|
if (out_flags) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user