summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fat/fs_fat32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index f0845070b..7b7ce1f5f 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -1705,7 +1705,11 @@ static int fat_statfs(struct inode *mountpt, struct statfs *buf)
{
buf->f_blocks = fs->fs_nclusters; /* Total data blocks in the file system */
buf->f_bavail = buf->f_bfree; /* Free blocks avail to non-superuser */
+#ifdef CONFIG_FAT_LFN
+ buf->f_namelen = LDIR_MAXFNAME; /* Maximum length of filenames */
+#else
buf->f_namelen = (8+1+3); /* Maximum length of filenames */
+#endif
}
errout_with_semaphore: