/external/toybox/toys/other/ |
reset.c | 21 int fd = tty_fd(); local 24 xwrite(fd<0 ? 1 : fd, "\033c", 2);
|
freeramdisk.c | 22 int fd; local 24 fd = xopen(toys.optargs[0], O_RDWR); 25 xioctl(fd, BLKFLSBUF, toys.optargs[0]); 26 if (CFG_TOYBOX_FREE) xclose(fd);
|
chvt.c | 24 int vtnum, fd = fd; local 29 if (-1 != (fd = open(*cc, O_RDWR))) break; 32 if (!*cc || fd < 0 || ioctl(fd, 0x5606, vtnum) || ioctl(fd, 0x5607, vtnum))
|
/external/linux-kselftest/tools/testing/selftests/sync/ |
sw_sync.h | 38 int sw_sync_timeline_is_valid(int fd); 39 int sw_sync_timeline_inc(int fd, unsigned int count); 40 void sw_sync_timeline_destroy(int fd); 42 int sw_sync_fence_create(int fd, const char *name, unsigned int value); 43 int sw_sync_fence_is_valid(int fd); 44 void sw_sync_fence_destroy(int fd);
|
/external/mesa3d/src/gallium/auxiliary/target-helpers/ |
drm_helper_public.h | 8 pipe_i915_create_screen(int fd); 11 pipe_ilo_create_screen(int fd); 14 pipe_nouveau_create_screen(int fd); 17 pipe_r300_create_screen(int fd); 20 pipe_r600_create_screen(int fd); 23 pipe_radeonsi_create_screen(int fd); 26 pipe_vmwgfx_create_screen(int fd); 29 pipe_freedreno_create_screen(int fd); 32 pipe_virgl_create_screen(int fd); 35 pipe_vc4_create_screen(int fd); [all...] |
/external/clang/test/Analysis/ |
unix-api.c | 15 int fd; local 16 fd = open(path, O_RDONLY); // no-warning 17 if (fd > -1) 18 close(fd); 22 int fd; local 24 fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than three arguments}} 25 if (fd > -1) 26 close(fd); 30 int fd; local 31 fd = open(path, O_RDONLY, NULL); // expected-warning{{Third argument to 'open' is not an integer} 37 int fd; local 44 int fd; local 54 int fd; local 64 int fd; local 71 int fd; local [all...] |
/external/adhd/cras/src/common/ |
cras_shm.c | 23 int fd; local 28 fd = ashmem_create_region(name, size); 29 if (fd < 0) { 30 fd = -errno; 32 name, strerror(-fd)); 34 return fd; 37 int cras_shm_reopen_ro (const char *name, int fd) 41 if (ashmem_set_prot_region(fd, PROT_READ) != 0) { 42 fd = -errno; 45 name, strerror(-fd)); 59 int fd; local [all...] |
/external/strace/tests/ |
redirect-fds.c | 39 check_fd(int fd, const char *fname) 45 if (fstat(fd, &st_fd)) { 47 return 10 + fd; 50 return 20 + fd; 53 return 30 + fd; 57 return 40 + fd; 68 int rc = 0, fd; local 69 for (fd = 1; fd < 1 + N_FDS; ++fd) [all...] |
fchmod.c | 46 int fd = open(fname, O_CREAT|O_RDONLY, 0400); local 47 if (fd < 0) 53 long rc = syscall(__NR_fchmod, fd, 0600); 54 printf("fchmod(%d, 0600) = %s\n", fd, sprintrc(rc)); 56 close(fd); 58 rc = syscall(__NR_fchmod, fd, 051); 59 printf("fchmod(%d, 051) = %s\n", fd, sprintrc(rc)); 61 rc = syscall(__NR_fchmod, fd, 004); 62 printf("fchmod(%d, 004) = %s\n", fd, sprintrc(rc));
|
/external/strace/tests-m32/ |
redirect-fds.c | 39 check_fd(int fd, const char *fname) 45 if (fstat(fd, &st_fd)) { 47 return 10 + fd; 50 return 20 + fd; 53 return 30 + fd; 57 return 40 + fd; 68 int rc = 0, fd; local 69 for (fd = 1; fd < 1 + N_FDS; ++fd) [all...] |
/external/strace/tests-mx32/ |
redirect-fds.c | 39 check_fd(int fd, const char *fname) 45 if (fstat(fd, &st_fd)) { 47 return 10 + fd; 50 return 20 + fd; 53 return 30 + fd; 57 return 40 + fd; 68 int rc = 0, fd; local 69 for (fd = 1; fd < 1 + N_FDS; ++fd) [all...] |
/external/ltp/testcases/open_posix_testsuite/include/ |
mq_send.h | 14 int sync_pipe_create(int fd[]) 16 return pipe (fd); 19 int sync_pipe_close(int fd[]) 23 if (fd[0] != -1) 24 r = close (fd[0]); 25 if (fd[1] != -1) 26 r |= close (fd[1]); 30 int sync_pipe_wait(int fd[]) 35 if (fd[1] != -1) { 36 close (fd[1]) [all...] |
/external/mesa3d/src/amd/vulkan/winsys/amdgpu/ |
radv_amdgpu_winsys_public.h | 32 struct radeon_winsys *radv_amdgpu_winsys_create(int fd);
|
/external/mesa3d/src/gbm/main/ |
backend.h | 34 _gbm_create_device(int fd);
|
/external/libchrome/base/ |
file_descriptor_posix.h | 19 // |fd| when going out of scope. Instead, a consumer of a base::FileDescriptor 20 // must invoke close() on |fd| if |auto_close| is true. 22 // In the case of IPC, the the IPC subsystem knows to close() |fd| after sending 24 // other end, the receiver must make sure to close() |fd| after it has finished 29 FileDescriptor() : fd(-1), auto_close(false) {} 31 FileDescriptor(int ifd, bool iauto_close) : fd(ifd), auto_close(iauto_close) { 34 FileDescriptor(File file) : fd(file.TakePlatformFile()), auto_close(true) {} 35 explicit FileDescriptor(ScopedFD fd) : fd(fd.release()), auto_close(true) { 50 int fd; member in struct:base::FileDescriptor [all...] |
/external/nanopb-c/examples/network_server/ |
common.h | 6 pb_ostream_t pb_ostream_from_socket(int fd); 7 pb_istream_t pb_istream_from_socket(int fd);
|
/system/netd/libnetdutils/ |
UniqueFd.cpp | 25 void UniqueFd::reset(Fd fd) { 27 std::swap(fd, mFd); 28 if (isWellFormed(fd)) { 29 expectOk(sys.close(fd)); 33 std::ostream& operator<<(std::ostream& os, const UniqueFd& fd) { 34 return os << "UniqueFd[" << static_cast<Fd>(fd) << "]";
|
/external/e2fsprogs/tests/progs/ |
random_exercise.c | 51 int fd; local 54 fd = ((int) random()) % MAXFDS; 55 if (fd > 2) 56 return fd; 60 unsigned int get_inode_num(int fd) 64 if (fstat(fd, &st) < 0) { 75 int fd; local 84 fd = open(template, O_RDONLY, 0600); 85 printf("Created temp directory %s, fd = %d\n", 86 template, fd); 145 int i, fd; local [all...] |
/external/ltp/testcases/kernel/security/tomoyo/ |
tomoyo_rewrite_test.c | 58 int fd; local 77 fd = open(REWRITE_PATH, O_RDONLY); 78 show_result(fd); 79 close(fd); 82 fd = open(REWRITE_PATH, O_WRONLY | O_APPEND); 83 show_result(fd); 84 close(fd); 88 fd = open(REWRITE_PATH, O_WRONLY); 89 show_result(fd); 90 close(fd); [all...] |
/system/core/adb/ |
adb_io.h | 25 bool SendOkay(int fd); 28 bool SendFail(int fd, const std::string& reason); 31 bool SendProtocolString(int fd, const std::string& s); 34 bool ReadProtocolString(int fd, std::string* s, std::string* error); 36 // Reads exactly len bytes from fd into buf. 42 bool ReadFdExactly(int fd, void* buf, size_t len); 60 bool ReadOrderlyShutdown(int fd); 62 // Writes exactly len bytes from buf to fd. 64 // Returns false if there is an error or if the fd was closed before the write 65 // completed. If the other end of the fd (such as in a socket, pipe, or fifo) [all...] |
/external/wayland/cursor/ |
os-compatibility.c | 40 set_cloexec_or_close(int fd) 44 if (fd == -1) 47 flags = fcntl(fd, F_GETFD); 51 if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) 54 return fd; 57 close(fd); 65 int fd; local 68 fd = mkostemp(tmpname, O_CLOEXEC); 69 if (fd >= 0) 72 fd = mkstemp(tmpname) 109 int fd; local [all...] |
/external/ltp/testcases/kernel/syscalls/memfd_create/ |
memfd_create01.c | 32 static void test_basic(int fd) 35 CHECK_MFD_HAS_SEALS(fd, 0); 36 CHECK_MFD_ADD_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); 37 CHECK_MFD_HAS_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); 40 CHECK_MFD_ADD_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); 41 CHECK_MFD_HAS_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); 44 CHECK_MFD_ADD_SEALS(fd, F_SEAL_GROW | F_SEAL_SEAL); 45 CHECK_MFD_HAS_SEALS(fd, F_SEAL_SHRINK | F_SEAL_GROW | 49 CHECK_MFD_FAIL_ADD_SEALS(fd, F_SEAL_GROW); 50 CHECK_MFD_FAIL_ADD_SEALS(fd, 0) 247 int fd; local [all...] |
/bionic/libc/upstream-openbsd/lib/libc/gen/ |
daemon.c | 39 int fd; local 56 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 57 (void)dup2(fd, STDIN_FILENO); 58 (void)dup2(fd, STDOUT_FILENO); 59 (void)dup2(fd, STDERR_FILENO); 60 if (fd > 2) 61 (void)close(fd);
|
/external/linux-kselftest/tools/testing/selftests/memfd/ |
memfd_test.c | 69 int r, fd; local 71 fd = sys_memfd_create(name, flags); 72 if (fd < 0) { 78 r = ftruncate(fd, sz); 84 return fd; 100 static unsigned int mfd_assert_get_seals(int fd) 104 r = fcntl(fd, F_GET_SEALS); 106 printf("GET_SEALS(%d) failed: %m\n", fd); 113 static void mfd_assert_has_seals(int fd, unsigned int seals) 117 s = mfd_assert_get_seals(fd); 599 int fd; local 650 int fd; local 706 int fd; local 728 int fd; local 761 int fd; local 791 int fd; local 821 int fd; local 851 int fd, fd2; local 877 int fd, fd2; local 927 int fd; local 964 int fd, fd2; local 992 int fd, fd2; local 1043 int fd; local [all...] |
/external/ltp/testcases/kernel/syscalls/epoll_create1/ |
epoll_create1_01.c | 39 int fd, coe; local 41 fd = tst_syscall(__NR_epoll_create1, 0); 42 if (fd == -1) 45 coe = SAFE_FCNTL(fd, F_GETFD); 49 SAFE_CLOSE(fd); 51 fd = tst_syscall(__NR_epoll_create1, EPOLL_CLOEXEC); 52 if (fd == -1) 55 coe = SAFE_FCNTL(fd, F_GETFD); 59 SAFE_CLOSE(fd);
|