Home
last modified time | relevance | path

Searched refs:oldfd (Results 1 – 25 of 28) sorted by relevance

12

/freebsd-14.2/lib/libc/gen/
H A Ddup3.c40 __dup3(int oldfd, int newfd, int flags) in __dup3() argument
44 if (oldfd == newfd) { in __dup3()
56 return (_fcntl(oldfd, how, newfd)); in __dup3()
/freebsd-14.2/usr.bin/bsdiff/bspatch/
H A Dbspatch.c106 int newfd, oldfd; in main() local
134 if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) in main()
162 cap_rights_limit(oldfd, &rights_ro) < 0 || in main()
222 if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 || in main()
225 lseek(oldfd, 0, SEEK_SET) != 0 || in main()
226 read(oldfd, old, oldsize) != oldsize || in main()
227 close(oldfd) == -1) in main()
/freebsd-14.2/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_solaris.cpp137 DECLARE__REAL_AND_INTERNAL(uptr, dup, int oldfd) { in DECLARE__REAL_AND_INTERNAL() argument
138 return _REAL(dup)(oldfd); in DECLARE__REAL_AND_INTERNAL()
141 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { in DECLARE__REAL_AND_INTERNAL() argument
142 return _REAL(dup2)(oldfd, newfd); in DECLARE__REAL_AND_INTERNAL()
H A Dsanitizer_netbsd.cpp182 uptr internal_dup(int oldfd) { in internal_dup() argument
184 return _REAL(dup, oldfd); in internal_dup()
187 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument
189 return _REAL(dup2, oldfd, newfd); in internal_dup2()
H A Dsanitizer_posix.h52 uptr internal_dup(int oldfd);
53 uptr internal_dup2(int oldfd, int newfd);
H A Dsanitizer_mac.cpp200 uptr internal_dup(int oldfd) { in internal_dup() argument
201 return dup(oldfd); in internal_dup()
204 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument
205 return dup2(oldfd, newfd); in internal_dup2()
H A Dsanitizer_linux.cpp462 uptr internal_dup(int oldfd) { return internal_syscall(SYSCALL(dup), oldfd); } in internal_dup() argument
464 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument
466 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); in internal_dup2()
468 return internal_syscall(SYSCALL(dup2), oldfd, newfd); in internal_dup2()
H A Dsanitizer_common_syscalls.inc1351 PRE_SYSCALL(dup2)(long oldfd, long newfd) {}
1353 POST_SYSCALL(dup2)(long res, long oldfd, long newfd) {}
1355 PRE_SYSCALL(dup3)(long oldfd, long newfd, long flags) {}
1357 POST_SYSCALL(dup3)(long res, long oldfd, long newfd, long flags) {}
/freebsd-14.2/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.cpp260 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { in FdDup() argument
261 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); in FdDup()
262 if (bogusfd(oldfd) || bogusfd(newfd)) in FdDup()
265 FdDesc *od = fddesc(thr, pc, oldfd); in FdDup()
H A Dtsan_interceptors_posix.cpp1707 TSAN_INTERCEPTOR(int, dup, int oldfd) { in TSAN_INTERCEPTOR() argument
1708 SCOPED_TSAN_INTERCEPTOR(dup, oldfd); in TSAN_INTERCEPTOR()
1709 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR()
1710 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR()
1711 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR()
1716 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); in TSAN_INTERCEPTOR()
1717 int newfd2 = REAL(dup2)(oldfd, newfd); in TSAN_INTERCEPTOR()
1718 if (oldfd >= 0 && newfd2 >= 0 && newfd2 != oldfd) in TSAN_INTERCEPTOR()
1719 FdDup(thr, pc, oldfd, newfd2, false); in TSAN_INTERCEPTOR()
1727 if (oldfd >= 0 && newfd2 >= 0 && newfd2 != oldfd) in TSAN_INTERCEPTOR()
[all …]
H A Dtsan_fd.h46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
/freebsd-14.2/contrib/atf/atf-c/detail/
H A Dprocess.c311 safe_dup(const int oldfd, const int newfd) in safe_dup() argument
315 if (oldfd != newfd) { in safe_dup()
316 if (dup2(oldfd, newfd) == -1) { in safe_dup()
319 close(oldfd); in safe_dup()
/freebsd-14.2/contrib/ofed/librdmacm/
H A Dpreload.c88 int (*dup2)(int oldfd, int newfd);
1104 int dup2(int oldfd, int newfd) in dup2() argument
1110 oldfdi = idm_lookup(&idm, oldfd); in dup2()
1113 fork_passive(oldfd); in dup2()
1115 fork_active(oldfd); in dup2()
1126 ret = real.dup2(oldfd, newfd); in dup2()
1146 newfdi->dupfd = oldfd; in dup2()
/freebsd-14.2/contrib/llvm-project/compiler-rt/include/sanitizer/
H A Dlinux_syscall_hooks.h730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ argument
731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd))
732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ argument
733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd))
734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ argument
735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags))
736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ argument
2423 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd);
2424 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd);
2425 void __sanitizer_syscall_pre_impl_dup3(long oldfd, long newfd, long flags);
[all …]
/freebsd-14.2/sys/kern/
H A Dvfs_syscalls.c3639 int oldfd; member
3649 return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new, in sys_renameat()
3655 kern_renameat_mac(struct thread *td, int oldfd, const char *old, int newfd, in kern_renameat_mac() argument
3661 pathseg, old, oldfd, &cap_renameat_source_rights); in kern_renameat_mac()
3679 kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, in kern_renameat() argument
3692 error = kern_renameat_mac(td, oldfd, old, newfd, new, pathseg, in kern_renameat()
3699 pathseg, old, oldfd, &cap_renameat_source_rights); in kern_renameat()
H A Dsystrace_args.c2727 iarg[a++] = p->oldfd; /* int */ in systrace_args()
/freebsd-14.2/sys/compat/linux/
H A Dlinux_file.c1676 if (args->oldfd == args->newfd) in linux_dup3()
1686 return (kern_fcntl(td, args->oldfd, cmd, newfd)); in linux_dup3()
/freebsd-14.2/sys/sys/
H A Dsyscallsubr.h293 int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd,
/freebsd-14.2/sys/arm64/linux/
H A Dlinux_systrace_args.c188 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
H A Dlinux_proto.h131 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member
/freebsd-14.2/sys/amd64/linux/
H A Dlinux_systrace_args.c2244 iarg[a++] = p->oldfd; /* l_uint */ in systrace_args()
H A Dlinux_proto.h1106 char oldfd_l_[PADL_(l_uint)]; l_uint oldfd; char oldfd_r_[PADR_(l_uint)]; member
/freebsd-14.2/sys/i386/linux/
H A Dlinux_systrace_args.c2396 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
H A Dlinux_proto.h1172 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member
/freebsd-14.2/sys/amd64/linux32/
H A Dlinux32_systrace_args.c2365 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()

12