Searched refs:buf (Results 1 - 25 of 320) 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 // 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/bt/osi/src/
H A Dbuffer.c48 buffer_t *buffer_new_ref(const buffer_t *buf) { argument
49 assert(buf != NULL);
50 return buffer_new_slice(buf, buf->length);
53 buffer_t *buffer_new_slice(const buffer_t *buf, size_t slice_size) { argument
54 assert(buf != NULL);
56 assert(slice_size <= buf->length);
60 ret->root = buf->root;
64 ++buf->root->refcount;
84 void *buffer_ptr(const buffer_t *buf) { argument
89 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...]
H A Dtrace-dev.c71 char buf[PROPERTY_KEY_MAX]; local
75 snprintf(buf, sizeof(buf), "debug.atrace.app_%d", i);
76 property_get(buf, value, "");
189 char buf[ATRACE_MESSAGE_LENGTH]; local
191 int len = snprintf(buf, sizeof(buf), "B|%d|%s", getpid(), name);
192 if (len >= (int) sizeof(buf)) {
194 len = sizeof(buf) - 1;
196 write(atrace_marker_fd, buf, le
[all...]
/system/core/libsuspend/
H A Dautosuspend_wakeup_count.c46 char buf[80]; local
59 strerror_r(errno, buf, sizeof(buf));
60 ALOGE("Error reading from %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
72 strerror_r(errno, buf, sizeof(buf));
73 ALOGE("Error waiting on semaphore: %s\n", buf);
81 strerror_r(errno, buf, sizeof(buf));
82 ALOGE("Error writing to %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
107 char buf[80]; local
126 char buf[80]; local
160 char buf[80]; local
[all...]
H A Dautosuspend_autosleep.c38 char buf[80]; local
45 strerror_r(errno, buf, sizeof(buf));
46 ALOGE("Error writing to %s: %s\n", SYS_POWER_AUTOSLEEP, buf);
60 char buf[80]; local
67 strerror_r(errno, buf, sizeof(buf));
68 ALOGE("Error writing to %s: %s\n", SYS_POWER_AUTOSLEEP, buf);
87 char buf[80]; local
91 strerror_r(errno, buf, sizeo
[all...]
H A Dautosuspend_earlysuspend.c51 char buf; local
54 err = TEMP_FAILURE_RETRY(read(fd, &buf, 1));
64 char buf; local
67 err = TEMP_FAILURE_RETRY(read(fd, &buf, 1));
98 char buf[80]; local
105 strerror_r(errno, buf, sizeof(buf));
106 ALOGE("Error writing to %s: %s\n", EARLYSUSPEND_SYS_POWER_STATE, buf);
128 char buf[80]; local
135 strerror_r(errno, buf, sizeo
163 char buf[80]; local
191 char buf[80]; local
[all...]
/system/core/libutils/tests/
H A DBlobCache_test.cpp47 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
49 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 4));
50 ASSERT_EQ('e', buf[0]);
51 ASSERT_EQ('f', buf[1]);
52 ASSERT_EQ('g', buf[2]);
53 ASSERT_EQ('h', buf[3]);
57 unsigned char buf[2] = { 0xee, 0xee }; local
60 ASSERT_EQ(size_t(2), mBC->get("ab", 2, buf, 2));
61 ASSERT_EQ('c', buf[0]);
62 ASSERT_EQ('d', buf[
69 unsigned char buf[6] = { 0xee, 0xee, 0xee, 0xee, 0xee, 0xee }; local
81 unsigned char buf[3] = { 0xee, 0xee, 0xee }; local
95 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
106 unsigned char buf[MAX_VALUE_SIZE+1] = { 0xee, 0xee, 0xee, 0xee }; local
118 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
131 char buf[MAX_VALUE_SIZE+1]; local
285 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
351 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
368 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
387 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; local
406 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; 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/extras/f2fs_utils/
H A Df2fs_ioutils.c90 void *buf; member in struct:buf_item
97 static int dev_write_fd(void *buf, __u64 offset, size_t len) argument
101 ssize_t written = write(config.fd, buf, len);
114 free(bi->buf);
119 static int dev_write_sparse(void *buf, __u64 byte_offset, size_t byte_len) argument
126 bi->buf = malloc(byte_len);
127 if (bi->buf == NULL) {
133 memcpy(bi->buf, buf, byte_len);
137 sparse_file_add_data(f2fs_sparse_file, bi->buf, byte_le
153 dev_read_version(void *buf, __u64 offset, size_t len) argument
158 dev_read(void *buf, __u64 offset, size_t len) argument
163 dev_write(void *buf, __u64 offset, size_t len) argument
173 dev_fill(void *buf, __u64 offset, size_t len) argument
184 dev_read_block(void *buf, __u64 blk_addr) argument
190 dev_read_blocks(void *buf, __u64 addr, __u32 nr_blks) argument
[all...]
/system/tpm/trunks/ftdi/
H A Dsupport.c32 int raw_write(struct mpsse_context* mpsse, uint8_t* buf, int size) { argument
36 if (ftdi_write_data(&mpsse->ftdi, buf, size) == size) {
45 int raw_read(struct mpsse_context* mpsse, uint8_t* buf, int size) { argument
50 r = ftdi_read_data(&mpsse->ftdi, buf, size);
97 uint8_t* buf = NULL; local
124 buf = malloc(total_size);
125 if (buf) {
126 memset(buf, 0, total_size);
140 buf[i++] = SET_BITS_LOW;
141 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.c30 char* buf = vecs->iov_base; local
34 int ret = read( fd, buf, len );
44 buf += ret;
57 const char* buf = vecs->iov_base; local
61 int ret = write( fd, buf, len );
71 buf += ret;
/system/core/libsparse/
H A Dsparse_crc32.h26 uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size);
/system/core/init/
H A Dlog.cpp35 char buf[1024]; local
36 size_t prefix_size = snprintf(buf, sizeof(buf), "<%d>%s: ", level, tag);
37 size_t msg_size = vsnprintf(buf + prefix_size, sizeof(buf) - prefix_size, fmt, ap);
38 if (msg_size >= sizeof(buf) - prefix_size) {
39 msg_size = snprintf(buf + prefix_size, sizeof(buf) - prefix_size,
44 iov[0].iov_base = buf;
/system/bt/bta/include/
H A Dbta_jv_co.h47 extern int bta_co_rfc_data_outgoing(void *user_data, UINT8* buf, UINT16 size);
51 extern int bta_co_l2cap_data_outgoing(void *user_data, UINT8* buf, UINT16 size);
/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.c14 char buf[256], path[128]; local
32 snprintf(buf, sizeof(buf), "/sys/fs/ext4/%s", blockdev);
33 if (access(buf, F_OK) == 0) {
37 snprintf(buf, sizeof(buf), "/dev/block/%s", blockdev);
39 if (!partition_wiped(buf)) {
52 execl(mkfs, mkfs, buf, NULL);
/system/core/adb/
H A Dadb_io.cpp43 char buf[5]; local
44 if (!ReadFdExactly(fd, buf, 4)) {
48 buf[4] = 0;
50 unsigned long len = strtoul(buf, 0, 16);
68 bool ReadFdExactly(int fd, void* buf, size_t len) { argument
69 char* p = reinterpret_cast<char*>(buf);
90 << " " << dump_hex(reinterpret_cast<const unsigned char*>(buf), len0);
95 bool WriteFdExactly(int fd, const void* buf, size_t len) { argument
96 const char* p = reinterpret_cast<const char*>(buf);
100 << " " << dump_hex(reinterpret_cast<const unsigned char*>(buf), le
144 char buf[16]; local
[all...]
H A Dadb_io_test.cpp49 char buf[sizeof(expected)] = {}; local
50 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf) - 1)) << strerror(errno);
51 EXPECT_STREQ(expected, buf);
63 char buf[sizeof(expected) + 1] = {}; local
64 ASSERT_FALSE(ReadFdExactly(tf.fd, buf, sizeof(buf)));
77 char buf[sizeof(input) - 1] = {}; local
78 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf)
101 const char buf[] = "Foobar"; local
121 char buf[] = "foo"; local
[all...]
/system/bt/bta/hf_client/
H A Dbta_hf_client_at.c120 static void bta_hf_client_queue_at(tBTA_HF_CLIENT_AT_CMD cmd, const char *buf, UINT16 buf_len) argument
130 memcpy(new_cmd->buf, buf, buf_len);
169 static void bta_hf_client_send_at(tBTA_HF_CLIENT_AT_CMD cmd, char *buf, UINT16 buf_len) argument
178 APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buf_len - 1, buf);
191 PORT_WriteData(bta_hf_client_cb.scb.conn_handle, buf, buf_len, &len);
198 bta_hf_client_queue_at(cmd, buf, buf_len);
211 bta_hf_client_send_at(cur->cmd, cur->buf, cur->buf_len);
585 #define AT_CHECK_EVENT(buf, event) \
586 if (strncmp("\r\n"event, buf,sizeo
1377 char *buf = bta_hf_client_cb.scb.at_cb.buf; local
1452 bta_hf_client_at_parse(char *buf, unsigned int len) argument
1511 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1528 char *buf; local
1546 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1563 char *buf; local
1584 char *buf; local
1598 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1619 char *buf; local
1633 char *buf; local
1648 char *buf; local
1662 char *buf; local
1676 char *buf; local
1687 char *buf; local
1701 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1718 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1735 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1763 char *buf; local
1774 char *buf; local
1785 char *buf; local
1796 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1821 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1839 char *buf; local
1850 char *buf; local
1861 char *buf; local
1878 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1896 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
[all...]
/system/core/logd/
H A DCommandListener.cpp39 CommandListener::CommandListener(LogBuffer *buf, LogReader * /*reader*/, argument
42 // registerCmd(new ShutdownCmd(buf, writer, swl));
43 registerCmd(new ClearCmd(buf));
44 registerCmd(new GetBufSizeCmd(buf));
45 registerCmd(new SetBufSizeCmd(buf));
46 registerCmd(new GetBufSizeUsedCmd(buf));
47 registerCmd(new GetStatisticsCmd(buf));
48 registerCmd(new SetPruneListCmd(buf));
49 registerCmd(new GetPruneListCmd(buf));
68 CommandListener::ClearCmd::ClearCmd(LogBuffer *buf) argument
104 GetBufSizeCmd(LogBuffer *buf) argument
124 char buf[512]; local
130 SetBufSizeCmd(LogBuffer *buf) argument
164 GetBufSizeUsedCmd(LogBuffer *buf) argument
184 char buf[512]; local
190 GetStatisticsCmd(LogBuffer *buf) argument
241 GetPruneListCmd(LogBuffer *buf) argument
253 SetPruneListCmd(LogBuffer *buf) argument
[all...]

Completed in 1880 milliseconds

1234567891011>>