Home | History | Annotate | Download | only in vold

Lines Matching refs:sock

36 static int do_monitor(int sock, int stop_after_cmd);
37 static int do_cmd(int sock, int argc, char **argv);
40 int sock;
45 if ((sock = socket_local_client("vold",
53 exit(do_monitor(sock, 0));
54 exit(do_cmd(sock, argc, argv));
57 static int do_cmd(int sock, int argc, char **argv) {
76 if (write(sock, final_cmd, strlen(final_cmd) + 1) < 0) {
81 return do_monitor(sock, 1);
84 static int do_monitor(int sock, int stop_after_cmd) {
99 FD_SET(sock, &read_fds);
101 if ((rc = select(sock +1, &read_fds, NULL, NULL, &to)) < 0) {
109 } else if (FD_ISSET(sock, &read_fds)) {
111 if ((rc = read(sock, buffer, 4096)) <= 0) {