Forráskód Böngészése

[修复] 修复编译错误

Signed-off-by: liu2guang <1004383796@qq.com>
liu2guang 4 éve
szülő
commit
a58f4a2150
2 módosított fájl, 3 hozzáadás és 3 törlés
  1. 1 1
      components/dfs/src/dfs.c
  2. 2 2
      components/lwp/unix98pty/lwp_ptmx.c

+ 1 - 1
components/dfs/src/dfs.c

@@ -877,7 +877,7 @@ int lsof(int argc, char *argv[])
     return 0;
 }
 MSH_CMD_EXPORT(lsof, list open files); 
-#ifdef RT_USING_LWP
+#endif /* RT_USING_LWP */ 
 
 /*
  * If no argument is specified, display the mount history;

+ 2 - 2
components/lwp/unix98pty/lwp_ptmx.c

@@ -39,7 +39,7 @@ static struct rt_pts_device *ptmxfd2pts(struct dfs_fd *fd)
     int ptmx_fd = -1; 
     struct rt_pts_device *pts = RT_NULL; 
 
-    ptmx_fd = fd_get_fd(fd); 
+    ptmx_fd = fd_get_fd_index(fd); 
     for(int i = 0; i < LWP_PTY_PTS_SIZE; i++)
     {
         struct rt_pts_device *_pts = RT_NULL; 
@@ -73,7 +73,7 @@ static int ptmx_file_open(struct dfs_fd *fd)
     }
 
     /* 注册 pts 设备 */ 
-    ptmx_fd = fd_get_fd(fd); 
+    ptmx_fd = fd_get_fd_index(fd); 
     ret = lwp_pts_register(pts, ptmx_fd, ptmx->pts_index); 
     if(ret != RT_EOK)
     {