!959 fix: monthly_20221018 对外提供CONFIG_NFILE_DESCRIPTORS宏表示最大可打开fd数量

Merge pull request !959 from Hongjin Li/cherry-pick-1670397258
This commit is contained in:
openharmony_ci 2022-12-07 07:49:48 +00:00 committed by Gitee
commit da29e90bca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 11 deletions

View File

@ -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

View File

@ -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