/system/libufdt/tests/src/ |
H A D | ufdt_gen_test_dts.c | 76 static void output_header(FILE *fp, int is_plugin) { argument 77 fprintf(fp, "/dts-v1/;\n"); 79 fprintf(fp, "/plugin/;\n"); 81 fprintf(fp, "\n"); 84 static void output_root_begin(FILE *fp, int depth) { argument 85 fprintf(fp, "/ {\n"); 89 fprintf(fp, "level%d {\n", i); 93 static void output_root_end(FILE *fp, int depth) { argument 96 fprintf(fp, "};\n"); 99 fprintf(fp, "};\ 102 output_unused_nodes(FILE *fp, int count) argument 109 output_prop_str(FILE *fp, const char *prop, const char *value) argument 114 output_nodes(FILE *fp, int count, const char *prop, const char *value) argument 123 output_ref_nodes(FILE *fp, int start_id, int count, const char *prop, const char *value) argument 133 gen_dts(FILE *fp, const struct gen_params *params) argument 194 FILE *fp = NULL; local [all...] |
H A D | util.c | 25 static char *load_file_contents(FILE *fp, size_t *len_ptr) { argument 27 fseek(fp, 0, SEEK_END); 28 size_t len = ftell(fp); 29 fseek(fp, 0, SEEK_SET); 36 if (fread(buf, len, 1, fp) != 1) { 49 FILE *fp = fopen(filename, "r"); local 50 if (!fp) { 54 char *buf = load_file_contents(fp, len_ptr); 56 fclose(fp);
|
/system/core/toolbox/upstream-netbsd/lib/libc/string/ |
H A D | swab.c | 51 const char *fp; local 61 fp = (const char *)from; 63 #define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp
|
/system/core/logcat/tests/ |
H A D | liblogcat_test.cpp | 21 #define logcat_pclose(context, fp) android_logcat_pclose(&context, fp)
|
H A D | logcat_test.cpp | 40 #define logcat_pclose(context, fp) pclose(fp) 67 FILE* fp; local 76 (fp = logcat_popen( 85 while (fgets(buffer, sizeof(buffer), fp)) { 96 logcat_pclose(ctx, fp); 104 FILE* fp; local 108 (fp = logcat_popen(ctx, logcat_executable 117 while (fgets(buffer, sizeof(buffer), fp)) { 121 logcat_pclose(ctx, fp); 162 FILE* fp; local 198 fgetLongTime(char* buffer, size_t buflen, FILE* fp) argument 239 FILE* fp; local 267 FILE* fp; local 301 FILE* fp; local 335 FILE* fp; local 454 FILE* fp; local 491 FILE* fp[256]; // does this count as a multitude! local 535 FILE* fp; local 639 FILE* fp; local 707 FILE* fp; local 791 FILE* fp; local 837 FILE* fp; local 898 FILE* fp; local 1137 FILE* fp = fopen(id_file, "w"); local 1180 FILE* fp; local 1296 FILE* fp; local 1332 FILE* fp; local 1395 FILE* fp; local 1435 FILE* fp; local 1479 FILE* fp = logcat_popen(ctx, local 1655 FILE* fp = logcat_popen(ctx, command); local 1676 FILE* fp = logcat_popen(ctx, command); local [all...] |
H A D | exec_benchmark.cpp | 27 FILE* fp = popen(cmd, "r"); local 29 android::base::ReadFdToString(fileno(fp), &ret); 30 pclose(fp); 42 FILE* fp = android_logcat_popen(&ctx, cmd); local 44 android::base::ReadFdToString(fileno(fp), &ret); 45 android_logcat_pclose(&ctx, fp);
|
H A D | logcat_benchmark.cpp | 26 FILE* fp; local 30 fp = popen( 33 if (!fp) return; 83 while (fgets(buffer, sizeof(buffer), fp)) { 109 pclose(fp);
|
/system/extras/perfprofd/ |
H A D | cpuconfig.cc | 66 FILE *fp = fopen(possible.c_str(), "re"); local 67 if (fp) { 69 if (fscanf(fp, "%u-%u", &lo, &hi) == 2) { 72 fclose(fp); 81 FILE *fp = fopen(ss.str().c_str(), "we"); local 82 if (fp) { 83 fprintf(fp, onoff ? "1\n" : "0\n"); 84 fclose(fp);
|
/system/core/liblog/tests/ |
H A D | libc_test.cpp | 24 FILE* fp; local 25 ASSERT_TRUE(NULL != (fp = fopen("/dev/pmsg0", "a"))); 27 ASSERT_EQ((size_t)1, fwrite(message, sizeof(message), 1, fp)); 28 int fflushReturn = fflush(fp); 32 int fcloseReturn = fclose(fp);
|
H A D | log_radio_test.cpp | 94 FILE* fp = popen(buf.c_str(), "r"); local 97 if (fp) { 98 if (!android::base::ReadFdToString(fileno(fp), &buf)) buf = ""; 99 pclose(fp);
|
H A D | log_system_test.cpp | 94 FILE* fp = popen(buf.c_str(), "r"); local 97 if (fp) { 98 if (!android::base::ReadFdToString(fileno(fp), &buf)) buf = ""; 99 pclose(fp);
|
/system/update_engine/update_manager/ |
H A D | real_random_provider.cc | 47 RandomSeedVariable(const string& name, FILE* fp) argument 48 : Variable<uint64_t>(name, kVariableModeConst), fp_(fp) {} 62 // Either EOF on fp or read failed. 82 FILE* fp = fopen(kRandomDevice, "r"); local 83 if (!fp) 85 var_seed_.reset(new RandomSeedVariable("seed", fp));
|
/system/extras/perfprofd/quipper/ |
H A D | perf_utils.h | 31 // Given a valid open file handle |fp|, returns the size of the file. 32 int64_t GetFileSizeFromHandle(FILE* fp); 43 FILE* fp = fopen(filename.c_str(), "wb"); local 44 if (!fp) 52 fp), 55 fclose(fp);
|
/system/extras/simpleperf/ |
H A D | SampleDisplayer.h | 114 void operator()(FILE* fp, const SampleT* sample) { argument 116 fprintf(fp, "%s|\n", prefix.c_str()); 117 fprintf(fp, "%s-- %s\n", prefix.c_str(), PrintSampleName(sample).c_str()); 120 DisplayCallGraphEntry(fp, 1, prefix, sample->callchain.children[i], 126 void DisplayCallGraphEntry(FILE* fp, size_t depth, std::string prefix, argument 142 fprintf(fp, "%s\n", prefix.c_str()); 146 fprintf(fp, "%s%s%s\n", prefix.c_str(), percentage_s.c_str(), 149 fprintf(fp, "%s%*s%s\n", prefix.c_str(), static_cast<int>(percentage_s.size()), "", 154 fprintf(fp, "%s|--%.2f%%-- [hit in function]\n", prefix.c_str(), 158 DisplayCallGraphEntry(fp, dept 229 PrintNames(FILE* fp) argument 240 PrintSample(FILE* fp, const EntryT* sample) argument [all...] |
/system/core/libbacktrace/ |
H A D | BacktraceMap.cpp | 111 FILE* fp = popen(cmd, "r"); local 115 FILE* fp = fopen(path, "r"); local 117 if (fp == nullptr) { 121 while(fgets(line, sizeof(line), fp)) { 128 pclose(fp); 130 fclose(fp);
|
/system/core/libprocinfo/ |
H A D | process.cpp | 55 std::unique_ptr<FILE, decltype(&fclose)> fp(fdopen(status_fd, "r"), fclose); 56 if (!fp) { 67 while (getline(&line, &len, fp.get()) != -1 && field_bitmap != finished_bitmap) {
|
/system/core/fs_mgr/ |
H A D | fs_mgr_verity.cpp | 367 static int metadata_add(FILE *fp, long start, const char *tag, argument 370 if (fseek(fp, start, SEEK_SET) < 0 || 371 fprintf(fp, "%s %u\n", tag, length) < 0) { 375 *offset = ftell(fp); 377 if (fseek(fp, length, SEEK_CUR) < 0 || 378 fprintf(fp, METADATA_EOD " 0\n") < 0) { 388 FILE *fp = NULL; local 400 fp = fopen(fname, "r+"); 402 if (!fp) { 408 if (fseek(fp, star [all...] |
/system/core/init/ |
H A D | bootchart.cpp | 80 auto fp = fopen_unique("/data/bootchart/header", "we"); local 81 if (!fp) return; 82 fprintf(&*fp, "version = Android init 0.8\n"); 83 fprintf(&*fp, "title = Boot chart for Android (%s)\n", date); 84 fprintf(&*fp, "system.uname = %s %s %s %s\n", uts.sysname, uts.release, uts.version, uts.machine); 85 fprintf(&*fp, "system.release = %s\n", fingerprint.c_str()); 87 fprintf(&*fp, "system.cpu = %s\n", uts.machine); 88 fprintf(&*fp, "system.kernel.options = %s\n", kernel_cmdline.c_str());
|
/system/core/libutils/ |
H A D | ProcessCallStack.cpp | 53 FILE* fp; local 56 if ((fp = fopen(path, "r"))) { 57 procName = fgets(procNameBuf, sizeof(procNameBuf), fp); 58 fclose(fp); 81 FILE* fp; local 84 if ((fp = fopen(path, "r"))) { 85 procName = fgets(procNameBuf, sizeof(procNameBuf), fp); 86 fclose(fp);
|
/system/core/libpackagelistparser/ |
H A D | packagelistparser.c | 93 FILE *fp; local 107 fp = fopen(PACKAGES_LIST_FILE, "re"); 108 if (!fp) { 114 while ((bytesread = getline(&buf, &buflen, fp)) > 0) { 243 fclose(fp);
|
/system/sepolicy/tests/ |
H A D | sepol_wrap.cpp | 98 FILE *fp; local 101 fp = fopen(policy_path, "re"); 102 if (!fp) { 110 fclose(fp); 119 if (fstat(fileno(fp), &sb)) { 122 fclose(fp); 128 mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0), unmap); 132 fclose(fp); 144 fclose(fp); 152 fclose(fp); [all...] |
/system/bt/osi/src/ |
H A D | config.cc | 55 static bool config_parse(FILE* fp, config_t* config); 88 FILE* fp = fopen(filename, "rt"); 89 if (!fp) { 96 if (!config_parse(fp, config)) { 101 fclose(fp); 293 FILE* fp = NULL; local 318 fp = fopen(temp_filename, "wt"); 319 if (!fp) { 328 if (fprintf(fp, "[%s]\n", section->name) < 0) { 337 if (fprintf(fp, " 421 config_parse(FILE* fp, config_t* config) argument [all...] |
/system/extras/ioshark/ |
H A D | ioshark_bench.c | 53 FILE *fp; member in struct:thread_state_s 176 1, state->fp) != 1) { 407 rewind(state->fp); 408 if (fread(&header, sizeof(struct ioshark_header), 1, state->fp) != 1) { 419 fseek(state->fp, 428 1, state->fp) != 1) { 500 if (fread(&header, sizeof(struct ioshark_header), 1, state->fp) != 1) { 527 FILE *fp; local 544 fp = fopen(infile, "r"); 545 if (fp 654 FILE *fp; local [all...] |
/system/libufdt/utils/src/ |
H A D | mkdtimg_core.c | 72 static char *load_file_contents(FILE *fp, size_t *len_ptr) { argument 74 fseek(fp, 0, SEEK_END); 75 size_t len = ftell(fp); 76 fseek(fp, 0, SEEK_SET); 83 if (fread(buf, len, 1, fp) != 1) { 96 FILE *fp = fopen(filename, "r"); local 97 if (!fp) { 101 char *buf = load_file_contents(fp, len_ptr); 103 fclose(fp);
|
/system/core/adb/ |
H A D | remount_service.cpp | 41 std::unique_ptr<FILE, int(*)(FILE*)> fp(setmntent("/proc/mounts", "r"), endmntent); 42 if (!fp) { 47 while ((e = getmntent(fp.get())) != nullptr) {
|