From 0a79d13a2d3b0c4f8360ab942434e1551df32e3c Mon Sep 17 00:00:00 2001 From: Steven Burnett Date: Sat, 11 Nov 2023 23:00:08 +0000 Subject: [PATCH] Add option to configure FATFS_USE_LABEL in menuconfig --- components/fatfs/Kconfig | 6 ++++++ components/fatfs/src/ffconf.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/fatfs/Kconfig b/components/fatfs/Kconfig index f2c737a6ce..5ff4e3ab97 100644 --- a/components/fatfs/Kconfig +++ b/components/fatfs/Kconfig @@ -239,4 +239,10 @@ menu "FAT Filesystem support" vfs_fat_pwrite(), vfs_fat_link(), vfs_fat_truncate() and vfs_fat_ftruncate() functions. This feature improves file-consistency and size reporting accuracy for the FatFS, at a price on decreased performance due to frequent disk operations + + config FATFS_USE_LABEL + bool "Use FATFS volume label" + default n + help + Allows FATFS volume label to be specified using f_setlabel endmenu diff --git a/components/fatfs/src/ffconf.h b/components/fatfs/src/ffconf.h index 7e25dd08f0..8d579002b6 100644 --- a/components/fatfs/src/ffconf.h +++ b/components/fatfs/src/ffconf.h @@ -49,7 +49,7 @@ / (0:Disable or 1:Enable) Also FF_FS_READONLY needs to be 0 to enable this option. */ -#define FF_USE_LABEL 0 +#define FF_USE_LABEL CONFIG_FATFS_USE_LABEL /* This option switches volume label functions, f_getlabel() and f_setlabel(). / (0:Disable or 1:Enable) */