Lines Matching refs:newfd
53 SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags) in SYSCALL_DEFINE3() argument
63 if (unlikely(oldfd == newfd)) in SYSCALL_DEFINE3()
67 err = expand_files(files, newfd); in SYSCALL_DEFINE3()
92 tofree = fdt->fd[newfd]; in SYSCALL_DEFINE3()
93 if (!tofree && FD_ISSET(newfd, fdt->open_fds)) in SYSCALL_DEFINE3()
96 rcu_assign_pointer(fdt->fd[newfd], file); in SYSCALL_DEFINE3()
97 FD_SET(newfd, fdt->open_fds); in SYSCALL_DEFINE3()
99 FD_SET(newfd, fdt->close_on_exec); in SYSCALL_DEFINE3()
101 FD_CLR(newfd, fdt->close_on_exec); in SYSCALL_DEFINE3()
107 return newfd; in SYSCALL_DEFINE3()
116 SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd) in SYSCALL_DEFINE2() argument
118 if (unlikely(newfd == oldfd)) { /* corner case */ in SYSCALL_DEFINE2()
126 return sys_dup3(oldfd, newfd, 0); in SYSCALL_DEFINE2()