Home
last modified time | relevance | path

Searched refs:newfd (Results 1 - 25 of 53) sorted by relevance

123

/third_party/elfutils/src/
H A Dar.c423 copy_content (Elf *elf, int newfd, off_t off, size_t n) in copy_content() argument
435 return write_retry (newfd, rawfile + off, n) != (ssize_t) n; in copy_content()
758 int newfd = mkstemp (tmpfname); in do_oper_extract() local
759 if (unlikely (newfd == -1)) in do_oper_extract()
768 if (unlikely (write_retry (newfd, ARMAG, SARMAG) != SARMAG)) in do_oper_extract()
773 if (newfd != -1) in do_oper_extract()
774 close (newfd); in do_oper_extract()
789 && ((write_retry (newfd, symtab.symsoff, in do_oper_extract()
792 || (write_retry (newfd, symtab.symsname, in do_oper_extract()
799 && copy_content (elf, newfd, SARMA in do_oper_extract()
845 write_member(struct armem *memb, off_t *startp, off_t *lenp, Elf *elf, off_t end_off, int newfd) write_member() argument
1003 int newfd = mkstemp (tmpfname); do_oper_delete() local
1257 int newfd = open (argv[cnt], O_RDONLY); do_oper_insert() local
1394 int newfd; do_oper_insert() local
[all...]
H A Dranlib.c117 copy_content (Elf *elf, int newfd, off_t off, size_t n) in copy_content() argument
129 return write_retry (newfd, rawfile + off, n) != (ssize_t) n; in copy_content()
217 int newfd = mkstemp (tmpfname); in handle_file() local
218 if (unlikely (newfd == -1)) in handle_file()
227 if (unlikely (write_retry (newfd, ARMAG, SARMAG) != SARMAG)) in handle_file()
232 if (newfd != -1) in handle_file()
233 close (newfd); in handle_file()
248 && ((write_retry (newfd, symtab.symsoff, in handle_file()
251 || (write_retry (newfd, symtab.symsname, in handle_file()
259 && copy_content (arelf, newfd, SARMA in handle_file()
[all...]
/third_party/mesa3d/src/util/
H A Dos_file.c54 int newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd); in os_dupfd_cloexec() local
56 if (newfd >= 0) in os_dupfd_cloexec()
57 return newfd; in os_dupfd_cloexec()
62 newfd = fcntl(fd, F_DUPFD, minfd); in os_dupfd_cloexec()
64 if (newfd < 0) in os_dupfd_cloexec()
67 long flags = fcntl(newfd, F_GETFD); in os_dupfd_cloexec()
69 close(newfd); in os_dupfd_cloexec()
73 if (fcntl(newfd, F_SETFD, flags | FD_CLOEXEC) == -1) { in os_dupfd_cloexec()
74 close(newfd); in os_dupfd_cloexec()
78 return newfd; in os_dupfd_cloexec()
[all...]
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
H A Drenameat.c31 int oldfd, newfd; in renameat_0100() local
41 if ((newfd = creat(newPath, S_IWUSR)) < 0) { in renameat_0100()
42 t_error("%s creat newfd failed\n", __func__); in renameat_0100()
45 close(newfd); in renameat_0100()
52 if (renameat(oldfd, oldPath, newfd, newPath) == -1) { in renameat_0100()
56 newfd = open(newPath, O_RDWR); in renameat_0100()
57 int bytes = read(newfd, buf, len); in renameat_0100()
66 close(newfd); in renameat_0100()
H A Ddup3.c55 int newfd = -1; in dup3_0300() local
58 int ret = dup3(fd, newfd, O_CLOEXEC); in dup3_0300()
/third_party/musl/src/unistd/
H A Drenameat.c4 int renameat(int oldfd, const char *old, int newfd, const char *new) in renameat() argument
7 return syscall(SYS_renameat, oldfd, old, newfd, new); in renameat()
9 return syscall(SYS_renameat2, oldfd, old, newfd, new, 0); in renameat()
13 int renameat2(int oldfd, const char *old, int newfd, const char *new, unsigned int flags) in renameat2() argument
15 return syscall(SYS_renameat2, oldfd, old, newfd, new, flags); in renameat2()
/third_party/mesa3d/src/gallium/winsys/crocus/drm/
H A Dcrocus_drm_winsys.c35 int newfd = os_dupfd_cloexec(fd); in crocus_drm_screen_create() local
36 if (newfd < 0) in crocus_drm_screen_create()
38 return crocus_screen_create(newfd, config); in crocus_drm_screen_create()
/third_party/libuv/src/unix/
H A Dtty.c139 int newfd; in uv_tty_init() local
155 newfd = -1; in uv_tty_init()
194 newfd = r; in uv_tty_init()
196 r = uv__dup2_cloexec(newfd, fd); in uv_tty_init()
198 /* EINVAL means newfd == fd which could conceivably happen if another in uv_tty_init()
202 uv__close(newfd); in uv_tty_init()
206 fd = newfd; in uv_tty_init()
223 if (newfd != -1) in uv_tty_init()
224 uv__close(newfd); in uv_tty_init()
/third_party/node/deps/uv/src/unix/
H A Dtty.c139 int newfd; in uv_tty_init() local
155 newfd = -1; in uv_tty_init()
194 newfd = r; in uv_tty_init()
196 r = uv__dup2_cloexec(newfd, fd); in uv_tty_init()
198 /* EINVAL means newfd == fd which could conceivably happen if another in uv_tty_init()
202 uv__close(newfd); in uv_tty_init()
206 fd = newfd; in uv_tty_init()
223 if (newfd != -1) in uv_tty_init()
224 uv__close(newfd); in uv_tty_init()
/third_party/ltp/testcases/kernel/syscalls/recvmsg/
H A Drecvmsg01.c454 int newfd; in do_child() local
457 newfd = SAFE_ACCEPT(sfd, (struct sockaddr *)&fsin, &fromlen); in do_child()
458 if (newfd >= 0) { in do_child()
459 FD_SET(newfd, &afds); in do_child()
460 nfds = MAX(nfds, newfd + 1); in do_child()
462 SAFE_SEND(1, newfd, "hi", 2, 0); in do_child()
466 int newfd; in do_child() local
469 newfd = SAFE_ACCEPT(ufd, (struct sockaddr *)&fsun, &fromlen); in do_child()
470 if (newfd >= 0) { in do_child()
471 FD_SET(newfd, in do_child()
[all...]
/third_party/ltp/testcases/kernel/syscalls/dup3/
H A Ddup3_02.c12 * - oldfd is equal to newfd without using O_CLOEXEC flag
13 * - oldfd is equal to newfd with using O_CLOEXEC flag
29 int *newfd; member
41 TST_EXP_FAIL2(dup3(*tc->oldfd, *tc->newfd, tc->flags), EINVAL, in run()
42 "dup3(%d, %d, %d)", *tc->oldfd, *tc->newfd, tc->flags); in run()
/third_party/ltp/testcases/kernel/syscalls/recv/
H A 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()
/third_party/toybox/toys/pending/
H A 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) xconnect(newfd, (struct sockaddr *)buf, sizeof(buf)); in tcpsvd_main()
393 dup2(newfd, 0); in tcpsvd_main()
394 dup2(newfd, 1); in tcpsvd_main()
398 xclose(newfd); //clos in tcpsvd_main()
[all...]
/third_party/ltp/testcases/kernel/io/direct_io/
H A Ddiotest4.c195 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()
/third_party/ltp/testcases/kernel/syscalls/connect/
H A 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()
/third_party/ltp/testcases/kernel/syscalls/send/
H A 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()
/third_party/ltp/testcases/kernel/syscalls/recvfrom/
H A 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()
/third_party/ltp/testcases/kernel/syscalls/sendmsg/
H A 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()
/third_party/ltp/testcases/kernel/syscalls/fanotify/
H A Dfanotify07.c159 int newfd; in test_fanotify() local
170 newfd = setup_instance(); in test_fanotify()
172 SAFE_CLOSE(newfd); in test_fanotify()
/third_party/ltp/testcases/kernel/syscalls/sendto/
H A 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()
/third_party/ltp/lib/
H A Dtst_safe_macros.c533 int safe_dup2(const char *file, const int lineno, int oldfd, int newfd) in safe_dup2() argument
537 rval = dup2(oldfd, newfd); in safe_dup2()
541 "dup2(%i, %i) failed", oldfd, newfd); in safe_dup2()
542 } else if (rval != newfd) { in safe_dup2()
545 oldfd, newfd, rval); in safe_dup2()
/third_party/NuttX/fs/vfs/
H A Dfs_link.c36 int do_link(int oldfd, const char *oldpath, int newfd, const char *newpath, int flag) in do_link() argument
59 ret = vfs_normalize_pathat(newfd, newpath, &fullnewpath); in do_link()
H A Dfs_symlink.c93 int do_symlink(const char *target, int newfd, const char *path) in do_symlink() argument
120 ret = vfs_normalize_pathat(newfd, path, &fullpath); in do_symlink()
H A Dfs_rename.c117 int do_rename(int oldfd, const char *oldpath, int newfd, const char *newpath) in do_rename() argument
140 ret = vfs_normalize_pathat(newfd, newpath, &fullnewpath); in do_rename()
/third_party/ltp/testcases/kernel/syscalls/symlinkat/
H A Dsymlinkat01.c72 int *newfd; member
171 TEST(mysymlinkat(desc->oldfn, *desc->newfd, desc->newfn)); in mysymlinkat_test()

Completed in 12 milliseconds

123