/system/keymaster/include/keymaster/ |
H A D | android_keymaster_messages.h | 120 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override; 124 virtual uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const = 0; 135 uint8_t* Serialize(uint8_t* buf, const uint8_t* /* end */) const override { return buf; } 145 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { 146 return append_uint32_to_buf(buf, end, algorithm); 170 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { 171 buf = append_uint32_to_buf(buf, end, algorithm); 172 return append_uint32_to_buf(buf, en [all...] |
/system/bt/hci/src/ |
H A D | hci_inject.cc | 174 BT_HDR* buf = (BT_HDR*)buffer_allocator->alloc(BT_HDR_SIZE + packet_len); local 175 if (buf) { 176 buf->event = hci_packet_to_event(packet_type); 177 buf->offset = 0; 178 buf->layer_specific = 0; 179 buf->len = packet_len; 180 memcpy(buf->data, buffer + 3, packet_len); 181 hci->transmit_downward(buf->event, buf);
|
/system/extras/tests/pagingtest/ |
H A D | pagingtest.c | 20 void *buf; local 49 buf = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, 0); 50 if (buf == (void *)-1) { 55 tmp_buf = buf; 69 if (madvise(buf, size, MADV_DONTNEED)) { 85 munmap(buf, size); 90 munmap(buf, size); 112 bool check_caching(void *buf, unsigned char *vec, size_t size, bool is_cached) { argument 116 if (mincore(buf, size, vec)) {
|
/system/core/libcutils/ |
H A D | open_memstream.c | 121 static int write_memstream(void* cookie, const char* buf, int size) argument 137 memcpy(*stream->bufp + stream->offset, buf, size); 277 char *buf; 284 stream = open_memstream(&buf, &len); 287 printf("buf=%s, len=%zu\n", buf, len); 293 printf("buf=%s, len=%zu\n", buf, len); 294 free(buf); 299 stream = open_memstream(&buf, [all...] |
H A D | trace-container.cpp | 126 char buf[CONTAINER_ATRACE_MESSAGE_LENGTH]; \ 132 buf, sizeof(buf), \ 135 if (len >= (int) sizeof(buf)) { \ 136 int name_len = strlen(name) - (len - sizeof(buf)) - 1; \ 141 buf, sizeof(buf), \ 151 write(atrace_container_sock_fd, buf, len); \
|
/system/extras/tests/ext4/ |
H A D | rand_emmc_perf.c | 114 char buf[TST_BLK_SIZE] = { 0 }; local 131 if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { 135 if (read(fd, buf, sizeof(buf)) != sizeof(buf)) { 149 char buf[TST_BLK_SIZE] = { 0 }; local 160 if (write(fd, buf, sizeof(buf)) ! [all...] |
/system/update_engine/payload_consumer/ |
H A D | mtd_file_descriptor.cc | 138 ssize_t MtdFileDescriptor::Read(void* buf, size_t count) { argument 140 return mtd_read_data(read_ctx_.get(), static_cast<char*>(buf), count); 143 ssize_t MtdFileDescriptor::Write(const void* buf, size_t count) { argument 146 static_cast<const char*>(buf), 217 ssize_t UbiFileDescriptor::Read(void* buf, size_t count) { argument 219 return EintrSafeFileDescriptor::Read(buf, count); 222 ssize_t UbiFileDescriptor::Write(const void* buf, size_t count) { argument 224 ssize_t nr_chunk = EintrSafeFileDescriptor::Write(buf, count); 242 char buf[1024]; local 243 memset(buf, [all...] |
/system/core/liblog/tests/ |
H A D | log_read_test.cpp | 44 std::string buf = android::base::StringPrintf("pid=%u ts=%ld.%09ld", pid, local 49 ASSERT_LT(0, __android_log_write(prio, tag, buf.c_str())); 52 buf = std::string(&prio, sizeof(prio)) + tag + std::string("", 1) + buf + 66 if (log_msg.entry.len != buf.length()) continue; 68 if (buf != std::string(log_msg.msg(), log_msg.entry.len)) continue;
|
/system/core/toolbox/upstream-netbsd/lib/libc/gen/ |
H A D | humanize_number.c | 47 humanize_number(char *buf, size_t len, int64_t bytes, argument 55 _DIAGASSERT(buf != NULL); 85 if (buf == NULL || suffix == NULL) 89 buf[0] = '\0'; 152 r = snprintf(buf, len, "%d%s%d%s%s%s", 156 r = snprintf(buf, len, "%" PRId64 "%s%s%s",
|
/system/keymaster/km_openssl/ |
H A D | hkdf.cpp | 64 UniquePtr<uint8_t[]> buf(new(std::nothrow) uint8_t[digest_size_ + info_len + 1]); 66 if (buf.get() == nullptr || digest.get() == nullptr) 76 memcpy(buf.get(), digest.get(), digest_size_); 80 memcpy(buf.get() + block_input_len, info, info_len); 82 *(buf.get() + block_input_len++) = static_cast<uint8_t>(i + 1); 83 result = hmac.Sign(buf.get(), block_input_len, digest.get(), digest_size_);
|
/system/core/debuggerd/crasher/ |
H A D | crasher.cpp | 83 char buf[128]; local 84 smash_stack_dummy_buf = buf; 96 void* buf[1]; local 97 buf[0] = p; 98 global = buf; 99 overflow_stack(&buf); 138 char buf[16]; local 139 free(buf); // GCC is smart enough to warn about this, but we're doing it deliberately. 223 char buf[1]; local 224 TEMP_FAILURE_RETRY(read(STDIN_FILENO, buf, sizeo 259 char buf[10]; local [all...] |
/system/keymaster/tests/ |
H A D | authorization_set_test.cpp | 165 UniquePtr<uint8_t[]> buf(new uint8_t[size]); 166 EXPECT_EQ(buf.get() + size, set.Serialize(buf.get(), buf.get() + size)); 167 AuthorizationSet deserialized(buf.get(), size); 193 UniquePtr<uint8_t[]> buf(new uint8_t[size]); 194 EXPECT_EQ(buf.get() + size, set.Serialize(buf.get(), buf.get() + size)); 196 const uint8_t* p = buf 215 uint8_t buf[] = {0, 0, 0}; local 251 uint8_t buf[] = {0, 0, 0}; local 259 read_uint32(const uint8_t* buf) argument 265 add_to_uint32(uint8_t* buf, int delta) argument [all...] |
/system/connectivity/wifilogd/tests/ |
H A D | mock_os.h | 41 std::tuple<size_t, Errno>(int fd, void* buf, size_t buflen)); 42 MOCK_METHOD3(Write, std::tuple<size_t, Os::Errno>(int fd, const void* buf,
|
/system/core/libutils/tests/ |
H A D | TestHelpers.h | 53 char buf[1]; local 54 ssize_t nRead = ::read(receiveFd, buf, 1);
|
/system/core/logd/ |
H A D | LogAudit.h | 37 LogAudit(LogBuffer* buf, LogReader* reader, int fdDmesg); 38 int log(char* buf, size_t len);
|
/system/keymaster/android_keymaster/ |
H A D | android_keymaster_utils.cpp | 27 uint8_t* dup_buffer(const void* buf, size_t size) { argument 32 memcpy(retval, buf, size);
|
/system/netd/libnetdutils/include/netdutils/ |
H A D | Netlink.h | 29 // Invoke onMsg once for each netlink message in buf. onMsg will be 33 // Assume that the first message begins at offset zero within buf. 34 void forEachNetlinkMessage(const Slice buf, 37 // Invoke onAttr once for each netlink attribute in buf. onAttr will be 41 // Assume that the first attribute begins at offset zero within buf. 42 void forEachNetlinkAttribute(const Slice buf,
|
/system/tpm/trunks/ftdi/ |
H A D | support.h | 27 int raw_write(struct mpsse_context* mpsse, uint8_t* buf, int size); 28 int raw_read(struct mpsse_context* mpsse, uint8_t* buf, int size);
|
/system/update_engine/ |
H A D | test_subprocess.cc | 48 struct stat buf; local 49 int rc = fstat(fd, &buf);
|
/system/core/adb/ |
H A D | sysdeps.h | 116 extern int adb_read(int fd, void* buf, int len); 117 extern int adb_write(int fd, const void* buf, int len); 132 extern int unix_read_interruptible(int fd, void* buf, size_t len); 135 static __inline__ int unix_read(int fd, void* buf, size_t len) { argument 136 return TEMP_FAILURE_RETRY(unix_read_interruptible(fd, buf, len)); 143 static __inline__ int unix_write(int fd, const void* buf, size_t len) argument 145 return write(fd, buf, len); 229 extern int adb_fputs(const char* buf, FILE* stream); 232 extern int adb_puts(const char* buf); 240 extern char* adb_getcwd(char* buf, in [all...] |
/system/core/logwrapper/ |
H A D | logwrap.c | 59 char *buf; member in struct:beginning_buf 66 /* This is a circular buf that holds up to the last ending_buf->buf_size bytes 72 char *buf; member in struct:ending_buf 82 /* A structure to hold all the abbreviated buf data */ 111 /* Add to the end of the buf */ 112 memcpy(b_buf->buf + b_buf->used_len, line, line_len); 126 if (e_buf->buf == NULL) { 148 memcpy(e_buf->buf + e_buf->write, line, cnt); 150 memcpy(e_buf->buf, line + cnt, line_len - cnt); 169 /* Log to either the abbreviated buf, o 187 print_buf_lines(struct log_info *log_info, char *buf, int buf_size) argument [all...] |
/system/core/debuggerd/ |
H A D | debuggerd.cpp | 45 char buf[BUFSIZ]; 46 ssize_t rc = TEMP_FAILURE_RETRY(read(fd.get(), buf, sizeof(buf))); 51 if (!android::base::WriteFully(STDOUT_FILENO, buf, rc)) {
|
/system/core/debuggerd/libdebuggerd/ |
H A D | utility.cpp | 77 char buf[512]; local 80 vsnprintf(buf, sizeof(buf), fmt, ap); 83 size_t len = strlen(buf); 89 TEMP_FAILURE_RETRY(write(log->tfd, buf, len)); 93 __android_log_buf_write(LOG_ID_CRASH, ANDROID_LOG_FATAL, LOG_TAG, buf); 95 *log->amfd_data += buf; 103 if (buf[len - 1] == '\n') { 104 buf[len - 1] = '\0'; 107 std::vector<std::string> fragments = android::base::Split(buf, "\ 225 read_with_default(const char* path, char* buf, size_t len, const char* default_value) argument [all...] |
/system/extras/sound/ |
H A D | playwav.c | 39 int (*fill)(void *buf, unsigned sz, void *cookie), 47 char buf[8192]; local 68 if (sz > sizeof(buf)) { 75 if (fill(buf, sz, cookie)) 77 if (write(afd, buf, sz) != (ssize_t) sz) 89 if (fill(buf, sz, cookie)) 91 if (write(afd, buf, sz) != (ssize_t) sz) 128 int fill_buffer(void *buf, unsigned sz, void *cookie) argument 132 memcpy(buf, next, sz); 196 unsigned char buf[819 local 38 pcm_play(unsigned rate, unsigned channels, int (*fill)(void *buf, unsigned sz, void *cookie), void *cookie) argument 299 char buf[64*1024]; local [all...] |
/system/netd/libnetdutils/ |
H A D | Netlink.cpp | 26 void forEachNetlinkMessage(const Slice buf, argument 28 Slice tail = buf; 38 void forEachNetlinkAttribute(const Slice buf, argument 40 Slice tail = buf;
|