/system/extras/tests/bionic/libc/common/ |
D | bench_stdio.c | 53 void read_file(FILE* fp, int chunkSize) in read_file() argument 57 fread(buffer, 1, chunkSize, fp); in read_file() 61 void write_file(FILE* fp, int chunkSize) in write_file() argument 65 fwrite(buffer, 1, chunkSize, fp); in write_file() 80 FILE* fp = fopen("/dev/zero", "rw"); in main() local 82 if (fp == NULL) { in main() 87 BENCH(read_file(fp,1)); in main() 88 BENCH(read_file(fp,2)); in main() 89 BENCH(read_file(fp,3)); in main() 90 BENCH(read_file(fp,4)); in main() [all …]
|
/system/core/sh/ |
D | show.c | 73 shtree(union node *n, int ind, char *pfx, FILE *fp) in shtree() argument 81 indent(ind, pfx, fp); in shtree() 92 shtree(n->nbinary.ch1, ind, NULL, fp); in shtree() 94 fputs(s, fp); in shtree() 95 shtree(n->nbinary.ch2, ind, NULL, fp); in shtree() 98 shcmd(n, fp); in shtree() 100 putc('\n', fp); in shtree() 104 shcmd(lp->n, fp); in shtree() 106 fputs(" | ", fp); in shtree() 109 fputs(" &", fp); in shtree() [all …]
|
/system/vold/ |
D | Xwarp.cpp | 45 FILE *fp; in status() local 50 if (!(fp = fopen(XWARP_READY, "r"))) { in status() 54 fscanf(fp, "%d", (int *) ready); in status() 55 fclose(fp); in status() 57 if (!(fp = fopen(XWARP_MIRROR_STATUS, "r"))) { in status() 61 fscanf(fp, "%u %u", mirrorPos, maxSize); in status() 62 fclose(fp); in status()
|
D | VolumeManager.cpp | 1188 FILE *fp; in listMountedObbs() local 1191 if (!(fp = fopen("/proc/mounts", "r"))) { in listMountedObbs() 1203 while(fgets(line, sizeof(line), fp)) { in listMountedObbs() 1225 fclose(fp); in listMountedObbs() 1316 FILE* fp; in shareVolume() local 1318 if ((fp = fopen("/proc/sys/vm/dirty_ratio", "r+"))) { in shareVolume() 1320 if (fgets(line, sizeof(line), fp) && sscanf(line, "%d", &mSavedDirtyRatio)) { in shareVolume() 1321 fprintf(fp, "%d\n", mUmsDirtyRatio); in shareVolume() 1325 fclose(fp); in shareVolume() 1367 FILE* fp; in unshareVolume() local [all …]
|
D | Volume.cpp | 269 FILE *fp; in isMountpointMounted() local 272 if (!(fp = fopen("/proc/mounts", "r"))) { in isMountpointMounted() 277 while(fgets(line, sizeof(line), fp)) { in isMountpointMounted() 281 fclose(fp); in isMountpointMounted() 287 fclose(fp); in isMountpointMounted()
|
D | CommandListener.cpp | 102 FILE *fp = fopen("/proc/mounts", "r"); in runCommand() local 103 if (fp) { in runCommand() 105 while (fgets(line, sizeof(line), fp)) { in runCommand() 109 fclose(fp); in runCommand()
|
/system/core/toolbox/ |
D | netstat.c | 92 FILE *fp = fopen(filename, "r"); in ipv4() local 93 if (fp == NULL) { in ipv4() 97 fgets(buf, BUFSIZ, fp); in ipv4() 98 while (fgets(buf, BUFSIZ, fp)){ in ipv4() 115 fclose(fp); in ipv4() 119 FILE *fp = fopen(filename, "r"); in ipv6() local 120 if (fp == NULL) { in ipv6() 124 fgets(buf, BUFSIZ, fp); in ipv6() 125 while (fgets(buf, BUFSIZ, fp)){ in ipv6() 143 fclose(fp); in ipv6()
|
D | cat.c | 53 cook_buf(FILE *fp) in cook_buf() argument 59 for (prev = '\n'; (ch = getc(fp)) != EOF; prev = ch) { in cook_buf() 127 FILE *fp; in cook_args() local 129 fp = stdin; in cook_args() 134 fp = stdin; in cook_args() 135 else if ((fp = fopen(*argv, in cook_args() 144 cook_buf(fp); in cook_args() 145 if (fp != stdin) in cook_args() 146 fclose(fp); in cook_args()
|
/system/core/debuggerd/ |
D | backtrace.c | 41 FILE* fp; in dump_process_header() local 44 if ((fp = fopen(path, "r"))) { in dump_process_header() 45 procname = fgets(procnamebuf, sizeof(procnamebuf), fp); in dump_process_header() 46 fclose(fp); in dump_process_header() 70 FILE* fp; in dump_thread() local 73 if ((fp = fopen(path, "r"))) { in dump_thread() 74 threadname = fgets(threadnamebuf, sizeof(threadnamebuf), fp); in dump_thread() 75 fclose(fp); in dump_thread()
|
D | debuggerd.c | 164 FILE* fp = fopen(path, "r"); in get_process_info() local 165 if (!fp) { in get_process_info() 171 while (fgets(line, sizeof(line), fp)) { in get_process_info() 184 fclose(fp); in get_process_info()
|
D | tombstone.c | 200 FILE *fp; in dump_thread_info() local 203 if ((fp = fopen(path, "r"))) { in dump_thread_info() 204 threadname = fgets(threadnamebuf, sizeof(threadnamebuf), fp); in dump_thread_info() 205 fclose(fp); in dump_thread_info() 219 if ((fp = fopen(path, "r"))) { in dump_thread_info() 220 procname = fgets(procnamebuf, sizeof(procnamebuf), fp); in dump_thread_info() 221 fclose(fp); in dump_thread_info()
|
/system/core/libcutils/tests/memset_mips/ |
D | test_memset.c | 200 } *fp, functions[] = { in main() local 222 for (fp = functions; fp < &functions[NFUNCTIONS]; fp++) { in main() 223 (fp->fn)(arena, 0xffffffff, ARENASIZE); /* one call to get the code into Icache */ in main() 225 sprintf(tag, "%10s: %7s %4d-%4d", fp->name, pp->type, pp->minbytes, pp->maxbytes); in main() 229 testone(tag, fp->fn, pp->trials, pp->minbytes, pp->maxbytes, fp->size, threshold); in main()
|
/system/core/libcutils/ |
D | sched_policy.c | 166 FILE *fp; in getSchedulerGroup() local 169 if (!(fp = fopen(pathBuf, "r"))) { in getSchedulerGroup() 173 while(fgets(lineBuf, sizeof(lineBuf) -1, fp)) { in getSchedulerGroup() 205 fclose(fp); in getSchedulerGroup() 210 fclose(fp); in getSchedulerGroup() 214 fclose(fp); in getSchedulerGroup()
|
D | open_memstream.c | 227 FILE* fp; in open_memstream() local 239 fp = funopen(stream, in open_memstream() 241 if (fp == NULL) { in open_memstream() 251 return fp; in open_memstream()
|
/system/core/libcorkscrew/ |
D | map_info.c | 76 FILE* fp; in load_map_info_list() local 80 fp = fopen(path, "r"); in load_map_info_list() 81 if (fp) { in load_map_info_list() 82 while(fgets(line, sizeof(line), fp)) { in load_map_info_list() 89 fclose(fp); in load_map_info_list()
|
/system/core/libnetutils/ |
D | ifc_utils.c | 654 FILE *fp; in ifc_remove_host_routes() local 657 fp = fopen("/proc/net/route", "r"); in ifc_remove_host_routes() 658 if (fp == NULL) in ifc_remove_host_routes() 661 if (fscanf(fp, "%*[^\n]\n") < 0) { in ifc_remove_host_routes() 662 fclose(fp); in ifc_remove_host_routes() 667 int nread = fscanf(fp, "%63s%X%X%X%d%d%d%X%d%d%d\n", in ifc_remove_host_routes() 688 fclose(fp); in ifc_remove_host_routes() 707 FILE *fp; in ifc_get_default_route() local 709 fp = fopen("/proc/net/route", "r"); in ifc_get_default_route() 710 if (fp == NULL) in ifc_get_default_route() [all …]
|
/system/core/libpixelflinger/ |
D | raster.cpp | 105 const GGLFormat* fp = &(c->formats[cb->format]); in ggl_copyPixels() local 107 + (xs + (cb->stride * ys)) * fp->size; in ggl_copyPixels() 109 + (xd + (cb->stride * yd)) * fp->size; in ggl_copyPixels() 110 const size_t bpr = cb->stride * fp->size; in ggl_copyPixels() 111 const size_t rowsize = width * fp->size; in ggl_copyPixels()
|
D | scanline.cpp | 2231 const GGLFormat* fp = &(c->formats[cb->format]); in scanline_memcpy() local 2233 (x + (cb->stride * y)) * fp->size; in scanline_memcpy() 2239 (u + (tex->stride * v)) * fp->size; in scanline_memcpy() 2241 const size_t size = ct * fp->size; in scanline_memcpy() 2284 const GGLFormat* fp = &(c->formats[cb->format]); in scanline_clear() local 2286 (x + (cb->stride * y)) * fp->size; in scanline_clear() 2287 const size_t size = ct * fp->size; in scanline_clear() 2297 const GGLFormat* fp = &(c->formats[cb->format]); in scanline_set() local 2299 (x + (cb->stride * y)) * fp->size; in scanline_set() 2300 const size_t size = ct * fp->size; in scanline_set() [all …]
|
D | trap.cpp | 455 const GGLFormat* fp = &(c->formats[cb->format]); in scanline_set() local 457 (x + (cb->stride * y)) * fp->size; in scanline_set() 458 const size_t size = ct * fp->size; in scanline_set()
|
/system/netd/ |
D | BandwidthController.cpp | 675 FILE *fp; in getInterfaceQuota() local 680 fp = fopen(fname, "r"); in getInterfaceQuota() 682 if (!fp) { in getInterfaceQuota() 686 scanRes = fscanf(fp, "%lld", bytes); in getInterfaceQuota() 688 fclose(fp); in getInterfaceQuota() 726 FILE *fp; in updateQuota() local 730 fp = fopen(fname, "w"); in updateQuota() 732 if (!fp) { in updateQuota() 736 fprintf(fp, "%lld\n", bytes); in updateQuota() 737 fclose(fp); in updateQuota() [all …]
|
D | BandwidthController.h | 143 static int parseForwardChainStats(TetherStats &stats, FILE *fp,
|
/system/extras/showmap/ |
D | showmap.c | 164 FILE *fp; in load_maps() local 171 fp = fopen(fn, "r"); in load_maps() 172 if (fp == 0) { in load_maps() 177 while (fgets(line, sizeof(line), fp) != 0) { in load_maps() 199 fclose(fp); in load_maps()
|
/system/extras/tests/fstest/ |
D | perm_checker.c | 155 static int read_rules(FILE *fp) in read_rules() argument 165 while ((res = fscanf(fp, "%s %lo %lo %s %s %s %s\n", spec, in read_rules() 409 FILE *fp; in main() local 422 if (!(fp = fopen(config_file, "r"))) { in main() 426 read_rules(fp); in main() 427 fclose(fp); in main()
|
/system/extras/tests/lib/testUtil/ |
D | testUtil.c | 395 FILE *fp; in testExecCmd() local 405 if ((fp = popen(cmd, "r")) == NULL) { in testExecCmd() 411 while (fgets(str, sizeof(str), fp) != NULL) { in testExecCmd() 420 status = pclose(fp); in testExecCmd()
|
/system/extras/tests/wifi/stress/ |
D | wifiLoadScanAssoc.c | 127 FILE *fp; in main() local
|