dfsv2 code tidy. (#8374)

This commit is contained in:
geniusgogo
2023-12-16 18:06:47 +08:00
committed by GitHub
parent 4658267117
commit 6b22a0a2b7
8 changed files with 201 additions and 275 deletions
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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;