Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 26) sorted by relevance

12

/device/google/cuttlefish/common/libs/fs/
Dshared_fd_stream.cpp45 ssize_t bytes_read = ReadExact(shared_fd_, in underflow() local
51 read_buffer_.get() + unget_size + bytes_read); in underflow()
53 if (bytes_read <= 0 || in_avail() == 0) { in underflow()
61 std::streamsize bytes_read = 0; in xsgetn() local
62 while (bytes_read < count) { in xsgetn()
69 std::min(static_cast<std::streamsize>(in_avail()), count - bytes_read); in xsgetn()
70 std::memcpy(dst + bytes_read, gptr(), buffer_count); in xsgetn()
72 bytes_read += buffer_count; in xsgetn()
74 return bytes_read; in xsgetn()
/device/google/cuttlefish/host/frontend/webrtc/
Daudio_handler.cpp492 size_t bytes_read = 0; in OnCaptureBuffer() local
497 bytes_read += holding_buffer.Take(rx_buffer + bytes_read, in OnCaptureBuffer()
498 buffer.len() - bytes_read); in OnCaptureBuffer()
500 while (buffer.len() - bytes_read >= bytes_per_request) { in OnCaptureBuffer()
503 auto write_pos = rx_buffer + bytes_read; in OnCaptureBuffer()
515 memset(rx_buffer + bytes_read, 0, buffer.len() - bytes_read); in OnCaptureBuffer()
516 bytes_read = buffer.len(); in OnCaptureBuffer()
520 bytes_read += bytes_received; in OnCaptureBuffer()
522 if (bytes_read < buffer.len()) { in OnCaptureBuffer()
539 memset(rx_buffer + bytes_read, 0, buffer.len() - bytes_read); in OnCaptureBuffer()
[all …]
/device/google/cuttlefish/guest/commands/bt_vhci_forwarder/hci/
Dh4_packetizer.cc63 ssize_t bytes_read; in OnDataReady() local
65 bytes_read = read(fd, buffer.data(), bytes_to_read); in OnDataReady()
66 } while (bytes_read == -1 && errno == EINTR); in OnDataReady()
68 if (bytes_read == 0) { in OnDataReady()
74 if (bytes_read < 0) { in OnDataReady()
90 h4_parser_.Consume(buffer.data(), bytes_read); in OnDataReady()
Dh4_parser.cc106 bool H4Parser::Consume(const uint8_t* buffer, int32_t bytes_read) { in Consume() argument
108 if (bytes_read <= 0) { in Consume()
112 if ((uint32_t)bytes_read > BytesRequested()) { in Consume()
114 static_cast<int>(bytes_read), in Consume()
165 packet_.insert(packet_.end(), buffer, buffer + bytes_read); in Consume()
166 bytes_wanted_ -= bytes_read; in Consume()
/device/google/cuttlefish/host/commands/console_forwarder/
Dmain.cpp168 auto bytes_read = console_out_->Read(buf_ptr->data(), buf_ptr->size()); in ReadLoop() local
170 CHECK(bytes_read > 0) << "Error reading from console output: " in ReadLoop()
172 buf_ptr->resize(bytes_read); in ReadLoop()
181 auto bytes_read = client_fd->Read(buf_ptr->data(), buf_ptr->size()); in ReadLoop() local
182 if (bytes_read <= 0) { in ReadLoop()
189 } else if (bytes_read == 1) { // Control message in ReadLoop()
192 buf_ptr->resize(bytes_read); in ReadLoop()
/device/google/cuttlefish/host/commands/cvd_send_sms/unittest/
Dsms_sender_test.cc42 ssize_t bytes_read; in AssertCommandIsSent() local
44 bytes_read = fake_server_fd_->Read(buffer.data(), buffer.size()); in AssertCommandIsSent()
45 CHECK(bytes_read >= 0) << strerror(errno); in AssertCommandIsSent()
46 ss << std::string(buffer.data(), bytes_read); in AssertCommandIsSent()
47 } while (buffer[bytes_read - 1] != '\r'); in AssertCommandIsSent()
/device/google/gs-common/gear/dumpstate_v3/
DDumpstate.cpp138 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size())); in dumpLogSection() local
140 if (bytes_read == 0) { in dumpLogSection()
142 } else if (bytes_read < 0) { in dumpLogSection()
147 ssize_t result = TEMP_FAILURE_RETRY(write(fd_bin, buffer.data(), bytes_read)); in dumpLogSection()
149 if (result != bytes_read) { in dumpLogSection()
150 ALOGD("Failed to write %zd bytes, actually written: %zd", bytes_read, result); in dumpLogSection()
/device/google/gs-common/gear/dumpstate/
DDumpstate.cpp138 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size())); in dumpLogSection() local
140 if (bytes_read == 0) { in dumpLogSection()
142 } else if (bytes_read < 0) { in dumpLogSection()
147 ssize_t result = TEMP_FAILURE_RETRY(write(fd_bin, buffer.data(), bytes_read)); in dumpLogSection()
149 if (result != bytes_read) { in dumpLogSection()
150 ALOGD("Failed to write %zd bytes, actually written: %zd", bytes_read, result); in dumpLogSection()
/device/google/trout/hal/dumpstate/1.1/
DDumpstateDevice.cpp80 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(tempTarFile.fd, buffer.data(), buffer.size())); in tryDumpDirAsTar() local
82 if (bytes_read == 0) { in tryDumpDirAsTar()
84 } else if (bytes_read < 0) { in tryDumpDirAsTar()
89 ssize_t result = TEMP_FAILURE_RETRY(write(binFd, buffer.data(), bytes_read)); in tryDumpDirAsTar()
91 if (result != bytes_read) { in tryDumpDirAsTar()
92 LOG(DEBUG) << "Failed to write " << bytes_read in tryDumpDirAsTar()
/device/google/cuttlefish/host/commands/kernel_log_monitor/
Dutils.cc27 ssize_t bytes_read = cuttlefish::ReadExactBinary(fd, &length); in ReadEvent() local
28 if (bytes_read <= 0) { in ReadEvent()
33 bytes_read = cuttlefish::ReadExact(fd, &buf); in ReadEvent()
34 if (bytes_read <= 0) { in ReadEvent()
/device/google/cuttlefish/host/commands/tombstone_receiver/
Dmain.cpp104 auto bytes_read = conn->Recv(buff, sizeof(buff), 0); in TombstoneReceiverMain() local
105 acc += bytes_read; in TombstoneReceiverMain()
106 if (bytes_read <= 0) { in TombstoneReceiverMain()
110 file.write(buff, bytes_read); in TombstoneReceiverMain()
/device/google/barbet/dumpstate/
DDumpstateDevice.cpp360 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size())); in dumpModemThread() local
362 if (bytes_read == 0) { in dumpModemThread()
364 } else if (bytes_read < 0) { in dumpModemThread()
369 ssize_t result = TEMP_FAILURE_RETRY(write(fdModem, buffer.data(), bytes_read)); in dumpModemThread()
371 if (result != bytes_read) { in dumpModemThread()
372 ALOGD("Failed to write %ld bytes, actually written: %ld", bytes_read, result); in dumpModemThread()
/device/google/coral/dumpstate/
DDumpstateDevice.cpp353 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size())); in dumpModemThread() local
355 if (bytes_read == 0) { in dumpModemThread()
357 } else if (bytes_read < 0) { in dumpModemThread()
362 ssize_t result = TEMP_FAILURE_RETRY(write(fdModem, buffer.data(), bytes_read)); in dumpModemThread()
364 if (result != bytes_read) { in dumpModemThread()
365 ALOGD("Failed to write %ld bytes, actually written: %ld", bytes_read, result); in dumpModemThread()
/device/google/redfin/dumpstate/
DDumpstateDevice.cpp358 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size())); in dumpModemThread() local
360 if (bytes_read == 0) { in dumpModemThread()
362 } else if (bytes_read < 0) { in dumpModemThread()
367 ssize_t result = TEMP_FAILURE_RETRY(write(fdModem, buffer.data(), bytes_read)); in dumpModemThread()
369 if (result != bytes_read) { in dumpModemThread()
370 ALOGD("Failed to write %ld bytes, actually written: %ld", bytes_read, result); in dumpModemThread()
/device/google/sunfish/dumpstate/
DDumpstateDevice.cpp359 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size())); in dumpModemThread() local
361 if (bytes_read == 0) { in dumpModemThread()
363 } else if (bytes_read < 0) { in dumpModemThread()
368 ssize_t result = TEMP_FAILURE_RETRY(write(fdModem, buffer.data(), bytes_read)); in dumpModemThread()
370 if (result != bytes_read) { in dumpModemThread()
371 ALOGD("Failed to write %ld bytes, actually written: %ld", bytes_read, result); in dumpModemThread()
/device/google/contexthub/util/nanotool/
Dcalibrationfile.cpp52 ssize_t bytes_read = file_->read(file_data.data(), file_size); in Initialize() local
53 if (bytes_read != file_size) { in Initialize()
55 bytes_read, file_size); in Initialize()
Dcontexthub.cpp157 size_t bytes_read = fread(firmware_data.data(), sizeof(uint8_t), in Flash() local
161 if (bytes_read != static_cast<size_t>(file_size)) { in Flash()
163 bytes_read, file_size); in Flash()
/device/google/cuttlefish/common/libs/utils/
Dunix_sockets.cpp274 auto bytes_read = socket_->RecvMsg(&message_header, MSG_CMSG_CLOEXEC); in ReadMessage() local
276 auto bytes_read = socket_->RecvMsg(&message_header, 0); in ReadMessage() local
280 CF_EXPECT(bytes_read >= 0, "Read error: " << socket_->StrError()); in ReadMessage()
293 message_data.resize(bytes_read); in ReadMessage()
Dfiles.cpp555 const auto bytes_read = read_fd->Read(text_output.data(), text_output.size()); in GetDiskUsage() local
556 CHECK_GT(bytes_read, 0) << "Failed to read from pipe " << strerror(errno); in GetDiskUsage()
/device/google/cuttlefish/host/commands/run_cvd/
Dboot_state_machine.cc59 auto bytes_read = read_end->Read(&exit_code, sizeof(exit_code)); in DaemonizeLauncher() local
60 if (bytes_read != sizeof(exit_code)) { in DaemonizeLauncher()
61 LOG(ERROR) << "Failed to read a complete exit code, read " << bytes_read in DaemonizeLauncher()
Dmain.cc191 auto bytes_read = ReadAll(input_fd, &input_files_str); in FindConfigFromStdin() local
192 CF_EXPECT(bytes_read >= 0, "Failed to read input files. Error was \"" in FindConfigFromStdin()
/device/google/cuttlefish/host/commands/gnss_grpc_proxy/
Dgnss_grpc_proxy.cpp309 auto bytes_read = source_out->Read(buffer.data(), buffer.size()); in SendCommand() local
310 if (bytes_read > 0) { in SendCommand()
311 std::string s(buffer.data(), bytes_read); in SendCommand()
/device/google/cuttlefish/host/commands/modem_simulator/
Dchannel_monitor.cpp137 auto bytes_read = client.client_read_fd_->Read(buffer.data(), buffer.size()); in ReadCommand() local
138 if (bytes_read <= 0) { in ReadCommand()
/device/google/cuttlefish/host/commands/assemble_cvd/
Dassemble_cvd.cc549 auto bytes_read = ReadAll(input_fd, &input_files_str); in AssembleCvdMain() local
550 CF_EXPECT(bytes_read >= 0, "Failed to read input files. Error was \"" in AssembleCvdMain()
/device/google/cuttlefish/host/commands/modem_simulator/unittest/
Dservice_test.cpp109 auto bytes_read = in ReadCommandResponse() local
111 if (bytes_read <= 0) { in ReadCommandResponse()

12