diff --git a/components/fs/vfs/vfs_config.h b/components/fs/vfs/vfs_config.h index 93cc10a3..74640798 100644 --- a/components/fs/vfs/vfs_config.h +++ b/components/fs/vfs/vfs_config.h @@ -49,19 +49,15 @@ #ifdef LOSCFG_FS_FAT #include "fatfs_conf.h" -#define __FAT_NFILE FAT_MAX_OPEN_FILES -#else -#define __FAT_NFILE 0 #endif #ifdef LOSCFG_FS_LITTLEFS #include "lfs_conf.h" -#define __LFS_NFILE LOSCFG_LFS_MAX_OPEN_FILES -#else -#define __LFS_NFILE 0 #endif -#define CONFIG_NFILE_DESCRIPTORS (__FAT_NFILE + __LFS_NFILE) +#ifndef CONFIG_NFILE_DESCRIPTORS +#define CONFIG_NFILE_DESCRIPTORS 256 +#endif #define NR_OPEN_DEFAULT CONFIG_NFILE_DESCRIPTORS diff --git a/components/fs/vfs/vfs_fs.c b/components/fs/vfs/vfs_fs.c index daf1ee8e..0bec9575 100644 --- a/components/fs/vfs/vfs_fs.c +++ b/components/fs/vfs/vfs_fs.c @@ -57,10 +57,6 @@ #define CONFIG_NSOCKET_DESCRIPTORS 0 #endif -#ifndef CONFIG_NFILE_DESCRIPTORS -#define CONFIG_NFILE_DESCRIPTORS 256 -#endif - #ifdef LOSCFG_RANDOM_DEV #include "hks_client.h" #define RANDOM_DEV_FD CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS