Home
last modified time | relevance | path

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

123456

/aosp12/system/bt/vendor_libs/test_vendor_lib/model/setup/
H A Dtest_channel_transport.cc99 int bytes_read = read(fd, &command_name_size, 1); in OnCommandReady() local
100 if (bytes_read != 1) { in OnCommandReady()
106 bytes_read = read(fd, &command_name_raw[0], command_name_size); in OnCommandReady()
107 if (bytes_read != command_name_size) { in OnCommandReady()
120 bytes_read = read(fd, &num_args, 1); in OnCommandReady()
121 if (bytes_read != 1) { in OnCommandReady()
122 LOG_INFO("Unexpected (num_args) bytes_read: %d != %d", bytes_read, 1); in OnCommandReady()
127 bytes_read = read(fd, &arg_size, 1); in OnCommandReady()
128 if (bytes_read != 1) { in OnCommandReady()
133 bytes_read = read(fd, &arg[0], arg_size); in OnCommandReady()
[all …]
/aosp12/frameworks/native/cmds/bugreportz/
H A Dbugreportz.cpp48 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(s, buffer, sizeof(buffer))); in bugreportz() local
49 if (bytes_read == 0) { in bugreportz()
51 } else if (bytes_read == -1) { in bugreportz()
61 for (int i = 0; i < bytes_read; i++) { in bugreportz()
78 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(s, buffer, sizeof(buffer))); in bugreportz_stream() local
79 if (bytes_read == 0) { in bugreportz_stream()
81 } else if (bytes_read == -1) { in bugreportz_stream()
91 bytes_read)) { in bugreportz_stream()
92 printf("Failed to write data to stdout: trying to send %zd bytes (%s)\n", bytes_read, in bugreportz_stream()
/aosp12/hardware/interfaces/bluetooth/1.0/default/
H A Dhci_packetizer.cc64 ssize_t bytes_read = TEMP_FAILURE_RETRY( in OnDataReady() local
67 if (bytes_read == 0) { in OnDataReady()
73 if (bytes_read < 0) { in OnDataReady()
77 bytes_read_ += bytes_read; in OnDataReady()
91 ssize_t bytes_read = TEMP_FAILURE_RETRY(read( in OnDataReady() local
95 if (bytes_read == 0) { in OnDataReady()
101 if (bytes_read < 0) { in OnDataReady()
105 bytes_remaining_ -= bytes_read; in OnDataReady()
106 bytes_read_ += bytes_read; in OnDataReady()
H A Dh4_protocol.cc75 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, 1)); in OnDataReady() local
76 if (bytes_read != 1) { in OnDataReady()
77 if (bytes_read == 0) { in OnDataReady()
82 } else if (bytes_read < 0) { in OnDataReady()
87 static_cast<unsigned int>(bytes_read)); in OnDataReady()
/aosp12/art/libprofile/profile/
H A Dprofile_boot_info.cc66 int bytes_read = TEMP_FAILURE_RETRY(read(fd, &string_length, sizeof(uint8_t))); in Load() local
67 if (bytes_read < 0) { in Load()
70 } else if (bytes_read == 0) { in Load()
83 bytes_read = TEMP_FAILURE_RETRY(read(fd, data.get(), string_length)); in Load()
84 if (bytes_read < 0) { in Load()
87 } else if (bytes_read == 0) { in Load()
111 int bytes_read = TEMP_FAILURE_RETRY(read(fd, &dex_file_index, sizeof(dex_file_index))); in Load() local
112 if (bytes_read <= 0) { in Load()
115 bytes_read = TEMP_FAILURE_RETRY(read(fd, &method_id, sizeof(method_id))); in Load()
116 if (bytes_read <= 0) { in Load()
/aosp12/system/bt/vendor_libs/linux/interface/
H A Dhci_packetizer.cc58 size_t bytes_read = TEMP_FAILURE_RETRY( in OnDataReady() local
61 CHECK(bytes_read > 0); in OnDataReady()
62 bytes_read_ += bytes_read; in OnDataReady()
76 size_t bytes_read = TEMP_FAILURE_RETRY(read( in OnDataReady() local
80 CHECK(bytes_read > 0); in OnDataReady()
81 bytes_remaining_ -= bytes_read; in OnDataReady()
82 bytes_read_ += bytes_read; in OnDataReady()
/aosp12/frameworks/ex/framesequence/jni/
H A DStream.cpp61 size_t bytes_read = 0; in read() local
64 bytes_read = min(size, peek_remaining); in read()
65 memcpy(buffer, mPeekBuffer + mPeekOffset, bytes_read); in read()
66 mPeekOffset += bytes_read; in read()
73 size -= bytes_read; in read()
74 buffer = ((char*) buffer) + bytes_read; in read()
77 bytes_read += doRead(buffer, size); in read()
79 return bytes_read; in read()
/aosp12/system/unwinding/libbacktrace/
H A DBacktracePtrace.cpp76 size_t bytes_read = 0; in Read()
88 bytes_read += copy_bytes; in Read()
94 return bytes_read; in Read()
99 bytes_read += sizeof(word_t); in Read()
105 return bytes_read; in Read()
108 bytes_read += left_over; in Read()
110 return bytes_read; in Read()
H A Dbacktrace_read_benchmarks.cpp94 size_t bytes_read = 0; in PtraceRead() local
98 return bytes_read; in PtraceRead()
103 bytes_read += sizeof(long); in PtraceRead()
109 return bytes_read; in PtraceRead()
112 bytes_read += left_over; in PtraceRead()
114 return bytes_read; in PtraceRead()
/aosp12/system/update_engine/payload_generator/
H A Dcow_size_estimator.cc43 ssize_t bytes_read = 0; in PerformReplaceOp() local
48 &bytes_read); in PerformReplaceOp()
50 CHECK_EQ(static_cast<size_t>(bytes_read), buffer.size()); in PerformReplaceOp()
83 ssize_t bytes_read = 0; in WriteAllCowOps() local
89 &bytes_read)); in WriteAllCowOps()
90 if (bytes_read <= 0 || static_cast<size_t>(bytes_read) != block_size) { in WriteAllCowOps()
91 LOG(ERROR) << "source_fd->Read failed: " << bytes_read; in WriteAllCowOps()
H A Dblock_mapping.cc50 ssize_t bytes_read = 0; in AddDiskBlock() local
51 if (!utils::PReadAll(fd, blob.data(), block_size_, byte_offset, &bytes_read)) in AddDiskBlock()
53 if (static_cast<size_t>(bytes_read) != block_size_) in AddDiskBlock()
122 ssize_t bytes_read = 0; in CompareData() local
123 if (!utils::PReadAll(fd, blob.data(), block_size, byte_offset, &bytes_read)) in CompareData()
125 if (static_cast<size_t>(bytes_read) != block_size) in CompareData()
H A Dblob_file_writer_unittest.cc45 ssize_t bytes_read; in TEST() local
47 blob_file.fd(), stored_blob.data(), kBlobSize, 0, &bytes_read)); in TEST()
48 EXPECT_EQ(bytes_read, kBlobSize); in TEST()
/aosp12/system/update_engine/payload_consumer/
H A Dextent_reader.cc69 uint64_t bytes_read = 0; in Read() local
70 while (bytes_read < count) { in Read()
72 TEST_AND_RETURN_FALSE(bytes_read == count); in Read()
77 std::min(count - bytes_read, cur_extent_bytes_left); in Read()
82 bytes + bytes_read, in Read()
89 bytes_read += bytes_to_read; in Read()
H A Dfilesystem_verifier_action.cc234 const auto bytes_read = fd->Read(buffer, read_size); in WriteVerityAndHashPartition() local
235 if (bytes_read < 0 || static_cast<size_t>(bytes_read) != read_size) { in WriteVerityAndHashPartition()
237 << read_size << " bytes, actual: " << bytes_read; in WriteVerityAndHashPartition()
247 UpdatePartitionProgress((start_offset + bytes_read) * 1.0f / partition_size_ * in WriteVerityAndHashPartition()
254 start_offset + bytes_read, in WriteVerityAndHashPartition()
280 const auto bytes_read = fd->Read(buffer, read_size); in HashPartition() local
281 if (bytes_read < 0 || static_cast<size_t>(bytes_read) != read_size) { in HashPartition()
283 << read_size << " bytes, actual: " << bytes_read; in HashPartition()
292 const auto progress = (start_offset + bytes_read) * 1.0f / partition_size_; in HashPartition()
300 start_offset + bytes_read, in HashPartition()
H A Dverity_writer_android.cc180 ssize_t bytes_read = 0; in EncodeFEC() local
185 &bytes_read)); in EncodeFEC()
186 TEST_AND_RETURN_FALSE(bytes_read >= 0); in EncodeFEC()
187 TEST_AND_RETURN_FALSE(static_cast<size_t>(bytes_read) == buffer.size()); in EncodeFEC()
204 ssize_t bytes_read = 0; in EncodeFEC() local
206 read_fd, fec_read.data(), fec_read.size(), fec_offset, &bytes_read)); in EncodeFEC()
207 TEST_AND_RETURN_FALSE(bytes_read >= 0); in EncodeFEC()
208 TEST_AND_RETURN_FALSE(static_cast<size_t>(bytes_read) == fec_read.size()); in EncodeFEC()
H A Dvabc_partition_writer.cc114 ssize_t bytes_read = 0; in WriteAllCowOps() local
119 &bytes_read)); in WriteAllCowOps()
120 if (bytes_read <= 0 || static_cast<size_t>(bytes_read) != block_size) { in WriteAllCowOps()
121 LOG(ERROR) << "source_fd->Read failed: " << bytes_read; in WriteAllCowOps()
/aosp12/packages/services/Car/cpp/bugreport/
H A Dmain.cpp145 if (bytes_read == 0) { in zipFilesToFd()
148 if (bytes_read == -1) { in zipFilesToFd()
157 error = writer->WriteBytes(buffer, bytes_read); in zipFilesToFd()
179 if (bytes_read == 0) { in copyTo()
182 if (bytes_read == -1) { in copyTo()
192 if (!android::base::WriteFully(fd_out, buffer, bytes_read)) { in copyTo()
196 return bytes_read; in copyTo()
249 if (bytes_read == 0) { in doBugreport()
252 if (bytes_read == -1) { in doBugreport()
257 for (int i = 0; i < bytes_read; i++) { in doBugreport()
[all …]
/aosp12/hardware/qcom/audio/hal/audio_extn/
H A Daudiozoom.c124 int bytes_read; in audio_extn_audiozoom_parse_info() local
152 bytes_read = fread(buf, 1, kBufSize, file); in audio_extn_audiozoom_parse_info()
153 if (bytes_read < 0) { in audio_extn_audiozoom_parse_info()
154 ALOGE("%s: fread failed, bytes read = %d", __func__, bytes_read); in audio_extn_audiozoom_parse_info()
155 ret = bytes_read; in audio_extn_audiozoom_parse_info()
159 if (XML_ParseBuffer(parser, bytes_read, in audio_extn_audiozoom_parse_info()
160 bytes_read == 0) == XML_STATUS_ERROR) { in audio_extn_audiozoom_parse_info()
167 if (bytes_read == 0) in audio_extn_audiozoom_parse_info()
/aosp12/system/update_engine/common/
H A Dutils.cc125 size_t bytes_read = 0; in ReadAll() local
127 while (bytes_read < count) { in ReadAll()
128 ssize_t rc = HANDLE_EINTR(read(fd, c_buf + bytes_read, count - bytes_read)); in ReadAll()
144 bytes_read += rc; in ReadAll()
207 ssize_t bytes_read = 0; in PReadAll() local
210 pread(fd, c_buf + bytes_read, count - bytes_read, offset + bytes_read); in PReadAll()
215 bytes_read += rc; in PReadAll()
229 ssize_t bytes_read = 0; in ReadAll() local
231 ssize_t rc = fd->Read(c_buf + bytes_read, count - bytes_read); in ReadAll()
236 bytes_read += rc; in ReadAll()
[all …]
/aosp12/system/bt/vendor_libs/test_vendor_lib/model/devices/
H A Dh4_packetizer.cc61 ssize_t bytes_read; in OnDataReady() local
62 OSI_NO_INTR(bytes_read = read(fd, buffer.data(), bytes_to_read)); in OnDataReady()
63 if (bytes_read == 0) { in OnDataReady()
68 } else if (bytes_read < 0) { in OnDataReady()
82 h4_parser_.Consume(buffer.data(), bytes_read); in OnDataReady()
H A Dh4_parser.cc104 bool H4Parser::Consume(uint8_t* buffer, int32_t bytes_read) { in Consume() argument
106 if (bytes_read <= 0) { in Consume()
109 } else if (bytes_read > BytesRequested()) { in Consume()
111 static_cast<int>(bytes_read), in Consume()
132 packet_.insert(packet_.end(), buffer, buffer + bytes_read); in Consume()
133 bytes_wanted_ -= bytes_read; in Consume()
/aosp12/hardware/knowles/athletico/sound_trigger_hal/tests/
H A Dcrash_event_logger.c242 int bytes_read = 0; in dump_crash_log() local
278 if (bytes_read > 0) in dump_crash_log()
279 write(out_fp, buf, bytes_read); in dump_crash_log()
280 } while (bytes_read > 0); in dump_crash_log()
308 int bytes_read = 0; in dump_reg_access_hist_log() local
344 if (bytes_read > 0) in dump_reg_access_hist_log()
345 write(out_fp, buf, bytes_read); in dump_reg_access_hist_log()
346 } while (bytes_read > 0); in dump_reg_access_hist_log()
464 int bytes_read = 0; in ssr_copy_log() local
494 if (bytes_read > 0) in ssr_copy_log()
[all …]
/aosp12/hardware/qcom/wlan/qcwcn/wifi_hal/
H A Dring_buffer.cpp346 unsigned int bytes_read = 0; in rb_read() local
350 while (bytes_read < max_length) { in rb_read()
365 (max_length - bytes_read)) { in rb_read()
369 cur_cpy_len = max_length - bytes_read; in rb_read()
375 if (rbc->cur_valid_bytes <= bytes_read) { in rb_read()
392 memcpy((buf + bytes_read), in rb_read()
413 bytes_read += cur_cpy_len; in rb_read()
419 rbc->total_bytes_read += bytes_read; in rb_read()
420 if (rbc->cur_valid_bytes < bytes_read) { in rb_read()
425 rbc->cur_valid_bytes -= bytes_read; in rb_read()
[all …]
/aosp12/bionic/libc/bionic/
H A Dbionic_netlink.cpp78 ssize_t bytes_read; in ReadResponses() local
79 while ((bytes_read = TEMP_FAILURE_RETRY(recv(fd_.get(), data_, size_, 0))) > 0) { in ReadResponses()
81 for (; NLMSG_OK(hdr, static_cast<size_t>(bytes_read)); hdr = NLMSG_NEXT(hdr, bytes_read)) { in ReadResponses()
/aosp12/system/extras/tests/directiotest/
H A Ddirectiotest.c74 size_t bytes_read = 0; in do_read() local
79 ret = read(fd, (char *)buf + bytes_read, count - bytes_read); in do_read()
87 bytes_read += ret; in do_read()
88 } while (bytes_read < count); in do_read()
90 return bytes_read; in do_read()

123456