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

123456789

/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/libprocessgroup/
H A Dcleanup.cpp24 char buf[PATH_MAX]; local
28 memcpy(buf, PROCESSGROUP_CGROUP_PATH, sizeof(PROCESSGROUP_CGROUP_PATH));
29 strlcat(buf, argv[1], sizeof(buf));
30 return rmdir(buf);
/system/core/libutils/
H A DSharedBufferTest.cpp32 android::SharedBuffer* buf = local
34 ASSERT_TRUE(NULL == buf);
36 buf = android::SharedBuffer::alloc(0);
37 ASSERT_FALSE(NULL == 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/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.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/bt/osi/src/
H A Dbuffer.c51 buffer_t *buffer_new_ref(const buffer_t *buf) { argument
52 assert(buf != NULL);
53 return buffer_new_slice(buf, buf->length);
56 buffer_t *buffer_new_slice(const buffer_t *buf, size_t slice_size) { argument
57 assert(buf != NULL);
59 assert(slice_size <= buf->length);
67 ret->root = buf->root;
71 ++buf->root->refcount;
91 void *buffer_ptr(const buffer_t *buf) { argument
96 buffer_length(const buffer_t *buf) argument
[all...]
/system/core/libsparse/
H A Dsparse_crc32.h19 uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size);
/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/core/logd/
H A DCommandListener.cpp35 CommandListener::CommandListener(LogBuffer *buf, LogReader * /*reader*/, argument
38 mBuf(*buf) {
39 // registerCmd(new ShutdownCmd(buf, writer, swl));
40 registerCmd(new ClearCmd(buf));
41 registerCmd(new GetBufSizeCmd(buf));
42 registerCmd(new SetBufSizeCmd(buf));
43 registerCmd(new GetBufSizeUsedCmd(buf));
44 registerCmd(new GetStatisticsCmd(buf));
45 registerCmd(new SetPruneListCmd(buf));
46 registerCmd(new GetPruneListCmd(buf));
50 ShutdownCmd(LogBuffer *buf, LogReader *reader, LogListener *swl) argument
66 ClearCmd(LogBuffer *buf) argument
103 GetBufSizeCmd(LogBuffer *buf) argument
123 char buf[512]; local
129 SetBufSizeCmd(LogBuffer *buf) argument
163 GetBufSizeUsedCmd(LogBuffer *buf) argument
183 char buf[512]; local
189 GetStatisticsCmd(LogBuffer *buf) argument
233 char *buf = NULL; local
246 GetPruneListCmd(LogBuffer *buf) argument
254 char *buf = NULL; local
266 SetPruneListCmd(LogBuffer *buf) argument
[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 if (write(config.fd, buf, len) != len)
111 free(bi->buf);
116 static int dev_write_sparse(void *buf, __u64 byte_offset, size_t byte_len) argument
123 bi->buf = malloc(byte_len);
124 if (bi->buf == NULL) {
130 memcpy(bi->buf, buf, byte_len);
134 sparse_file_add_data(f2fs_sparse_file, bi->buf, byte_le
150 dev_read_version(void *buf, __u64 offset, size_t len) argument
155 dev_read(void *buf, __u64 offset, size_t len) argument
160 dev_write(void *buf, __u64 offset, size_t len) argument
170 dev_fill(void *buf, __u64 offset, size_t len) argument
181 dev_read_block(void *buf, __u64 blk_addr) argument
187 dev_read_blocks(void *buf, __u64 addr, __u32 nr_blks) 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.c27 char* buf = vecs->iov_base; local
31 int ret = read( fd, buf, len );
41 buf += ret;
54 const char* buf = vecs->iov_base; local
58 int ret = write( fd, buf, len );
68 buf += ret;
H A Dlog_read.c284 const char *msg, char *buf, size_t buf_size)
297 snprintf(buf, buf_size, msg, logger ? logger->id : (unsigned) -1);
300 len = strlen(buf) + 1;
301 ret = TEMP_FAILURE_RETRY(write(sock, buf, len));
307 cp = buf;
350 static int check_log_success(char *buf, ssize_t ret) argument
356 if (strncmp(buf, "success", 7)) {
413 char buf[512]; local
422 return check_log_success(buf,
423 send_log_msg(logger, "clear %d", buf, sizeo
283 send_log_msg(struct logger *logger, const char *msg, char *buf, size_t buf_size) argument
429 char buf[512]; local
445 char buf[512]; local
459 char buf[512]; local
484 android_logger_get_statistics(struct logger_list *logger_list, char *buf, size_t len) argument
506 android_logger_get_prune_list(struct logger_list *logger_list __unused, char *buf, size_t len) argument
512 android_logger_set_prune_list(struct logger_list *logger_list __unused, char *buf, size_t len) argument
635 } buf; 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
208 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
233 Serialize(uint8_t* buf, const uint8_t* end) const argument
256 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
274 Serialize(uint8_t* buf, const uint8_t* end) const argument
293 Serialize(uint8_t* buf, const uint8_t* end) const argument
319 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
339 Serialize(uint8_t* buf, const uint8_t* end) const argument
361 NonErrorSerialize(uint8_t* buf, const uint8_t* end) const argument
383 Serialize(uint8_t* buf, const uint8_t* end) const argument
395 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/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/bt/bta/hf_client/
H A Dbta_hf_client_at.c113 static void bta_hf_client_queue_at(tBTA_HF_CLIENT_AT_CMD cmd, const char *buf, UINT16 buf_len) argument
124 memcpy(new_cmd->buf, buf, buf_len);
175 static void bta_hf_client_send_at(tBTA_HF_CLIENT_AT_CMD cmd, char *buf, UINT16 buf_len) argument
184 APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buf_len - 1, buf);
197 PORT_WriteData(bta_hf_client_cb.scb.conn_handle, buf, buf_len, &len);
204 bta_hf_client_queue_at(cmd, buf, buf_len);
217 bta_hf_client_send_at(cur->cmd, cur->buf, cur->buf_len);
607 #define AT_CHECK_EVENT(buf, event) \
608 if (strncmp("\r\n"event, buf,sizeo
1322 char *buf = bta_hf_client_cb.scb.at_cb.buf; local
1397 bta_hf_client_at_parse(char *buf, unsigned int len) argument
1456 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1468 char *buf; local
1486 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1498 char *buf; local
1519 char *buf; local
1533 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1548 char *buf; local
1562 char *buf; local
1577 char *buf; local
1591 char *buf; local
1605 char *buf; local
1616 char *buf; local
1630 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1642 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1654 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1672 char *buf; local
1683 char *buf; local
1694 char *buf; local
1705 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1724 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1736 char *buf; local
1747 char *buf; local
1758 char *buf; local
1775 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
1787 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local
[all...]
/system/core/adb/
H A Dadb_io_test.cpp65 char buf[sizeof(expected)] = {}; local
66 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf) - 1)) << strerror(errno);
67 EXPECT_STREQ(expected, buf);
79 char buf[sizeof(expected) + 1] = {}; local
80 ASSERT_FALSE(ReadFdExactly(tf.fd, buf, sizeof(buf)));
93 char buf[sizeof(input) - 1] = {}; local
94 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf)
117 const char buf[] = "Foobar"; local
137 char buf[] = "foo"; local
[all...]
/system/core/init/
H A Dparser.cpp12 char buf[128]; local
15 snprintf(buf, 128, "%s: %d: ", state->filename, state->line);
16 buf[127] = 0;
17 off = strlen(buf);
20 vsnprintf(buf + off, 128 - off, fmt, ap);
22 buf[127] = 0;
23 ERROR("%s", buf);
/system/extras/tests/pagingtest/
H A Dpageinout_test.c17 volatile char *buf; local
36 buf = mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0);
37 if (buf == ((void *)-1)) {
42 if (!check_caching((void *)buf, vec, file_size, false)) {
50 buf[j];
57 if (!check_caching((void *)buf, vec, file_size, true)) {
62 rc = madvise((void *)buf, file_size, MADV_DONTNEED) ||
73 if (!check_caching((void *)buf, vec, file_size, false)) {
86 munmap((void *)buf, file_size);

Completed in 1465 milliseconds

123456789