/system/connectivity/shill/ |
H A D | active_link_monitor.cc | 237 void ActiveLinkMonitor::ReceiveResponse(int fd) { argument
|
H A D | arp_client_unittest.cc | 80 void StartClientWithFD(int fd); 138 void ArpClientTest::StartClientWithFD(int fd) { argument 140 .WillOnce(Return(fd)); 141 EXPECT_CALL(*sockets_, AttachFilter(fd, _)).WillOnce(Return(0)); 142 EXPECT_CALL(*sockets_, SetNonBlocking(fd)).WillOnce(Return(0)); 143 EXPECT_CALL(*sockets_, Bind(fd, 147 EXPECT_EQ(fd, client_.socket_);
|
H A D | crypto_util_proxy.cc | 267 void CryptoUtilProxy::HandleShimStdinReady(int fd) { argument 268 CHECK(fd == shim_stdin_);
|
H A D | dns_client.cc | 215 void DNSClient::HandleDNSRead(int fd) { argument 216 ares_->ProcessFd(resolver_state_->channel, fd, ARES_SOCKET_BAD); 220 void DNSClient::HandleDNSWrite(int fd) { argument 221 ares_->ProcessFd(resolver_state_->channel, ARES_SOCKET_BAD, fd);
|
H A D | http_request.cc | 204 void HTTPRequest::OnConnectCompletion(bool success, int fd) { argument 215 server_socket_ = fd; 274 void HTTPRequest::WriteToServer(int fd) { argument 275 CHECK_EQ(server_socket_, fd); 276 int ret = sockets_->Send(fd, request_data_.GetConstData(),
|
/system/connectivity/shill/net/ |
H A D | sockets.cc | 79 int Sockets::Close(int fd) const { 80 return IGNORE_EINTR(close(fd)); 173 ScopedSocketCloser::ScopedSocketCloser(Sockets* sockets, int fd) argument 175 fd_(fd) {} 183 int fd = fd_; local 185 return fd;
|
/system/core/adb/ |
H A D | adb_auth_client.cpp | 177 static void adb_auth_event(int fd, unsigned events, void*) { argument 182 ret = unix_read(fd, response, sizeof(response)); 228 static void adb_auth_listener(int fd, unsigned events, void* data) { argument 235 s = adb_socket_accept(fd, reinterpret_cast<sockaddr*>(&addr), &alen); 257 int fd = android_get_control_socket("adbd"); local 258 if (fd == -1) { 262 fcntl(fd, F_SETFD, FD_CLOEXEC); 266 int fd = android_get_control_socket("adbd"); local 267 if (fd == -1) { 272 if (listen(fd, [all...] |
H A D | fdevent.cpp | 60 pollfd.fd = fde->fd; 112 return android::base::StringPrintf("(fdevent %d %s)", fde->fd, state.c_str()); 115 fdevent *fdevent_create(int fd, fd_func func, void *arg) argument 120 fdevent_install(fde, fd, func, arg); 136 void fdevent_install(fdevent* fde, int fd, fd_func func, void* arg) { argument 138 CHECK_GE(fd, 0); 141 fde->fd = fd; 144 if (!set_file_block_mode(fd, fals 295 fdevent_subproc_event_func(int fd, unsigned ev, void* ) argument [all...] |
H A D | fdevent_test.cpp | 43 static void FdEventCallback(int fd, unsigned events, void* userdata) { argument 47 ASSERT_EQ(fd, handler->read_fd_); 49 ASSERT_EQ(1, adb_read(fd, &c, 1)); 54 ASSERT_EQ(fd, handler->write_fd_); 58 ASSERT_EQ(1, adb_write(fd, &c, 1)); 146 static void InvalidFdEventCallback(int fd, unsigned events, void* userdata) { argument
|
H A D | file_sync_service.cpp | 136 static bool SendSyncFail(int fd, const std::string& reason) { argument 142 return WriteFdExactly(fd, &msg.data, sizeof(msg.data)) && WriteFdExactly(fd, reason); 145 static bool SendSyncFailErrno(int fd, const std::string& reason) { argument 146 return SendSyncFail(fd, android::base::StringPrintf("%s: %s", reason.c_str(), strerror(errno))); 156 int fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, mode); local 157 if (fd < 0 && errno == ENOENT) { 162 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, mode); 164 if (fd < 0 && errno == EEXIST) { 165 fd 353 int fd = adb_open(path, O_RDONLY | O_CLOEXEC); local 383 handle_sync_command(int fd, std::vector<char>& buffer) argument 430 file_sync_service(int fd, void* cookie) argument [all...] |
H A D | services.cpp | 56 void (*func)(int fd, void *cookie); 57 int fd; member in struct:stinfo 63 adb_thread_setname(android::base::StringPrintf("service %d", sti->fd)); 64 sti->func(sti->fd, sti->cookie); 70 void restart_root_service(int fd, void *cookie) { argument 72 WriteFdExactly(fd, "adbd is already running as root\n"); 73 adb_close(fd); 78 WriteFdExactly(fd, "adbd cannot run as root in production builds\n"); 79 adb_close(fd); 84 WriteFdExactly(fd, "restartin 89 restart_unroot_service(int fd, void *cookie) argument 100 restart_tcp_service(int fd, void *cookie) argument 115 restart_usb_service(int fd, void *cookie) argument 121 reboot_service_impl(int fd, const char* arg) argument 173 reboot_service(int fd, void* arg) argument 187 reconnect_service(int fd, void* arg) argument 372 wait_for_state(int fd, void* data) argument 422 int fd = network_connect(host.c_str(), port, SOCK_STREAM, 10, &error); local 494 connect_service(int fd, void* data) argument 552 int fd = create_service_thread(wait_for_state, sinfo.release()); local 556 int fd = create_service_thread(connect_service, host); local [all...] |
H A D | socket_test.cpp | 222 int fd = network_loopback_client(5038, SOCK_STREAM, &error); local 223 ASSERT_GE(fd, 0) << error; 225 ASSERT_EQ(0, adb_close(fd));
|
H A D | transport_local.cpp | 99 int fd = -1; local 109 fd = network_connect(host, adb_port, SOCK_STREAM, 0, error); 112 if (fd < 0) { 113 fd = network_loopback_client(adb_port, SOCK_STREAM, error); 116 if (fd >= 0) { 117 D("client: connected on remote on fd %d", fd); 118 close_on_exec(fd); 119 disable_tcp_nagle(fd); 121 if (register_socket_transport(fd, seria 148 int serverfd, fd; local 234 int fd; local 323 int fd = t->sfd; local 343 int fd = t->sfd; local [all...] |
/system/core/cpio/ |
H A D | mkbootfs.c | 243 int fd; local 245 fd = open(in, O_RDONLY); 246 if(fd < 0) die("cannot open '%s' for read", in); 251 if(read(fd, tmp, s.st_size) != s.st_size) { 258 close(fd);
|
/system/core/gatekeeperd/ |
H A D | gatekeeperd.cpp | 80 int fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR); local 81 if (fd < 0) { 85 write(fd, &sid, sizeof(sid)); 86 close(fd); 92 int fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR); local 93 if (fd < 0) { 97 close(fd); 115 int fd = open(filename, O_RDONLY); local 116 if (fd < 0) return 0; 117 read(fd, 299 dump(int fd, const Vector<String16> &) argument [all...] |
/system/core/healthd/ |
H A D | BatteryMonitor.cpp | 132 int fd = open(path.string(), O_RDONLY, 0); local 133 if (fd == -1) { 138 ssize_t count = TEMP_FAILURE_RETRY(read(fd, buf, size)); 147 close(fd); 435 void BatteryMonitor::dumpState(int fd) { argument 443 write(fd, vs, strlen(vs)); 446 write(fd, vs, strlen(vs)); 450 write(fd, vs, strlen(vs)); 455 write(fd, vs, strlen(vs)); 461 write(fd, v [all...] |
H A D | healthd.cpp | 139 int healthd_register_event(int fd, void (*handler)(uint32_t), EventWakeup wakeup) { argument 148 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev) == -1) { 206 void healthd_dump_battery_state(int fd) { argument 207 gBatteryMonitor->dumpState(fd); 208 fsync(fd); 261 KLOG_ERROR(LOG_TAG, "wakealarm_event: read wakealarm fd failed\n");
|
/system/core/include/utils/ |
H A D | Looper.h | 45 typedef int (*Looper_callbackFunc)(int fd, int events, void* data); 112 virtual int handleEvent(int fd, int events, void* data) = 0; 124 virtual int handleEvent(int fd, int events, void* data); 258 * events and data associated with the fd, otherwise they will be set to NULL. 290 * "fd" is the file descriptor to be added. 317 int addFd(int fd, int ident, int events, Looper_callbackFunc callback, void* data); 318 int addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data); 340 int removeFd(int fd); 421 int fd; member in struct:android::Looper::Request 474 int removeFd(int fd, in [all...] |
/system/core/libcutils/ |
H A D | sched_policy.c | 77 static int add_tid_to_cgroup(int tid, int fd) argument 79 if (fd < 0) { 80 SLOGE("add_tid_to_cgroup failed; fd=%d\n", fd); 95 if (write(fd, ptr, end - ptr) < 0) { 102 SLOGW("add_tid_to_cgroup failed to write '%s' (%s); fd=%d\n", 103 ptr, strerror(errno), fd); 291 int fd = -1; 295 fd = bg_cpuset_fd; 301 fd 344 int fd; local 383 int fd = -1; local [all...] |
/system/core/liblog/ |
H A D | event_tag_map.c | 70 int fd = -1; local 76 fd = open(fileName, O_RDONLY | O_CLOEXEC); 77 if (fd < 0) { 83 end = lseek(fd, 0L, SEEK_END); 84 (void) lseek(fd, 0L, SEEK_SET); 91 fd, 0); 102 if (fd >= 0) 103 close(fd); 109 if (fd >= 0) 110 close(fd); [all...] |
H A D | logd_reader.c | 211 * connect to peer named "name" on fd 212 * returns same fd or -1 on error. 213 * fd is not closed on error. that's your job. 217 LIBLOG_WEAK int socket_local_client_connect(int fd, const char *name, argument 230 if(connect(fd, (struct sockaddr *) &addr, alen) < 0) { 234 return fd; 242 * returns fd or -1 on error 299 p.fd = sock; 650 p.fd = ret;
|
H A D | logger.h | 32 /* Union, sock or fd of zero is not allowed unless static initialized */ 36 int fd; member in union:android_log_context
|
/system/core/libpixelflinger/codeflinger/ |
H A D | CodeCache.cpp | 84 int fd = ashmem_create_region("CodeFlinger code cache", local 86 LOG_ALWAYS_FATAL_IF(fd < 0, 91 MAP_PRIVATE, fd, 0); 95 close(fd);
|
/system/core/libprocessgroup/ |
H A D | processgroup.cpp | 66 int fd; member in struct:ctx 112 int fd = open(path, O_RDONLY); local 113 if (fd < 0) { 119 ctx->fd = fd; 134 ssize_t ret = read(ctx->fd, ctx->buf_ptr + ctx->buf_len, 286 close(ctx.fd); 363 int fd = open(path, O_WRONLY); local 364 if (fd < 0) { 373 ret = write(fd, pi [all...] |
/system/core/libsparse/ |
H A D | backed_block.c | 39 int fd; member in struct:backed_block::__anon1680::__anon1683 41 } fd; member in union:backed_block::__anon1680 90 return bb->fd.fd; 99 return bb->fd.offset; 231 if (a->fd.fd != b->fd.fd || 232 a->fd 347 backed_block_add_fd(struct backed_block_list *bbl, int fd, int64_t offset, unsigned int len, unsigned int block) argument [all...] |