瀏覽代碼

[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");