/system/bt/bta/gatt/ |
H A D | bta_gattc_cache.c | 1523 FILE *fd = fopen(fname, "rb"); local 1524 if (!fd) { 1534 if (fread(&cache_ver, sizeof(UINT16), 1, fd) != 1) { 1546 if (fread(&num_attr, sizeof(UINT16), 1, fd) != 1) { 1553 if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), 0xFF, fd) != num_attr) { 1564 fclose(fd); 1587 FILE *fd = fopen(fname, "wb"); local 1588 if (!fd) { 1594 if (fwrite(&cache_ver, sizeof(UINT16), 1, fd) != 1) { 1596 fclose(fd); [all...] |
/system/bt/btif/include/ |
H A D | btif_hl.h | 280 int fd; member in struct:__anon616
|
/system/bt/btif/src/ |
H A D | btif_hh.c | 143 extern void bta_hh_co_destroy(int fd); 144 extern void bta_hh_co_write(int fd, UINT8* rpt, UINT16 len); 159 static void toggle_os_keylockstates(int fd, int changedkeystates); 194 static void toggle_os_keylockstates(int fd, int changedlockstates) argument 196 BTIF_TRACE_EVENT("%s: fd = %d, changedlockstates = 0x%x", 197 __FUNCTION__, fd, changedlockstates); 226 bta_hh_co_write(fd , hidreport, sizeof(hidreport)); 237 bta_hh_co_write(fd , hidreport, sizeof(hidreport)); 316 toggle_os_keylockstates(p_dev->fd, keylockstates); 519 BTIF_TRACE_DEBUG("%s: uhid fd [all...] |
H A D | btif_sock_l2cap.c | 75 int our_fd; //fd from our side 76 int app_fd; //fd from app's side 393 static BOOLEAN send_app_connect_signal(int fd, const bt_bdaddr_t* addr, argument 404 if (sock_send_fd(fd, (const uint8_t*)&cs, sizeof(cs), send_fd) == sizeof(cs)) 406 else APPL_TRACE_ERROR("sock_send_fd failed, fd:%d, send_fd:%d", fd, send_fd); 407 } else if (sock_send_all(fd, (const uint8_t*)&cs, sizeof(cs)) == sizeof(cs)) { 489 APPL_TRACE_DEBUG("sending connect signal & app fd: %d to app server to accept() the" 491 APPL_TRACE_DEBUG("server fd:%d, scn:%d", sock->our_fd, sock->channel); 494 accept_rs->app_fd = -1; // The fd i 1023 btsock_l2cap_signaled(int fd, int flags, uint32_t user_id) argument [all...] |
/system/connectivity/shill/ |
H A D | device_info.cc | 732 const int fd = sockets_->Socket(PF_INET, SOCK_DGRAM, 0); local 733 if (fd < 0) { 738 ScopedSocketCloser socket_closer(sockets_.get(), fd); 743 int err = sockets_->Ioctl(fd, SIOCGIFHWADDR, &ifr); 765 const int fd = sockets_->Socket(PF_INET, SOCK_DGRAM, 0); local 766 if (fd < 0) { 771 ScopedSocketCloser socket_closer(sockets_.get(), fd); 789 int err = sockets_->Ioctl(fd, SIOCGARP, &areq); 968 int fd = HANDLE_EINTR(open(kTunDeviceName, O_RDWR)); local 969 if (fd < 994 int fd = HANDLE_EINTR(open(kTunDeviceName, O_RDWR)); local [all...] |
H A D | http_proxy_unittest.cc | 137 for (const int fd : proxy_fds) { 138 if (fd != -1) { 139 EXPECT_CALL(sockets_, Close(fd)); 152 int InvokeGetSockName(int fd, struct sockaddr* addr_out, argument 155 EXPECT_EQ(kProxyFD, fd); 247 void ExpectClientInput(int fd) { argument 249 .WillOnce(Return(fd)); 250 EXPECT_CALL(sockets(), SetNonBlocking(fd)) 253 CreateInputHandler(fd, 376 void AcceptClient(int fd) { argument 421 WriteToClient(int fd) argument 424 WriteToServer(int fd) argument [all...] |
/system/core/adb/ |
H A D | transport.cpp | 89 read_packet(int fd, const char* name, apacket** ppacket) argument 93 snprintf(buff, sizeof buff, "fd=%d", fd); 99 int r = adb_read(fd, p, len); 104 D("%s: read_packet (fd=%d), error ret=%d: %s", name, fd, r, strerror(errno)); 114 write_packet(int fd, const char* name, apacket** ppacket) argument 118 snprintf(buff, sizeof buff, "fd=%d", fd); 125 int r = adb_write(fd, 137 transport_socket_events(int fd, unsigned events, void *_t) argument 442 transport_read_action(int fd, struct tmsg* m) argument 462 transport_write_action(int fd, struct tmsg* m) argument [all...] |
H A D | commandline.cpp | 293 // Reads from |fd| and prints received data. If |use_shell_protocol| is true 298 int read_and_dump(int fd, bool use_shell_protocol = false, argument 301 if (fd < 0) return exit_code; 309 protocol.reset(new ShellProtocol(fd)); 338 D("read_and_dump(): pre adb_read(fd=%d)", fd); 339 length = adb_read(fd, raw_buffer, sizeof(raw_buffer)); 340 D("read_and_dump(): post adb_read(fd=%d): length=%d", fd, length); 351 static void read_status_line(int fd, cha argument 448 send_window_size_change(int fd, std::unique_ptr<ShellProtocol>& shell) argument 653 int fd = adb_connect(service_string, &error); local 819 int fd = adb_connect(android::base::StringPrintf("%s:%d", service, sz), &error); local 906 int fd = adb_connect(service, &error); local 1084 ScopedFd fd; local 1129 int fd; local 1193 write_zeros(int bytes, int fd) argument 1258 int fd = adb_connect(cmd, &error); local 1286 int fd = adb_connect("restore:", &error); local 1400 int fd = adb_connect(command, &error); local 1673 int fd = adb_connect(cmd, &error); local 1690 int fd = _adb_connect("host:kill", &error); local 2068 int fd = adb_connect(cmd, &error); local [all...] |
/system/core/healthd/ |
H A D | healthd_mode_charger.cpp | 653 static int input_callback(int fd, unsigned int epevents, void *data) argument 659 ret = ev_get_input(fd, epevents, &ev);
|
/system/core/init/ |
H A D | builtins.cpp | 73 int fd = open(filename, O_RDONLY | O_NOFOLLOW | O_CLOEXEC); local 74 if (fd == -1) { 78 int rc = syscall(__NR_finit_module, fd, options, 0); 82 close(fd); 188 int fd = TEMP_FAILURE_RETRY(open(entry->mnt_fsname, O_RDONLY | O_EXCL)); local 189 if (fd >= 0) { 191 close(fd); 424 int mode, loop, fd; local 428 fd = open(source + 5, mode | O_CLOEXEC); 429 if (fd < [all...] |
H A D | devices.cpp | 936 int dfd, fd; local 940 fd = openat(dfd, "uevent", O_WRONLY); 941 if(fd >= 0) { 942 write(fd, "add\n", 4); 943 close(fd); 953 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY); 954 if(fd < 0) 957 d2 = fdopendir(fd); 959 close(fd);
|
/system/core/libbacktrace/ |
H A D | backtrace_test.cpp | 1177 int fd = open(tmp_so_name, O_RDONLY); local 1178 ASSERT_TRUE(fd != -1); 1180 void* map = mmap(NULL, map_size, PROT_READ | PROT_EXEC, MAP_PRIVATE, fd, 0); 1182 close(fd); 1223 int fd = open(tmp_so_name, O_RDONLY); local 1224 if (fd == -1) { 1230 void* map = mmap(NULL, map_size, PROT_READ | PROT_EXEC, MAP_PRIVATE, fd, 0); 1236 close(fd);
|
/system/core/libpixelflinger/codeflinger/ |
H A D | GGLAssembler.cpp | 161 int fd = i==GGLFormat::ALPHA ? mBlendDstA : mBlendDst; local 177 info.blend = (fs != int(GGL_ONE)) || (fd > int(GGL_ZERO)); 493 int fd = component==GGLFormat::ALPHA ? mBlendDstA : mBlendDst; local 499 const int blending = blending_codes(fs, fd); 502 const int need_blending = (fs != int(GGL_ONE)) || (fd > int(GGL_ZERO));
|
/system/core/libpixelflinger/tests/arch-arm64/assembler/ |
H A D | arm64_assembler_test.cpp | 718 int fd = ashmem_create_region("code cache", instrMemSize); local 719 if(fd < 0) 724 MAP_PRIVATE, fd, 0);
|
/system/core/libpixelflinger/tests/arch-mips64/assembler/ |
H A D | mips64_assembler_test.cpp | 615 int fd = ashmem_create_region("code cache", instrMemSize); local 616 if(fd < 0) { 623 MAP_PRIVATE, fd, 0);
|
/system/core/libusbhost/ |
H A D | usbhost.c | 69 int fd; member in struct:usb_host_context 82 int fd; member in struct:usb_device 147 wds[0] = inotify_add_watch(context->fd, USB_FS_DIR, IN_CREATE | IN_DELETE); 154 ret = inotify_add_watch(context->fd, path, IN_CREATE | IN_DELETE); 167 context->fd = inotify_init(); 168 if (context->fd < 0) { 178 close(context->fd); 184 return context->fd; 208 context->wdd = inotify_add_watch(context->fd, DEV_DIR, IN_CREATE | IN_DELETE); 235 ret = read(context->fd, event_bu 322 int fd, did_retry = 0, writeable = 1; local 357 usb_device_new(const char *dev_name, int fd) argument 389 int fd = open(device->dev_name, O_RDWR); local [all...] |
/system/core/libziparchive/ |
H A D | zip_archive.cc | 217 static int32_t MapCentralDirectory0(int fd, const char* debug_file_name, argument 222 if (lseek64(fd, search_start, SEEK_SET) != search_start) { 227 if (!android::base::ReadFully(fd, scan_buffer, static_cast<size_t>(read_amount))) { 294 if (!archive->directory_map.create(debug_file_name, fd, 314 static int32_t MapCentralDirectory(int fd, const char* debug_file_name, argument 320 off64_t file_length = lseek64(fd, 0, SEEK_END); 322 ALOGV("Zip: lseek on fd %d failed", fd); 354 int32_t result = MapCentralDirectory0(fd, debug_file_name, archive, 444 if ((result = MapCentralDirectory(archive->fd, debug_file_nam 455 OpenArchiveFd(int fd, const char* debug_file_name, ZipArchiveHandle* handle, bool assume_ownership) argument 463 const int fd = open(fileName, O_RDONLY | O_BINARY, 0); local 484 UpdateEntryFromDataDescriptor(int fd, ZipEntry *entry) argument 507 ReadAtOffset(int fd, uint8_t* buf, size_t len, off64_t off) argument 811 Create(int fd, const ZipEntry* entry) argument 867 FileWriter(const int fd, const size_t declared_length) argument 887 InflateEntryToWriter(int fd, const ZipEntry* entry, Writer* writer, uint64_t* crc_out) argument 985 CopyEntryToWriter(int fd, const ZipEntry* entry, Writer* writer, uint64_t *crc_out) argument 1059 ExtractEntryToFile(ZipArchiveHandle handle, ZipEntry* entry, int fd) argument [all...] |
/system/core/lmkd/ |
H A D | lmkd.c | 126 static ssize_t read_all(int fd, char *buf, size_t max_len) argument 131 ssize_t r = read(fd, buf, max_len); 220 int fd = open(path, O_WRONLY | O_CLOEXEC); local 224 if (fd < 0) { 229 ret = write(fd, s, len); 236 close(fd); 469 int fd; local 477 fd = open(ZONEINFO_PATH, O_RDONLY | O_CLOEXEC); 478 if (fd == -1) { 483 size = read_all(fd, bu 502 int fd; local 526 int fd; local [all...] |
/system/core/logcat/ |
H A D | logcat.cpp | 867 int fd; local 873 fd = open("/proc/cmdline", O_RDONLY); 874 if (fd >= 0) { 875 int n = read(fd, cmdline, sizeof(cmdline)-1 ); 878 close(fd); 915 fd = open( devname, O_WRONLY ); 916 if (fd >= 0) { 917 dup2(fd, 1); 918 dup2(fd, 2); 919 close(fd); [all...] |
/system/core/toolbox/ |
H A D | newfs_msdos.c | 265 int ch, fd, fd1; local 376 fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644); 377 if (fd == -1) 379 if (ftruncate(fd, opt_create)) 381 } else if ((fd = open(fname, opt_N ? O_RDONLY : O_RDWR)) == -1) 383 if (fstat(fd, &sb)) 394 if (opt_ofs && opt_ofs != lseek(fd, opt_ofs, SEEK_SET)) 416 getdiskinfo(fd, fname, dtype, oflag, &bpb); 737 if ((n = write(fd, img, bpb.bps)) == -1) 797 static void getdiskinfo(int fd, cons argument 847 getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag, struct bpb *bpb) argument [all...] |
/system/extras/ext4_utils/ |
H A D | make_ext4fs.c | 421 int make_ext4fs_sparse_fd(int fd, long long len, argument 424 return make_ext4fs_sparse_fd_directory(fd, len, mountpoint, sehnd, NULL); 427 int make_ext4fs_sparse_fd_directory(int fd, long long len, argument 434 return make_ext4fs_internal(fd, directory, NULL, mountpoint, NULL, 449 int fd; local 455 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); 456 if (fd < 0) { 461 status = make_ext4fs_internal(fd, directory, NULL, mountpoint, NULL, 464 close(fd); 681 int make_ext4fs_internal(int fd, cons argument [all...] |
/system/media/camera/src/ |
H A D | camera_metadata.c | 878 static void print_data(int fd, const uint8_t *data_ptr, uint32_t tag, int type, 883 int fd, 885 dump_indented_camera_metadata(metadata, fd, verbosity, 0); 889 int fd, 893 dprintf(fd, "%*sDumping camera metadata array: Not allocated\n", 898 dprintf(fd, 903 dprintf(fd, "%*sVersion: %d, Flags: %08x\n", 924 dprintf(fd, "%*s%s.%s (%05x): %s[%" PRIu32 "]\n", 953 print_data(fd, data_ptr, entry->tag, entry->type, count, indentation); 957 static void print_data(int fd, cons argument 882 dump_camera_metadata(const camera_metadata_t *metadata, int fd, int verbosity) argument 888 dump_indented_camera_metadata(const camera_metadata_t *metadata, int fd, int verbosity, int indentation) argument [all...] |
/system/vold/ |
H A D | Utils.cpp | 354 int fd = TEMP_FAILURE_RETRY(open("/dev/urandom", O_RDONLY | O_CLOEXEC | O_NOFOLLOW)); local 355 if (fd == -1) { 361 while ((n = TEMP_FAILURE_RETRY(read(fd, &buf[0], std::min(sizeof(buf), bytes)))) > 0) { 365 close(fd); 523 int fd = TEMP_FAILURE_RETRY(open(c_path, O_RDWR | O_CLOEXEC)); local 524 if (fd == -1) { 529 if ((ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) { 538 if (ioctl(fd, BLKDISCARD, &range) == 0) { 546 close(fd); 682 ScopedFd::ScopedFd(int fd) argument [all...] |
/system/bt/audio_a2dp_hw/ |
H A D | audio_a2dp_hw.c | 253 INFO("connected to stack fd = %d", skt_fd); 258 static int skt_read(int fd, void *p, size_t len) argument 266 OSI_NO_INTR(read = recv(fd, p, len, MSG_NOSIGNAL)); 273 static int skt_write(int fd, const void *p, size_t len) argument 282 OSI_NO_INTR(sent = send(fd, p, len, MSG_NOSIGNAL)); 293 OSI_NO_INTR(sent = send(fd, p, len - count, MSG_NOSIGNAL | MSG_DONTWAIT)); 313 static int skt_disconnect(int fd) argument 315 INFO("fd %d", fd); 317 if (fd ! 728 out_dump(const struct audio_stream *stream, int fd) argument 952 in_dump(const struct audio_stream *stream, int fd) argument 1379 adev_dump(const audio_hw_device_t *device, int fd) argument [all...] |
/system/core/fastboot/ |
H A D | fastboot.cpp | 162 static int64_t get_file_size(int fd) { argument 164 return fstat(fd, &sb) == -1 ? -1 : sb.st_size; 167 static void* load_fd(int fd, int64_t* sz) { argument 171 *sz = get_file_size(fd); 179 if(read(fd, data, *sz) != *sz) goto oops; 180 close(fd); 186 close(fd); 193 int fd = open(fn, O_RDONLY | O_BINARY); local 194 if (fd == -1) return nullptr; 195 return load_fd(fd, s 569 int fd = open(marker_file.c_str(), O_CREAT | O_WRONLY | O_CLOEXEC, 0666); local 608 int fd = fileno(fp); local 719 load_sparse_files(int fd, int max_size) argument 802 load_buf_fd(Transport* transport, int fd, struct fastboot_buffer* buf) argument 830 int fd; local 1114 int fd = unzip_to_file(zip, images[i].img_name); local 1313 int fd; local [all...] |