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

12

/freebsd-11-stable/lib/libc/gen/
H A Ddup3.c41 __dup3(int oldfd, int newfd, int flags) argument
45 if (oldfd == newfd) {
57 return (_fcntl(oldfd, how, newfd));
/freebsd-11-stable/cddl/compat/opensolaris/misc/
H A Dfsshare.c155 FILE *newfd, *oldfd; local
158 newfd = oldfd = NULL;
181 oldfd = fopen(file, "r");
182 if (oldfd == NULL) {
196 error = flock(fileno(oldfd), LOCK_EX);
203 while (oldfd != NULL && (line = zgetline(oldfd, mountpoint)) != NULL)
205 if (oldfd != NULL && ferror(oldfd) != 0) {
206 error = ferror(oldfd);
[all...]
/freebsd-11-stable/usr.bin/bsdiff/bspatch/
H A Dbspatch.c115 int newfd, oldfd; local
143 if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0)
174 cap_rights_limit(oldfd, &rights_ro) < 0 ||
235 if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 ||
238 lseek(oldfd, 0, SEEK_SET) != 0 ||
239 read(oldfd, old, oldsize) != oldsize ||
240 close(oldfd) == -1)
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.h46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
H A Dtsan_fd.cpp225 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { argument
226 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd);
227 if (bogusfd(oldfd) || bogusfd(newfd))
230 FdDesc *od = fddesc(thr, pc, oldfd);
H A Dtsan_interceptors_posix.cpp1553 TSAN_INTERCEPTOR(int, dup, int oldfd) { argument
1554 SCOPED_TSAN_INTERCEPTOR(dup, oldfd);
1555 int newfd = REAL(dup)(oldfd);
1556 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd)
1557 FdDup(thr, pc, oldfd, newfd, true);
1561 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) { argument
1562 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd);
1563 int newfd2 = REAL(dup2)(oldfd, newfd);
1564 if (oldfd >
1570 TSAN_INTERCEPTOR(int, dup3, int oldfd, int newfd, int flags) argument
[all...]
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_solaris.cpp123 DECLARE__REAL_AND_INTERNAL(uptr, dup, int oldfd) { argument
124 return _REAL(dup)(oldfd);
127 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { argument
128 return _REAL(dup2)(oldfd, newfd);
H A Dsanitizer_posix.h51 uptr internal_dup(int oldfd);
52 uptr internal_dup2(int oldfd, int newfd);
H A Dsanitizer_netbsd.cpp171 uptr internal_dup(int oldfd) { argument
173 return _REAL(dup, oldfd);
176 uptr internal_dup2(int oldfd, int newfd) { argument
178 return _REAL(dup2, oldfd, newfd);
H A Dsanitizer_mac.cpp179 uptr internal_dup(int oldfd) { argument
180 return dup(oldfd);
183 uptr internal_dup2(int oldfd, int newfd) { argument
184 return dup2(oldfd, newfd);
H A Dsanitizer_linux.cpp377 uptr internal_dup(int oldfd) { argument
378 return internal_syscall(SYSCALL(dup), oldfd);
381 uptr internal_dup2(int oldfd, int newfd) { argument
383 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0);
385 return internal_syscall(SYSCALL(dup2), oldfd, newfd);
/freebsd-11-stable/contrib/atf/atf-c/detail/
H A Dprocess.c310 safe_dup(const int oldfd, const int newfd) argument
314 if (oldfd != newfd) {
315 if (dup2(oldfd, newfd) == -1) {
318 close(oldfd);
/freebsd-11-stable/contrib/ofed/librdmacm/
H A Dpreload.c88 int (*dup2)(int oldfd, int newfd);
1104 int dup2(int oldfd, int newfd) argument
1110 oldfdi = idm_lookup(&idm, oldfd);
1113 fork_passive(oldfd);
1115 fork_active(oldfd);
1126 ret = real.dup2(oldfd, newfd);
1146 newfdi->dupfd = oldfd;
/freebsd-11-stable/contrib/llvm-project/compiler-rt/include/sanitizer/
H A Dlinux_syscall_hooks.h730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \
731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd))
732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \
733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd))
734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \
735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags))
736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \
737 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \
2414 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd);
2415 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, lon
[all...]
/freebsd-11-stable/sys/sys/
H A Dsyscallsubr.h215 int kern_renameat(struct thread *td, int oldfd, char *old, int newfd,
/freebsd-11-stable/contrib/gcclibs/libcpp/
H A Dfiles.c1573 int oldfd = f->fd;
1583 f->fd = oldfd;
1572 int oldfd = f->fd; local
/freebsd-11-stable/sys/kern/
H A Dvfs_syscalls.c3183 int oldfd; member in struct:renameat_args
3193 return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new,
3198 kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, argument
3211 AUDITVNODE1, pathseg, old, oldfd,
3215 pathseg, old, oldfd,
H A Dsystrace_args.c2926 iarg[0] = p->oldfd; /* int */
/freebsd-11-stable/sys/compat/linux/
H A Dlinux_file.c1678 if (args->oldfd == args->newfd)
1688 return (kern_fcntl(td, args->oldfd, cmd, newfd));
/freebsd-11-stable/sys/amd64/linux/
H A Dlinux_systrace_args.c2096 iarg[0] = p->oldfd; /* l_int */
2300 iarg[0] = p->oldfd; /* l_int */
H A Dlinux_proto.h1007 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member in struct:linux_dup3_args
1127 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member in struct:linux_renameat2_args
/freebsd-11-stable/sys/amd64/linux32/
H A Dlinux32_systrace_args.c2237 iarg[0] = p->oldfd; /* l_int */
2427 iarg[0] = p->oldfd; /* l_int */
H A Dlinux32_proto.h1087 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member in struct:linux_dup3_args
1201 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member in struct:linux_renameat2_args
/freebsd-11-stable/sys/i386/linux/
H A Dlinux_systrace_args.c2313 iarg[0] = p->oldfd; /* l_int */
2503 iarg[0] = p->oldfd; /* l_int */
H A Dlinux_proto.h1105 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member in struct:linux_dup3_args
1219 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member in struct:linux_renameat2_args

Completed in 355 milliseconds

12