Merge pull request #2899 from gbcwbz/fix-dfs-list_fd

[components][dfs] Fix fd error in command list_fd
This commit is contained in:
Bernard Xiong 2019-07-29 13:33:49 +08:00 committed by GitHub
commit 4bd0ce9bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -537,7 +537,7 @@ int list_fd(void)
if (fd && fd->fops)
{
rt_kprintf("%2d ", index);
rt_kprintf("%2d ", index + DFS_FD_OFFSET);
if (fd->type == FT_DIRECTORY) rt_kprintf("%-7.7s ", "dir");
else if (fd->type == FT_REGULAR) rt_kprintf("%-7.7s ", "file");
else if (fd->type == FT_SOCKET) rt_kprintf("%-7.7s ", "socket");