/system/core/libcutils/ |
H A D | load_file.c | 25 int sz; local 32 sz = lseek(fd, 0, SEEK_END); 33 if(sz < 0) goto oops; 37 data = (char*) malloc(sz + 1); 40 if(read(fd, data, sz) != sz) goto oops; 42 data[sz] = 0; 44 if(_sz) *_sz = sz;
|
/system/core/include/cutils/ |
H A D | misc.h | 26 * sz is non-zero, return the size of the file via sz. 29 extern void *load_file(const char *fn, unsigned *sz);
|
/system/extras/sound/ |
H A D | playwav.c | 37 int (*fill)(void *buf, unsigned sz, void *cookie), 42 unsigned sz, n; local 63 sz = config.buffer_size; 64 if (sz > sizeof(buf)) { 71 if (fill(buf, sz, cookie)) 73 if (write(afd, buf, sz) != sz) 85 if (fill(buf, sz, cookie)) 87 if (write(afd, buf, sz) != sz) 36 pcm_play(unsigned rate, unsigned channels, int (*fill)(void *buf, unsigned sz, void *cookie), void *cookie) argument 125 fill_buffer(void *buf, unsigned sz, void *cookie) argument 196 unsigned sz, n; local [all...] |
/system/core/gpttool/ |
H A D | gpttool.c | 194 u64 parse_size(char *sz) argument 196 int l = strlen(sz); 197 u64 n = strtoull(sz, 0, 10); 199 switch(sz[l-1]){ 220 u64 sz; local 229 sz = ptbl->header.last_lba - next_lba; 231 sz = parse_size(y); 232 if (sz & 511) { 236 sz /= 512; 239 if (sz 256 u64 sz; local [all...] |
/system/core/fastbootd/ |
H A D | commands.c | 56 int sz, atags_sz, new_atags_sz; local 90 sz = get_file_size(data_fd); 92 ptr = (char *) mmap(NULL, sz, PROT_READ, 102 if ((size_t) sz < sizeof(*hdr)) { 122 if ((int) (hdr->page_size + kernel_actual + ramdisk_actual) < sz) { 145 munmap(ptr, sz); 161 munmap(ptr, sz); 271 uint64_t sz; local 312 sz = get_file_size64(data_fd); 314 sz [all...] |
/system/core/fastboot/ |
H A D | fastboot.c | 94 unsigned int sz; member in struct:fastboot_buffer 166 int sz; local 171 sz = file_size(fd); 172 if (sz < 0) { 176 data = (char*) malloc(sz); 179 if(read(fd, data, sz) != sz) goto oops; 182 if(_sz) *_sz = sz; 328 const char *secondstage, unsigned *sz, 356 *sz 327 load_bootable_image(const char *kernel, const char *ramdisk, const char *secondstage, unsigned *sz, const char *cmdline) argument 392 unzip_file(zipfile_t zip, const char *name, unsigned *sz) argument 427 unsigned sz; local 525 setup_requirements(char *data, unsigned sz) argument 659 unsigned int sz; local 716 unsigned sz; local 728 unsigned sz; local 786 unsigned sz; local 805 unsigned sz; local 988 unsigned sz; local [all...] |
H A 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);
|
H A D | engine.c | 175 void fb_queue_flash(const char *ptn, void *data, unsigned sz) argument 181 a->size = sz; 182 a->msg = mkmsg("sending '%s' (%d KB)", ptn, sz / 1024); 188 void fb_queue_flash_sparse(const char *ptn, struct sparse_file *s, unsigned sz) argument 195 a->msg = mkmsg("sending sparse '%s' (%d KB)", ptn, sz / 1024);
|
/system/vold/ |
H A D | NetlinkManager.cpp | 52 int sz = 64 * 1024; local 66 if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
|
/system/core/init/ |
H A D | property_service.h | 29 void get_property_workspace(int *fd, int *sz);
|
H A D | util.c | 153 int sz; local 172 sz = lseek(fd, 0, SEEK_END); 173 if(sz < 0) goto oops; 177 data = (char*) malloc(sz + 2); 180 if(read(fd, data, sz) != sz) goto oops; 182 data[sz] = '\n'; 183 data[sz+1] = 0; 184 if(_sz) *_sz = sz;
|
H A D | property_service.c | 352 void get_property_workspace(int *fd, int *sz) argument 355 *sz = pa_workspace.size; 427 unsigned sz; local 429 data = read_file(fn, &sz);
|
H A D | init.c | 257 int fd, sz; local 261 get_property_workspace(&fd, &sz); 262 sprintf(tmp, "%d,%d", dup(fd), sz);
|
/system/core/mkbootimg/ |
H A D | mkbootimg.c | 31 int sz; local 38 sz = lseek(fd, 0, SEEK_END); 39 if(sz < 0) goto oops; 43 data = (char*) malloc(sz); 46 if(read(fd, data, sz) != sz) goto oops; 49 if(_sz) *_sz = sz;
|
/system/netd/server/ |
H A D | NetlinkManager.cpp | 57 int sz = 64 * 1024; local 70 if (setsockopt(*sock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
|
/system/core/adb/ |
H A D | commandline.c | 453 int adb_download_buffer(const char *service, const char *fn, const void* data, int sz, argument 461 sprintf(buf,"%s:%d", service, sz); 471 total = sz; 479 while(sz > 0) { 480 unsigned xfer = (sz > CHUNK_SIZE) ? CHUNK_SIZE : sz; 486 sz -= xfer; 489 printf("sending: '%s' %4d%% \r", fn, (int)(100LL - ((100LL * sz) / (total)))); 517 unsigned sz; local 519 data = load_file(fn, &sz); 553 unsigned sz; local [all...] |
/system/core/healthd/ |
H A D | healthd_mode_charger.cpp | 197 unsigned sz = 0; local 203 buf = (char *)load_file(LAST_KMSG_PSTORE_PATH, &sz); 205 if (!buf || !sz) { 206 buf = (char *)load_file(LAST_KMSG_PATH, &sz); 207 if (!buf || !sz) { 213 len = min(sz, LAST_KMSG_MAX_SZ); 214 ptr = buf + (sz - len);
|
/system/core/logwrapper/ |
H A D | logwrap.c | 310 int sz; local 358 sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b); 360 sz += b; 362 for (b = 0; b < sz; b++) {
|
/system/core/toolbox/upstream-netbsd/usr.bin/du/ |
H A D | du.c | 270 int64_t sz = blocks * 512; local 272 humanize_number(buf, sizeof(buf), sz, "", HN_AUTOSCALE,
|
/system/core/libnetutils/ |
H A D | dhcpclient.c | 353 static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz) argument 355 if (sz < DHCP_MSG_FIXED_SIZE) { 356 if (verbose) ALOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE);
|
/system/core/libpixelflinger/codeflinger/ |
H A D | GGLAssembler.h | 222 integer_t(int r, int sz=32, int f=0) argument 223 : reg_t(r, f), s(sz) { 225 void setTo(int r, int sz=32, int f=0) { argument 226 reg_t::setTo(r, f); s=sz;
|
/system/core/fastbootd/commands/ |
H A D | partitions.c | 82 uint64_t sz = get_file_size64(fd); local 83 if (sz < size + location) { 84 D(ERR, "the location of mapping area is outside of the device size %" PRId64, sz);
|
/system/core/logd/ |
H A D | LogStatistics.cpp | 692 android::String8 sz(""); 693 sz.appendFormat((sizes != sizesTotal) ? "%zu/%zu" : "%zu", 701 spaces_total, sz.string(), pd.string(),
|