/system/core/include/utils/ |
H A D | Flattenable.h | 41 static size_t align(void const*& buffer) { argument 43 uintptr_t b = uintptr_t(buffer); 44 buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1)); 45 return size_t(uintptr_t(buffer) - b); 49 static size_t align(void*& buffer) { argument 50 return align<N>( const_cast<void const*&>(buffer) ); 53 static void advance(void*& buffer, size_t& size, size_t offset) { argument 54 buffer = reinterpret_cast<void*>( uintptr_t(buffer) 58 advance(void const*& buffer, size_t& size, size_t offset) argument 65 write(void*& buffer, size_t& size, const T& value) argument 74 read(void const*& buffer, size_t& size, T& value) argument 124 flatten( void*& buffer, size_t& size, int*& fds, size_t& count) const argument 129 unflatten( void const*& buffer, size_t& size, int const*& fds, size_t& count) argument 166 flatten(void* buffer, size_t size) const argument 170 unflatten(void const* buffer, size_t size) argument 190 flatten(void* buffer, size_t size) const argument 195 unflatten(void const* buffer, size_t) argument 196 memcpy(static_cast<T*>(this), buffer, sizeof(T)); local [all...] |
/system/core/libcrypto_utils/ |
H A D | android_pubkey.c | 55 // Reverses byte order in |buffer|. 56 static void reverse_bytes(uint8_t* buffer, size_t size) { argument 58 uint8_t tmp = buffer[i]; 59 buffer[i] = buffer[size - i - 1]; 60 buffer[size - i - 1] = tmp; 113 static bool android_pubkey_encode_bignum(const BIGNUM* num, uint8_t* buffer) { argument 114 if (!BN_bn2bin_padded(buffer, ANDROID_PUBKEY_MODULUS_SIZE, num)) { 118 reverse_bytes(buffer, ANDROID_PUBKEY_MODULUS_SIZE);
|
/system/core/libcutils/ |
H A D | record_stream.c | 37 unsigned char *buffer; member in struct:RecordStream 55 ret->buffer = (unsigned char *)malloc (maxRecordLen + HEADER_SIZE); 57 ret->unconsumed = ret->buffer; 58 ret->read_end = ret->buffer; 59 ret->buffer_end = ret->buffer + maxRecordLen + HEADER_SIZE; 67 free(rs->buffer); 72 /* returns NULL; if there isn't a full record in the buffer */ 102 /* one full line in the buffer */ 134 /* is there one record already in the buffer? */ 142 // if the buffer i [all...] |
/system/core/liblog/ |
H A D | logd_writer.c | 187 android_log_event_int_t buffer; local 190 buffer.header.tag = htole32(LIBLOG_LOG_TAG); 191 buffer.payload.type = EVENT_TYPE_INT; 192 buffer.payload.data = htole32(snapshot); 194 newVec[headerLength].iov_base = &buffer; 195 newVec[headerLength].iov_len = sizeof(buffer); 198 if (ret != (ssize_t)(sizeof(header) + sizeof(buffer))) { 207 android_log_event_int_t buffer; local 210 buffer.header.tag = htole32(LIBLOG_LOG_TAG); 211 buffer [all...] |
/system/core/libunwindstack/include/unwindstack/ |
H A D | Maps.h | 80 BufferMaps(const char* buffer) : buffer_(buffer) {} argument
|
/system/core/libutils/include/utils/ |
H A D | Flattenable.h | 41 static size_t align(void const*& buffer) { argument 43 uintptr_t b = uintptr_t(buffer); 44 buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1)); 45 return size_t(uintptr_t(buffer) - b); 49 static size_t align(void*& buffer) { argument 50 return align<N>( const_cast<void const*&>(buffer) ); 53 static void advance(void*& buffer, size_t& size, size_t offset) { argument 54 buffer = reinterpret_cast<void*>( uintptr_t(buffer) 58 advance(void const*& buffer, size_t& size, size_t offset) argument 65 write(void*& buffer, size_t& size, const T& value) argument 74 read(void const*& buffer, size_t& size, T& value) argument 124 flatten( void*& buffer, size_t& size, int*& fds, size_t& count) const argument 129 unflatten( void const*& buffer, size_t& size, int const*& fds, size_t& count) argument 166 flatten(void* buffer, size_t size) const argument 170 unflatten(void const* buffer, size_t size) argument 190 flatten(void* buffer, size_t size) const argument 195 unflatten(void const* buffer, size_t) argument 196 memcpy(static_cast<T*>(this), buffer, sizeof(T)); local [all...] |
/system/core/libziparchive/ |
H A D | zip_writer_test.cc | 254 // to deflate() because the ZipWriter buffer isn't big enough to hold 255 // the entire compressed data buffer. 257 std::vector<uint8_t> buffer(kBufSize); 260 buffer[i] = i + prev; 266 ASSERT_EQ(0, writer.WriteBytes(buffer.data(), buffer.size())); 283 EXPECT_EQ(0, memcmp(decompress.data(), buffer.data(), kBufSize)) 284 << "Input buffer and output buffer are different."; 393 uint8_t* buffer local [all...] |
/system/core/logcat/tests/ |
H A D | logcat_benchmark.cpp | 46 void init(const char* buffer) { argument 48 if (buffer != NULL) { 49 ok = sscanf(buffer, "%d-%d %d:%d:%d.%d ", &month, &day, &hour, 54 explicit timestamp(const char* buffer) { argument 55 init(buffer); 78 char buffer[5120]; local 83 while (fgets(buffer, sizeof(buffer), fp)) { 84 if (!strncmp(begin, buffer, sizeof(begin) - 1)) { 89 last_buffer = strdup(buffer); [all...] |
/system/core/logd/ |
H A D | LogListener.cpp | 46 char buffer[sizeof_log_id_t + sizeof(uint16_t) + sizeof(log_time) + local 48 struct iovec iov = { buffer, sizeof(buffer) }; 57 // To clear the entire buffer is secure/safe, but this contributes to 1.68% 59 // memset(buffer, 0, sizeof(buffer)); 92 reinterpret_cast<android_log_header_t*>(buffer); 125 char* msg = ((char*)buffer) + sizeof(android_log_header_t);
|
/system/core/storaged/ |
H A D | storaged_info.cpp | 44 struct stat buffer; local 45 return stat(filename.c_str(), &buffer) == 0; 89 string buffer; local 92 if (!ReadFileToString(emmc_sysfs + "rev", &buffer)) { 96 if (sscanf(buffer.c_str(), "0x%hx", &rev) < 1 || 104 if (!ReadFileToString(emmc_sysfs + "pre_eol_info", &buffer)) { 108 if (sscanf(buffer.c_str(), "%hx", &eol) < 1 || eol == 0) { 112 if (!ReadFileToString(emmc_sysfs + "life_time", &buffer)) { 116 if (sscanf(buffer.c_str(), "0x%hx 0x%hx", &lifetime_a, &lifetime_b) < 2 || 133 string buffer; local 170 string buffer; local [all...] |
/system/core/toolbox/upstream-netbsd/usr.bin/grep/ |
H A D | file.c | 70 static unsigned char buffer[MAXBUFSIZ]; variable 85 bufpos = buffer; 90 nr = gzread(gzbufdesc, buffer, MAXBUFSIZ); 92 nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); 111 nr = read(f->fd, buffer, MAXBUFSIZ); 119 nr = read(f->fd, buffer, MAXBUFSIZ); 149 /* Fill the buffer, if necessary */ 159 /* Look for a newline in the remaining part of the buffer */ 170 /* We have to copy the current buffered data to the line buffer */ 217 /* Fill read buffer, als [all...] |
/system/extras/tests/sdcard/ |
H A D | testcase.cpp | 98 char buffer[32000] = {0,}; local 99 char *str = buffer; 100 size_t size_left = sizeof(buffer); 110 write(mIpc[TestCase::WRITE_TO_PARENT], buffer, str - buffer); 131 char buffer[32000] = {0,}; local 132 while(read(mIpc[READ_FROM_CHILD], buffer, sizeof(buffer)) != 0) 134 printf("%s", buffer); 136 memset(buffer, [all...] |
/system/media/audio_utils/include/audio_utils/ |
H A D | SimpleLog.h | 107 // format to buffer 108 char buffer[kMaxStringLength]; local 109 int length = vsnprintf(buffer, sizeof(buffer), format, args); 113 } else if (length >= (signed)sizeof(buffer)) { 114 length = sizeof(buffer) - 1; 118 while (length > 0 && buffer[length - 1] == '\n') { 119 buffer[--length] = '\0'; 121 logs(nowNs, buffer); 125 * \brief Logs a string to the buffer wit 133 logs(int64_t nowNs, const char *buffer) argument [all...] |
/system/media/audio_utils/tests/ |
H A D | fifo_threads.cpp | 42 char buffer[4]; local 43 ssize_t actual = context->mInputReader->read(buffer, sizeof(buffer), &timeout); 46 if ((size_t) actual > sizeof(buffer)) { 50 ssize_t actual2 = context->mTransferWriter->write(buffer, actual, &timeout); 77 char buffer[4]; local 78 ssize_t actual = context->mTransferReader->read(buffer, sizeof(buffer), &timeout); 80 if ((size_t) actual > sizeof(buffer)) { 84 ssize_t actual2 = context->mOutputWriter->write(buffer, actua 141 char buffer[4]; local [all...] |
/system/netd/server/ |
H A D | ndc.cpp | 118 char *buffer = (char *)malloc(4096); local 138 free(buffer); 148 memset(buffer, 0, 4096); 149 if ((rc = read(sock, buffer, 4096)) <= 0) { 155 free(buffer); 165 if (buffer[i] == '\0') { 169 strncpy(tmp, buffer + offset, 3); 173 printf("%s\n", buffer + offset); 182 free(buffer);
|
/system/nfc/halimpl/bcm2079x/adaptation/ |
H A D | NonVolatileStore.cpp | 50 ** Parameters p_buf - buffer to read the data into. 51 ** nbytes - number of bytes to read into the buffer. 57 ** called with the buffer of data, along with the number 58 ** of bytes read into the buffer, and a status. The 77 ALOGD("%s: buffer len=%u; file=%s", __func__, nbytes, filename); 104 ** Parameters p_buf - buffer to read the data from. 164 char buffer[100]; local 165 memset(buffer, 0, sizeof(buffer)); 166 if (!GetStrValue(NAME_NFA_STORAGE, buffer, sizeo [all...] |
/system/nvram/messages/ |
H A D | io.cpp | 88 uint8_t* buffer = static_cast<uint8_t*>(data); local 91 memcpy(buffer, pos_, end_ - pos_); 92 buffer += end_ - pos_; 100 memcpy(buffer, pos_, size); 175 const uint8_t* buffer = static_cast<const uint8_t*>(data); 178 memcpy(pos_, buffer, end_ - pos_); 179 buffer += end_ - pos_; 187 memcpy(pos_, buffer, size);
|
/system/tpm/attestation/common/ |
H A D | crypto_utility_impl_test.cc | 80 std::string buffer; local 81 EXPECT_FALSE(crypto_utility_->GetRandom(num_bytes, &buffer));
|
/system/bt/btif/src/ |
H A D | btif_debug_btsnoop.cc | 34 // Total btsnoop memory log buffer size 46 static ringbuffer_t* buffer = NULL; variable 62 // Make room in the ring buffer 64 while (ringbuffer_available(buffer) < 66 ringbuffer_pop(buffer, (uint8_t*)&header, sizeof(btsnooz_header_t)); 67 ringbuffer_delete(buffer, header.length - 1); 78 ringbuffer_insert(buffer, (uint8_t*)&header, sizeof(btsnooz_header_t)); 79 ringbuffer_insert(buffer, data, included_length); 176 if (buffer == NULL) buffer [all...] |
H A D | btif_sock_util.cc | 96 unsigned char* buffer = (unsigned char*)buf; local 119 iv.iov_base = buffer; 134 buffer += ret;
|
/system/bt/hci/src/ |
H A D | hci_inject.cc | 46 uint8_t buffer[65536 + 3]; // 2 bytes length prefix, 1 byte type prefix. member in struct:__anon734 154 socket_read(client->socket, client->buffer + client->buffer_size, 155 sizeof(client->buffer) - client->buffer_size); 163 uint8_t* buffer = client->buffer; local 164 hci_packet_t packet_type = (hci_packet_t)buffer[0]; 165 size_t packet_len = (buffer[2] << 8) | buffer[1]; 180 memcpy(buf->data, buffer + 3, packet_len); 188 memmove(buffer, buffe [all...] |
/system/chre/host/common/ |
H A D | socket_client.cc | 143 uint8_t buffer[kReceiveBufferSize]; local 148 ssize_t bytesReceived = recv(mSockFd, buffer, sizeof(buffer), 0); 160 mCallbacks->onMessageReceived(buffer, bytesReceived); 230 // Set the send buffer size to 2MB to allow plenty of room for nanoapp
|
H A D | socket_server.cc | 191 uint8_t buffer[kMaxPacketSize]; local 192 ssize_t packetSize = recv(clientSocket, buffer, sizeof(buffer), MSG_DONTWAIT); 201 mClientMessageCallback(clientId, buffer, packetSize);
|
/system/chre/platform/slpi/ |
H A D | platform_nanoapp.cc | 84 LOGE("Couldn't allocate %zu byte buffer for nanoapp 0x%016" PRIx64, 243 bool PlatformNanoapp::logStateToBuffer(char *buffer, size_t *bufferPos, argument 247 success &= debugDumpPrint(buffer, bufferPos, bufferSize, " %s: vendor=\"%s\"",
|
/system/core/adb/ |
H A D | shell_service_test.cpp | 99 char buffer[1024]; local 100 char *cur_ptr = buffer, *end_ptr = buffer + sizeof(buffer); 105 return std::string(buffer, cur_ptr);
|