Searched refs:buf (Results 1 - 25 of 408) sorted by relevance

1234567891011>>

/system/bt/osi/include/
H A Dbuffer.h31 // Creates a new reference to the buffer |buf|. A reference is indistinguishable
33 // and vice versa. In other words, this function creates an alias to |buf|. The
35 // releasing the returned buffer does not release |buf|. |buf| must not be NULL.
36 buffer_t* buffer_new_ref(const buffer_t* buf);
38 // Creates a new reference to the last |slice_size| bytes of |buf|. See
41 // (0 < slice_size <= buffer_length). |buf| must not be NULL.
42 buffer_t* buffer_new_slice(const buffer_t* buf, size_t slice_size);
44 // Frees a buffer object. |buf| may be NULL.
45 void buffer_free(buffer_t* buf);
[all...]
/system/core/libutils/
H A DSharedBufferTest.cpp32 android::SharedBuffer* buf = local
34 ASSERT_EQ(nullptr, buf);
36 buf = android::SharedBuffer::alloc(0);
37 ASSERT_NE(nullptr, buf);
38 ASSERT_EQ(0U, buf->size());
39 buf->release();
43 android::SharedBuffer* buf = android::SharedBuffer::alloc(10); local
44 EXPECT_DEATH(buf->editResize(SIZE_MAX - sizeof(android::SharedBuffer)), "");
45 buf = android::SharedBuffer::alloc(10);
46 EXPECT_DEATH(buf
[all...]
/system/nvram/messages/tests/
H A Dio_test.cpp80 TestInputStreamBuffer<10> buf;
81 EXPECT_FALSE(buf.Done());
84 EXPECT_TRUE(buf.ReadByte(&byte));
86 EXPECT_FALSE(buf.Done());
88 CheckRead(&buf, 6, 1);
89 EXPECT_FALSE(buf.Done());
91 EXPECT_TRUE(buf.Skip(3));
92 EXPECT_TRUE(buf.Done());
96 InputStreamBuffer buf(nullptr, nullptr);
97 EXPECT_TRUE(buf
[all...]
/system/bt/osi/src/
H A Dbuffer.cc49 buffer_t* buffer_new_ref(const buffer_t* buf) { argument
50 CHECK(buf != NULL);
51 return buffer_new_slice(buf, buf->length);
54 buffer_t* buffer_new_slice(const buffer_t* buf, size_t slice_size) { argument
55 CHECK(buf != NULL);
57 CHECK(slice_size <= buf->length);
61 ret->root = buf->root;
65 ++buf->root->refcount;
83 void* buffer_ptr(const buffer_t* buf) { argument
88 buffer_length(const buffer_t* buf) argument
[all...]
/system/vold/
H A DBenchmarkGen.h43 char* buf = (char*) malloc(1048576); local
47 TEMP_FAILURE_RETRY(read(t3433f17, buf, 65557));
48 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 769726, 38187008)); // mmap2
49 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 278721));
50 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 19, 278751));
51 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 25119, 278528)); // mmap2
52 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 37276895));
53 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 14, 37276925));
54 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 914520, 37273600)); // mmap2
56 TEMP_FAILURE_RETRY(pread(t3433f18, buf, 409
4051 std::string buf; local
[all...]
/system/core/libcutils/
H A Dpartition_utils.cpp28 static int only_one_char(char *buf, int len, char c) argument
34 if (buf[i] != c) {
44 char buf[4096]; local
51 ret = read(fd, buf, sizeof(buf));
54 if (ret != sizeof(buf)) {
59 if (only_one_char(buf, sizeof(buf), 0)) {
64 if (only_one_char(buf, sizeof(buf),
[all...]
H A Dashmem-host.cpp68 struct stat buf; local
69 int result = fstat(fd, &buf);
79 if (!(buf.st_nlink == 0 && S_ISREG(buf.st_mode))) {
84 return buf.st_size;
H A Dproperties.cpp39 char buf[PROPERTY_VALUE_MAX] = {'\0'}; local
41 int len = property_get(key, buf, "");
43 char ch = buf[0];
50 if (!strcmp(buf, "no") || !strcmp(buf, "false") || !strcmp(buf, "off")) {
52 } else if (!strcmp(buf, "yes") || !strcmp(buf, "true") || !strcmp(buf, "on")) {
68 char buf[PROPERTY_VALUE_MA local
[all...]
/system/core/lmkd/
H A Dliblmkd_utils.c46 char buf[256]; local
50 snprintf(buf, sizeof(buf), "/dev/memcg/apps/uid_%u", uid);
51 if (mkdir(buf, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) < 0 &&
56 snprintf(buf, sizeof(buf), "/dev/memcg/apps/uid_%u/pid_%u", uid, pid);
57 if (mkdir(buf, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) < 0 &&
62 snprintf(buf, sizeof(buf), "/dev/memcg/apps/uid_%u/pid_%u/tasks", uid, pid);
63 tasks_file = open(buf, O_WRONL
[all...]
/system/iot/attestation/atap/test/
H A Datap_util_unittest.cpp44 static void validate_blob(const uint8_t* buf, AtapBlob* blob) { argument
45 EXPECT_EQ(blob->data_length, *(uint32_t*)&buf[0]);
46 EXPECT_EQ(0, memcmp(&buf[4], blob->data, blob->data_length));
55 static void validate_cert_chain(const uint8_t* buf, AtapCertChain* chain) { argument
57 EXPECT_EQ(*(uint32_t*)&buf[0], chain_size);
60 validate_blob(&buf[index], &chain->entries[i]);
72 static void validate_header(uint8_t* buf, argument
75 uint8_t protocol_version = *next(buf, index, 4);
77 uint32_t message_len = *(uint32_t*)next(buf, index, sizeof(uint32_t));
85 uint8_t buf[sizeo local
92 uint8_t buf[sizeof(uint64_t)]; local
103 uint8_t buf[ATAP_HEADER_LEN]; local
115 uint8_t buf[32]; local
132 uint8_t buf[128]; local
166 uint8_t buf[4096]; local
201 uint8_t buf[4096]; local
233 uint8_t buf[4096]; local
262 uint8_t buf[4096]; local
292 uint8_t buf[4096]; local
310 uint8_t buf[128]; local
[all...]
/system/bt/btif/include/
H A Dbtif_sock_util.h33 int sock_send_all(int sock_fd, const uint8_t* buf, int len);
34 int sock_recv_all(int sock_fd, uint8_t* buf, int len);
/system/keymaster/android_keymaster/
H A Dandroid_keymaster_messages.cpp36 static uint8_t* serialize_key_blob(const keymaster_key_blob_t& key_blob, uint8_t* buf, argument
38 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size);
57 static uint8_t* serialize_blob(const keymaster_blob_t& blob, uint8_t* buf, const uint8_t* end) { argument
58 return append_size_and_data_to_buf(buf, end, blob.data, blob.data_length);
78 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { argument
79 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error));
81 buf = NonErrorSerialize(buf, end);
82 return buf;
101 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
124 Serialize(uint8_t* buf, const uint8_t* end) const argument
138 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
157 Serialize(uint8_t* buf, const uint8_t* end) const argument
176 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
197 Serialize(uint8_t* buf, const uint8_t* end) const argument
233 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
272 Serialize(uint8_t* buf, const uint8_t* end) const argument
299 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
317 Serialize(uint8_t* buf, const uint8_t* end) const argument
336 Serialize(uint8_t* buf, const uint8_t* end) const argument
362 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
382 Serialize(uint8_t* buf, const uint8_t* end) const argument
404 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
426 Serialize(uint8_t* buf, const uint8_t* end) const argument
438 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
472 Serialize(uint8_t* buf, const uint8_t* end) const argument
518 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
556 Serialize(uint8_t* buf, const uint8_t* end) const argument
574 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
586 Serialize(uint8_t* buf, const uint8_t* end) const argument
604 Serialize(uint8_t* buf, const uint8_t* end) const argument
626 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
641 Serialize(uint8_t* buf, const uint8_t* end) const argument
679 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
695 Serialize(uint8_t* buf, const uint8_t* end) const argument
718 Serialize(uint8_t* buf, const uint8_t* end) const argument
[all...]
/system/tpm/trunks/ftdi/
H A Dsupport.c31 int raw_write(struct mpsse_context* mpsse, uint8_t* buf, int size) { argument
35 if (ftdi_write_data(&mpsse->ftdi, buf, size) == size) {
44 int raw_read(struct mpsse_context* mpsse, uint8_t* buf, int size) { argument
49 r = ftdi_read_data(&mpsse->ftdi, buf, size);
96 uint8_t* buf = NULL; local
123 buf = malloc(total_size);
124 if (buf) {
125 memset(buf, 0, total_size);
139 buf[i++] = SET_BITS_LOW;
140 buf[
206 char buf[CMD_SIZE] = {0}; local
217 char buf[CMD_SIZE] = {0}; local
[all...]
/system/core/libunwindstack/tests/
H A DMemoryOfflineTest.cpp50 char buf = '\0'; local
51 ASSERT_EQ(0U, memory->Read(offset - 1, &buf, 1));
52 ASSERT_EQ(0U, memory->Read(offset + data.size(), &buf, 1));
53 ASSERT_EQ(1U, memory->Read(offset, &buf, 1));
54 ASSERT_EQ(buf, data.front());
55 ASSERT_EQ(1U, memory->Read(offset + data.size() - 1, &buf, 1));
56 ASSERT_EQ(buf, data.back());
60 std::vector<char> buf; local
61 buf.resize(2 * data.size());
62 ASSERT_EQ(data.size(), memory->Read(offset, buf
[all...]
/system/iot/attestation/atap/libatap/
H A Datap_util.c35 uint8_t* append_to_buf(uint8_t* buf, const void* data, uint32_t data_size) { argument
36 atap_memcpy(buf, data, data_size);
37 return buf + data_size;
40 uint8_t* append_uint32_to_buf(uint8_t* buf, uint32_t x) { argument
41 return append_to_buf(buf, &x, sizeof(uint32_t));
44 uint8_t* append_header_to_buf(uint8_t* buf, uint32_t message_length) { argument
45 buf[0] = ATAP_PROTOCOL_VERSION;
46 atap_memset(&buf[1], 0, 3); // reserved
47 buf += 4;
48 return append_uint32_to_buf(buf, message_lengt
51 append_blob_to_buf(uint8_t* buf, const AtapBlob* blob) argument
60 append_cert_chain_to_buf(uint8_t* buf, const AtapCertChain* cert_chain) argument
77 append_ca_request_to_buf(uint8_t* buf, const AtapCaRequest* ca_request) argument
88 append_inner_ca_request_to_buf( uint8_t* buf, const AtapInnerCaRequest* inner_ca_request) argument
245 validate_encrypted_message(const uint8_t* buf, uint32_t buf_size) argument
270 validate_inner_ca_response(const uint8_t* buf, uint32_t buf_size, AtapOperation operation) argument
[all...]
/system/core/base/
H A Dstringprintf_test.cpp42 char* buf = new char[n + 1]; local
43 memset(buf, 'x', n);
44 buf[n] = '\0';
45 std::string s(android::base::StringPrintf("%s", buf));
46 EXPECT_EQ(buf, s);
47 delete[] buf;
/system/core/liblog/
H A Duio.c29 char* buf = vecs->iov_base; local
33 int ret = read(fd, buf, len);
41 buf += ret;
53 const char* buf = vecs->iov_base; local
57 int ret = write(fd, buf, len);
65 buf += ret;
H A Dlogd_reader.h26 LIBLOG_HIDDEN ssize_t __send_log_msg(char* buf, size_t buf_size);
/system/core/libsparse/
H A Dsparse_crc32.h26 uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size);
/system/libufdt/tests/src/
H A Dutil.c31 char *buf = malloc(len); local
32 if (buf == NULL) {
36 if (fread(buf, len, 1, fp) != 1) {
37 free(buf);
45 return buf;
54 char *buf = load_file_contents(fp, len_ptr); local
58 return buf;
62 const void *buf, size_t buf_size) {
71 if (fwrite(buf, 1, buf_size, fout) < 1) {
61 write_buf_to_file(const char *filename, const void *buf, size_t buf_size) argument
H A Dextract_dtb.c26 int find_dtb_header_pos(const char *buf, size_t buf_size) { argument
27 if (buf == NULL || buf_size == 0) {
37 uint32_t tag = fdt32_to_cpu(*(fdt32_t *)(buf + pos));
48 const char *buf, size_t buf_size) {
49 int tag_pos = find_dtb_header_pos(buf, buf_size);
55 const char *fdt_ptr = buf + tag_pos;
98 char *buf = NULL; local
101 buf = load_file(in_filename, &buf_size);
102 if (!buf) {
113 tag_pos = find_and_write_dtb(filename, buf, buf_siz
47 find_and_write_dtb(const char *filename, const char *buf, size_t buf_size) argument
[all...]
/system/bt/bta/hf_client/
H A Dbta_hf_client_at.h35 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; member in struct:queued_at_cmd
46 char buf[BTA_HF_CLIENT_AT_PARSER_MAX_LEN + member in struct:__anon151
/system/core/adb/
H A Dadb_io.cpp45 char buf[5]; local
46 if (!ReadFdExactly(fd, buf, 4)) {
50 buf[4] = 0;
52 unsigned long len = strtoul(buf, 0, 16);
70 bool ReadFdExactly(int fd, void* buf, size_t len) { argument
71 char* p = reinterpret_cast<char*>(buf);
92 << " " << dump_hex(reinterpret_cast<const unsigned char*>(buf), len0);
97 bool WriteFdExactly(int fd, const void* buf, size_t len) { argument
98 const char* p = reinterpret_cast<const char*>(buf);
102 << " " << dump_hex(reinterpret_cast<const unsigned char*>(buf), le
146 char buf[16]; local
[all...]
/system/connectivity/wifilogd/
H A Dmemory_reader.h35 MemoryReader(const void* buf, size_t buflen) argument
36 : head_(static_cast<const uint8_t*>(buf)), n_bytes_avail_(buflen) {}
38 explicit MemoryReader(std::tuple<const uint8_t*, size_t> buf) argument
39 : head_(std::get<0>(buf)), n_bytes_avail_(std::get<1>(buf)) {}
/system/core/logd/
H A DLogKlog.h42 LogKlog(LogBuffer* buf, LogReader* reader, int fdWrite, int fdRead,
44 int log(const char* buf, ssize_t len);
45 void synchronize(const char* buf, ssize_t len);
58 void sniffTime(log_time& now, const char*& buf, ssize_t len, bool reverse);
59 pid_t sniffPid(const char*& buf, ssize_t len);

Completed in 1139 milliseconds

1234567891011>>