Home
last modified time | relevance | path

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

123

/external/elfutils/src/
Dar.c424 copy_content (Elf *elf, int newfd, off_t off, size_t n) in copy_content() argument
436 return write_retry (newfd, rawfile + off, n) != (ssize_t) n; in copy_content()
760 int newfd = mkstemp (tmpfname); in do_oper_extract() local
761 if (unlikely (newfd == -1)) in do_oper_extract()
770 if (unlikely (write_retry (newfd, ARMAG, SARMAG) != SARMAG)) in do_oper_extract()
775 if (newfd != -1) in do_oper_extract()
776 close (newfd); in do_oper_extract()
791 && ((write_retry (newfd, symtab.symsoff, in do_oper_extract()
794 || (write_retry (newfd, symtab.symsname, in do_oper_extract()
800 && copy_content (elf, newfd, SARMAG, index_off - SARMAG)) in do_oper_extract()
[all …]
Dranlib.c118 copy_content (Elf *elf, int newfd, off_t off, size_t n) in copy_content() argument
130 return write_retry (newfd, rawfile + off, n) != (ssize_t) n; in copy_content()
218 int newfd = mkstemp (tmpfname); in handle_file() local
219 if (unlikely (newfd == -1)) in handle_file()
228 if (unlikely (write_retry (newfd, ARMAG, SARMAG) != SARMAG)) in handle_file()
233 if (newfd != -1) in handle_file()
234 close (newfd); in handle_file()
249 && ((write_retry (newfd, symtab.symsoff, in handle_file()
252 || (write_retry (newfd, symtab.symsname, in handle_file()
258 && copy_content (arelf, newfd, SARMAG, index_off - SARMAG)) in handle_file()
[all …]
/external/grpc-grpc/src/core/lib/iomgr/
Dsocket_utils_common_posix.cc382 grpc_dualstack_mode* dsmode, int* newfd) { in grpc_create_dualstack_socket() argument
384 nullptr, resolved_addr, type, protocol, dsmode, newfd); in grpc_create_dualstack_socket()
396 int type, int protocol, grpc_dualstack_mode* dsmode, int* newfd) { in grpc_create_dualstack_socket_using_factory() argument
402 *newfd = create_socket(factory, family, type, protocol); in grpc_create_dualstack_socket_using_factory()
404 *newfd = -1; in grpc_create_dualstack_socket_using_factory()
408 if (*newfd >= 0 && set_socket_dualstack(*newfd)) { in grpc_create_dualstack_socket_using_factory()
415 return error_for_fd(*newfd, resolved_addr); in grpc_create_dualstack_socket_using_factory()
418 if (*newfd >= 0) { in grpc_create_dualstack_socket_using_factory()
419 close(*newfd); in grpc_create_dualstack_socket_using_factory()
424 *newfd = create_socket(factory, family, type, protocol); in grpc_create_dualstack_socket_using_factory()
[all …]
Dsocket_utils_posix.h136 int* newfd);
142 int protocol, grpc_dualstack_mode* dsmode, int* newfd);
/external/wayland/src/
Dwayland-os.c78 int newfd; in wl_os_dupfd_cloexec() local
80 newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd); in wl_os_dupfd_cloexec()
81 if (newfd >= 0) in wl_os_dupfd_cloexec()
82 return newfd; in wl_os_dupfd_cloexec()
86 newfd = fcntl(fd, F_DUPFD, minfd); in wl_os_dupfd_cloexec()
87 return set_cloexec_or_close(newfd); in wl_os_dupfd_cloexec()
/external/ltp/testcases/kernel/syscalls/recvmsg/
Drecvmsg01.c452 int newfd; in do_child() local
455 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
456 if (newfd >= 0) { in do_child()
457 FD_SET(newfd, &afds); in do_child()
458 nfds = MAX(nfds, newfd + 1); in do_child()
460 (void)write(newfd, "hoser\n", 6); in do_child()
464 int newfd; in do_child() local
467 newfd = accept(ufd, (struct sockaddr *)&fsun, &fromlen); in do_child()
468 if (newfd >= 0) { in do_child()
469 FD_SET(newfd, &afds); in do_child()
[all …]
/external/toybox/toys/pending/
Dtcpsvd.c271 int hash, fd, newfd, j; in tcpsvd_main() local
311 newfd = fd; in tcpsvd_main()
313 newfd = accept(fd, (struct sockaddr *)buf, &len); in tcpsvd_main()
314 if (newfd < 0) perror_exit("Error on accept"); in tcpsvd_main()
331 if (ptr) write(newfd, ptr, strlen(ptr)+1); in tcpsvd_main()
332 close(newfd); in tcpsvd_main()
389 if (TT.udp && (connect(newfd, (struct sockaddr *)buf, sizeof(buf)) < 0)) in tcpsvd_main()
394 dup2(newfd, 0); in tcpsvd_main()
395 dup2(newfd, 1); in tcpsvd_main()
399 xclose(newfd); //close and reopen for next client. in tcpsvd_main()
/external/ltp/testcases/kernel/syscalls/recv/
Drecv01.c286 int newfd; in do_child() local
289 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
290 if (newfd >= 0) { in do_child()
291 FD_SET(newfd, &afds); in do_child()
292 nfds = MAX(nfds, newfd + 1); in do_child()
294 (void)write(newfd, "hoser\n", 6); in do_child()
/external/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify07.c164 int newfd; in test_fanotify() local
175 newfd = setup_instance(); in test_fanotify()
176 if (close(newfd)) { in test_fanotify()
177 tst_brk(TBROK | TERRNO, "close(%d) failed", newfd); in test_fanotify()
/external/ltp/testcases/kernel/syscalls/recvfrom/
Drecvfrom01.c315 int newfd; in do_child() local
318 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
319 if (newfd >= 0) { in do_child()
320 FD_SET(newfd, &afds); in do_child()
321 nfds = MAX(nfds, newfd + 1); in do_child()
323 (void)write(newfd, "hoser\n", 6); in do_child()
/external/compiler-rt/lib/tsan/rtl/
Dtsan_fd.cc225 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()
232 FdClose(thr, pc, newfd, write); in FdDup()
233 init(thr, pc, newfd, ref(od->sync), write); in FdDup()
280 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) { in FdSocketAccept() argument
281 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd); in FdSocketAccept()
286 init(thr, pc, newfd, &fdctx.socksync); in FdSocketAccept()
Dtsan_fd.h47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
54 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
/external/ltp/testcases/kernel/io/direct_io/
Ddiotest4.c196 int fd, newfd; in main() local
309 newfd = -1; in main()
310 ret = runtest_f(newfd, buf2, offset, count, EBADF, 5, "negative fd"); in main()
317 if ((newfd = getdtablesize()) < 0) { in main()
322 ret = runtest_f(newfd, buf2, offset, count, EBADF, 6, in main()
327 close(newfd); in main()
344 if ((newfd = open("/dev/null", O_DIRECT | O_RDWR)) < 0) { in main()
347 ret = runtest_s(newfd, buf2, offset, count, 9, "/dev/null"); in main()
351 close(newfd); in main()
/external/ltp/testcases/kernel/syscalls/close/
Dclose01.c40 int fild, newfd, pipefildes[2]; variable
48 &newfd, "file"},
72 if ((newfd = dup(fild)) == -1) in main()
/external/skia/experimental/Networking/
DSkSockets.cpp265 int newfd; in acceptConnections() local
284 newfd = accept(fSockfd, (struct sockaddr*)&clientAddr, &clientLen); in acceptConnections()
285 if (newfd< 0) { in acceptConnections()
289 SkDebugf("New incoming connection - %d\n", newfd); in acceptConnections()
292 this->setNonBlocking(newfd); in acceptConnections()
294 this->addToMasterSet(newfd); in acceptConnections()
/external/skqp/experimental/Networking/
DSkSockets.cpp265 int newfd; in acceptConnections() local
284 newfd = accept(fSockfd, (struct sockaddr*)&clientAddr, &clientLen); in acceptConnections()
285 if (newfd< 0) { in acceptConnections()
289 SkDebugf("New incoming connection - %d\n", newfd); in acceptConnections()
292 this->setNonBlocking(newfd); in acceptConnections()
294 this->addToMasterSet(newfd); in acceptConnections()
/external/ltp/testcases/kernel/syscalls/connect/
Dconnect01.c306 int newfd; in do_child() local
309 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
310 if (newfd >= 0) { in do_child()
311 FD_SET(newfd, &afds); in do_child()
312 nfds = MAX(nfds, newfd + 1); in do_child()
/external/ltp/testcases/kernel/syscalls/send/
Dsend01.c229 int newfd; in do_child() local
232 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
233 if (newfd >= 0) { in do_child()
234 FD_SET(newfd, &afds); in do_child()
235 nfds = MAX(nfds, newfd + 1); in do_child()
/external/ltp/testcases/kernel/syscalls/sendmsg/
Dsendmsg01.c504 int newfd; in do_child() local
507 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
508 if (newfd >= 0) { in do_child()
509 FD_SET(newfd, &afds); in do_child()
510 nfds = MAX(nfds, newfd + 1); in do_child()
514 int newfd; in do_child() local
517 newfd = accept(ufd, (struct sockaddr *)&fsun, &fromlen); in do_child()
518 if (newfd >= 0) in do_child()
519 FD_SET(newfd, &afds); in do_child()
/external/ltp/testcases/kernel/syscalls/sendto/
Dsendto01.c299 int newfd; in do_child() local
302 newfd = accept(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
303 if (newfd >= 0) { in do_child()
304 FD_SET(newfd, &afds); in do_child()
305 nfds = MAX(nfds, newfd + 1); in do_child()
/external/ltp/testcases/kernel/syscalls/dup3/
Ddup3_02.c51 int *newfd; member
77 *(test_cases[i].newfd), test_cases[i].flags)); in main()
/external/syzkaller/sys/fuchsia/
Dposix.txt35 dup2(oldfd fd, newfd fd) fd
36 dup3(oldfd fd, newfd fd, flags flags[dup_flags]) fd
59 linkat(oldfd fd, old ptr[in, filename], newfd fd, new ptr[in, filename], flags flags[linkat_flags])
60 symlinkat(old ptr[in, filename], newfd fd, new ptr[in, filename])
67 renameat(oldfd fd, old ptr[in, filename], newfd fd, new ptr[in, filename])
/external/syzkaller/vendor/golang.org/x/sys/unix/
Dsyscall_linux_arm64.go190 func Dup2(oldfd int, newfd int) (err error) {
191 return Dup3(oldfd, newfd, 0)
/external/ltp/testcases/kernel/syscalls/symlinkat/
Dsymlinkat01.c72 int *newfd; member
178 TEST(mysymlinkat(desc->oldfn, *desc->newfd, desc->newfn)); in mysymlinkat_test()
/external/ltp/testcases/kernel/syscalls/linkat/
Dlinkat01.c93 int *newfd; member
244 (*desc->oldfd, desc->oldfn, *desc->newfd, desc->newfn, in mylinkat_test()

123