Searched defs:fd (Results 226 - 250 of 337) sorted by relevance

1234567891011>>

/system/extras/verity/fec/
H A Dimage.cpp95 static uint64_t get_size(int fd) argument
99 if (fstat(fd, &st) == -1) {
106 if (ioctl(fd, BLKGETSIZE64, &size) == -1) {
139 int fd = fds.front(); local
141 calculate_rounds(get_size(fd), ctx);
160 void *p = mmap(NULL, (size_t)ctx->inp_size, flags, MAP_SHARED, fd, 0);
167 ctx->inp_fd = fd;
186 /* fd is closed in mmap_image_free */
211 for (auto fd : fds) {
219 len = get_size(fd);
294 int fd = TEMP_FAILURE_RETRY(open(fn.c_str(), flags | O_LARGEFILE)); local
319 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), local
341 int fd = TEMP_FAILURE_RETRY(open(ctx->fec_filename, local
404 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY)); local
512 int fd = TEMP_FAILURE_RETRY(open(ctx->fec_filename, local
[all...]
/system/netd/client/
H A DNetdClient.cpp46 int closeFdAndSetErrno(int fd, int error) { argument
47 close(fd);
/system/netd/server/
H A DNetdNativeService.cpp88 status_t NetdNativeService::dump(int fd, const Vector<String16> & /* args */) { argument
92 write(fd, msg.string(), msg.size());
98 DumpWriter dw(fd);
H A DTetherController.cpp49 int fd = open(filename, O_WRONLY); local
50 if (fd < 0) {
56 if (write(fd, value, len) != len) {
58 close(fd);
61 close(fd);
/system/sepolicy/tools/sepolicy-analyze/
H A Dneverallow.c441 int fd; local
445 fd = open(filename, O_RDONLY);
446 if (fd < 0) {
450 if (fstat(fd, &sb) < 0) {
452 close(fd);
455 text = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
459 close(fd);
462 close(fd);
/system/sepolicy/tools/
H A Dsepolicy-check.c189 int fd; local
194 fd = open(filename, O_RDONLY);
195 if (fd < 0) {
199 if (fstat(fd, &sb) < 0) {
201 close(fd);
204 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
207 close(fd);
217 close(fd);
224 close(fd);
/system/tools/aidl/
H A Daidl_language.cpp15 int isatty(int fd) argument
17 return (fd == 0);
/system/update_engine/common/
H A Dtest_utils.cc118 int fd = mkstemp(path); local
119 if (fd == -1) {
127 close(fd);
132 int xattr_res = fsetxattr(fd, "user.xattr-test", "value", strlen("value"), 0);
140 close(fd);
H A Dutils.h68 // written to fd or an error occurs. Returns true on success.
69 bool WriteAll(int fd, const void* buf, size_t count);
70 bool PWriteAll(int fd, const void* buf, size_t count, off_t offset);
72 bool WriteAll(FileDescriptorPtr fd, const void* buf, size_t count);
73 bool PWriteAll(FileDescriptorPtr fd,
84 int fd, void* buf, size_t count, size_t* out_bytes_read, bool* eof);
88 bool PReadAll(int fd, void* buf, size_t count, off_t offset,
91 bool PReadAll(FileDescriptorPtr fd, void* buf, size_t count, off_t offset,
109 // Returns the size of the block device at the file descriptor fd. If an error
111 off_t BlockDevSize(int fd);
377 ScopedFdCloser(int* fd) argument
[all...]
H A Dutils_unittest.cc575 int fd = HANDLE_EINTR(open(target_file.c_str(), O_RDONLY)); local
576 EXPECT_GE(fd, 0);
578 IGNORE_EINTR(close(fd));
/system/update_engine/payload_generator/
H A Ddelta_diff_utils_unittest.cc72 int fd = -1; local
73 ASSERT_TRUE(utils::MakeTempFile(pattern.c_str(), &part->path, &fd));
74 ASSERT_EQ(0, ftruncate(fd, size));
75 ASSERT_EQ(0, close(fd));
/system/webservd/libwebserv/
H A Ddbus_protocol_handler.cc40 // by a file descriptor |fd|.
42 const dbus::FileDescriptor& fd) {
43 int dupfd = dup(fd.value());
278 auto on_success = [callbacks](const dbus::FileDescriptor& fd) {
281 // since |fd| is a const reference, so duplicate the descriptor.
282 int dupfd = dup(fd.value());
41 WriteResponseData(brillo::StreamPtr src_stream, const dbus::FileDescriptor& fd) argument
/system/webservd/webservd/
H A Dprotocol_handler.cc309 Watcher(ProtocolHandler* handler, int fd) : fd_{fd}, handler_{handler} {} argument
332 void OnFileCanReadWithoutBlocking(int /* fd */) override {
337 void OnFileCanWriteWithoutBlocking(int /* fd */) override {
384 int fd = watcher->GetFileDescriptor(); local
385 if (FD_ISSET(fd, &rs) || FD_ISSET(fd, &ws)) {
386 watcher->Watch(FD_ISSET(fd, &rs), FD_ISSET(fd, &ws));
387 FD_CLR(fd,
[all...]
/system/bt/btif/src/
H A Dbluetooth.c339 static void dump(int fd, const char **arguments) argument
344 metrics_print(fd, true);
349 metrics_write(fd, true);
353 btif_debug_conn_dump(fd);
354 btif_debug_bond_event_dump(fd);
355 btif_debug_a2dp_dump(fd);
356 btif_debug_config_dump(fd);
357 wakelock_debug_dump(fd);
358 alarm_debug_dump(fd);
360 btif_debug_btsnoop_dump(fd);
[all...]
H A Dbtif_config.c534 void btif_debug_config_dump(int fd) { argument
535 dprintf(fd, "\nBluetooth Config:\n");
537 dprintf(fd, " Config Source: ");
540 dprintf(fd, "Not loaded\n");
543 dprintf(fd, "Original file\n");
546 dprintf(fd, "Backup file\n");
549 dprintf(fd, "Legacy file\n");
552 dprintf(fd, "New file\n");
555 dprintf(fd, "Reset file\n");
559 dprintf(fd, " Device
[all...]
H A Dbtif_sock_thread.c103 static inline void add_poll(int h, int fd, int type, int flags, uint32_t user_id);
216 //add the cmd fd for read & write
235 int fd; member in struct:__anon694
240 int btsock_thread_add_fd(int h, int fd, int type, int flags, uint32_t user_id) argument
259 add_poll(h, fd, type, flags, user_id);
264 sock_cmd_t cmd = {CMD_ADD_FD, fd, type, flags, user_id};
265 APPL_TRACE_DEBUG("adding fd:%d, flags:0x%x", fd, flags);
273 bool btsock_thread_remove_fd_and_close(int thread_handle, int fd) argument
280 if (fd
401 set_poll(poll_slot_t* ps, int fd, int type, int flags, uint32_t user_id) argument
412 add_poll(int h, int fd, int type, int flags, uint32_t user_id) argument
460 int fd = ts[h].cmd_fdr; local
[all...]
/system/bt/udrv/ulinux/
H A Duipc.c66 #define SAFE_FD_ISSET(fd, set) (((fd) == -1) ? FALSE : FD_ISSET((fd), (set)))
80 int fd; member in struct:__anon1307
166 BTIF_TRACE_EVENT("created socket fd %d", s);
174 int fd; local
177 BTIF_TRACE_EVENT("accept fd %d", sfd);
180 pfd.fd = sfd;
193 OSI_NO_INTR(fd = accept(sfd, (struct sockaddr *)&remote, &len));
194 if (fd
352 int fd; local
725 int fd = uipc_main.ch[ch_id].fd; local
[all...]
/system/bt/vendor_libs/linux/
H A Dbt_vendor_linux.c153 int fd; local
158 fd = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
159 if (fd < 0) {
169 if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
171 close(fd);
175 fds[0].fd = fd;
184 OSI_NO_INTR(wrote = write(fd, &ev, 6));
205 OSI_NO_INTR(n = read(fd, &ev, sizeof(struct mgmt_pkt)));
233 close(fd);
240 int fd; local
279 int fd; local
311 int fd = bt_vendor_fd; local
[all...]
/system/connectivity/shill/
H A Dconnection_health_checker_unittest.cc90 int GetSockName(int fd, struct sockaddr* addr_out, socklen_t* sockaddr_size) { argument
92 EXPECT_EQ(kProxyFD, fd);
102 int GetSockNameReturnsIPv6(int fd, struct sockaddr* addr_out, argument
105 EXPECT_EQ(kProxyFD, fd);
H A Dhttp_proxy.cc180 void HTTPProxy::AcceptClient(int fd) { argument
183 int client_fd = sockets_->Accept(fd, nullptr, nullptr);
230 void HTTPProxy::OnConnectCompletion(bool success, int fd) { argument
236 server_socket_ = fd;
682 void HTTPProxy::WriteToClient(int fd) { argument
683 CHECK_EQ(client_socket_, fd);
684 int ret = sockets_->Send(fd, server_data_.GetConstData(),
706 void HTTPProxy::WriteToServer(int fd) { argument
707 CHECK_EQ(server_socket_, fd);
708 int ret = sockets_->Send(fd, client_data
[all...]
/system/connectivity/shill/vpn/
H A Dopenvpn_management_server.cc177 void OpenVPNManagementServer::OnReady(int fd) { argument
178 SLOG(this, 2) << __func__ << "(" << fd << ")"; local
179 connected_socket_ = sockets_->Accept(fd, nullptr, nullptr);
/system/core/adb/
H A Dadb.h134 int fd; member in struct:alistener
184 void framebuffer_service(int fd, void *cookie);
185 void set_verity_enabled_state_service(int fd, void* cookie);
H A Djdwp_service.cpp340 int fd = proc->out_fds[0]; local
362 ((int*)CMSG_DATA(cmsg))[0] = fd;
365 VLOG(JDWP) << "failed to set blocking mode for fd " << proc->socket;
372 adb_close(fd);
383 fd, proc->pid);
389 VLOG(JDWP) << "failed to set non-blocking mode for fd " << proc->socket;
H A Dsockets.cpp51 ** write to their fd.
142 int r = adb_write(s->fd, p->ptr, p->len);
190 D("LS(%d): destroying fde.fd=%d", s->id, s->fde.fd);
192 /* IMPORTANT: the remove closes the fd
213 D("entered local_socket_close. LS(%d) fd=%d", s->id, s->fd);
216 D("LS(%d): closing peer. peer->id=%d peer->fd=%d", s->id, s->peer->id, s->peer->fd);
245 D("LS(%d): put on socket_closing_list fd
250 local_socket_event_func(int fd, unsigned ev, void* _s) argument
385 create_local_socket(int fd) argument
411 int fd = service_to_fd(name, transport); local
[all...]
H A Dusb_linux.cpp56 if (fd != -1) unix_close(fd);
60 int fd = -1; member in struct:usb_handle
152 int fd = unix_open(dev_name.c_str(), O_RDONLY | O_CLOEXEC); local
153 if (fd == -1) {
157 size_t desclength = unix_read(fd, devdesc, sizeof(devdesc));
163 unix_close(fd);
171 unix_close(fd);
184 unix_close(fd);
266 if (!fstat(fd,
360 int fd = h->fd; local
[all...]

Completed in 673 milliseconds

1234567891011>>