/system/core/adb/ |
H A D | adb_io_test.cpp | 55 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/core/libutils/ |
H A D | String8.cpp | 65 SharedBuffer* buf = SharedBuffer::alloc(1); local 66 char* str = (char*)buf->data(); 68 gEmptyStringBuf = buf; 87 SharedBuffer* buf = SharedBuffer::alloc(len+1); local 88 ALOG_ASSERT(buf, "Unable to allocate shared buffer"); 89 if (buf) { 90 char* str = (char*)buf->data(); 111 SharedBuffer* buf = SharedBuffer::alloc(resultStrLen); local 112 ALOG_ASSERT(buf, "Unable to allocate shared buffer"); 113 if (!buf) { 133 SharedBuffer* buf = SharedBuffer::alloc(resultStrLen); local 351 char* buf = lockBuffer(oldLength + n); local 365 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 380 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 398 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 427 char* buf = lockBuffer(size()); local 461 char* buf = lockBuffer(len); local 485 char* buf = lockBuffer(len); local 520 char* buf = lockBuffer(len); local 536 const char*const buf = mString; local 561 const char* buf = str; local 650 char* buf = lockBuffer(len+1+newlen); local 673 char * buf = lockBuffer(len); local [all...] |
H A D | SharedBuffer.cpp | 70 SharedBuffer* buf = const_cast<SharedBuffer*>(this); local 71 if (buf->mSize == newSize) return buf; 77 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize); 78 if (buf != NULL) { 79 buf->mSize = newSize; 80 return buf;
|
H A D | String16.cpp | 38 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t)); local 39 char16_t* str = (char16_t*)buf->data(); 41 gEmptyStringBuf = buf; 65 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t)*(u16len+1)); local 66 if (buf) { 68 char16_t* u16str = (char16_t*)buf->data(); 73 //printHexData(1, str, buf->size(), 16, 1); 88 SharedBuffer* buf = SharedBuffer::alloc((u16len + 1) * sizeof(char16_t)); local 89 ALOG_ASSERT(buf, "Unable to allocate shared buffer"); 90 if (buf) { 200 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 228 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 254 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 289 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 363 SharedBuffer* buf = SharedBuffer::bufferFromData(mString)->edit(); local 384 SharedBuffer* buf = SharedBuffer::bufferFromData(mString)->edit(); local 411 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local 420 SharedBuffer* buf = SharedBuffer::bufferFromData(mString) local [all...] |
/system/core/liblog/ |
H A D | pmsg_reader.c | 143 } buf; local 172 if (preread_count < sizeof(buf)) { 178 read(fd, &buf.p.magic + preread_count, sizeof(buf) - preread_count)); 184 if (preread_count != sizeof(buf)) { 187 if ((buf.p.magic != LOGGER_MAGIC) || (buf.p.len <= sizeof(buf)) || 188 (buf.p.len > (sizeof(buf) 509 char* buf; local [all...] |
H A D | fake_writer.c | 53 char buf[sizeof("/dev/log_security") + 8]; local 57 snprintf(buf, sizeof(buf), "/dev/log_%s", android_log_id_to_name(i)); 58 logFds[i] = fakeLogOpen(buf); 60 fprintf(stderr, "fakeLogOpen(%s) failed\n", buf);
|
/system/core/logd/ |
H A D | CommandListener.cpp | 40 CommandListener::CommandListener(LogBuffer* buf, LogReader* /*reader*/, argument 43 // registerCmd(new ShutdownCmd(buf, writer, swl)); 44 registerCmd(new ClearCmd(buf)); 45 registerCmd(new GetBufSizeCmd(buf)); 46 registerCmd(new SetBufSizeCmd(buf)); 47 registerCmd(new GetBufSizeUsedCmd(buf)); 48 registerCmd(new GetStatisticsCmd(buf)); 49 registerCmd(new SetPruneListCmd(buf)); 50 registerCmd(new GetPruneListCmd(buf)); 51 registerCmd(new GetEventTagCmd(buf)); 67 ClearCmd(LogBuffer* buf) argument 102 GetBufSizeCmd(LogBuffer* buf) argument 121 char buf[512]; local 127 SetBufSizeCmd(LogBuffer* buf) argument 160 GetBufSizeUsedCmd(LogBuffer* buf) argument 179 char buf[512]; local 185 GetStatisticsCmd(LogBuffer* buf) argument 236 GetPruneListCmd(LogBuffer* buf) argument 247 SetPruneListCmd(LogBuffer* buf) argument 279 GetEventTagCmd(LogBuffer* buf) argument [all...] |
/system/bt/bta/include/ |
H A D | bta_jv_co.h | 46 extern int bta_co_rfc_data_outgoing(uint32_t rfcomm_slot_id, uint8_t* buf,
|
/system/connectivity/wifilogd/ |
H A D | raw_os.cpp | 46 ssize_t RawOs::Recv(int sockfd, void* buf, size_t buflen, int flags) { argument 47 return recv(sockfd, buf, buflen, flags); 50 ssize_t RawOs::Write(int fd, const void* buf, size_t buflen) { argument 51 return write(fd, buf, buflen);
|
/system/core/include/utils/ |
H A D | Compat.h | 32 static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset) { argument 33 return pread(fd, buf, nbytes, offset); 36 static inline ssize_t pwrite64(int fd, const void* buf, size_t nbytes, off64_t offset) { argument 37 return pwrite(fd, buf, nbytes, offset);
|
/system/core/libnativebridge/tests/ |
H A D | PreInitializeNativeBridge_test.cpp | 52 char buf[1024]; local 53 EXPECT_NE(nullptr, fgets(buf, sizeof(buf), proc_cpuinfo)) << "Error reading."; 56 EXPECT_EQ(0, strcmp(buf, kTestData));
|
/system/core/libutils/include/utils/ |
H A D | Compat.h | 32 static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset) { argument 33 return pread(fd, buf, nbytes, offset); 36 static inline ssize_t pwrite64(int fd, const void* buf, size_t nbytes, off64_t offset) { argument 37 return pwrite(fd, buf, nbytes, offset);
|
/system/libufdt/tests/src/ |
H A D | util.h | 23 int write_buf_to_file(const char *filename, const void *buf, size_t buf_size);
|
/system/core/libcutils/ |
H A D | klog.cpp | 58 char buf[LOG_BUF_MAX]; local 61 vsnprintf(buf, sizeof(buf), fmt, ap); 64 buf[LOG_BUF_MAX - 1] = 0; 67 iov[0].iov_base = buf; 68 iov[0].iov_len = strlen(buf);
|
H A D | android_get_control_file.cpp | 99 char *buf = static_cast<char *>(calloc(1, len + 2)); local 100 if (!buf) { 104 ssize_t ret = TEMP_FAILURE_RETRY(readlink(proc, buf, len + 1)); 106 int cmp = (len != static_cast<size_t>(ret)) || strcmp(buf, path); 107 free(buf);
|
/system/extras/simpleperf/ |
H A D | utils_test.cpp | 67 char buf[8]; local 69 buf[i] = i; 71 ASSERT_EQ(0x1ULL, ConvertBytesToValue(buf + 1, 1)); 72 ASSERT_EQ(0x201ULL, ConvertBytesToValue(buf + 1, 2)); 73 ASSERT_EQ(0x05040302ULL, ConvertBytesToValue(buf + 2, 4)); 74 ASSERT_EQ(0x0706050403020100ULL, ConvertBytesToValue(buf, 8));
|
/system/keymaster/include/keymaster/ |
H A D | serializable.h | 44 * written. Will not write past \p end, which should point to \p buf + size of the buffer 47 virtual uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const = 0; 51 * true if successful, and advances *buf past the bytes read. 80 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len); 89 inline uint8_t* append_uint32_to_buf(uint8_t* buf, const uint8_t* end, T value) { argument 91 return append_to_buf(buf, end, &val, sizeof(val)); 97 inline uint8_t* append_uint64_to_buf(uint8_t* buf, const uint8_t* end, uint64_t value) { argument 98 return append_to_buf(buf, end, &value, sizeof(value)); 107 inline uint8_t* append_size_and_data_to_buf(uint8_t* buf, const uint8_t* end, const void* data, argument 109 buf 120 append_uint32_array_to_buf(uint8_t* buf, const uint8_t* end, const T* data, size_t count) argument 206 Buffer(const void* buf, size_t size) argument [all...] |
/system/bt/bta/hf_client/ |
H A D | bta_hf_client_at.cc | 120 tBTA_HF_CLIENT_AT_CMD cmd, const char* buf, 130 memcpy(new_cmd->buf, buf, buf_len); 169 tBTA_HF_CLIENT_AT_CMD cmd, const char* buf, 178 APPL_TRACE_DEBUG("%s: %.*s", __func__, buf_len - 1, buf); 192 PORT_WriteData(client_cb->conn_handle, buf, buf_len, &len); 199 bta_hf_client_queue_at(client_cb, cmd, buf, buf_len); 210 bta_hf_client_send_at(client_cb, cur->cmd, cur->buf, cur->buf_len); 768 #define AT_CHECK_EVENT(buf, event) \ 770 if (strncmp("\r\n" event, buf, sizeo 119 bta_hf_client_queue_at(tBTA_HF_CLIENT_CB* client_cb, tBTA_HF_CLIENT_AT_CMD cmd, const char* buf, uint16_t buf_len) argument 168 bta_hf_client_send_at(tBTA_HF_CLIENT_CB* client_cb, tBTA_HF_CLIENT_AT_CMD cmd, const char* buf, uint16_t buf_len) argument 1499 char* buf = client_cb->at_cb.buf; local 1570 bta_hf_client_at_parse(tBTA_HF_CLIENT_CB* client_cb, char* buf, unsigned int len) argument 1631 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1646 const char* buf; local 1656 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1671 const char* buf; local 1688 const char* buf; local 1702 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1721 const char* buf; local 1734 const char* buf; local 1747 const char* buf; local 1760 const char* buf; local 1773 const char* buf; local 1783 const char* buf; local 1796 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1811 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1827 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1853 const char* buf; local 1863 const char* buf; local 1873 const char* buf; local 1884 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1904 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1920 const char* buf; local 1930 const char* buf; local 1940 const char* buf; local 1955 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 1971 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local 2035 char buf[BTA_HF_CLIENT_AT_MAX_LEN]; local [all...] |
/system/extras/tests/pagingtest/ |
H A D | pageinout_test.c | 18 volatile char *buf; local 37 buf = mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0); 38 if (buf == ((void *)-1)) { 43 if (!check_caching((void *)buf, vec, file_size, false)) { 49 rc = madvise((void *)buf, file_size, MADV_RANDOM) || 60 buf[j]; 67 if (!check_caching((void *)buf, vec, file_size, true)) { 72 rc = madvise((void *)buf, file_size, MADV_DONTNEED) || 83 if (!check_caching((void *)buf, vec, file_size, false)) { 98 munmap((void *)buf, file_siz [all...] |
H A D | mmap_test.c | 11 void *buf; local 24 buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 26 if (buf == ((void *)-1)) { 34 munmap(buf, alloc_size); 46 munmap(buf, alloc_size); // unreached?
|
/system/core/libion/tests/ |
H A D | device_test.cpp | 38 void readDMA(int fd, void *buf, size_t size); 39 void writeDMA(int fd, void *buf, size_t size); 40 void readKernel(int fd, void *buf, size_t size); 41 void writeKernel(int fd, void *buf, size_t size); 59 void Device::readDMA(int fd, void *buf, size_t size) argument 63 .ptr = (uint64_t)buf, 73 void Device::writeDMA(int fd, void *buf, size_t size) argument 77 .ptr = (uint64_t)buf, 87 void Device::readKernel(int fd, void *buf, size_t size) argument 91 .ptr = (uint64_t)buf, 101 writeKernel(int fd, void *buf, size_t size) argument 138 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 170 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 202 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 232 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 264 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 296 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 328 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 360 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 393 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 425 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 457 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 487 void *buf = (void *)(ALIGN((unsigned long)alloc_ptr.get(), 4096) + 1024); local 519 void *buf = buf_ptr.get(); local [all...] |
/system/core/toolbox/upstream-netbsd/bin/dd/ |
H A D | misc.c | 97 char buf[100]; local 110 (void)snprintf(buf, sizeof(buf), 114 (void)write(STDERR_FILENO, buf, strlen(buf)); 116 (void)snprintf(buf, sizeof(buf), "%llu odd length swab %s\n", 119 (void)write(STDERR_FILENO, buf, strlen(buf)); 122 (void)snprintf(buf, sizeo [all...] |
/system/keymaster/key_blob_utils/ |
H A D | auth_encrypted_key_blob.cpp | 42 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/iot/attestation/atap/libatap/ |
H A D | atap_util.h | 145 /* These write serialized structures to |buf|, and return 146 * |buf| + [number of bytes written]. 148 uint8_t* append_to_buf(uint8_t* buf, const void* data, uint32_t data_size); 149 uint8_t* append_uint32_to_buf(uint8_t* buf, uint32_t x); 150 uint8_t* append_header_to_buf(uint8_t* buf, uint32_t message_length); 151 uint8_t* append_blob_to_buf(uint8_t* buf, const AtapBlob* blob); 152 uint8_t* append_cert_chain_to_buf(uint8_t* buf, 154 uint8_t* append_ca_request_to_buf(uint8_t* buf, 157 uint8_t* buf, const AtapInnerCaRequest* inner_ca_request); 188 bool validate_encrypted_message(const uint8_t* buf, uint32_ [all...] |
/system/tools/aidl/tests/ |
H A D | aidl_test_client_file_descriptors.cpp | 53 bool DoWrite(const string& name, const unique_fd& fd, const string& buf) { argument 56 while ((wrote = write(fd.get(), buf.data(), buf.size())) < 0 && errno == EINTR); 58 if (wrote == (signed)buf.size()) { 75 string buf; local 76 buf.resize(length); 78 while ((got = read(fd.get(), &buf[0], length)) < 0 && errno == EINTR); 85 if (buf != expected) { 86 cerr << "Expected '" << expected << "' got '" << buf << "'" << endl;
|