/system/core/logcat/tests/ |
D | logcat_test.cpp | 49 FILE *fp; in TEST() local 51 ASSERT_TRUE(NULL != (fp = popen( in TEST() 60 while (fgets(buffer, sizeof(buffer), fp)) { in TEST() 71 pclose(fp); in TEST() 85 FILE *fp; in TEST() local 99 ASSERT_TRUE(NULL != (fp = popen( in TEST() 107 while (fgets(buffer, sizeof(buffer), fp)) { in TEST() 113 pclose(fp); in TEST() 119 char *fgetLongTime(char *buffer, size_t buflen, FILE *fp) { in fgetLongTime() argument 120 while (fgets(buffer, buflen, fp)) { in fgetLongTime() [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/extras/perfprofd/ |
D | cpuconfig.cc | 66 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()
|
D | perfprofdcore.cc | 507 FILE *fp = fopen(encoded_file_path, "w"); in encode_to_proto() local 508 if (!fp) { in encode_to_proto() 512 if (fwrite(dtarget, fsiz, 1, fp) != 1) { in encode_to_proto() 513 fclose(fp); in encode_to_proto() 516 fclose(fp); in encode_to_proto() 654 FILE *fp = fopen(processed_file_path.c_str(), "r"); in post_process() local 655 if (fp != NULL) { in post_process() 657 while(fscanf(fp, "%d\n", &seq) > 0) { in post_process() 663 fclose(fp); in post_process() 667 fp = fopen(produced_file_path.c_str(), "r"); in post_process() [all …]
|
/system/core/debuggerd/ |
D | backtrace.cpp | 46 FILE* fp; in dump_process_header() local 49 if ((fp = fopen(path, "r"))) { in dump_process_header() 50 procname = fgets(procnamebuf, sizeof(procnamebuf), fp); in dump_process_header() 51 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/update_engine/update_manager/ |
D | real_random_provider.cc | 47 RandomSeedVariable(const string& name, FILE* fp) in RandomSeedVariable() argument 48 : Variable<uint64_t>(name, kVariableModeConst), fp_(fp) {} in RandomSeedVariable() 82 FILE* fp = fopen(kRandomDevice, "r"); in Init() local 83 if (!fp) in Init() 85 var_seed_.reset(new RandomSeedVariable("seed", fp)); in Init()
|
/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/bt/osi/src/ |
D | config.c | 55 static bool config_parse(FILE *fp, config_t *config); 88 FILE *fp = fopen(filename, "rt"); in config_new() local 89 if (!fp) { in config_new() 95 if (!config_parse(fp, config)) { in config_new() 100 fclose(fp); in config_new() 292 FILE *fp = NULL; in config_save() local 315 fp = fopen(temp_filename, "wt"); in config_save() 316 if (!fp) { in config_save() 323 if (fprintf(fp, "[%s]\n", section->name) < 0) { in config_save() 330 if (fprintf(fp, "%s = %s\n", entry->key, entry->value) < 0) { in config_save() [all …]
|
/system/core/libcutils/ |
D | android_reboot.c | 73 FILE* fp; in find_rw() local 76 if ((fp = setmntent("/proc/mounts", "r")) == NULL) { in find_rw() 80 while ((mentry = getmntent(fp)) != NULL) { in find_rw() 92 endmntent(fp); in find_rw() 135 FILE* fp; in remount_ro() local 167 if ((fp = setmntent("/proc/mounts", "r")) == NULL) { in remount_ro() 172 while ((mentry = getmntent(fp)) != NULL) { in remount_ro() 184 endmntent(fp); in remount_ro()
|
D | sched_policy.c | 166 FILE *fp; in getCGroupSubsys() local 169 if (!(fp = fopen(pathBuf, "r"))) { in getCGroupSubsys() 173 while(fgets(lineBuf, sizeof(lineBuf) -1, fp)) { in getCGroupSubsys() 205 fclose(fp); in getCGroupSubsys() 210 fclose(fp); in getCGroupSubsys() 214 fclose(fp); in getCGroupSubsys()
|
/system/extras/simpleperf/ |
D | environment.cpp | 43 LineReader(FILE* fp) : fp_(fp), buf_(nullptr), bufsize_(0) { in LineReader() argument 70 FILE* fp = fopen("/sys/devices/system/cpu/online", "re"); in GetOnlineCpus() local 71 if (fp == nullptr) { in GetOnlineCpus() 76 LineReader reader(fp); in GetOnlineCpus() 115 FILE* fp = fopen(symbol_file.c_str(), "re"); in ProcessKernelSymbols() local 116 if (fp == nullptr) { in ProcessKernelSymbols() 120 LineReader reader(fp); in ProcessKernelSymbols() 150 FILE* fp = fopen("/proc/modules", "re"); in GetLoadedModules() local 151 if (fp == nullptr) { in GetLoadedModules() 156 LineReader reader(fp); in GetLoadedModules() [all …]
|
D | read_apk.cpp | 147 FILE* fp = fopen(apk_path.c_str(), mode.c_str()); in IsValidApkPath() local 148 if (fp == nullptr) { in IsValidApkPath() 152 if (fread(buf, 4, 1, fp) != 1) { in IsValidApkPath() 153 fclose(fp); in IsValidApkPath() 156 fclose(fp); in IsValidApkPath()
|
D | record_file_writer.cpp | 43 FILE* fp = fopen(filename.c_str(), "web+"); in CreateInstance() local 44 if (fp == nullptr) { in CreateInstance() 49 return std::unique_ptr<RecordFileWriter>(new RecordFileWriter(filename, fp)); in CreateInstance() 52 RecordFileWriter::RecordFileWriter(const std::string& filename, FILE* fp) in RecordFileWriter() argument 54 record_fp_(fp), in RecordFileWriter()
|
D | record_file_reader.cpp | 34 FILE* fp = fopen(filename.c_str(), mode.c_str()); in CreateInstance() local 35 if (fp == nullptr) { in CreateInstance() 39 auto reader = std::unique_ptr<RecordFileReader>(new RecordFileReader(filename, fp)); in CreateInstance() 47 RecordFileReader::RecordFileReader(const std::string& filename, FILE* fp) in RecordFileReader() argument 48 : filename_(filename), record_fp_(fp) { in RecordFileReader()
|
/system/extras/perfprofd/quipper/ |
D | perf_utils.h | 32 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/ |
D | ProcessCallStack.cpp | 56 FILE* fp; in dumpProcessHeader() local 59 if ((fp = fopen(path, "r"))) { in dumpProcessHeader() 60 procName = fgets(procNameBuf, sizeof(procNameBuf), fp); in dumpProcessHeader() 61 fclose(fp); in dumpProcessHeader() 84 FILE* fp; in getThreadName() local 87 if ((fp = fopen(path, "r"))) { in getThreadName() 88 procName = fgets(procNameBuf, sizeof(procNameBuf), fp); in getThreadName() 89 fclose(fp); in getThreadName()
|
/system/core/libbacktrace/ |
D | BacktraceMap.cpp | 107 FILE* fp = popen(cmd, "r"); local 111 FILE* fp = fopen(path, "r"); local 113 if (fp == nullptr) { 117 while(fgets(line, sizeof(line), fp)) { 124 pclose(fp); 126 fclose(fp);
|
/system/connectivity/shill/ |
D | file_reader.cc | 44 FILE* fp = file_.get(); in ReadLine() local 45 if (!fp) in ReadLine() 51 while ((ch = fgetc(fp)) != EOF) { in ReadLine()
|
/system/core/fs_mgr/ |
D | fs_mgr_verity.cpp | 435 static int metadata_add(FILE *fp, long start, const char *tag, in metadata_add() argument 438 if (fseek(fp, start, SEEK_SET) < 0 || in metadata_add() 439 fprintf(fp, "%s %u\n", tag, length) < 0) { in metadata_add() 443 *offset = ftell(fp); in metadata_add() 445 if (fseek(fp, length, SEEK_CUR) < 0 || in metadata_add() 446 fprintf(fp, METADATA_EOD " 0\n") < 0) { in metadata_add() 456 FILE *fp = NULL; in metadata_find() local 468 fp = fopen(fname, "r+"); in metadata_find() 470 if (!fp) { in metadata_find() 476 if (fseek(fp, start, SEEK_SET) < 0 || in metadata_find() [all …]
|
/system/core/liblog/tests/ |
D | libc_test.cpp | 139 FILE *fp; in TEST() local 140 ASSERT_TRUE(NULL != (fp = fopen("/dev/pmsg0", "a"))); in TEST() 142 ASSERT_EQ((size_t)1, fwrite(message, sizeof(message), 1, fp)); in TEST() 143 ASSERT_EQ(0, fclose(fp)); in TEST()
|
/system/core/libpackagelistparser/ |
D | packagelistparser.c | 94 FILE *fp; in packagelist_parse() local 108 fp = fopen(PACKAGES_LIST_FILE, "re"); in packagelist_parse() 109 if (!fp) { in packagelist_parse() 115 while ((bytesread = getline(&buf, &buflen, fp)) > 0) { in packagelist_parse() 244 fclose(fp); in packagelist_parse()
|
/system/core/adb/ |
D | remount_service.cpp | 40 std::unique_ptr<FILE, int(*)(FILE*)> fp(setmntent("/proc/mounts", "r"), endmntent); in find_proc_mount() local 41 if (!fp) { in find_proc_mount() 46 while ((e = getmntent(fp.get())) != nullptr) { in find_proc_mount()
|
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/util/ |
D | event.h | 257 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/ |
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/netd/server/ |
D | BandwidthController.cpp | 748 FILE *fp; in getInterfaceQuota() local 756 fp = fopen(fname, "re"); in getInterfaceQuota() 758 if (!fp) { in getInterfaceQuota() 762 scanRes = fscanf(fp, "%" SCNd64, bytes); in getInterfaceQuota() 764 fclose(fp); in getInterfaceQuota() 802 FILE *fp; in updateQuota() local 811 fp = fopen(fname, "we"); in updateQuota() 813 if (!fp) { in updateQuota() 817 fprintf(fp, "%" PRId64"\n", bytes); in updateQuota() 818 fclose(fp); in updateQuota() [all …]
|