Searched refs:fd (Results 1 - 25 of 3083) sorted by relevance

1234567891011>>

/external/libdrm/tests/
H A Dopenclose.c32 int fd; local
34 fd = drm_open_any();
35 close(fd);
H A Dname_from_fd.c43 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 Dunix-api.c15 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 Dfd-safer-flag.c40 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 Dfd-safer.c37 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 Dpipe-safer.c31 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 Dpipe2-safer.c31 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 Dredirect-fds.c39 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 Dfchmod.c46 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 Dredirect-fds.c39 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 Dfchmod.c46 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 Dredirect-fds.c39 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 Dfchmod.c46 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 Dmq_send.h14 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 Dbackend.h34 _gbm_create_device(int fd);
/external/toybox/toys/other/
H A Dfreeramdisk.c22 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 Dchvt.c24 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 Dfile_descriptor_posix.h19 // |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 Dcommon.h6 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 Dinput_helper.h26 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 Drandom_exercise.c51 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 Dtomoyo_rewrite_test.c58 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 Ddaemon.c54 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 Depoll_create1_01.c39 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 Dsyslxcom.h7 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);

Completed in 576 milliseconds

1234567891011>>