Home
last modified time | relevance | path

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

12

/system/core/logcat/tests/
Dlogcat_test.cpp46 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 …]
Dlogcat_benchmark.cpp26 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/extras/perfprofd/
Dcpuconfig.cc66 FILE *fp = fopen(possible.c_str(), "re"); in GetNumCores() local
67 if (fp) { in GetNumCores()
69 if (fscanf(fp, "%u-%u", &lo, &hi) == 2) { in GetNumCores()
72 fclose(fp); in GetNumCores()
81 FILE *fp = fopen(ss.str().c_str(), "we"); in OnlineCore() local
82 if (fp) { in OnlineCore()
83 fprintf(fp, onoff ? "1\n" : "0\n"); in OnlineCore()
84 fclose(fp); in OnlineCore()
Dperfprofdcore.cc329 FILE *fp = fopen(config_file_path, "r"); in readFile() local
330 if (!fp) { in readFile()
340 getline(&linebuf, &line_length, fp) != -1; in readFile()
371 fclose(fp); in readFile()
554 FILE *fp = fopen(encoded_file_path, "w"); in encode_to_proto() local
555 if (!fp) { in encode_to_proto()
559 if (fwrite(dtarget, fsiz, 1, fp) != 1) { in encode_to_proto()
560 fclose(fp); in encode_to_proto()
563 fclose(fp); in encode_to_proto()
701 FILE *fp = fopen(processed_file_path.c_str(), "r"); in post_process() local
[all …]
/system/core/libbacktrace/
Dmap_info.c71 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()
DBacktraceMap.cpp110 FILE* fp = popen(cmd, "r"); local
114 FILE* fp = fopen(path, "r"); local
116 if (fp == nullptr) {
120 while(fgets(line, sizeof(line), fp)) {
127 pclose(fp);
129 fclose(fp);
/system/core/toolbox/upstream-netbsd/lib/libc/string/
Dswab.c51 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/debuggerd/
Dbacktrace.cpp45 FILE* fp; in dump_process_header() local
48 if ((fp = fopen(path, "r"))) { in dump_process_header()
49 procname = fgets(procnamebuf, sizeof(procnamebuf), fp); in dump_process_header()
50 fclose(fp); in dump_process_header()
75 FILE* fp; in dump_thread() local
78 if ((fp = fopen(path, "r"))) { in dump_thread()
79 threadname = fgets(threadnamebuf, sizeof(threadnamebuf), fp); in dump_thread()
80 fclose(fp); in dump_thread()
/system/core/libcutils/
Dandroid_reboot.c37 FILE* fp; in remount_ro_done() local
41 if ((fp = setmntent("/proc/mounts", "r")) == NULL) { in remount_ro_done()
45 while ((mentry = getmntent(fp)) != NULL) { in remount_ro_done()
51 endmntent(fp); in remount_ro_done()
Dsched_policy.c150 FILE *fp; in getSchedulerGroup() local
153 if (!(fp = fopen(pathBuf, "r"))) { in getSchedulerGroup()
157 while(fgets(lineBuf, sizeof(lineBuf) -1, fp)) { in getSchedulerGroup()
189 fclose(fp); in getSchedulerGroup()
194 fclose(fp); in getSchedulerGroup()
198 fclose(fp); in getSchedulerGroup()
Dopen_memstream.c225 FILE* fp; in open_memstream() local
237 fp = funopen(stream, in open_memstream()
239 if (fp == NULL) { in open_memstream()
249 return fp; in open_memstream()
/system/bt/osi/src/
Dconfig.c54 static void config_parse(FILE *fp, config_t *config);
91 FILE *fp = fopen(filename, "rt"); in config_new() local
92 if (!fp) { in config_new()
97 config_parse(fp, config); in config_new()
98 fclose(fp); in config_new()
290 FILE *fp = NULL; in config_save() local
313 fp = fopen(temp_filename, "wt"); in config_save()
314 if (!fp) { in config_save()
321 if (fprintf(fp, "[%s]\n", section->name) < 0) { in config_save()
328 if (fprintf(fp, "%s = %s\n", entry->key, entry->value) < 0) { in config_save()
[all …]
/system/extras/simpleperf/
Denvironment.cpp35 FILE* fp = fopen("/sys/devices/system/cpu/online", "re"); in GetOnlineCpus() local
36 if (fp == nullptr) { in GetOnlineCpus()
41 LineReader reader(fp); in GetOnlineCpus()
78 FILE* fp = fopen(symbol_file.c_str(), "re"); in ProcessKernelSymbols() local
79 if (fp == nullptr) { in ProcessKernelSymbols()
83 LineReader reader(fp); in ProcessKernelSymbols()
142 FILE* fp = fopen("/proc/modules", "re"); in GetLoadedModules() local
143 if (fp == nullptr) { in GetLoadedModules()
148 LineReader reader(fp); in GetLoadedModules()
253 FILE* fp = fopen(status_file.c_str(), "re"); in ReadThreadNameAndTgid() local
[all …]
Dutils.h30 LineReader(FILE* fp) : fp_(fp), buf_(nullptr), bufsize_(0) { in LineReader() argument
/system/extras/perfprofd/quipper/
Dperf_utils.h32 int64_t GetFileSizeFromHandle(FILE* fp);
43 FILE* fp = fopen(filename.c_str(), "wb"); in BufferToFile() local
44 if (!fp) in BufferToFile()
52 fp), in BufferToFile()
55 fclose(fp); in BufferToFile()
/system/core/libutils/
DProcessCallStack.cpp55 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/fs_mgr/
Dfs_mgr_verity.c526 static int metadata_add(FILE *fp, long start, const char *tag, in metadata_add() argument
529 if (fseek(fp, start, SEEK_SET) < 0 || in metadata_add()
530 fprintf(fp, "%s %u\n", tag, length) < 0) { in metadata_add()
534 *offset = ftell(fp); in metadata_add()
536 if (fseek(fp, length, SEEK_CUR) < 0 || in metadata_add()
537 fprintf(fp, METADATA_EOD " 0\n") < 0) { in metadata_add()
547 FILE *fp = NULL; in metadata_find() local
559 fp = fopen(fname, "r+"); in metadata_find()
561 if (!fp) { in metadata_find()
567 if (fseek(fp, start, SEEK_SET) < 0 || in metadata_find()
[all …]
/system/core/liblog/tests/
Dlibc_test.cpp141 FILE *fp; in TEST() local
142 ASSERT_TRUE(NULL != (fp = fopen("/dev/pmsg0", "a"))); in TEST()
144 ASSERT_EQ((size_t)1, fwrite(message, sizeof(message), 1, fp)); in TEST()
145 ASSERT_EQ(0, fclose(fp)); in TEST()
/system/core/adb/
Dremount_service.cpp39 std::unique_ptr<FILE, int(*)(FILE*)> fp(setmntent("/proc/mounts", "r"), endmntent); in find_mount() local
40 if (!fp) { in find_mount()
45 while ((e = getmntent(fp.get())) != nullptr) { in find_mount()
Dadb_auth_host.cpp276 FILE* fp = fopen(file, "r"); in read_key() local
277 if (!fp) { in read_key()
285 if (!PEM_read_RSAPrivateKey(fp, &key->rsa, NULL, NULL)) { in read_key()
287 fclose(fp); in read_key()
293 fclose(fp); in read_key()
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/util/
Devent.h257 size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp);
258 size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp);
259 size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp);
260 size_t perf_event__fprintf_task(union perf_event *event, FILE *fp);
261 size_t perf_event__fprintf(union perf_event *event, FILE *fp);
/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()
/system/extras/showmap/
Dshowmap.c166 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/
DBandwidthController.cpp781 FILE *fp; in getInterfaceQuota() local
789 fp = fopen(fname, "re"); 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, "we"); in updateQuota()
848 if (!fp) { in updateQuota()
852 fprintf(fp, "%" PRId64"\n", bytes); in updateQuota()
853 fclose(fp); in updateQuota()
[all …]
/system/core/logd/
Dmain.cpp182 FILE *fp = fopen("/data/system/packages.list", "r"); in reinit_thread_start() local
183 if (fp) { in reinit_thread_start()
191 while (getline(&buffer, &len, fp) > 0) { in reinit_thread_start()
205 fclose(fp); in reinit_thread_start()

12