Home
last modified time | relevance | path

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

12

/aosp12/system/core/init/
H A Dutil_test.cpp36 ASSERT_FALSE(file_contents.ok()); in TEST()
58 ASSERT_FALSE(file_contents.ok()); in TEST()
67 ASSERT_FALSE(file_contents.ok()); in TEST()
74 ASSERT_TRUE(file_contents.ok()); in TEST()
76 EXPECT_EQ('\n', file_contents->at(file_contents->length() - 1)); in TEST()
77 (*file_contents)[5] = 0; in TEST()
104 ASSERT_RESULT_OK(file_contents); in TEST()
105 EXPECT_EQ(s, *file_contents); in TEST()
120 ASSERT_RESULT_OK(file_contents); in TEST()
123 file_contents = ReadFile(tf.path); in TEST()
[all …]
H A Dpersistent_properties.cpp151 auto file_contents = ReadFile(persistent_property_filename); in ReadPersistentPropertyFile() local
152 if (!file_contents.ok()) { in ReadPersistentPropertyFile()
153 return Error() << "Unable to read persistent property file: " << file_contents.error(); in ReadPersistentPropertyFile()
155 return *file_contents; in ReadPersistentPropertyFile()
161 auto file_contents = ReadPersistentPropertyFile(); in LoadPersistentPropertyFile() local
162 if (!file_contents.ok()) return file_contents.error(); in LoadPersistentPropertyFile()
165 if (persistent_properties.ParseFromString(*file_contents)) return persistent_properties; in LoadPersistentPropertyFile()
H A Dbuiltins.cpp296 auto file_contents = ReadFile(args[1]); in do_load_exports() local
297 if (!file_contents.ok()) { in do_load_exports()
299 << "': " << file_contents.error(); in do_load_exports()
302 auto lines = Split(*file_contents, "\n"); in do_load_exports()
998 auto file_contents = ReadFile(args[1]); in do_copy() local
999 if (!file_contents.ok()) { in do_copy()
1000 … return Error() << "Could not read input file '" << args[1] << "': " << file_contents.error(); in do_copy()
1002 if (auto result = WriteFile(args[2], *file_contents); !result.ok()) { in do_copy()
1010 std::string file_contents; in do_copy_per_line() local
1011 if (!android::base::ReadFileToString(args[1], &file_contents, true)) { in do_copy_per_line()
[all …]
H A Dhost_init_verifier.cpp203 auto file_contents = std::string(); in HandlePropertyContexts() local
204 if (!ReadFileToString(filename, &file_contents)) { in HandlePropertyContexts()
210 ParsePropertyInfoFile(file_contents, true, property_infos, &errors); in HandlePropertyContexts()
H A Dproperty_service.cpp743 auto file_contents = ReadFile(filename); in load_properties_from_file() local
744 if (!file_contents.ok()) { in load_properties_from_file()
746 << "': " << file_contents.error(); in load_properties_from_file()
749 file_contents->push_back('\n'); in load_properties_from_file()
751 LoadProperties(file_contents->data(), filter, filename, properties); in load_properties_from_file()
1111 auto file_contents = std::string(); in LoadPropertyInfoFromFile() local
1112 if (!ReadFileToString(filename, &file_contents)) { in LoadPropertyInfoFromFile()
1119 ParsePropertyInfoFile(file_contents, require_prefix_or_exact, property_infos, &errors); in LoadPropertyInfoFromFile()
/aosp12/hardware/google/pixel/pixelstats/
H A DSysfsCollector.cpp91 std::string file_contents; in ReadFileToInt() local
114 std::string file_contents; in logBatteryChargeCycles() local
143 std::replace(file_contents.begin(), file_contents.end(), ' ', ','); in logBatteryChargeCycles()
163 std::string file_contents; in logCodecFailed() local
172 if (file_contents == "0") { in logCodecFailed()
187 std::string file_contents; in logCodec1Failed() local
196 if (file_contents == "0") { in logCodec1Failed()
211 std::string file_contents; in reportSlowIoFromFile() local
250 std::string file_contents; in logSpeakerImpedance() local
281 std::string file_contents; in logSpeakerHealthStats() local
[all …]
H A DMmMetricsReporter.cpp108 std::string file_contents; in ReadFileToUint() local
114 file_contents = android::base::Trim(file_contents); in ReadFileToUint()
143 std::string file_contents; in readVmStat() local
330 std::string file_contents; in isValidPid() local
337 file_contents = android::base::Trim(file_contents); in isValidPid()
338 return !file_contents.compare(name); in isValidPid()
361 std::string file_contents; in findPidByProcessName() local
366 file_contents = android::base::Trim(file_contents); in findPidByProcessName()
367 if (file_contents.compare(name)) in findPidByProcessName()
382 std::string file_contents; in getStimeByPid() local
[all …]
H A DWirelessChargeStats.cpp55 bool WirelessChargeStats::CheckWirelessContentsAndAck(std::string *file_contents) { in CheckWirelessContentsAndAck() argument
59 if (!ReadFileToString(kWirelessChargeMetricsPath.c_str(), file_contents)) in CheckWirelessContentsAndAck()
62 ss.str(*file_contents); in CheckWirelessContentsAndAck()
104 const std::string file_contents) { in CalculateWirelessChargeStats() argument
109 ss.str(file_contents); in CalculateWirelessChargeStats()
H A DPcaChargeStats.cpp35 bool PcaChargeStats::CheckPcaContentsAndAck(std::string *file_contents) { in CheckPcaContentsAndAck() argument
39 if (!ReadFileToString(kPcaChargeMetricsPath.c_str(), file_contents)) { in CheckPcaContentsAndAck()
43 ss.str(*file_contents); in CheckPcaContentsAndAck()
H A DBatteryEEPROMReporter.cpp45 std::string file_contents; in checkAndReport() local
56 if (!ReadFileToString(path.c_str(), &file_contents)) { in checkAndReport()
60 ALOGD("checkAndReport: %s", file_contents.c_str()); in checkAndReport()
64 const int kHistTotalLen = strlen(file_contents.c_str()); in checkAndReport()
69 history_each = file_contents.substr(i, LINESIZE); in checkAndReport()
H A DMitigationStatsReporter.cpp44 std::string file_contents; in ReadFileToInt() local
46 if (!ReadFileToString(path.c_str(), &file_contents)) { in ReadFileToInt()
50 file_contents = android::base::Trim(file_contents); in ReadFileToInt()
51 if (!android::base::ParseInt(file_contents, val)) { in ReadFileToInt()
H A DUeventListener.cpp92 std::string file_contents; in ReadFileToInt() local
94 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt()
97 } else if (sscanf(file_contents.c_str(), "%d", val) != 1) { in ReadFileToInt()
336 std::string file_contents, line, wfile_contents, wline_at, wline_ac, pca_file_contents, in ReportChargeMetricsEvent() local
342 if (!ReadFileToString(kChargeMetricsPath.c_str(), &file_contents)) { in ReportChargeMetricsEvent()
347 ss.str(file_contents); in ReportChargeMetricsEvent()
H A DWlcReporter.cpp200 std::string file_contents; in reportInBackground() local
201 if (!ReadFileToString(ptmc_path, &file_contents)) { in reportInBackground()
204 int ptmcId = readPtmcId(file_contents.c_str()); in reportInBackground()
/aosp12/system/bt/gd/dumpsys/bundler/
H A Dextract_files_and_call.py45 file_contents = []
49 args = sys.argv[i + 1:] + file_contents
52 file_contents.extend(file_to_args(sys.argv[i]))
/aosp12/system/tools/sysprop/
H A DCommon.cpp297 std::string file_contents; in ParseProps() local
299 if (!android::base::ReadFileToString(input_file_path, &file_contents, true)) { in ParseProps()
303 if (!google::protobuf::TextFormat::ParseFromString(file_contents, &ret)) { in ParseProps()
320 std::string file_contents; in ParseApiFile() local
322 if (!android::base::ReadFileToString(input_file_path, &file_contents, true)) { in ParseApiFile()
326 if (!google::protobuf::TextFormat::ParseFromString(file_contents, &ret)) { in ParseApiFile()
/aosp12/hardware/google/pixel/pixelstats/include/pixelstats/
H A DWirelessChargeStats.h31 bool CheckWirelessContentsAndAck(std::string *file_contents);
32 void CalculateWirelessChargeStats(const int soc_tmp, const std::string file_contents);
H A DPcaChargeStats.h30 bool CheckPcaContentsAndAck(std::string *file_contents);
/aosp12/system/core/property_service/property_info_checker/
H A Dproperty_info_checker.cpp149 auto file_contents = std::string{}; in main()
150 if (!ReadFileToString(filename, &file_contents)) { in main()
156 ParsePropertyInfoFile(file_contents, true, &property_info_entries, &errors); in main()
/aosp12/system/core/property_service/libpropertyinfoserializer/
H A Dproperty_info_file.cpp106 void ParsePropertyInfoFile(const std::string& file_contents, bool require_prefix_or_exact, in ParsePropertyInfoFile() argument
113 for (const auto& line : Split(file_contents, "\n")) { in ParsePropertyInfoFile()
/aosp12/system/tools/aidl/
H A Dgenerate_cpp_unittest.cpp42 ASTTest(const string& cmdline, const string& file_contents) in ASTTest() argument
43 : options_(Options::From(cmdline)), file_contents_(file_contents) { in ASTTest()
H A Daidl_unittest.cpp153 const std::string file_contents = "package a; interface IBar {}"; in TEST_P() local
155 EXPECT_EQ(nullptr, Parse("a/Foo.aidl", file_contents, typenames_, GetLanguage())); in TEST_P()
156 EXPECT_EQ(expected_stderr, GetCapturedStderr()) << file_contents; in TEST_P()
162 const std::string file_contents = "package a; interface Bar {}"; in TEST_P() local
164 EXPECT_EQ(nullptr, Parse("a/Foo.aidl", file_contents, typenames_, GetLanguage())); in TEST_P()
165 EXPECT_EQ(expected_stderr, GetCapturedStderr()) << file_contents; in TEST_P()
173 EXPECT_EQ(nullptr, Parse("a/Foo.aidl", file_contents, typenames_, GetLanguage())); in TEST_P()
174 EXPECT_EQ(expected_stderr, GetCapturedStderr()) << file_contents; in TEST_P()
180 const std::string file_contents = "package a; enum Bar { A, }"; in TEST_P() local
182 EXPECT_EQ(nullptr, Parse("a/Foo.aidl", file_contents, typenames_, GetLanguage())); in TEST_P()
[all …]
/aosp12/bootable/recovery/applypatch/
H A Dapplypatch.cpp136 static bool WriteBufferToPartition(const FileContents& file_contents, const Partition& partition) { in WriteBufferToPartition() argument
137 const unsigned char* data = file_contents.data.data(); in WriteBufferToPartition()
138 size_t len = file_contents.data.size(); in WriteBufferToPartition()
/aosp12/system/core/property_service/libpropertyinfoserializer/include/property_info_serializer/
H A Dproperty_info_serializer.h43 void ParsePropertyInfoFile(const std::string& file_contents, bool require_prefix_or_exact,
/aosp12/art/profman/
H A Dprofile_assistant_test.cc254 std::string* file_contents, in DumpClassesAndMethods() argument
262 bool DumpOnly(const std::string& filename, std::string* file_contents) { in DumpOnly() argument
265 return RunProfman(filename, extra_args, file_contents, GetLibCoreDexFileNames()[0]); in DumpOnly()
817 std::string file_contents; in TEST_F() local
819 file_contents += class_name + std::string("\n"); in TEST_F()
822 ASSERT_TRUE(CreateAndDump(file_contents, &output_file_contents)); in TEST_F()
823 ASSERT_EQ(output_file_contents, file_contents); in TEST_F()
830 std::string file_contents; in TEST_F() local
832 file_contents += class_name + std::string("\n"); in TEST_F()
835 ASSERT_TRUE(CreateAndDump(file_contents, &output_file_contents)); in TEST_F()
[all …]
/aosp12/bionic/tests/
H A Dgrp_pwd_test.cpp843 std::string file_contents; in TestAidNamePrefix() local
844 if (!ReadFileToString(file_path, &file_contents)) { in TestAidNamePrefix()
849 auto lines = Split(file_contents, "\n"); in TestAidNamePrefix()

12