Home
last modified time | relevance | path

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

/system/core/init/
Dutil_test.cpp34 auto file_contents = ReadFile("/proc/does-not-exist"); in TEST() local
36 ASSERT_FALSE(file_contents.ok()); in TEST()
37 EXPECT_EQ("open() failed: No such file or directory", file_contents.error().message()); in TEST()
46 auto file_contents = ReadFile(tf.path); in TEST() local
47 ASSERT_FALSE(file_contents.ok()) << strerror(errno); in TEST()
48 EXPECT_EQ("Skipping insecure file", file_contents.error().message()); in TEST()
57 auto file_contents = ReadFile(tf.path); in TEST() local
58 ASSERT_FALSE(file_contents.ok()); in TEST()
59 EXPECT_EQ("Skipping insecure file", file_contents.error().message()); in TEST()
65 auto file_contents = ReadFile("/system/bin/ps"); in TEST() local
[all …]
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()
Dhost_init_verifier.cpp185 auto file_contents = std::string(); in HandlePropertyContexts() local
186 if (!ReadFileToString(filename, &file_contents)) { in HandlePropertyContexts()
192 ParsePropertyInfoFile(file_contents, true, property_infos, &errors); in HandlePropertyContexts()
Dproperty_service.cpp735 auto file_contents = ReadFile(filename); in load_properties_from_file() local
736 if (!file_contents.ok()) { in load_properties_from_file()
738 << "': " << file_contents.error(); in load_properties_from_file()
741 file_contents->push_back('\n'); in load_properties_from_file()
743 LoadProperties(file_contents->data(), filter, filename, properties); in load_properties_from_file()
972 auto file_contents = std::string(); in LoadPropertyInfoFromFile() local
973 if (!ReadFileToString(filename, &file_contents)) { in LoadPropertyInfoFromFile()
980 ParsePropertyInfoFile(file_contents, require_prefix_or_exact, property_infos, &errors); in LoadPropertyInfoFromFile()
Dbuiltins.cpp956 auto file_contents = ReadFile(args[1]); in do_copy() local
957 if (!file_contents.ok()) { in do_copy()
958 … return Error() << "Could not read input file '" << args[1] << "': " << file_contents.error(); in do_copy()
960 if (auto result = WriteFile(args[2], *file_contents); !result.ok()) { in do_copy()
/system/tools/sysprop/
DCommon.cpp295 std::string file_contents; in ParseProps() local
297 if (!android::base::ReadFileToString(input_file_path, &file_contents, true)) { in ParseProps()
301 if (!google::protobuf::TextFormat::ParseFromString(file_contents, &ret)) { in ParseProps()
318 std::string file_contents; in ParseApiFile() local
320 if (!android::base::ReadFileToString(input_file_path, &file_contents, true)) { in ParseApiFile()
324 if (!google::protobuf::TextFormat::ParseFromString(file_contents, &ret)) { in ParseApiFile()
/system/core/property_service/libpropertyinfoserializer/
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()
/system/core/property_service/property_info_checker/
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()
/system/core/property_service/libpropertyinfoserializer/include/property_info_serializer/
Dproperty_info_serializer.h43 void ParsePropertyInfoFile(const std::string& file_contents, bool require_prefix_or_exact,
/system/tools/aidl/
Dgenerate_cpp_unittest.cpp1517 ASTTest(const string& cmdline, const string& file_contents) in ASTTest() argument
1518 : options_(Options::From(cmdline)), file_contents_(file_contents) { in ASTTest()
/system/libziparchive/
Dzip_archive_test.cc552 std::vector<uint8_t> file_contents(kAbUncompressedSize); in TEST() local
554 …ASSERT_TRUE(android::base::ReadFully(tmp_output_file.fd, &file_contents[0], file_contents.size())); in TEST()
555 ASSERT_EQ(file_contents, buffer); in TEST()
558 const uint8_t* line = &file_contents[0] + (3 * i); in TEST()