Update dfs.c

修复list_fd打印乱码问题
This commit is contained in:
Bluebear233 2018-06-29 10:50:16 +08:00 committed by GitHub
parent 614b2e389c
commit 052e6009d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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