/system/core/libcutils/ |
D | load_file.c | 25 int sz; in load_file() local 32 sz = lseek(fd, 0, SEEK_END); in load_file() 33 if(sz < 0) goto oops; in load_file() 37 data = (char*) malloc(sz + 1); in load_file() 40 if(read(fd, data, sz) != sz) goto oops; in load_file() 42 data[sz] = 0; in load_file() 44 if(_sz) *_sz = sz; in load_file()
|
/system/extras/sound/ |
D | playwav.c | 39 int (*fill)(void *buf, unsigned sz, void *cookie), in pcm_play() argument 44 unsigned sz, n; in pcm_play() local 65 sz = config.buffer_size; in pcm_play() 66 if (sz > sizeof(buf)) { in pcm_play() 73 if (fill(buf, sz, cookie)) in pcm_play() 75 if (write(afd, buf, sz) != sz) in pcm_play() 87 if (fill(buf, sz, cookie)) in pcm_play() 89 if (write(afd, buf, sz) != sz) in pcm_play() 127 int fill_buffer(void *buf, unsigned sz, void *cookie) in fill_buffer() argument 129 if (sz > avail) in fill_buffer() [all …]
|
/system/core/fastboot/ |
D | fastboot.cpp | 98 int64_t sz; member 159 static void* load_fd(int fd, int64_t* sz) { in load_fd() argument 163 *sz = get_file_size(fd); in load_fd() 164 if (*sz < 0) { in load_fd() 168 data = (char*) malloc(*sz); in load_fd() 171 if(read(fd, data, *sz) != *sz) goto oops; in load_fd() 184 static void* load_file(const char* fn, int64_t* sz) { in load_file() argument 187 return load_fd(fd, sz); in load_file() 403 const char* secondstage, int64_t* sz, in load_bootable_image() argument 426 *sz = ksize; in load_bootable_image() [all …]
|
D | fastboot.h | 53 void fb_queue_flash(const char *ptn, void *data, uint32_t sz); 54 void fb_queue_flash_sparse(const char* ptn, struct sparse_file* s, uint32_t sz, size_t current,
|
D | engine.cpp | 147 void fb_queue_flash(const char *ptn, void *data, unsigned sz) in fb_queue_flash() argument 153 a->size = sz; in fb_queue_flash() 154 a->msg = mkmsg("sending '%s' (%d KB)", ptn, sz / 1024); in fb_queue_flash() 160 void fb_queue_flash_sparse(const char* ptn, struct sparse_file* s, unsigned sz, size_t current, in fb_queue_flash_sparse() argument 167 a->msg = mkmsg("sending sparse '%s' %zu/%zu (%d KB)", ptn, current, total, sz / 1024); in fb_queue_flash_sparse()
|
/system/vold/ |
D | NetlinkManager.cpp | 53 int sz = 64 * 1024; in start() local 67 if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) { in start()
|
/system/weaved/buffet/ |
D | webserv_client.cc | 60 size_t sz = 0; in GetData() local 61 while (stream->ReadBlocking(buffer.data(), buffer.size(), &sz, nullptr) && in GetData() 62 sz > 0) { in GetData() 63 request_data_->append(buffer.data(), buffer.data() + sz); in GetData()
|
/system/netd/server/ |
D | NetlinkManager.cpp | 71 int sz = 64 * 1024; in setupSocket() local 84 if (setsockopt(*sock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) { in setupSocket()
|
/system/core/healthd/ |
D | healthd_mode_charger.cpp | 198 unsigned sz = 0; in dump_last_kmsg() local 204 buf = (char *)load_file(LAST_KMSG_PSTORE_PATH, &sz); in dump_last_kmsg() 206 if (!buf || !sz) { in dump_last_kmsg() 207 buf = (char *)load_file(LAST_KMSG_PATH, &sz); in dump_last_kmsg() 208 if (!buf || !sz) { in dump_last_kmsg() 214 len = min(sz, LAST_KMSG_MAX_SZ); in dump_last_kmsg() 215 ptr = buf + (sz - len); in dump_last_kmsg()
|
/system/core/include/cutils/ |
D | misc.h | 29 extern void *load_file(const char *fn, unsigned *sz);
|
/system/core/adb/ |
D | commandline.cpp | 816 static int adb_download_buffer(const char *service, const char *fn, const void* data, unsigned sz, in adb_download_buffer() argument 820 int fd = adb_connect(android::base::StringPrintf("%s:%d", service, sz), &error); in adb_download_buffer() 829 unsigned total = sz; in adb_download_buffer() 837 while (sz > 0) { in adb_download_buffer() 838 unsigned xfer = (sz > CHUNK_SIZE) ? CHUNK_SIZE : sz; in adb_download_buffer() 846 sz -= xfer; in adb_download_buffer() 849 printf("sending: '%s' %4d%% \r", fn, (int)(100LL - ((100LL * sz) / (total)))); in adb_download_buffer() 889 unsigned sz; in adb_sideload_host() local 897 uint8_t* data = reinterpret_cast<uint8_t*>(load_file(fn, &sz)); in adb_sideload_host() 905 android::base::StringPrintf("sideload-host:%d:%d", sz, SIDELOAD_HOST_BLOCK_SIZE); in adb_sideload_host() [all …]
|
/system/core/logwrapper/ |
D | logwrap.c | 311 int sz; in parent() local 359 sz = TEMP_FAILURE_RETRY( in parent() 362 for (size_t i = 0; sz > 0 && i < opts_len; ++i) { in parent() 365 (uint8_t*)&buffer[b], sz, opts[i].opt_capture_output.user_pointer); in parent() 369 sz += b; in parent() 371 for (b = 0; b < sz; b++) { in parent()
|
/system/update_engine/payload_generator/ |
D | extent_ranges_unittest.cc | 36 size_t sz, in ExpectRangeEq() argument 39 for (size_t i = 1; i < sz; i += 2) { in ExpectRangeEq() 46 for (size_t i = 0; i < sz; i += 2) { in ExpectRangeEq()
|
/system/core/libpixelflinger/codeflinger/ |
D | GGLAssembler.h | 222 integer_t(int r, int sz=32, int f=0) 223 : reg_t(r, f), s(sz) { in reg_t() 225 void setTo(int r, int sz=32, int f=0) { 226 reg_t::setTo(r, f); s=sz;
|
/system/core/libnetutils/ |
D | dhcpclient.c | 353 static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz) in is_valid_reply() argument 355 if (sz < DHCP_MSG_FIXED_SIZE) { in is_valid_reply() 356 if (verbose) ALOGD("Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE); in is_valid_reply()
|
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/util/ |
D | header.h | 157 int get_cpuid(char *buffer, size_t sz);
|