From 052e6009d031d5d7f811a2a22d1e63b09c191b00 Mon Sep 17 00:00:00 2001 From: Bluebear233 <417350690@qq.com> Date: Fri, 29 Jun 2018 10:50:16 +0800 Subject: [PATCH] Update dfs.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复list_fd打印乱码问题 --- components/dfs/src/dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 01f5f9ccc3..fbc0899d36 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -529,7 +529,7 @@ int list_fd(void) { struct dfs_fd *fd = fd_table->fds[index]; - if (fd->fops) + if (fd != RT_NULL) { rt_kprintf("%2d ", index); if (fd->type == FT_DIRECTORY) rt_kprintf("%-7.7s ", "dir");