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_is_open(newfd, fdt)) in SYSCALL_DEFINE3()
96 rcu_assign_pointer(fdt->fd[newfd], file); in SYSCALL_DEFINE3()
97 __set_open_fd(newfd, fdt); in SYSCALL_DEFINE3()
99 __set_close_on_exec(newfd, fdt); in SYSCALL_DEFINE3()
101 __clear_close_on_exec(newfd, fdt); 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()
128 return sys_dup3(oldfd, newfd, 0); in SYSCALL_DEFINE2()