From 97c9abffd11183fa396b920baa10864ee4eaefb7 Mon Sep 17 00:00:00 2001 From: gbcwbz Date: Fri, 26 Jul 2019 19:07:05 +0800 Subject: [PATCH] [components][dfs] Fix fd error in command 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 32cbbf643..b20de1398 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -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"); -- GitLab