summaryrefslogtreecommitdiff
path: root/init/import_parser.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2018-05-09 17:38:30 -0700
committerTom Cherry <tomcherry@google.com>2018-05-30 15:43:32 -0700
commit194b5d1da9ec8957bbf0987e263e50132776b5e1 (patch)
treee736f6bc12b0dfd4a4f7b31c9e861a61f9796684 /init/import_parser.cpp
parentfe86a1473fdb85d6c21bd4e1c9990b4c97d875ff (diff)
init: handle properties and imports for host init verifier
Allow specifying properties on the command line when running host init verifier. This is needed particularly for importing files that have a property expansion in their path. Handle the import statement on host, basing paths off of the out directory of Android builds. Bug: 36970783 Test: verify that bullhead imports the correct files and checks them Change-Id: I4fe263016b3764a372708b559bc0c739b1b7e5e3
Diffstat (limited to 'init/import_parser.cpp')
-rw-r--r--init/import_parser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/init/import_parser.cpp b/init/import_parser.cpp
index e335fd111..fb3185e83 100644
--- a/init/import_parser.cpp
+++ b/init/import_parser.cpp
@@ -41,14 +41,15 @@ Result<Success> ImportParser::ParseSection(std::vector<std::string>&& args,
return Success();
}
+Result<Success> ImportParser::ParseLineSection(std::vector<std::string>&&, int) {
+ return Error() << "Unexpected line found after import statement";
+}
+
void ImportParser::EndFile() {
auto current_imports = std::move(imports_);
imports_.clear();
for (const auto& [import, line_num] : current_imports) {
- if (!parser_->ParseConfig(import)) {
- PLOG(ERROR) << filename_ << ": " << line_num << ": Could not import file '" << import
- << "'";
- }
+ parser_->ParseConfig(import);
}
}