Home
last modified time | relevance | path

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

/freebsd/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/usr.bin/bsdiff/bspatch/
H A Dbspatch.c107 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 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.cpp523 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 Dsanitizer_common_syscalls.inc1365 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 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.cpp1718 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 Dtsan_fd.h46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
/freebsd/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/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/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
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 Dvfs_syscalls.c3676 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 Dsystrace_args.c2714 iarg[a++] = p->oldfd; /* int */ in systrace_args()
/freebsd/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/sys/sys/
H A Dsyscallsubr.h302 int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd,
H A Dsysproto.h1461 char oldfd_l_[PADL_(int)]; int oldfd; char oldfd_r_[PADR_(int)]; member
/freebsd/lib/libsys/
H A D_libsys.h784 int __sys_renameat(int oldfd, const char * old, int newfd, const char * new);
/freebsd/sys/arm64/linux/
H A Dlinux_systrace_args.c189 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
/freebsd/sys/amd64/linux/
H A Dlinux_systrace_args.c2245 iarg[a++] = p->oldfd; /* l_uint */ in systrace_args()
/freebsd/sys/i386/linux/
H A Dlinux_systrace_args.c2397 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
/freebsd/sys/amd64/linux32/
H A Dlinux32_systrace_args.c2366 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
/freebsd/sys/compat/freebsd32/
H A Dfreebsd32_systrace_args.c2603 iarg[a++] = p->oldfd; /* int */ in systrace_args()