Home
last modified time | relevance | path

Searched refs:sz (Results 1 – 25 of 27) sorted by relevance

12

/system/core/fastboot/
Dutil_windows.c43 DWORD sz; in file_size() local
56 sz = GetFileSize( file, NULL ); in file_size()
59 return sz; in file_size()
78 DWORD sz; in load_file() local
91 sz = GetFileSize( file, NULL ); in load_file()
94 if (sz > 0) { in load_file()
95 data = (char*) malloc( sz ); in load_file()
97 fprintf(stderr, "load_file: could not allocate %ld bytes\n", sz ); in load_file()
98 sz = 0; in load_file()
102 if ( !ReadFile( file, data, sz, &out_bytes, NULL ) || in load_file()
[all …]
Dfastboot.c158 int sz; in load_file() local
166 sz = lseek(fd, 0, SEEK_END); in load_file()
167 if(sz < 0) goto oops; in load_file()
171 data = (char*) malloc(sz); in load_file()
174 if(read(fd, data, sz) != sz) goto oops; in load_file()
177 if(_sz) *_sz = sz; in load_file()
308 unsigned *sz, const char *cmdline) in load_bootable_image() argument
335 *sz = ksize; in load_bootable_image()
355 *sz = bsize; in load_bootable_image()
360 void *unzip_file(zipfile_t zip, const char *name, unsigned *sz) in unzip_file() argument
[all …]
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);
Dengine.c405 void fb_queue_flash(const char *ptn, void *data, unsigned sz) in fb_queue_flash() argument
411 a->size = sz; in fb_queue_flash()
412 a->msg = mkmsg("sending '%s' (%d KB)", ptn, sz / 1024); in fb_queue_flash()
418 void fb_queue_flash_sparse(const char *ptn, struct sparse_file *s, unsigned sz) in fb_queue_flash_sparse() argument
425 a->msg = mkmsg("sending sparse '%s' (%d KB)", ptn, sz / 1024); in fb_queue_flash_sparse()
/system/core/libcutils/
Dload_file.c25 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/micro_bench/
Dmicro_bench.c82 static int do_memset(int iters, int sz) { in do_memset() argument
87 uint8_t *b = malloc(sz); in do_memset()
89 int c = 1000000000/sz; in do_memset()
94 memset(b, 0, sz); in do_memset()
101 c, sz, tv2.tv_sec, tv2.tv_usec, mb_sec(c*sz, &tv2)); in do_memset()
106 static int do_memcpy(int iters, int sz) { in do_memcpy() argument
111 uint8_t *a = malloc(sz); in do_memcpy()
113 uint8_t *b = malloc(sz); in do_memcpy()
115 int c = 1000000000/sz; in do_memcpy()
120 memcpy(b, a, sz); in do_memcpy()
[all …]
/system/extras/sound/
Dplaywav.c37 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/gpttool/
Dgpttool.c195 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/bluetooth/bluedroid/
Dbluetooth.c53 int sz; in init_rfkill() local
62 sz = read(fd, &buf, sizeof(buf)); in init_rfkill()
64 if (sz >= 9 && memcmp(buf, "bluetooth", 9) == 0) { in init_rfkill()
75 int sz; in check_bluetooth_power() local
90 sz = read(fd, &buffer, 1); in check_bluetooth_power()
91 if (sz != 1) { in check_bluetooth_power()
112 int sz; in set_bluetooth_power() local
127 sz = write(fd, &buffer, 1); in set_bluetooth_power()
128 if (sz < 0) { in set_bluetooth_power()
/system/vold/
DNetlinkManager.cpp52 int sz = 64 * 1024; in start() local
66 if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) { in start()
Dlogwrapper.c36 int sz; in parent() local
37 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) { in parent()
39 sz += b; in parent()
41 for (b = 0; b < sz; b++) { in parent()
/system/core/mkbootimg/
Dmkbootimg.c31 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/logwrapper/
Dlogwrapper.c54 int sz; in parent() local
59 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) { in parent()
61 sz += b; in parent()
63 for (b = 0; b < sz; b++) { in parent()
/system/core/init/
Dutil.c152 int sz; in read_file() local
171 sz = lseek(fd, 0, SEEK_END); in read_file()
172 if(sz < 0) goto oops; in read_file()
176 data = (char*) malloc(sz + 2); in read_file()
179 if(read(fd, data, sz) != sz) goto oops; in read_file()
181 data[sz] = '\n'; in read_file()
182 data[sz+1] = 0; in read_file()
183 if(_sz) *_sz = sz; in read_file()
Dproperty_service.h27 void get_property_workspace(int *fd, int *sz);
Dproperty_service.c484 void get_property_workspace(int *fd, int *sz) in get_property_workspace() argument
487 *sz = pa_workspace.size; in get_property_workspace()
520 unsigned sz; in load_properties_from_file() local
522 data = read_file(fn, &sz); in load_properties_from_file()
/system/netd/
DNetlinkManager.cpp57 int sz = 64 * 1024; in setupSocket() local
70 if (setsockopt(*sock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) { in setupSocket()
Dlogwrapper.c35 int sz; in parent() local
36 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) { in parent()
38 sz += b; in parent()
40 for (b = 0; b < sz; b++) { in parent()
/system/core/include/cutils/
Dmisc.h29 extern void *load_file(const char *fn, unsigned *sz);
/system/extras/tests/framebuffer/
Dmdp_test.c73 static int get_pmem(int *fd, void **data, int sz) in get_pmem() argument
81 sz = (sz + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); in get_pmem()
82 *data = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, *fd, 0); in get_pmem()
/system/bluetooth/brcm_patchram_plus/
Dbrcm_patchram_plus.c743 int sz; in read_default_bdaddr() local
763 sz = read(fd, bdaddr, len); in read_default_bdaddr()
764 if (sz < 0) { in read_default_bdaddr()
769 } else if (sz != len) { in read_default_bdaddr()
770 fprintf(stderr, "read(%s) unexpected size %d", path, sz); in read_default_bdaddr()
/system/core/adb/
Dcommandline.c374 int adb_download_buffer(const char *service, const void* data, int sz, in adb_download_buffer() argument
382 sprintf(buf,"%s:%d", service, sz); in adb_download_buffer()
392 total = sz; in adb_download_buffer()
400 while(sz > 0) { in adb_download_buffer()
401 unsigned xfer = (sz > CHUNK_SIZE) ? CHUNK_SIZE : sz; in adb_download_buffer()
407 sz -= xfer; in adb_download_buffer()
410 printf("sending: '%s' %4d%% \r", service, (int)(100LL - ((100LL * sz) / (total)))); in adb_download_buffer()
438 unsigned sz; in adb_download() local
440 data = load_file(fn, &sz); in adb_download()
446 int status = adb_download_buffer(service, data, sz, progress); in adb_download()
/system/core/charger/
Dcharger.c208 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/libsysutils/src/
DNetlinkEvent.cpp76 size_t sz = size; in parseBinaryNetlinkMessage() local
79 while (NLMSG_OK(nh, sz) && (nh->nlmsg_type != NLMSG_DONE)) { in parseBinaryNetlinkMessage()
/system/core/libpixelflinger/codeflinger/
DGGLAssembler.h216 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;

12