Searched refs:sz (Results 1 - 23 of 23) sorted by relevance

/system/core/libcutils/
H A Dload_file.c25 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 Dmisc.h26 * 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 Dplaywav.c37 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 Dgpttool.c194 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 Dcommands.c56 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 Dfastboot.c94 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 Dfastboot.h49 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 Dengine.c175 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 DNetlinkManager.cpp52 int sz = 64 * 1024; local
66 if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
/system/core/init/
H A Dproperty_service.h29 void get_property_workspace(int *fd, int *sz);
H A Dutil.c153 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 Dproperty_service.c352 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 Dinit.c257 int fd, sz; local
261 get_property_workspace(&fd, &sz);
262 sprintf(tmp, "%d,%d", dup(fd), sz);
/system/core/mkbootimg/
H A Dmkbootimg.c31 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 DNetlinkManager.cpp57 int sz = 64 * 1024; local
70 if (setsockopt(*sock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
/system/core/adb/
H A Dcommandline.c453 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 Dhealthd_mode_charger.cpp197 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 Dlogwrap.c310 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 Ddu.c270 int64_t sz = blocks * 512; local
272 humanize_number(buf, sizeof(buf), sz, "", HN_AUTOSCALE,
/system/core/libnetutils/
H A Ddhcpclient.c353 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 DGGLAssembler.h222 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 Dpartitions.c82 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 DLogStatistics.cpp692 android::String8 sz("");
693 sz.appendFormat((sizes != sizesTotal) ? "%zu/%zu" : "%zu",
701 spaces_total, sz.string(), pd.string(),

Completed in 374 milliseconds