mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
dfsv2 code tidy. (#8374)
This commit is contained in:
@@ -1089,11 +1089,11 @@ static void lwp_copy_stdio_fdt(struct rt_lwp *lwp)
|
||||
{
|
||||
lwp_fdt->maxfd = 4;
|
||||
d = fd_get(0);
|
||||
fd_associate(lwp_fdt, 0, d);
|
||||
fdt_fd_associate_file(lwp_fdt, 0, d);
|
||||
d = fd_get(1);
|
||||
fd_associate(lwp_fdt, 1, d);
|
||||
fdt_fd_associate_file(lwp_fdt, 1, d);
|
||||
d = fd_get(2);
|
||||
fd_associate(lwp_fdt, 2, d);
|
||||
fdt_fd_associate_file(lwp_fdt, 2, d);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -961,7 +961,7 @@ static struct dfs_file *lwp_fd_get(int fdt_type, int fd)
|
||||
{
|
||||
fdt = dfs_fdtable_get();
|
||||
}
|
||||
return fdt_fd_get(fdt, fd);
|
||||
return fdt_get_file(fdt, fd);
|
||||
}
|
||||
|
||||
static void lwp_fd_release(int fdt_type, int fd)
|
||||
|
||||
@@ -2049,7 +2049,7 @@ static int lwp_copy_files(struct rt_lwp *dst, struct rt_lwp *src)
|
||||
/* dup files */
|
||||
for (i = 0; i < src_fdt->maxfd; i++)
|
||||
{
|
||||
d_s = fdt_fd_get(src_fdt, i);
|
||||
d_s = fdt_get_file(src_fdt, i);
|
||||
if (d_s)
|
||||
{
|
||||
dst_fdt->fds[i] = d_s;
|
||||
|
||||
Reference in New Issue
Block a user