/system/core/fastboot/ |
H A D | usb_linux.cpp | 179 int fd; local 185 fd = open(path, O_RDONLY); 186 if (fd >= 0) { 187 int chars_read = read(fd, info.serial_number, 189 close(fd); 274 int fd, n; local 280 fd = open(path, O_RDONLY); 281 if (fd < 0) 284 n = read(fd, buf, bufsize - 1); 285 close(fd); 338 int fd; local 467 int fd; local [all...] |
/system/core/init/ |
H A D | property_service.cpp | 126 int fd; local 129 fd = mkstemp(tempPath); 130 if (fd < 0) { 134 write(fd, value, strlen(value)); 135 fsync(fd); 136 close(fd); 257 ufds[0].fd = s; 420 int fd = openat(dirfd(dir.get()), entry->d_name, O_RDONLY | O_NOFOLLOW); local 421 if (fd == -1) { 428 if (fstat(fd, 503 int fd = open(rec->blk_device, O_RDONLY); local [all...] |
/system/core/liblog/ |
H A D | pmsg_reader.c | 153 if (transp->context.fd <= 0) { 154 int fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY | O_CLOEXEC); local 156 if (fd < 0) { 159 if (fd == 0) { /* Argggg */ 160 fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY | O_CLOEXEC); 162 if (fd < 0) { 166 transp->context.fd = fd; 172 ret = TEMP_FAILURE_RETRY(read(transp->context.fd, 205 ret = TEMP_FAILURE_RETRY(read(transp->context.fd, [all...] |
/system/core/logd/tests/ |
H A D | logd_test.cpp | 55 .fd = sock, 308 int fd = socket_local_client("logdr", local 311 if (fd >= 0) { 320 user_logger_available = write(fd, ask, sizeof(ask)) == sizeof(ask); 322 user_logger_content = recv(fd, msg.buf, sizeof(msg), 0) > 0; 331 close(fd); 346 fd = open(loggers[i], O_RDONLY); 347 if (fd < 0) { 351 fcntl(fd, F_SETFL, O_RDONLY | O_NONBLOCK); 352 int result = TEMP_FAILURE_RETRY(read(fd, ms 551 int fd = socket_local_client("logdr", local 632 int fd = socket_local_client("logdr", local 725 int fd; local [all...] |
/system/core/toolbox/upstream-netbsd/bin/dd/ |
H A D | dd.h | 88 int fd; /* file descriptor */ member in struct:__anon1719 90 struct ddfops const *ops; /* ops to use with fd */
|
/system/core/trusty/libtrusty/tipc-test/ |
H A D | tipc_test.c | 191 int fd; local 198 fd = tipc_connect(dev_name, "foo"); 199 if (fd >= 0) { 202 tipc_close(fd); 217 int fd; local 224 fd = tipc_connect(dev_name, closer1_name); 225 if (fd < 0) { 233 tipc_close(fd); 246 int fd; local 253 fd 276 int fd[4]; local 403 int fd; local 449 _wait_for_msg(int fd, uint msgsz, int timeout) argument 503 int fd; local 548 int fd; local 587 int fd; local 637 int fd; local 666 int fd; local [all...] |
/system/extras/ext4_utils/ |
H A D | ext4_utils.c | 141 void read_sb(int fd, struct ext4_super_block *sb) argument 145 ret = lseek64(fd, 1024, SEEK_SET); 149 ret = read(fd, sb, sizeof(*sb)); 157 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument 161 ret = lseek64(fd, offset, SEEK_SET); 165 ret = write(fd, sb, sizeof(*sb)); 172 static void block_device_write_sb(int fd) argument 182 write_sb(fd, offset, aux_info.backup_sb[i]); 187 write_sb(fd, 1024, aux_info.sb); 191 void write_ext4_image(int fd, in argument 518 get_block_device_size(int fd) argument 538 is_block_device_fd(int fd) argument 552 get_file_size(int fd) argument 595 read_ext(int fd, int verbose) argument [all...] |
/system/extras/ksmutils/ |
H A D | ksminfo.c | 198 int fd; local 223 fd = open(filename, O_RDONLY); 224 if (fd < 0) { 248 off = lseek(fd, vaddr, SEEK_SET); 253 ssize_t len = read(fd, data, pm_kernel_pagesize(ker)); 337 close(fd);
|
/system/extras/procrank/ |
H A D | procrank.c | 72 int fd = open("/proc/meminfo", O_RDONLY); local 74 if (fd < 0) { 79 const int len = read(fd, buffer, sizeof(buffer)-1); 80 close(fd);
|
/system/extras/simpleperf/ |
H A D | read_elf.cpp | 47 bool IsValidElfFile(int fd) { argument 50 return android::base::ReadFully(fd, buf, 4) && memcmp(buf, elf_magic, 4) == 0; 161 auto buffer_or_err = llvm::MemoryBuffer::getOpenFileSlice(fhelper.fd(), filename, file_size, file_offset);
|
/system/extras/tests/sdcard/ |
H A D | sysutil.cpp | 84 int fd = open(filename, O_RDONLY); local 86 if (fd < 0) 105 s = read(fd, end, size); 127 close(fd); 148 int fd = open(filename, O_WRONLY); local 151 if (fd < 0) 167 ssize_t s = write(fd, start, size); 184 close(fd); 399 void fsyncAndDropCaches(int fd, int code) argument 401 fsync(fd); [all...] |
/system/media/alsa_utils/ |
H A D | alsa_device_profile.c | 585 void profile_dump(const alsa_device_profile* profile, int fd) argument 588 dprintf(fd, " %s\n", "No USB Profile"); 593 dprintf(fd, " Profile is INVALID"); 597 dprintf(fd, " card:%d, device:%d - %s\n", 601 dprintf(fd, " Formats: "); 605 dprintf(fd, "%d ", profile->formats[fmtIndex]); 607 dprintf(fd, "\n"); 610 dprintf(fd, " Rates: "); 614 dprintf(fd, "%u ", profile->sample_rates[rateIndex]); 616 dprintf(fd, "\ [all...] |
/system/netd/server/ |
H A D | SockDiag.cpp | 49 int checkError(int fd) { argument 54 ssize_t bytesread = recv(fd, &ack, sizeof(ack), MSG_DONTWAIT | MSG_PEEK); 60 recv(fd, &ack, sizeof(ack), 0);
|
/system/update_engine/payload_generator/ |
H A D | generate_delta_main.cc | 219 int fd = open(in_file.c_str(), O_RDONLY, 0); local 220 CHECK_GE(fd, 0); 221 ScopedFdCloser fd_closer(&fd); 224 CHECK(utils::PReadAll(fd, buf.data(), buf.size(), offset, &bytes_read));
|
/system/vold/ |
H A D | CommandListener.cpp | 651 "fd=%i," 840 android::status_t CommandListener::AppFuseCmd::sendFd(SocketClient *cli, int fd) { argument 866 *((int *) CMSG_DATA(controlMessage)) = fd;
|
/system/webservd/webservd/ |
H A D | request.cc | 187 int fd = dup(request_data_pipe_out_.GetPlatformFile()); local 188 CHECK_GE(fd, 0); 189 return fd;
|
/system/bt/btif/src/ |
H A D | btif_pan.c | 101 static void btpan_tap_fd_signaled(int fd, int type, int flags, uint32_t user_id); 404 int fd, err; local 409 if ((fd = open(clonedev, O_RDWR)) < 0) 412 return fd; 421 if ((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0) 424 close(fd); 429 int flags = fcntl(fd, F_GETFL, 0); 430 fcntl(fd, F_SETFL, flags | O_NONBLOCK); 431 return fd; 434 close(fd); 468 btpan_tap_close(int fd) argument 725 int fd = PTR_TO_INT(p_param); local 814 btpan_tap_fd_signaled(int fd, int type, int flags, uint32_t user_id) argument [all...] |
H A D | btif_sock_rfc.c | 82 int fd; member in struct:__anon689 118 rfc_slots[i].fd = INVALID_FD; 145 if (rfc_slots[i].fd == INVALID_FD) 207 slot->fd = fds[0]; 300 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. 308 slot->app_fd = INVALID_FD; // Drop our reference to the fd. 310 btsock_thread_add_fd(pth, slot->fd, BTSOCK_RFCOMM, SOCK_THREAD_FD_EXCEPTION, slot->id); 367 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. 368 slot->app_fd = INVALID_FD; // Drop our reference to the fd. 370 btsock_thread_add_fd(pth, slot->fd, BTSOCK_RFCOM 440 send_app_connect_signal(int fd, const bt_bdaddr_t* addr, int channel, int status, int send_fd) argument 736 send_data_to_app(int fd, BT_HDR *p_buf) argument 791 btsock_rfc_signaled(UNUSED_ATTR int fd, int flags, uint32_t user_id) argument [all...] |
/system/bt/osi/src/ |
H A D | alarm.c | 717 static void dump_stat(int fd, stat_t *stat, const char *description) argument 723 dprintf(fd, "%-51s: %llu / %llu / %llu\n", 730 void alarm_debug_dump(int fd) argument 732 dprintf(fd, "\nBluetooth Alarms Statistics:\n"); 738 dprintf(fd, " None\n"); 744 dprintf(fd, " Total Alarms: %zu\n\n", list_length(alarms)); 752 dprintf(fd, " Alarm : %s (%s)\n", stats->name, 755 dprintf(fd, "%-51s: %zu / %zu / %zu / %zu\n", 760 dprintf(fd, "%-51s: %zu / %zu\n", 765 dprintf(fd, " [all...] |
/system/bt/stack/smp/ |
H A D | aes.c | 90 #define fd(x) (f8(x) ^ f4(x) ^ x) macro 205 static const uint_8t gfmul_d[256] = mm_data(fd); 297 #define gfm_d(x) fd(x)
|
/system/connectivity/shill/ |
H A D | connection_diagnostics.cc | 737 void ConnectionDiagnostics::OnArpReplyReceived(int fd) { argument 738 SLOG(this, 3) << __func__ << "(fd " << fd << ")"; local
|
H A D | http_request_unittest.cc | 226 void CallConnectCompletion(bool success, int fd) { argument 227 request_->OnConnectCompletion(success, fd); 296 void WriteToServer(int fd) { argument 297 request_->WriteToServer(fd);
|
/system/core/adb/ |
H A D | adb.cpp | 533 const int fd = dup(original_fd); local 534 if (fd == -1) { 542 if (_setmode(fd, _O_BINARY) == -1) { 545 unix_close(fd); 549 stream.reset(fdopen(fd, "wb")); 553 unix_close(fd); 564 // fd will be closed when stream is closed. 713 L"adb -P %d fork-server server --reply-fd %d", server_port, 842 int fd[2]; 845 // fd[ 994 SendOkay(int fd, const std::string& s) argument [all...] |
H A D | file_sync_client.cpp | 108 fd = adb_connect("sync:", &error); 109 if (fd < 0) { 124 ReadOrderlyShutdown(fd); 126 adb_close(fd); 131 bool IsValid() { return fd >= 0; } 134 adb_pollfd pfd = {.fd = fd, .events = POLLIN}; 160 return WriteFdExactly(fd, &buf[0], buf.size()); 267 if (!ReadFdExactly(fd, &msg.status, sizeof(msg.status))) { 289 if (!ReadFdExactly(fd, 389 int fd; member in class:SyncConnection [all...] |
H A D | shell_service.cpp | 113 int fd = adb_open("/proc/self/oom_score_adj", O_WRONLY | O_CLOEXEC); local 114 if (fd >= 0) { 115 adb_write(fd, "0", 1); 116 adb_close(fd); 122 // Reads from |fd| until close or failure. 123 std::string ReadAll(int fd) { argument 128 int bytes = adb_read(fd, buffer, sizeof(buffer)); 290 int fd; local 291 pid_ = forkpty(&fd, pts_name, nullptr, nullptr); 293 stdinout_sfd_.Reset(fd); 697 int fd = local_socket_sfd_.fd(); local [all...] |