Searched refs:buf (Results 1 - 25 of 379) 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.h41 char* buf = (char*) malloc(1048576); local
45 TEMP_FAILURE_RETRY(read(t3433f17, buf, 65557));
46 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 769726, 38187008)); // mmap2
47 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 278721));
48 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 19, 278751));
49 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 25119, 278528)); // mmap2
50 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 30, 37276895));
51 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 14, 37276925));
52 TEMP_FAILURE_RETRY(pread(t3433f17, buf, 914520, 37273600)); // mmap2
54 TEMP_FAILURE_RETRY(pread(t3433f18, buf, 409
4032 std::string buf; local
[all...]
/system/core/libcutils/
H A Dpartition_utils.c26 static int only_one_char(char *buf, int len, char c) argument
32 if (buf[i] != c) {
42 char buf[4096]; local
49 ret = read(fd, buf, sizeof(buf));
52 if (ret != sizeof(buf)) {
57 if (only_one_char(buf, sizeof(buf), 0)) {
62 if (only_one_char(buf, sizeof(buf),
[all...]
/system/core/libsuspend/
H A Dautosuspend_wakeup_count.c60 char buf[80]; local
75 strerror_r(errno, buf, sizeof(buf));
76 ALOGE("Error reading from %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
88 strerror_r(errno, buf, sizeof(buf));
89 ALOGE("Error waiting on semaphore: %s\n", buf);
96 strerror_r(errno, buf, sizeof(buf));
97 ALOGE("Error writing to %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
122 char buf[80]; local
141 char buf[80]; local
175 char buf[80]; local
[all...]
/system/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);
60 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { argument
61 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error));
63 buf = NonErrorSerialize(buf, end);
64 return buf;
83 uint8_t* GenerateKeyResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { argument
84 buf
106 Serialize(uint8_t* buf, const uint8_t* end) const argument
120 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
139 Serialize(uint8_t* buf, const uint8_t* end) const argument
158 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
179 Serialize(uint8_t* buf, const uint8_t* end) const argument
215 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
254 Serialize(uint8_t* buf, const uint8_t* end) const argument
281 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
299 Serialize(uint8_t* buf, const uint8_t* end) const argument
318 Serialize(uint8_t* buf, const uint8_t* end) const argument
344 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
364 Serialize(uint8_t* buf, const uint8_t* end) const argument
386 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
408 Serialize(uint8_t* buf, const uint8_t* end) const argument
420 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
454 Serialize(uint8_t* buf, const uint8_t* end) const argument
500 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
538 Serialize(uint8_t* buf, const uint8_t* end) const argument
556 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
[all...]
H A Dauth_encrypted_key_blob.cpp42 uint8_t* buf = key_blob->writable_data();
45 *buf++ = CURRENT_BLOB_VERSION;
46 buf = nonce.Serialize(buf, end);
47 buf = encrypted_key_material.Serialize(buf, end);
48 buf = tag.Serialize(buf, end);
49 buf = hw_enforced.Serialize(buf, en
[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/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/nfc/halimpl/pn54x/utils/
H A Dsparse_crc32.h26 uint32_t sparse_crc32(uint32_t crc, const void* buf, size_t size);
/system/extras/f2fs_utils/
H A Df2fs_ioutils.c90 void *buf; member in struct:buf_item
113 static int dev_write_fd(void *buf, __u64 offset, size_t len) argument
119 ssize_t written = write(fd, buf, len);
132 free(bi->buf);
137 static int dev_write_sparse(void *buf, __u64 byte_offset, size_t byte_len) argument
144 bi->buf = malloc(byte_len);
145 if (bi->buf == NULL) {
151 memcpy(bi->buf, buf, byte_len);
155 sparse_file_add_data(f2fs_sparse_file, bi->buf, byte_le
171 dev_read_version(void *buf, __u64 offset, size_t len) argument
176 dev_read(void *buf, __u64 offset, size_t len) argument
186 dev_write(void *buf, __u64 offset, size_t len) argument
197 dev_write_block(void *buf, __u64 blk_addr) argument
203 dev_write_dump(void *buf, __u64 offset, size_t len) argument
209 dev_fill(void *buf, __u64 offset, size_t len) argument
221 dev_fill_block(void *buf, __u64 blk_addr) argument
227 dev_read_block(void *buf, __u64 blk_addr) argument
233 dev_read_blocks(void *buf, __u64 addr, __u32 nr_blks) 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:__anon181
/system/bt/btif/include/
H A Dbtif_sock_util.h35 int sock_send_all(int sock_fd, const uint8_t* buf, int len);
36 int sock_recv_all(int sock_fd, uint8_t* buf, int len);
/system/extras/ext4_utils/
H A Dsetup_fs.c15 char buf[256], path[128]; local
33 snprintf(buf, sizeof(buf), "/sys/fs/ext4/%s", blockdev);
34 if (access(buf, F_OK) == 0) {
38 snprintf(buf, sizeof(buf), "/dev/block/%s", blockdev);
40 if (!partition_wiped(buf)) {
53 execl(mkfs, mkfs, buf, NULL);
/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...]
H A Dadb_io_test.cpp55 char buf[sizeof(expected)] = {}; local
56 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf) - 1)) << strerror(errno);
57 EXPECT_STREQ(expected, buf);
69 char buf[sizeof(expected) + 1] = {}; local
70 ASSERT_FALSE(ReadFdExactly(tf.fd, buf, sizeof(buf)));
83 char buf[sizeof(input) - 1] = {}; local
84 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf)
107 const char buf[] = "Foobar"; local
127 char buf[] = "foo"; 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 1398 milliseconds

1234567891011>>