Merge pull request #1649 from enkiller/dev

[components][dfs]修复list_fd打印乱码的问题
This commit is contained in:
aozima 2018-07-20 16:32:02 +08:00 committed by GitHub
commit c64689147a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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