Home
last modified time | relevance | path

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

/system/extras/tests/bionic/libc/common/
Dbench_stdio.c53 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/
Dshow.c73 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/
DXwarp.cpp45 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()
DVolumeManager.cpp1188 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 …]
DVolume.cpp269 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()
DCommandListener.cpp102 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/
Dnetstat.c92 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()
Dcat.c53 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/
Dbacktrace.c41 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()
Ddebuggerd.c164 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()
Dtombstone.c200 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/
Dtest_memset.c200 } *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/
Dsched_policy.c166 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()
Dopen_memstream.c227 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/
Dmap_info.c76 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/
Difc_utils.c654 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/
Draster.cpp105 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()
Dscanline.cpp2231 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 …]
Dtrap.cpp455 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/
DBandwidthController.cpp675 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 …]
DBandwidthController.h143 static int parseForwardChainStats(TetherStats &stats, FILE *fp,
/system/extras/showmap/
Dshowmap.c164 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/
Dperm_checker.c155 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/
DtestUtil.c395 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/
DwifiLoadScanAssoc.c127 FILE *fp; in main() local