Skip to content

Commit 55069a7

Browse files
committed
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
2 parents 0c03c20 + 873ae74 commit 55069a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/fatfs/vfs/vfs_fat_sdmmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static esp_err_t s_f_mount(sdmmc_card_t *card, FATFS *fs, const char *drv, uint8
140140
}
141141

142142
ESP_LOGW(TAG, "mounting again");
143-
res = f_mount(fs, drv, 0);
143+
res = f_mount(fs, drv, 1);
144144
if (res != FR_OK) {
145145
err = ESP_FAIL;
146146
ESP_LOGD(TAG, "f_mount failed after formatting (%d)", res);

components/fatfs/vfs/vfs_fat_spiflash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static esp_err_t s_f_mount_rw(FATFS *fs, const char *drv, const esp_vfs_fat_moun
104104
}
105105

106106
ESP_LOGI(TAG, "Mounting again");
107-
fresult = f_mount(fs, drv, 0);
107+
fresult = f_mount(fs, drv, 1);
108108
ESP_RETURN_ON_FALSE(fresult == FR_OK, ESP_FAIL, TAG, "f_mount failed after formatting (%d)", fresult);
109109
} else {
110110
if (out_flags) {

0 commit comments

Comments
 (0)