Searched refs:fd (Results 1 - 25 of 218) sorted by path

123456789

/system/bluetooth/bluedroid/
H A Dbluetooth.c52 int fd; local
57 fd = open(path, O_RDONLY);
58 if (fd < 0) {
62 sz = read(fd, &buf, sizeof(buf));
63 close(fd);
76 int fd = -1; local
84 fd = open(rfkill_state_path, O_RDONLY);
85 if (fd < 0) {
90 sz = read(fd, &buffer, 1);
107 if (fd >
113 int fd = -1; local
[all...]
/system/bluetooth/brcm_patchram_plus/
H A Dbrcm_patchram_plus.c569 read_event(int fd, uchar *buffer) argument
575 while ((count = read(fd, &buffer[i], len)) < len) {
583 while ((count = read(fd, &buffer[i], len)) < len) {
744 int fd; local
756 fd = open(path, O_RDONLY);
757 if (fd < 0) {
763 sz = read(fd, bdaddr, len);
767 close(fd);
771 close(fd);
/system/bluetooth/tools/
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 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 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_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_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_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...]
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...]
/system/core/adb/
H A Dadb.c624 int fd; local
627 fd = adb_socket_accept(_fd, &addr, &alen);
628 if(fd < 0) return;
630 adb_socket_setbufsize(fd, CHUNK_SIZE);
632 s = create_local_socket(fd);
638 adb_close(fd);
650 int fd; local
653 fd = adb_socket_accept(_fd, &addr, &alen);
654 if(fd < 0) return;
656 s = create_local_socket(fd);
872 int fd; local
1239 int port, fd; local
[all...]
H A Dadb.h101 ** us to our fd event system. For remote asockets
105 int fd; member in struct:asocket
181 int fd; member in struct:atransport
190 /* usb handle or socket fd as needed */
228 int fd; member in struct:alistener
246 asocket *create_local_socket(int fd);
329 void framebuffer_service(int fd, void *cookie);
330 void log_service(int fd, void *cookie);
331 void remount_service(int fd, void *cookie);
488 int sendfailmsg(int fd, cons
[all...]
H A Dadb_auth_client.c155 static void adb_auth_event(int fd, unsigned events, void *data) argument
162 ret = unix_read(fd, response, sizeof(response));
207 static void adb_auth_listener(int fd, unsigned events, void *data) argument
215 s = adb_socket_accept(fd, &addr, &alen);
226 int fd, ret; local
231 fd = android_get_control_socket("adbd");
232 if (fd < 0) {
237 ret = listen(fd, 4);
239 D("Failed to listen on '%d'\n", fd);
243 fdevent_install(&listener_fde, fd, adb_auth_listene
[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 Dadb_client.h7 ** a valid fd for interacting with that service upon success
51 int adb_status(int fd);
H A Dbackup_service.c27 int fd; member in struct:__anon272
45 adb_close(params->fd);
144 params->fd = s[0];
H A Dcommandline.c203 static void stdin_raw_init(int fd) argument
207 if(tcgetattr(fd, &tio)) return;
208 if(tcgetattr(fd, &tio_save)) return;
216 tcsetattr(fd, TCSANOW, &tio);
217 tcflush(fd, TCIFLUSH);
220 static void stdin_raw_restore(int fd) argument
222 tcsetattr(fd, TCSANOW, &tio_save);
223 tcflush(fd, TCIFLUSH);
227 static void read_and_dump(int fd) argument
232 while(fd >
279 int fd, fdi; local
333 int fdi, fd; local
379 int fd; local
461 int fd; local
610 int fd, ret; local
688 int fd, outFd; local
742 int fd, tarFd; local
1083 int fd; local
1147 int fd; local
1176 int fd = adb_connect(command); local
1355 int fd = adb_connect("jdwp"); local
[all...]
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 Dfdevent.c73 fprintf(stderr,"FDE #%03d %c%c%c %s\n", fde->fd,
95 static void fdevent_subproc_event_func(int fd, unsigned events, void *userdata);
135 if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fde->fd, &ev)) {
155 epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fde->fd, &ev);
181 if(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fde->fd, &ev)) {
186 if(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fde->fd, &ev)) {
196 if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fde->fd, &ev)) {
262 if(fde->fd >= select_n) {
263 select_n = fde->fd + 1;
271 FD_CLR(fde->fd,
517 fdevent_subproc_event_func(int fd, unsigned ev, void *userdata) argument
575 fdevent_create(int fd, fd_func func, void *arg) argument
593 fdevent_install(fdevent *fde, int fd, fd_func func, void *arg) argument
[all...]
H A Dfdevent.h33 typedef void (*fd_func)(int fd, unsigned events, void *userdata);
36 * Note: use FD_TIMER as 'fd' to create a fd-less object
39 fdevent *fdevent_create(int fd, fd_func func, void *arg);
48 void fdevent_install(fdevent *fde, int fd, fd_func func, void *arg);
72 int fd; member in struct:fdevent
H A Dfile_sync_client.c65 void sync_quit(int fd) argument
72 writex(fd, &msg.req, sizeof(msg.req));
77 int sync_ls(int fd, const char *path, sync_ls_cb func, void *cookie) argument
89 if(writex(fd, &msg.req, sizeof(msg.req)) ||
90 writex(fd, path, len)) {
95 if(readx(fd, &msg.dent, sizeof(msg.dent))) break;
102 if(readx(fd, buf, len)) break;
112 adb_close(fd);
126 int sync_readtime(int fd, const char *path, unsigned *timestamp) argument
134 if(writex(fd,
151 sync_start_readtime(int fd, const char *path) argument
167 sync_finish_readtime(int fd, unsigned int *timestamp, unsigned int *mode, unsigned int *size) argument
185 sync_readmode(int fd, const char *path, unsigned *mode) argument
210 write_data_file(int fd, const char *path, syncsendbuf *sbuf) argument
247 write_data_buffer(int fd, char* file_buffer, int size, syncsendbuf *sbuf) argument
273 write_data_link(int fd, const char *path, syncsendbuf *sbuf) argument
297 sync_send(int fd, const char *lpath, const char *rpath, unsigned mtime, mode_t mode, int verifyApk) argument
441 sync_recv(int fd, const char *rpath, const char *lpath) argument
543 int fd = adb_connect("sync:"); local
674 copy_local_dir_remote(int fd, const char *lpath, const char *rpath, int checktimestamps, int listonly) argument
746 int fd; local
871 copy_remote_dir_local(int fd, const char *rpath, const char *lpath, int checktimestamps) argument
948 int fd; local
1010 int fd = adb_connect("sync:"); local
[all...]
H A Dfile_sync_service.c155 int fd; local
157 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode);
158 if(fd < 0 && errno == ENOENT) {
160 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode);
162 if(fd < 0 && errno == EEXIST) {
163 fd = adb_open_mode(path, O_WRONLY, mode);
165 if(fd < 0) {
168 fd = -1;
193 if(fd < 0)
195 if(writex(fd, buffe
322 int fd, r; local
359 file_sync_service(int fd, void *cookie) argument
[all...]
H A Dfile_sync_service.h79 void file_sync_service(int fd, void *cookie);
H A Dframebuffer_service.c55 void framebuffer_service(int fd, void *cookie) argument
164 if(writex(fd, &fbinfo, sizeof(fbinfo))) goto done;
169 if(writex(fd, buf, sizeof(buf))) goto done;
172 if(writex(fd, buf, fbinfo.size % sizeof(buf))) goto done;
179 close(fd);
H A Djdwp_service.c317 int fd = proc->out_fds[0]; local
340 ((int*)CMSG_DATA(cmsg))[0] = fd;
360 adb_close(fd);
371 fd, proc->pid);
H A Dlog_service.c31 void write_log_entry(int fd, struct logger_entry *buf);
33 void log_service(int fd, void *cookie) argument
67 write_log_entry(fd, entry);
71 unix_close(fd);
86 /* prints one log entry into the file descriptor fd */
87 void write_log_entry(int fd, struct logger_entry *buf) argument
91 writex(fd, buf, size);

Completed in 58 milliseconds

123456789