| /freebsd-12.1/cddl/compat/opensolaris/misc/ |
| H A D | fsshare.c | 155 FILE *newfd, *oldfd; in fsshare_main() local 158 newfd = oldfd = NULL; in fsshare_main() 181 oldfd = fopen(file, "r"); in fsshare_main() 182 if (oldfd == NULL) { in fsshare_main() 196 error = flock(fileno(oldfd), LOCK_EX); in fsshare_main() 203 while (oldfd != NULL && (line = zgetline(oldfd, mountpoint)) != NULL) in fsshare_main() 205 if (oldfd != NULL && ferror(oldfd) != 0) { in fsshare_main() 206 error = ferror(oldfd); in fsshare_main() 233 if (oldfd != NULL) { in fsshare_main() 234 flock(fileno(oldfd), LOCK_UN); in fsshare_main() [all …]
|
| /freebsd-12.1/usr.bin/bsdiff/bspatch/ |
| H A D | bspatch.c | 98 int newfd, oldfd; in main() local 126 if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) in main() 157 cap_rights_limit(oldfd, &rights_ro) < 0 || in main() 218 if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 || in main() 221 lseek(oldfd, 0, SEEK_SET) != 0 || in main() 222 read(oldfd, old, oldsize) != oldsize || in main() 223 close(oldfd) == -1) in main()
|
| /freebsd-12.1/lib/libc/gen/ |
| H A D | dup3.c | 43 __dup3(int oldfd, int newfd, int flags) in __dup3() argument 47 if (oldfd == newfd) { in __dup3() 59 return (_fcntl(oldfd, how, newfd)); in __dup3()
|
| /freebsd-12.1/contrib/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_netbsd.cc | 172 uptr internal_dup(int oldfd) { in internal_dup() argument 174 return _REAL(dup, oldfd); in internal_dup() 177 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 179 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_solaris.cc | 127 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { in DECLARE__REAL_AND_INTERNAL() argument 128 return _REAL(dup2)(oldfd, newfd); in DECLARE__REAL_AND_INTERNAL()
|
| H A D | sanitizer_mac.cc | 177 uptr internal_dup(int oldfd) { in internal_dup() argument 178 return dup(oldfd); in internal_dup() 181 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 182 return dup2(oldfd, newfd); in internal_dup2()
|
| H A D | sanitizer_linux.cc | 384 uptr internal_dup(int oldfd) { in internal_dup() argument 385 return internal_syscall(SYSCALL(dup), oldfd); in internal_dup() 388 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 390 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); in internal_dup2() 392 return internal_syscall(SYSCALL(dup2), oldfd, newfd); in internal_dup2()
|
| H A D | sanitizer_common_syscalls.inc | 1255 PRE_SYSCALL(dup2)(long oldfd, long newfd) {} 1257 POST_SYSCALL(dup2)(long res, long oldfd, long newfd) {} 1259 PRE_SYSCALL(dup3)(long oldfd, long newfd, long flags) {} 1261 POST_SYSCALL(dup3)(long res, long oldfd, long newfd, long flags) {}
|
| /freebsd-12.1/contrib/compiler-rt/lib/tsan/rtl/ |
| H A D | tsan_fd.cc | 225 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { in FdDup() argument 226 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); in FdDup() 227 if (bogusfd(oldfd) || bogusfd(newfd)) in FdDup() 230 FdDesc *od = fddesc(thr, pc, oldfd); in FdDup()
|
| H A D | tsan_interceptors.cc | 1556 TSAN_INTERCEPTOR(int, dup, int oldfd) { in TSAN_INTERCEPTOR() argument 1557 SCOPED_TSAN_INTERCEPTOR(dup, oldfd); in TSAN_INTERCEPTOR() 1558 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR() 1559 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR() 1560 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR() 1565 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); in TSAN_INTERCEPTOR() 1566 int newfd2 = REAL(dup2)(oldfd, newfd); in TSAN_INTERCEPTOR() 1567 if (oldfd >= 0 && newfd2 >= 0 && newfd2 != oldfd) in TSAN_INTERCEPTOR() 1568 FdDup(thr, pc, oldfd, newfd2, false); in TSAN_INTERCEPTOR() 1576 if (oldfd >= 0 && newfd2 >= 0 && newfd2 != oldfd) in TSAN_INTERCEPTOR() [all …]
|
| H A D | tsan_fd.h | 47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
|
| /freebsd-12.1/contrib/atf/atf-c/detail/ |
| H A D | process.c | 310 safe_dup(const int oldfd, const int newfd) in safe_dup() argument 314 if (oldfd != newfd) { in safe_dup() 315 if (dup2(oldfd, newfd) == -1) { in safe_dup() 318 close(oldfd); in safe_dup()
|
| /freebsd-12.1/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-12.1/contrib/compiler-rt/include/sanitizer/ |
| H A D | linux_syscall_hooks.h | 731 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ argument 732 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd)) 733 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ argument 734 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd)) 735 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ argument 737 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ argument 738 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \ 2415 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd); 2416 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd); 2417 void __sanitizer_syscall_pre_impl_dup3(long oldfd, long newfd, long flags); [all …]
|
| /freebsd-12.1/contrib/gcclibs/libcpp/ |
| H A D | files.c | 1572 int oldfd = f->fd; in _cpp_save_file_entries() local 1582 f->fd = oldfd; in _cpp_save_file_entries()
|
| /freebsd-12.1/sys/sys/ |
| H A D | syscallsubr.h | 219 int kern_renameat(struct thread *td, int oldfd, char *old, int newfd,
|
| /freebsd-12.1/sys/compat/linux/ |
| H A D | linux_file.c | 1664 if (args->oldfd == args->newfd) in linux_dup3() 1674 return (kern_fcntl(td, args->oldfd, cmd, newfd)); in linux_dup3()
|
| /freebsd-12.1/sys/kern/ |
| H A D | vfs_syscalls.c | 3454 int oldfd; member 3464 return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new, in sys_renameat() 3469 kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, in kern_renameat() argument 3481 AUDITVNODE1, pathseg, old, oldfd, in kern_renameat() 3485 pathseg, old, oldfd, in kern_renameat()
|
| /freebsd-12.1/sys/arm64/linux/ |
| H A D | linux_systrace_args.c | 135 iarg[0] = p->oldfd; /* l_int */ in systrace_args() 1975 iarg[0] = p->oldfd; /* l_int */ in systrace_args()
|
| H A D | linux_proto.h | 103 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member 974 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member
|
| /freebsd-12.1/sys/amd64/linux/ |
| H A D | linux_systrace_args.c | 2096 iarg[0] = p->oldfd; /* l_int */ in systrace_args() 2300 iarg[0] = p->oldfd; /* l_int */ in systrace_args()
|
| H A D | linux_proto.h | 1008 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member 1128 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member
|
| /freebsd-12.1/sys/amd64/linux32/ |
| H A D | linux32_systrace_args.c | 2237 iarg[0] = p->oldfd; /* l_int */ in systrace_args() 2427 iarg[0] = p->oldfd; /* l_int */ in systrace_args()
|
| /freebsd-12.1/sys/i386/linux/ |
| H A D | linux_systrace_args.c | 2313 iarg[0] = p->oldfd; /* l_int */ in systrace_args() 2503 iarg[0] = p->oldfd; /* l_int */ in systrace_args()
|