Explorar o código

[components][dfs] Fix fd error in command list_fd

gbcwbz %!s(int64=6) %!d(string=hai) anos
pai
achega
97c9abffd1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      components/dfs/src/dfs.c

+ 1 - 1
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");