소스 검색

[components][dfs]修复list_fd打印乱码的问题

tangyuxin 6 년 전
부모
커밋
cea61291e4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      components/dfs/src/dfs.c

+ 1 - 1
components/dfs/src/dfs.c

@@ -540,7 +540,7 @@ int list_fd(void)
     {
         struct dfs_fd *fd = fd_table->fds[index];
 
-        if (fd != RT_NULL)
+        if (fd && fd->fops)
         {
             rt_kprintf("%2d ", index);
             if (fd->type == FT_DIRECTORY)    rt_kprintf("%-7.7s ", "dir");