/system/core/logcat/tests/ |
D | logcat_test.cpp | 46 FILE *fp; in TEST() local 48 ASSERT_TRUE(NULL != (fp = popen( in TEST() 57 while (fgets(buffer, sizeof(buffer), fp)) { in TEST() 68 pclose(fp); in TEST() 76 FILE *fp; in TEST() local 78 ASSERT_TRUE(NULL != (fp = popen( in TEST() 86 while (fgets(buffer, sizeof(buffer), fp)) { in TEST() 94 pclose(fp); in TEST() 100 FILE *fp; in TEST() local 102 ASSERT_TRUE(NULL != (fp = popen( in TEST() [all …]
|
D | logcat_benchmark.cpp | 26 FILE *fp; in TEST() local 28 ASSERT_TRUE(NULL != (fp = popen( in TEST() 85 while (fgets(buffer, sizeof(buffer), fp)) { in TEST() 111 pclose(fp); in TEST()
|
/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()
|
/system/core/toolbox/upstream-netbsd/bin/cat/ |
D | cat.c | 145 FILE *fp; in cook_args() local 147 fp = stdin; in cook_args() 152 fp = stdin; in cook_args() 153 else if ((fp = fopen(*argv, in cook_args() 162 cook_buf(fp); in cook_args() 163 if (fp != stdin) in cook_args() 164 (void)fclose(fp); in cook_args() 166 clearerr(fp); in cook_args() 171 cook_buf(FILE *fp) in cook_buf() argument 176 for (prev = '\n'; (ch = getc(fp)) != EOF; prev = ch) { in cook_buf() [all …]
|
/system/core/toolbox/upstream-netbsd/lib/libc/string/ |
D | swab.c | 51 const char *fp; in swab() local 61 fp = (const char *)from; in swab() 63 #define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp in swab()
|
/system/core/libbacktrace/ |
D | map_info.c | 71 FILE* fp = popen(cmd, "r"); in backtrace_create_map_info_list() local 72 if (fp == NULL) { in backtrace_create_map_info_list() 78 while (fgets(line, sizeof(line), fp) != NULL) { in backtrace_create_map_info_list() 85 pclose(fp); in backtrace_create_map_info_list() 135 FILE* fp; in backtrace_create_map_info_list() local 142 fp = fopen(path, "r"); in backtrace_create_map_info_list() 143 if (fp) { in backtrace_create_map_info_list() 144 while(fgets(line, sizeof(line), fp)) { in backtrace_create_map_info_list() 151 fclose(fp); in backtrace_create_map_info_list()
|
D | BacktraceMap.cpp | 112 FILE* fp = popen(cmd, "r"); local 116 FILE* fp = fopen(path, "r"); local 118 if (fp == NULL) { 122 while(fgets(line, sizeof(line), fp)) { 129 pclose(fp); 131 fclose(fp);
|
/system/core/debuggerd/ |
D | backtrace.cpp | 40 FILE* fp; in dump_process_header() local 43 if ((fp = fopen(path, "r"))) { in dump_process_header() 44 procname = fgets(procnamebuf, sizeof(procnamebuf), fp); in dump_process_header() 45 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.cpp | 103 FILE* fp = fopen(path, "r"); in get_process_info() local 104 if (!fp) { in get_process_info() 110 while (fgets(line, sizeof(line), fp)) { in get_process_info() 123 fclose(fp); in get_process_info()
|
D | tombstone.cpp | 201 FILE *fp; in dump_thread_info() local 204 if ((fp = fopen(path, "r"))) { in dump_thread_info() 205 threadname = fgets(threadnamebuf, sizeof(threadnamebuf), fp); in dump_thread_info() 206 fclose(fp); in dump_thread_info() 225 if ((fp = fopen(path, "r"))) { in dump_thread_info() 226 procname = fgets(procnamebuf, sizeof(procnamebuf), fp); in dump_thread_info() 227 fclose(fp); in dump_thread_info()
|
/system/core/toolbox/upstream-netbsd/bin/kill/ |
D | kill.c | 212 printsignals(FILE *fp) in printsignals() argument 219 if (isatty(fileno(fp))) { in printsignals() 221 if (ioctl(fileno(fp), TIOCGWINSZ, &win) == 0 && win.ws_col > 0) in printsignals() 230 fprintf(fp, "\n"); in printsignals() 234 fprintf(fp, " "); in printsignals() 236 fprintf(fp, "%s", name); in printsignals() 239 fprintf(fp, "\n"); in printsignals()
|
/system/core/libutils/ |
D | ProcessCallStack.cpp | 55 FILE* fp; in dumpProcessHeader() local 58 if ((fp = fopen(path, "r"))) { in dumpProcessHeader() 59 procName = fgets(procNameBuf, sizeof(procNameBuf), fp); in dumpProcessHeader() 60 fclose(fp); in dumpProcessHeader() 83 FILE* fp; in getThreadName() local 86 if ((fp = fopen(path, "r"))) { in getThreadName() 87 procName = fgets(procNameBuf, sizeof(procNameBuf), fp); in getThreadName() 88 fclose(fp); in getThreadName()
|
/system/core/libcutils/ |
D | sched_policy.c | 148 FILE *fp; in getSchedulerGroup() local 151 if (!(fp = fopen(pathBuf, "r"))) { in getSchedulerGroup() 155 while(fgets(lineBuf, sizeof(lineBuf) -1, fp)) { in getSchedulerGroup() 187 fclose(fp); in getSchedulerGroup() 192 fclose(fp); in getSchedulerGroup() 196 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/vold/ |
D | Volume.cpp | 294 FILE *fp; in isMountpointMounted() local 297 if (!(fp = fopen("/proc/mounts", "r"))) { in isMountpointMounted() 302 while(fgets(line, sizeof(line), fp)) { in isMountpointMounted() 306 fclose(fp); in isMountpointMounted() 311 fclose(fp); in isMountpointMounted() 659 FILE* fp = popen(cmd.c_str(), "r"); in extractMetadata() local 660 if (!fp) { in extractMetadata() 668 if (fgets(line, sizeof(line), fp) != NULL) { in extractMetadata() 689 pclose(fp); in extractMetadata()
|
D | VolumeManager.cpp | 1472 FILE *fp; in listMountedObbs() local 1475 if (!(fp = fopen("/proc/mounts", "r"))) { in listMountedObbs() 1487 while(fgets(line, sizeof(line), fp)) { in listMountedObbs() 1509 fclose(fp); in listMountedObbs() 1600 FILE* fp; in shareVolume() local 1602 if ((fp = fopen("/proc/sys/vm/dirty_ratio", "r+"))) { in shareVolume() 1604 if (fgets(line, sizeof(line), fp) && sscanf(line, "%d", &mSavedDirtyRatio)) { in shareVolume() 1605 fprintf(fp, "%d\n", mUmsDirtyRatio); in shareVolume() 1609 fclose(fp); in shareVolume() 1651 FILE* fp; in unshareVolume() local [all …]
|
/system/core/logd/tests/ |
D | logd_test.cpp | 290 FILE *fp; in TEST() local 291 ASSERT_TRUE(NULL != (fp = fopen("/proc/sys/net/unix/max_dgram_qlen", "r"))); in TEST() 294 fscanf(fp, "%u", &max_dgram_qlen); in TEST() 296 fclose(fp); in TEST() 539 FILE *fp; in TEST() local 542 ASSERT_TRUE(NULL != (fp = popen( in TEST() 567 while (fgets(buffer, sizeof(buffer), fp)) { in TEST() 577 int ret = pclose(fp); in TEST()
|
/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()
|
/system/extras/showmap/ |
D | showmap.c | 166 FILE *fp; in load_maps() local 173 fp = fopen(fn, "r"); in load_maps() 174 if (fp == 0) { in load_maps() 179 while (fgets(line, sizeof(line), fp) != 0) { in load_maps() 201 fclose(fp); in load_maps()
|
/system/netd/server/ |
D | BandwidthController.cpp | 781 FILE *fp; in getInterfaceQuota() local 789 fp = fopen(fname, "r"); in getInterfaceQuota() 791 if (!fp) { in getInterfaceQuota() 795 scanRes = fscanf(fp, "%" SCNd64, bytes); in getInterfaceQuota() 797 fclose(fp); in getInterfaceQuota() 837 FILE *fp; in updateQuota() local 846 fp = fopen(fname, "w"); in updateQuota() 848 if (!fp) { in updateQuota() 852 fprintf(fp, "%" PRId64"\n", bytes); in updateQuota() 853 fclose(fp); in updateQuota() [all …]
|
D | BandwidthController.h | 165 static int parseForwardChainStats(SocketClient *cli, const TetherStats filter, FILE *fp, 175 static void parseAndFlushCostlyTables(FILE *fp, bool doRemove);
|
/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/core/liblog/tests/ |
D | liblog_test.cpp | 192 FILE *fp = fopen(buffer, "r"); in get_ticks() local 193 if (!fp) { in get_ticks() 197 char *cp = fgets(buffer, sizeof(buffer), fp); in get_ticks() 198 fclose(fp); in get_ticks()
|
/system/core/logwrapper/ |
D | logwrap.c | 96 FILE *fp; member 166 fprintf(log_info->fp, "%s\n", line); in do_log_line() 343 log_info.fp = fdopen(fd, "a"); in parent() 455 fclose(log_info.fp); /* Also closes underlying fd */ in parent()
|