/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 | 37 int (*fill)(void *buf, unsigned sz, void *cookie), in pcm_play() argument 42 unsigned sz, n; in pcm_play() local 63 sz = config.buffer_size; in pcm_play() 64 if (sz > sizeof(buf)) { in pcm_play() 71 if (fill(buf, sz, cookie)) in pcm_play() 73 if (write(afd, buf, sz) != sz) in pcm_play() 85 if (fill(buf, sz, cookie)) in pcm_play() 87 if (write(afd, buf, sz) != sz) in pcm_play() 125 int fill_buffer(void *buf, unsigned sz, void *cookie) in fill_buffer() argument 127 if (sz > avail) in fill_buffer() [all …]
|
/system/core/fastboot/ |
D | fastboot.c | 95 unsigned int sz; member 175 int sz; in load_fd() local 180 sz = file_size(fd); in load_fd() 181 if (sz < 0) { in load_fd() 185 data = (char*) malloc(sz); in load_fd() 188 if(read(fd, data, sz) != sz) goto oops; in load_fd() 191 if(_sz) *_sz = sz; in load_fd() 331 unsigned *sz, const char *cmdline) in load_bootable_image() argument 358 *sz = ksize; in load_bootable_image() 381 *sz = bsize; in load_bootable_image() [all …]
|
D | fastboot.h | 49 void fb_queue_flash(const char *ptn, void *data, unsigned sz); 50 void fb_queue_flash_sparse(const char *ptn, struct sparse_file *s, unsigned sz);
|
D | engine.c | 387 void fb_queue_flash(const char *ptn, void *data, unsigned sz) in fb_queue_flash() argument 393 a->size = sz; in fb_queue_flash() 394 a->msg = mkmsg("sending '%s' (%d KB)", ptn, sz / 1024); in fb_queue_flash() 400 void fb_queue_flash_sparse(const char *ptn, struct sparse_file *s, unsigned sz) in fb_queue_flash_sparse() argument 407 a->msg = mkmsg("sending sparse '%s' (%d KB)", ptn, sz / 1024); in fb_queue_flash_sparse()
|
/system/core/gpttool/ |
D | gpttool.c | 195 u64 parse_size(char *sz) in parse_size() argument 197 int l = strlen(sz); in parse_size() 198 u64 n = strtoull(sz, 0, 10); in parse_size() 200 switch(sz[l-1]){ in parse_size() 221 u64 sz; in parse_ptn() local 230 sz = ptbl->header.last_lba - next_lba; in parse_ptn() 232 sz = parse_size(y); in parse_ptn() 233 if (sz & 511) { in parse_ptn() 237 sz /= 512; in parse_ptn() 240 if (sz == 0) { in parse_ptn() [all …]
|
/system/core/fastbootd/ |
D | commands.c | 48 if (sz < sizeof(hdr)) { in cmd_boot() 61 if (2048 + kernel_actual + ramdisk_actual < sz) { in cmd_boot() 134 sz = ROUND_TO_PAGE(sz); in cmd_flash() 136 D(INFO, "writing %d bytes to '%s'\n", sz, ptn->name); in cmd_flash() 137 if (flash_write(ptn, extra, data, sz)) { in cmd_flash()
|
/system/vold/ |
D | NetlinkManager.cpp | 52 int sz = 64 * 1024; in start() local 66 if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) { in start()
|
/system/core/mkbootimg/ |
D | mkbootimg.c | 31 int sz; in load_file() local 38 sz = lseek(fd, 0, SEEK_END); in load_file() 39 if(sz < 0) goto oops; in load_file() 43 data = (char*) malloc(sz); in load_file() 46 if(read(fd, data, sz) != sz) goto oops; in load_file() 49 if(_sz) *_sz = sz; in load_file()
|
/system/core/init/ |
D | util.c | 145 int sz; in read_file() local 164 sz = lseek(fd, 0, SEEK_END); in read_file() 165 if(sz < 0) goto oops; in read_file() 169 data = (char*) malloc(sz + 2); in read_file() 172 if(read(fd, data, sz) != sz) goto oops; in read_file() 174 data[sz] = '\n'; in read_file() 175 data[sz+1] = 0; in read_file() 176 if(_sz) *_sz = sz; in read_file()
|
D | property_service.h | 28 void get_property_workspace(int *fd, int *sz);
|
D | property_service.c | 434 void get_property_workspace(int *fd, int *sz) in get_property_workspace() argument 437 *sz = pa_workspace.size; in get_property_workspace() 470 unsigned sz; in load_properties_from_file() local 472 data = read_file(fn, &sz); in load_properties_from_file()
|
D | init.c | 241 int fd, sz; in service_start() local 245 get_property_workspace(&fd, &sz); in service_start() 246 sprintf(tmp, "%d,%d", dup(fd), sz); in service_start()
|
/system/netd/ |
D | NetlinkManager.cpp | 57 int sz = 64 * 1024; in setupSocket() local 70 if (setsockopt(*sock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) { in setupSocket()
|
/system/core/include/cutils/ |
D | misc.h | 29 extern void *load_file(const char *fn, unsigned *sz);
|
/system/core/adb/ |
D | commandline.c | 389 int adb_download_buffer(const char *service, const char *fn, const void* data, int sz, in adb_download_buffer() argument 397 sprintf(buf,"%s:%d", service, sz); in adb_download_buffer() 407 total = sz; in adb_download_buffer() 415 while(sz > 0) { in adb_download_buffer() 416 unsigned xfer = (sz > CHUNK_SIZE) ? CHUNK_SIZE : sz; in adb_download_buffer() 422 sz -= xfer; in adb_download_buffer() 425 printf("sending: '%s' %4d%% \r", fn, (int)(100LL - ((100LL * sz) / (total)))); in adb_download_buffer() 453 unsigned sz; in adb_download() local 455 data = load_file(fn, &sz); in adb_download() 461 int status = adb_download_buffer(service, fn, data, sz, progress); in adb_download()
|
/system/core/charger/ |
D | charger.c | 208 unsigned sz = 0; in dump_last_kmsg() local 214 buf = load_file(LAST_KMSG_PATH, &sz); in dump_last_kmsg() 215 if (!buf || !sz) { in dump_last_kmsg() 220 len = min(sz, LAST_KMSG_MAX_SZ); in dump_last_kmsg() 221 ptr = buf + (sz - len); in dump_last_kmsg() 249 static int read_file(const char *path, char *buf, size_t sz) in read_file() argument 258 cnt = read(fd, buf, sz - 1); in read_file()
|
/system/core/logwrapper/ |
D | logwrap.c | 314 int sz; in parent() local 362 sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b); in parent() 364 sz += b; in parent() 366 for (b = 0; b < sz; b++) { in parent()
|
/system/core/libpixelflinger/codeflinger/ |
D | GGLAssembler.h | 216 integer_t(int r, int sz=32, int f=0) 217 : reg_t(r, f), s(sz) { in reg_t() 219 void setTo(int r, int sz=32, int f=0) { 220 reg_t::setTo(r, f); s=sz;
|
/system/core/libnetutils/ |
D | dhcpclient.c | 351 static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz) in is_valid_reply() argument 353 if (sz < DHCP_MSG_FIXED_SIZE) { in is_valid_reply() 354 if (verbose) ALOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE); in is_valid_reply()
|