/external/libdrm/tests/ |
H A D | openclose.c | 32 int fd; local 34 fd = drm_open_any(); 35 close(fd);
|
H A D | name_from_fd.c | 43 int fd; local 47 fd = open("/dev/dri/card0", O_RDWR); 48 if (fd < 0) 51 v = drmGetDeviceNameFromFd(fd); 52 close(fd);
|
/external/clang/test/Analysis/ |
H A D | 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 37 int fd; local 44 int fd; local 54 int fd; local 64 int fd; local 71 int fd; local [all...] |
/external/bison/lib/ |
H A D | fd-safer-flag.c | 40 fd_safer_flag (int fd, int flag) argument 42 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) 44 int f = dup_safer_flag (fd, flag); 46 close (fd); 48 fd = f; 51 return fd;
|
H A D | fd-safer.c | 37 fd_safer (int fd) argument 39 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) 41 int f = dup_safer (fd); 43 close (fd); 45 fd = f; 48 return fd;
|
H A D | pipe-safer.c | 31 pipe_safer (int fd[2]) argument 34 if (pipe (fd) == 0) 39 fd[i] = fd_safer (fd[i]); 40 if (fd[i] < 0) 43 close (fd[1 - i]);
|
H A D | pipe2-safer.c | 31 pipe2_safer (int fd[2], int flags) argument 34 if (pipe2 (fd, flags) == 0) 39 fd[i] = fd_safer_flag (fd[i], flags); 40 if (fd[i] < 0) 43 close (fd[1 - i]);
|
/external/strace/tests/ |
H A D | redirect-fds.c | 39 check_fd(int fd, const char *fname) argument 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...] |
H A D | 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/ |
H A D | redirect-fds.c | 39 check_fd(int fd, const char *fname) argument 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...] |
H A D | 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-mx32/ |
H A D | redirect-fds.c | 39 check_fd(int fd, const char *fname) argument 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...] |
H A D | 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/ltp/testcases/open_posix_testsuite/include/ |
H A D | mq_send.h | 14 int sync_pipe_create(int fd[]) argument 16 return pipe (fd); 19 int sync_pipe_close(int fd[]) argument 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[]) argument 35 if (fd[1] != -1) { 36 close (fd[ 47 sync_pipe_wait_select(int fd[], long tv_sec) argument 76 sync_pipe_notify(int fd[]) argument [all...] |
/external/mesa3d/src/gbm/main/ |
H A D | backend.h | 34 _gbm_create_device(int fd);
|
/external/toybox/toys/other/ |
H A D | 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);
|
H A D | 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/libchrome/base/ |
H A D | 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 argument 50 int fd; member in struct:base::FileDescriptor [all...] |
/external/nanopb-c/examples/network_server/ |
H A D | common.h | 6 pb_ostream_t pb_ostream_from_socket(int fd); 7 pb_istream_t pb_istream_from_socket(int fd);
|
/external/ltp/testcases/kernel/input/ |
H A D | input_helper.h | 26 void send_rel_move(int fd, int x, int y); 27 void send_event(int fd, int event, int code, int value); 29 void create_device(int fd); 30 void setup_mouse_events(int fd); 31 void destroy_device(int fd); 32 int no_events_queued(int fd);
|
/external/e2fsprogs/tests/progs/ |
H A D | 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) argument 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); 102 truncate_file(int fd) argument 117 unlink_file(int fd) argument 131 close_file(int fd) argument 145 int i, fd; local [all...] |
/external/ltp/testcases/kernel/security/tomoyo/ |
H A D | 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...] |
/external/openssh/openbsd-compat/ |
H A D | daemon.c | 54 int fd; local 71 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 72 (void)dup2(fd, STDIN_FILENO); 73 (void)dup2(fd, STDOUT_FILENO); 74 (void)dup2(fd, STDERR_FILENO); 75 if (fd > 2) 76 (void)close (fd);
|
/external/ltp/testcases/kernel/syscalls/epoll_create1/ |
H A D | 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);
|
/external/syslinux/libinstaller/ |
H A D | syslxcom.h | 7 ssize_t xpread(int fd, void *buf, size_t count, off_t offset); 8 ssize_t xpwrite(int fd, const void *buf, size_t count, off_t offset); 9 void clear_attributes(int fd); 10 void set_attributes(int fd); 11 int sectmap(int fd, sector_t *sectors, int nsectors);
|