Add already opened file logic

This commit is contained in:
li_zan 2021-05-08 15:18:01 +08:00
parent 3a4a8b0680
commit 96d2f2910e
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ FileOpInfo GetFsOpInfo(void)
LittleFsHandleStruct *GetFreeFd(const char *fileName, int *fd) LittleFsHandleStruct *GetFreeFd(const char *fileName, int *fd)
{ {
int len = strlen() + 1; int len = strlen(fileName) + 1;
pthread_mutex_lock(&g_FslocalMutex); pthread_mutex_lock(&g_FslocalMutex);
for (int i = 0; i < LITTLE_FS_MAX_OPEN_FILES; i++) { for (int i = 0; i < LITTLE_FS_MAX_OPEN_FILES; i++) {