From 09aae72bfaa371799b30d029efd4b4d6961f22e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rohl=C3=ADnek?= Date: Thu, 13 Feb 2025 10:08:32 +0100 Subject: [PATCH] docs(storage/fatfs): discrepancies between FATFS and POSIX Closes https://github.com/espressif/esp-idf/issues/15187 --- docs/en/api-reference/storage/fatfs.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/en/api-reference/storage/fatfs.rst b/docs/en/api-reference/storage/fatfs.rst index 8a3f2b3d0c..f7cf6cfd6c 100644 --- a/docs/en/api-reference/storage/fatfs.rst +++ b/docs/en/api-reference/storage/fatfs.rst @@ -43,10 +43,11 @@ Most applications use the following workflow when working with ``esp_vfs_fat_`` The convenience functions :cpp:func:`esp_vfs_fat_sdmmc_mount`, :cpp:func:`esp_vfs_fat_sdspi_mount`, and :cpp:func:`esp_vfs_fat_sdcard_unmount` wrap the steps described above and also handle SD card initialization. These functions are described in the next section. -.. note:: - - Because FAT filesystem does not support hardlinks, :cpp:func:`link` copies contents of the file instead. (This only applies to files on FatFs volumes.) +Differences to POSIX standard +----------------------------- +#. :cpp:func:`link`: Because FAT filesystem does not support hardlinks, :cpp:func:`link` copies contents of the file instead. (This only applies to files on FatFs volumes.) +#. :cpp:func:`unlink`: When trying to remove an open file, the operation will either fail with ``EBUSY``, when ``CONFIG_FATFS_FS_LOCK`` is enabled, or the behaviour is undefined (possibly causing FS corruption), if not. .. _using-fatfs-with-vfs-and-sdcards: