/system/libufdt/tests/src/ |
D | extract_dtb.c | 26 int find_dtb_header_pos(const char *buf, size_t buf_size) { in find_dtb_header_pos() argument 27 if (buf == NULL || buf_size == 0) { in find_dtb_header_pos() 31 int pos = buf_size; in find_dtb_header_pos() 48 const char *buf, size_t buf_size) { in find_and_write_dtb() argument 49 int tag_pos = find_dtb_header_pos(buf, buf_size); in find_and_write_dtb() 63 size_t fdt_actual_size = buf_size - tag_pos; in find_and_write_dtb() 100 size_t buf_size; in extract_dtbs() local 101 buf = load_file(in_filename, &buf_size); in extract_dtbs() 109 while (buf_size > 0) { in extract_dtbs() 113 tag_pos = find_and_write_dtb(filename, buf, buf_size); in extract_dtbs() [all …]
|
D | util.c | 62 const void *buf, size_t buf_size) { in write_buf_to_file() argument 71 if (fwrite(buf, 1, buf_size, fout) < 1) { in write_buf_to_file()
|
D | util.h | 23 int write_buf_to_file(const char *filename, const void *buf, size_t buf_size);
|
/system/update_engine/payload_generator/ |
D | bzip.cc | 37 size_t buf_size = 40 + in.size() * 35 / 100; in BzipCompress() local 38 out->resize(buf_size); in BzipCompress() 42 if (buf_size > std::numeric_limits<uint32_t>::max()) in BzipCompress() 44 uint32_t data_size = buf_size; in BzipCompress() 61 buf_size *= 2; in BzipCompress() 62 out->resize(buf_size); in BzipCompress()
|
/system/bt/osi/test/fuzzers/compat/ |
D | fuzz_compat.cc | 27 size_t buf_size = in LLVMFuzzerTestOneInput() local 29 if (buf_size == 0) { in LLVMFuzzerTestOneInput() 37 dataProvider.ConsumeBytesWithTerminator<char>(buf_size, '\0'); in LLVMFuzzerTestOneInput() 41 buf_size = bytes.size(); in LLVMFuzzerTestOneInput() 42 void* dst_buf = malloc(buf_size); in LLVMFuzzerTestOneInput() 51 size_t len_to_cpy = dataProvider.ConsumeIntegralInRange<size_t>(0, buf_size); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/include/ |
D | libosiFuzzHelperFunctions.h | 26 size_t buf_size = in generateBuffer() local 28 if (buf_size == 0) { in generateBuffer() 33 char* buf = reinterpret_cast<char*>(malloc(buf_size)); in generateBuffer() 34 std::vector<char> bytes = dataProvider->ConsumeBytes<char>(buf_size); in generateBuffer() 39 buf[buf_size - 1] = 0x00; in generateBuffer()
|
/system/core/fs_mgr/libsnapshot/ |
D | snapuserd.cpp | 54 size_t buf_size = 1UL << 16; in daemon_main() local 55 auto buf = std::make_unique<char>(buf_size); in daemon_main() 63 memset(buf.get(), 0, buf_size); in daemon_main() 65 ssize_t readed = read(ctrl_fd.get(), buf.get(), buf_size); in daemon_main() 68 buf_size *= 2; in daemon_main() 69 buf = std::make_unique<char>(buf_size); in daemon_main() 87 if ((sizeof(*msg) + msg->len) > buf_size) { in daemon_main() 89 buf_size = sizeof(*msg) + msg->len; in daemon_main() 90 buf = std::make_unique<char>(buf_size); in daemon_main()
|
/system/bt/osi/test/fuzzers/buffer/ |
D | fuzz_buffer.cc | 28 size_t buf_size = in LLVMFuzzerTestOneInput() local 30 buffer_t* buf = buffer_new(buf_size); in LLVMFuzzerTestOneInput() 34 if (buf != nullptr && buf_size > 1) { in LLVMFuzzerTestOneInput() 43 dataProvider.ConsumeIntegralInRange<size_t>(1, buf_size - 1); in LLVMFuzzerTestOneInput() 46 if (slice_size == buf_size) { in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/future/ |
D | fuzz_future.cc | 27 size_t buf_size = in LLVMFuzzerTestOneInput() local 29 void* buf = malloc(buf_size); in LLVMFuzzerTestOneInput() 33 std::vector<uint8_t> bytes = dataProvider.ConsumeBytes<uint8_t>(buf_size); in LLVMFuzzerTestOneInput()
|
/system/media/audio_utils/ |
D | echo_reference.c | 51 size_t buf_size; // main buffer size in frames member 118 er->buf_size = 0; in echo_reference_reset_l() 266 if (er->frames_in + inFrames > er->buf_size) { in echo_reference_write() 268 er->buf_size, er->frames_in + inFrames); in echo_reference_write() 269 er->buf_size = er->frames_in + inFrames; in echo_reference_write() 270 er->buffer = realloc(er->buffer, er->buf_size * er->rd_frame_size); in echo_reference_write() 279 inFrames, er->frames_in, er->buf_size, in echo_reference_write() 414 if (er->frames_in > er->buf_size) { in echo_reference_read() 415 er->buf_size = er->frames_in; in echo_reference_read() 416 er->buffer = realloc(er->buffer, er->buf_size * er->rd_frame_size); in echo_reference_read() [all …]
|
/system/core/adb/client/ |
D | incremental.cpp | 226 int buf_size = 0; in wait_for_installation() local 228 while ((bytes_read = adb_read(read_fd, child_stdout.data() + buf_size, in wait_for_installation() 229 child_stdout.size() - buf_size)) > 0) { in wait_for_installation() 231 fprintf(stdout, "%.*s", bytes_read, child_stdout.data() + buf_size); in wait_for_installation() 233 buf_size += bytes_read; in wait_for_installation() 234 const std::string_view stdout_str(child_stdout.data(), buf_size); in wait_for_installation() 243 if (buf_size >= maxMessageSize) { in wait_for_installation() 251 child_stdout.resize(buf_size + CHUNK_SIZE); in wait_for_installation()
|
D | line_printer.cpp | 97 COORD buf_size = { csbi.dwSize.X, 1 }; in Print() local 109 WriteConsoleOutputW(console_, &char_data[0], buf_size, zero_zero, &target); in Print()
|
/system/core/logwrapper/ |
D | logwrap.cpp | 66 size_t buf_size; member 79 ssize_t buf_size; member 110 if ((line_len + b_buf->used_len) > b_buf->buf_size) { in add_line_to_linear_buf() 130 if (line_len > e_buf->buf_size) { in add_line_to_circular_buf() 134 free_len = e_buf->buf_size - e_buf->used_len; in add_line_to_circular_buf() 140 e_buf->read = (e_buf->read + needed_space) % e_buf->buf_size; in add_line_to_circular_buf() 147 cnt = std::min(line_len, e_buf->buf_size - e_buf->write); in add_line_to_circular_buf() 153 e_buf->write = (e_buf->write + line_len) % e_buf->buf_size; in add_line_to_circular_buf() 187 static void print_buf_lines(struct log_info* log_info, char* buf, int buf_size) { in print_buf_lines() argument 193 for (i = 0; i < buf_size; i++) { in print_buf_lines() [all …]
|
/system/bt/hci/src/ |
D | hci_layer_linux.cc | 111 const size_t buf_size = 2000; in monitor_socket() local 112 uint8_t buf[buf_size]; in monitor_socket() 113 ssize_t len = read(fd, buf, buf_size); in monitor_socket() 116 if (len == buf_size) in monitor_socket() 122 size_t packet_size = buf_size + BT_HDR_SIZE; in monitor_socket() 164 len = read(fd, buf, buf_size); in monitor_socket()
|
/system/media/camera/tests/ |
D | camera_metadata_tests.cpp | 116 size_t buf_size = calculate_camera_metadata_size(entry_capacity, in TEST() local 119 EXPECT_TRUE(buf_size > 0); in TEST() 121 buf = malloc(buf_size); in TEST() 125 m = place_camera_metadata(buf, buf_size, entry_capacity, data_capacity); in TEST() 133 EXPECT_EQ(OK, validate_camera_metadata_structure(m, &buf_size)); in TEST() 145 size_t buf_size = calculate_camera_metadata_size(entry_capacity, in TEST() local 148 EXPECT_GT(buf_size, (size_t)0); in TEST() 150 buf_size--; in TEST() 152 buf = malloc(buf_size); in TEST() 156 m = place_camera_metadata(buf, buf_size, entry_capacity, data_capacity); in TEST() [all …]
|
/system/core/liblog/ |
D | logd_reader.h | 29 ssize_t SendLogdControlMessage(char* buf, size_t buf_size);
|
D | logd_reader.cpp | 67 ssize_t SendLogdControlMessage(char* buf, size_t buf_size) { in SendLogdControlMessage() argument 83 len = buf_size; in SendLogdControlMessage() 88 if (((size_t)ret == len) || (buf_size < PAGE_SIZE)) { in SendLogdControlMessage() 113 ret += buf_size - len; in SendLogdControlMessage()
|
/system/core/adb/ |
D | sysdeps_win32_test.cpp | 115 void TestParseCompleteUTF8(const char* buf, const size_t buf_size, in TestParseCompleteUTF8() argument 119 const size_t complete_bytes = internal::ParseCompleteUTF8(buf, buf + buf_size, in TestParseCompleteUTF8()
|
/system/bt/bta/hh/ |
D | bta_hh_api.cc | 193 uint8_t rpt_id, uint16_t buf_size) { in BTA_HhGetReport() argument 194 uint8_t param = (buf_size) ? (r_type | 0x08) : r_type; in BTA_HhGetReport() 196 bta_hh_snd_write_dev(dev_handle, HID_TRANS_GET_REPORT, param, buf_size, in BTA_HhGetReport()
|
/system/libziparchive/ |
D | zip_archive.cc | 1046 virtual bool Append(uint8_t* buf, size_t buf_size) override { in Append() argument 1047 if (size_ < buf_size || bytes_written_ > size_ - buf_size) { in Append() 1049 bytes_written_ + buf_size); in Append() 1053 memcpy(buf_ + bytes_written_, buf, buf_size); in Append() 1054 bytes_written_ += buf_size; in Append() 1136 virtual bool Append(uint8_t* buf, size_t buf_size) override { in Append() argument 1137 if (declared_length_ < buf_size || total_bytes_written_ > declared_length_ - buf_size) { in Append() 1139 total_bytes_written_ + buf_size); in Append() 1143 const bool result = android::base::WriteFully(fd_, buf, buf_size); in Append() 1145 total_bytes_written_ += buf_size; in Append() [all …]
|
/system/libziparchive/include/ziparchive/ |
D | zip_archive.h | 300 typedef bool (*ProcessZipEntryFunction)(const uint8_t* buf, size_t buf_size, void* cookie); 316 virtual bool Append(uint8_t* buf, size_t buf_size) = 0;
|
/system/libufdt/include/ |
D | libufdt.h | 302 int ufdt_to_fdt(const struct ufdt *tree, void *buf, int buf_size);
|
/system/libufdt/ |
D | ufdt_convert.c | 416 int ufdt_to_fdt(const struct ufdt *tree, void *buf, int buf_size) { in ufdt_to_fdt() argument 420 err = fdt_create(buf, buf_size); in ufdt_to_fdt() 454 return fdt_open_into(buf, buf, buf_size); in ufdt_to_fdt()
|
/system/extras/simpleperf/ |
D | read_elf.h | 106 bool IsValidElfFileMagic(const char* buf, size_t buf_size);
|
/system/bt/stack/hid/ |
D | hidd_conn.cc | 901 uint16_t buf_size; in hidd_conn_send_data() local 916 buf_size = HID_CONTROL_BUF_SIZE; in hidd_conn_send_data() 921 buf_size = HID_CONTROL_BUF_SIZE; in hidd_conn_send_data() 924 buf_size = HID_INTERRUPT_BUF_SIZE; in hidd_conn_send_data() 931 p_buf = (BT_HDR*)osi_malloc(buf_size); in hidd_conn_send_data()
|