/freebsd/lib/libc/gen/ |
H A D | dup3.c | 40 __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/usr.bin/bsdiff/bspatch/ |
H A D | bspatch.c | 107 int newfd, oldfd; in main() 135 if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) in main() 163 cap_rights_limit(oldfd, &rights_ro) < 0 || in main() 223 if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 || in main() 227 old = mmap(NULL, oldsize+1, PROT_READ, MAP_SHARED, oldfd, 0); in main() 228 if (old == MAP_FAILED || close(oldfd) != 0) in main() 106 int newfd, oldfd; main() local
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_solaris.cpp | 137 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 D | sanitizer_netbsd.cpp | 182 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 D | sanitizer_posix.h | 52 uptr internal_dup(int oldfd); 53 uptr internal_dup2(int oldfd, int newfd);
|
H A D | sanitizer_mac.cpp | 200 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 D | sanitizer_linux.cpp | 523 uptr internal_dup(int oldfd) { return internal_syscall(SYSCALL(dup), oldfd); } in internal_dup() argument 525 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 527 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); in internal_dup2() 529 return internal_syscall(SYSCALL(dup2), oldfd, newfd); in internal_dup2()
|
H A D | sanitizer_common_syscalls.inc | 1365 PRE_SYSCALL(dup2)(long oldfd, long newfd) {} 1367 POST_SYSCALL(dup2)(long res, long oldfd, long newfd) {} 1369 PRE_SYSCALL(dup3)(long oldfd, long newfd, long flags) {} 1371 POST_SYSCALL(dup3)(long res, long oldfd, long newfd, long flags) {}
|
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.cpp | 260 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 D | tsan_interceptors_posix.cpp | 1718 TSAN_INTERCEPTOR(int, dup, int oldfd) { in TSAN_INTERCEPTOR() argument 1719 SCOPED_TSAN_INTERCEPTOR(dup, oldfd); in TSAN_INTERCEPTOR() 1720 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR() 1721 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR() 1722 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR() 1726 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) { in TSAN_INTERCEPTOR() argument 1727 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); in TSAN_INTERCEPTOR() 1728 int newfd2 = REAL(dup2)(oldfd, newfd); in TSAN_INTERCEPTOR() 1729 if (oldfd >= 0 && newfd2 >= 0 && newfd2 != oldfd) in TSAN_INTERCEPTOR() 1730 FdDup(thr, pc, oldfd, newfd2, false); in TSAN_INTERCEPTOR() [all …]
|
H A D | tsan_fd.h | 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
|
/freebsd/contrib/atf/atf-c/detail/ |
H A D | process.c | 311 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/contrib/ofed/librdmacm/ |
H A D | preload.c | 88 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/contrib/llvm-project/compiler-rt/include/sanitizer/ |
H A D | linux_syscall_hooks.h | 730 #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 737 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \ 2430 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd); 2431 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd); [all …]
|
/freebsd/sys/kern/ |
H A D | vfs_syscalls.c | 3676 int oldfd; member 3686 return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new, in sys_renameat() 3692 kern_renameat_mac(struct thread *td, int oldfd, const char *old, int newfd, in kern_renameat_mac() argument 3698 pathseg, old, oldfd, &cap_renameat_source_rights); in kern_renameat_mac() 3716 kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, in kern_renameat() argument 3729 error = kern_renameat_mac(td, oldfd, old, newfd, new, pathseg, in kern_renameat() 3736 pathseg, old, oldfd, &cap_renameat_source_rights); in kern_renameat()
|
H A D | systrace_args.c | 2714 iarg[a++] = p->oldfd; /* int */ in systrace_args()
|
/freebsd/sys/compat/linux/ |
H A D | linux_file.c | 1676 if (args->oldfd == args->newfd) in linux_dup3() 1686 return (kern_fcntl(td, args->oldfd, cmd, newfd)); in linux_dup3()
|
/freebsd/sys/sys/ |
H A D | syscallsubr.h | 302 int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd,
|
H A D | sysproto.h | 1461 char oldfd_l_[PADL_(int)]; int oldfd; char oldfd_r_[PADR_(int)]; member
|
/freebsd/lib/libsys/ |
H A D | _libsys.h | 784 int __sys_renameat(int oldfd, const char * old, int newfd, const char * new);
|
/freebsd/sys/arm64/linux/ |
H A D | linux_systrace_args.c | 189 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
|
/freebsd/sys/amd64/linux/ |
H A D | linux_systrace_args.c | 2245 iarg[a++] = p->oldfd; /* l_uint */ in systrace_args()
|
/freebsd/sys/i386/linux/ |
H A D | linux_systrace_args.c | 2397 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
|
/freebsd/sys/amd64/linux32/ |
H A D | linux32_systrace_args.c | 2366 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
|
/freebsd/sys/compat/freebsd32/ |
H A D | freebsd32_systrace_args.c | 2603 iarg[a++] = p->oldfd; /* int */ in systrace_args()
|