Sfoglia il codice sorgente

Merge pull request #1649 from enkiller/dev

[components][dfs]修复list_fd打印乱码的问题
aozima 6 anni fa
parent
commit
c64689147a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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");