mirror of
https://github.com/openharmony/third_party_FatFs.git
synced 2026-07-20 21:42:26 -04:00
fix: 修复ffconf.h中宏FF_FS_LOCK设置不合理的问题
方案描述: 1、修改FF_FS_LOCK宏定义为:#define FF_FS_LOCK (CONFIG_NFILE_DESCRIPTORS + LOSCFG_MAX_OPEN_DIRS - MIN_START_FD) 2、其中各个宏的含义如下: 2.1、CONFIG_NFILE_DESCRIPTORS 在vfs_config.h文件中定义,表示打开文件描述符fd的最大数量 2.2、LOSCFG_MAX_OPEN_DIRS 在vfs_config.h文件中定义,表示打开目录最大数量 2.3、MIN_START_FD 在vfs_config.h文件中定义,表示保留的三个文件描述符fd:stdin,stdout,stderr BREAKING CHANGE: 修复ffconf.h中宏FF_FS_LOCK设置不合理的问题 修改后的FF_FS_LOCK宏定义为:#define FF_FS_LOCK (CONFIG_NFILE_DESCRIPTORS + LOSCFG_MAX_OPEN_DIRS - MIN_START_FD) Close: #I663SZ Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com> Change-Id: I5389e57d4276e99d40c79cb5a449c6e5a1f1179e
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@
|
||||
#include "los_config.h"
|
||||
#else
|
||||
#include "fs_config.h"
|
||||
#include "vfs_config.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -315,7 +316,7 @@ enum STORAGE {
|
||||
#ifndef __LITEOS_M__
|
||||
#define FF_FS_LOCK CONFIG_NFILE_DESCRIPTORS
|
||||
#else
|
||||
#define FF_FS_LOCK 64
|
||||
#define FF_FS_LOCK (CONFIG_NFILE_DESCRIPTORS + LOSCFG_MAX_OPEN_DIRS - MIN_START_FD)
|
||||
#endif
|
||||
/* The option FF_FS_LOCK switches file lock function to control duplicated file open
|
||||
/ and illegal operation to open objects. This option must be 0 when FF_FS_READONLY
|
||||
|
||||
Reference in New Issue
Block a user