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

12345678

/system/core/adb/
H A Dconsole.c8 int fd, port; local
18 fd = socket_loopback_client( port, SOCK_STREAM );
19 if (fd < 0) {
23 return fd;
29 int fd, nn; local
31 fd = connect_to_console();
32 if (fd < 0)
38 adb_write( fd, argv[nn], strlen(argv[nn]) );
39 adb_write( fd, (nn == argc-1) ? "\n" : " ", 1 );
41 adb_write( fd, QUI
[all...]
H A Dtransport.h24 int readx(int fd, void *ptr, size_t len);
25 int writex(int fd, const void *ptr, size_t len);
H A Dusb_linux_client.c35 int fd; member in struct:usb_handle
48 int fd; local
53 while (usb->fd != -1)
60 fd = unix_open("/dev/android_adb", O_RDWR);
61 if (fd < 0) {
63 fd = unix_open("/dev/android", O_RDWR);
65 if (fd < 0) {
68 } while (fd < 0);
71 close_on_exec(fd);
72 usb->fd
116 int fd; local
[all...]
H A Dadb_client.c86 static int switch_socket_transport(int fd) argument
118 if(writex(fd, tmp, 4) || writex(fd, service, len)) {
120 adb_close(fd);
125 if(adb_status(fd)) {
126 adb_close(fd);
134 int adb_status(int fd) argument
139 if(readx(fd, buf, 4)) {
155 if(readx(fd, buf, 4)) {
162 if(readx(fd, __adb_erro
174 int fd; local
212 int fd = _adb_connect("host:version"); local
282 int fd = adb_connect(service); local
302 int fd = adb_connect(service); local
[all...]
H A Dremount_service.c36 int fd; local
43 fd = unix_open("/proc/mounts", O_RDONLY);
44 if (fd < 0)
48 size = adb_read(fd, buf, sizeof(buf) - 1);
49 adb_close(fd);
92 static void write_string(int fd, const char* str) argument
94 writex(fd, str, strlen(str));
97 void remount_service(int fd, void *cookie) argument
102 write_string(fd, "remount succeeded\n");
106 write_string(fd, buffe
[all...]
/system/core/libcutils/
H A Dload_file.c26 int fd; local
29 fd = open(fn, O_RDONLY);
30 if(fd < 0) return 0;
32 sz = lseek(fd, 0, SEEK_END);
35 if(lseek(fd, 0, SEEK_SET) != 0) goto oops;
40 if(read(fd, data, sz) != sz) goto oops;
41 close(fd);
48 close(fd);
H A Dashmem-dev.c44 int fd, ret; local
46 fd = open(ASHMEM_DEVICE, O_RDWR);
47 if (fd < 0)
48 return fd;
54 ret = ioctl(fd, ASHMEM_SET_NAME, buf);
59 ret = ioctl(fd, ASHMEM_SET_SIZE, size);
63 return fd;
66 close(fd);
70 int ashmem_set_prot_region(int fd, int prot) argument
72 return ioctl(fd, ASHMEM_SET_PROT_MAS
75 ashmem_pin_region(int fd, size_t offset, size_t len) argument
81 ashmem_unpin_region(int fd, size_t offset, size_t len) argument
87 ashmem_get_size_region(int fd) argument
[all...]
H A Dashmem-host.c42 int fd; local
60 fd = open(name, O_RDWR | O_CREAT | O_EXCL, 0600);
61 if (fd == -1) {
69 if (ftruncate(fd, size) == -1)
75 return fd;
77 close(fd);
81 int ashmem_set_prot_region(int fd, int prot) argument
86 int ashmem_pin_region(int fd, size_t offset, size_t len) argument
91 int ashmem_unpin_region(int fd, size_t offset, size_t len) argument
96 int ashmem_get_size_region(int fd) argument
[all...]
/system/bluetooth/tools/
H A Dpipetest.c37 static int _socketpair(int fd[2]) { argument
40 ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
46 static int _close(int fd) { argument
48 printf("%d: close(%d)\n", gettid(), fd);
49 ret = close(fd);
50 printf("%d: close(%d) = %d\n", gettid(), fd, ret);
65 printf("\tfd %d ", ufds[i].fd); print_events(ufds[i].revents);
72 static int _write(int fd, char *buf, int len) { argument
75 printf("%d: write(%d)\n", gettid(), fd);
76 ret = write(fd, bu
83 _read(int fd) argument
95 _shutdown(int fd, int how) argument
106 int fd = (int)args; local
116 int fd = (int)args; local
126 int fd = (int)args; local
138 int fd = (int)args; local
145 int fd = (int)args; local
154 int fd[2]; local
172 int fd[2]; local
193 int fd[2]; local
214 int fd[2]; local
231 int fd[2]; local
252 int fd[2]; local
270 int fd[2]; local
293 int fd[2]; local
342 int fd[2]; local
360 int fd[2]; local
371 int fd[2]; local
[all...]
H A Dsocktest.c51 int fd; member in struct:thread_args
81 printf("%d ", ufds[i].fd);
126 static int _close(int fd, int type) { argument
129 printf("%ld: close(%d)\n", pthread_self(), fd);
130 ret = close(fd);
131 printf("%ld: close(%d) = %d\n", pthread_self(), fd, ret);
137 static int _bind(int fd, int type) { argument
166 printf("%ld: bind(%d)\n", pthread_self(), fd);
167 ret = bind(fd, addr, len);
168 printf("%ld: bind(%d) = %d\n", pthread_self(), fd, re
174 _listen(int fd, int type) argument
185 _read(int fd) argument
198 _accept(int fd, int type) argument
251 _connect(int fd, int type) argument
288 _write(int fd, int type) argument
300 _shutdown(int fd, int how) argument
339 int fd = (int)args; local
349 int fd = (int)args; local
356 int fd = (int)args; local
365 thread_shutdown(int fd) argument
413 int fd; local
433 int fd; local
458 int fd; local
486 int fd; local
510 int fd; local
541 int fd; local
569 int fd; local
595 int fd; local
618 int fd; local
639 int fd; local
660 int fd; local
716 int fd; local
[all...]
H A Dasocket_test.c52 int fd; member in struct:thread_args
82 printf("%d ", ufds[i].fd);
127 static int _close(int fd, int type) { argument
130 printf("%d: close(%d)\n", gettid(), fd);
131 ret = close(fd);
132 printf("%d: close(%d) = %d\n", gettid(), fd, ret);
138 static int _bind(int fd, int type) { argument
167 printf("%d: bind(%d)\n", gettid(), fd);
168 ret = bind(fd, addr, len);
169 printf("%d: bind(%d) = %d\n", gettid(), fd, re
175 _listen(int fd, int type) argument
186 _read(int fd) argument
199 _accept(int fd, int type) argument
238 _connect(int fd, int type) argument
274 _write(int fd, int type) argument
286 _shutdown(int fd, int how) argument
325 int fd = (int)args; local
335 int fd = (int)args; local
342 int fd = (int)args; local
351 thread_shutdown(int fd) argument
399 int fd; local
419 int fd; local
444 int fd; local
472 int fd; local
497 int fd; local
523 int fd; local
546 int fd; local
567 int fd; local
588 int fd; local
644 int fd; local
[all...]
H A Dsock_shutdown_bug_l2cap.c27 int fd; local
36 fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
37 flags = fcntl(fd, F_GETFL);
38 fcntl(fd, F_SETFL, flags | O_NONBLOCK);
40 connect(fd, (struct sockaddr *)&addr, sizeof(addr));
43 shutdown(fd, SHUT_RDWR);
45 close(fd);
H A Dsock_shutdown_bug_tcp.c26 int fd; local
34 fd = socket(PF_INET, SOCK_STREAM, 0);
36 ret = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
41 ret = listen(fd, 1);
48 close(fd);
52 fd = socket(PF_INET, SOCK_STREAM, 0);
54 ret = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
H A Dsock_shutdown_bug_rfcomm.c28 int fd; local
37 fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
38 flags = fcntl(fd, F_GETFL);
39 fcntl(fd, F_SETFL, flags | O_NONBLOCK);
41 ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr));
47 shutdown(fd, SHUT_RDWR);
50 fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
52 ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr));
59 shutdown(fd, SHUT_RDWR);
H A Dsock_shutdown_test.c50 int fd; member in struct:thread_args
109 static int _close(int fd) { argument
112 printf("%d: close(%d)\n", gettid(), fd);
113 ret = close(fd);
114 printf("%d: close(%d) = %d\n", gettid(), fd, ret);
120 static int _bind(int fd, int type) { argument
149 printf("%d: bind(%d)\n", gettid(), fd);
150 ret = bind(fd, addr, len);
151 printf("%d: bind(%d) = %d\n", gettid(), fd, ret);
157 static int _listen(int fd, in argument
168 _accept(int fd, int type) argument
207 _shutdown(int fd, int how) argument
226 int fd; local
[all...]
/system/extras/ext4_utils/
H A Dwipe.h20 int wipe_block_device(int fd, s64 len);
H A Dwipe.c33 int wipe_block_device(int fd, s64 len) argument
40 ret = ioctl(fd, BLKSECDISCARD, &range);
44 ret = ioctl(fd, BLKDISCARD, &range);
57 int wipe_block_device(int fd, s64 len) argument
H A Dext4fixup.c84 static void read_sb(int fd, struct ext4_super_block *sb) argument
88 ret = lseek64(fd, 1024, SEEK_SET);
92 ret = read(fd, sb, sizeof(*sb));
100 static void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument
108 ret = lseek64(fd, offset, SEEK_SET);
112 ret = write(fd, sb, sizeof(*sb));
119 static int get_fs_fixup_state(int fd) argument
128 lseek64(fd, 0, SEEK_SET);
129 len = read(fd, &magic, sizeof(magic));
150 static int set_fs_fixup_state(int fd, in argument
196 read_ext(int fd) argument
255 read_inode(int fd, unsigned int inum, struct ext4_inode *inode) argument
279 read_block(int fd, unsigned long long block_num, void *block) argument
298 write_block(int fd, unsigned long long block_num, void *block) argument
336 check_inode_bitmap(int fd, unsigned int bg_num) argument
368 update_superblocks_and_bg_desc(int fd, int state) argument
472 get_indirect_blocks(int fd, struct ext4_inode *inode, unsigned long long *block_list, unsigned int *count) argument
499 get_block_list_indirect(int fd, struct ext4_inode *inode, unsigned long long *block_list) argument
510 get_extent_ents(int fd, struct ext4_extent_header *ext_hdr, unsigned long long *block_list) argument
536 get_extent_idx(int fd, struct ext4_extent_header *ext_hdr, unsigned long long *block_list) argument
569 get_block_list_extents(int fd, struct ext4_inode *inode, unsigned long long *block_list) argument
590 is_entry_dir(int fd, struct ext4_dir_entry_2 *dirp, int pass) argument
618 recurse_dir(int fd, struct ext4_inode *inode, char *dirbuf, int dirsize, int mode) argument
786 int fd; local
[all...]
/system/core/include/cutils/
H A Dashmem.h20 int ashmem_set_prot_region(int fd, int prot);
21 int ashmem_pin_region(int fd, size_t offset, size_t len);
22 int ashmem_unpin_region(int fd, size_t offset, size_t len);
23 int ashmem_get_size_region(int fd);
H A Duio.h38 extern int readv( int fd, struct iovec* vecs, int count );
39 extern int writev( int fd, const struct iovec* vecs, int count );
/system/extras/tests/cpueater/
H A Dcpueater.c32 int fd; local
60 for (fd = 3; fd < 256; fd++) {
61 close(fd);
/system/extras/fatblock/
H A Dfdpool.c29 .fd = INVALID_FD,
79 pfd->fd = INVALID_FD;
85 close(pfd->fd);
97 static void fdpool_pool(struct pooled_fd *pfd, int fd) argument
103 pfd->fd = fd;
122 int fd; local
124 if (pfd->fd != INVALID_FD) {
126 return pfd->fd;
129 fd
[all...]
/system/core/toolbox/
H A Dsmd.c9 int fd, len, r, port = 0; local
21 fd = open(devname, O_WRONLY);
22 if(fd < 0) {
29 r = write(fd, argv[0], len);
37 write(fd, argc ? " " : "\r", 1);
39 close(fd);
H A Dsetconsole.c16 int fd = (int)arg; local
19 res = ioctl(fd, VT_ACTIVATE, (void*)activate_thread_switch_vc);
34 int fd; local
104 fd = open(ttydev, O_RDWR | O_SYNC);
105 if (fd < 0) {
113 res = ioctl(fd, VT_GETSTATE, &vs);
122 res = ioctl(fd, VT_OPENQRY, &vtnum);
134 pthread_create(&thread, &attr, activate_thread, (void*)fd);
137 res = ioctl(fd, VT_WAITACTIVE, (void*)switch_vc);
146 close(fd);
[all...]
/system/core/init/
H A Dlogo.c45 int fd; member in struct:FB
56 fb->fd = open("/dev/graphics/fb0", O_RDWR);
57 if (fb->fd < 0)
60 if (ioctl(fb->fd, FBIOGET_FSCREENINFO, &fb->fi) < 0)
62 if (ioctl(fb->fd, FBIOGET_VSCREENINFO, &fb->vi) < 0)
66 MAP_SHARED, fb->fd, 0);
73 close(fb->fd);
80 close(fb->fd);
87 ioctl(fb->fd, FBIOPUT_VSCREENINFO, &fb->vi);
89 ioctl(fb->fd, FBIOPUT_VSCREENINF
94 int fd, r; local
111 int fd; local
[all...]

Completed in 505 milliseconds

12345678