Commit 4bc83f3d authored by Roman Vaughan's avatar Roman Vaughan Committed by Anas Nashif
Browse files

fs: Set MAX_FILE_NAME appropiately with LFN and FATFS



Try to define MAX_FILE_NAME to the appropriate max length based on the
selected filesystm. Otherwise fallback to a standard filename of 12
(made up of 8.3 : <filename>.<extension>)

Signed-off-by: default avatarRoman Vaughan <nzsmartie@gmail.com>
Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 537d11f4
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -13,9 +13,16 @@ extern "C" {

#if defined(CONFIG_FILE_SYSTEM_LITTLEFS)
#define MAX_FILE_NAME 256
#else /* FAT_FS */
#elif defined(CONFIG_FAT_FILESYSTEM_ELM)
#if defined(CONFIG_FS_FATFS_LFN)
#define MAX_FILE_NAME CONFIG_FS_FATFS_MAX_LFN
#else /* CONFIG_FS_FATFS_LFN */
#define MAX_FILE_NAME 12 /* Uses 8.3 SFN */
#endif
#endif /* CONFIG_FS_FATFS_LFN */
#else /* filesystem selection */
/* Use standard 8.3 when no filesystem is explicitly selected */
#define MAX_FILE_NAME 12
#endif /* filesystem selection */

struct fs_mount_t;