!934 fix: 对外提供CONFIG_NFILE_DESCRIPTORS宏表示最大可打开fd数量
Merge pull request !934 from Hongjin Li/fs1
This commit is contained in:
commit
c7da881469
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue