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: Roman Vaughan <nzsmartie@gmail.com>
This commit is contained in:
parent
70df7a87a1
commit
42ee2e0938
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue