summaryrefslogtreecommitdiff
path: root/init/host_import_parser.h
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2018-06-12 14:40:38 -0700
committerTom Cherry <tomcherry@google.com>2018-06-14 14:08:33 -0700
commit863d808c2e7badcbcd43eee45ae7bbb49f2a1e2c (patch)
treebd7e5459be71cc9dcf5407dd75a21115b49e79f6 /init/host_import_parser.h
parentae74e42d2557b93a3da9ef75c51ef1f6aab3cc0a (diff)
Relax host init parser to work with the build system
It's not going to be possible to safely assume $OUT has the right init scripts to be parsed at a given point, so instead we fall back to parsing init scripts individually. This isn't a full revert of the previous commits. We retain parsing correctness of the 'import' statements and we retain using the new host side property functionality. Also, fix a bug where main was not actually returning -1 on failure Bug: 36970783 Test: testing individual files still works correctly Change-Id: I4ae5620f234caa08993deb2c30825904a75f6654
Diffstat (limited to 'init/host_import_parser.h')
-rw-r--r--init/host_import_parser.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/init/host_import_parser.h b/init/host_import_parser.h
index e2980b2ae..52b889196 100644
--- a/init/host_import_parser.h
+++ b/init/host_import_parser.h
@@ -19,21 +19,16 @@
#include <string>
#include <vector>
-#include "import_parser.h"
#include "parser.h"
namespace android {
namespace init {
-class HostImportParser : public ImportParser {
+class HostImportParser : public SectionParser {
public:
- HostImportParser(const std::string& out_dir, Parser* parser)
- : ImportParser(parser), out_dir_(out_dir) {}
- Result<Success> ParseSection(std::vector<std::string>&& args, const std::string& filename,
- int line) override;
-
- private:
- std::string out_dir_;
+ HostImportParser() {}
+ Result<Success> ParseSection(std::vector<std::string>&& args, const std::string&, int) override;
+ Result<Success> ParseLineSection(std::vector<std::string>&&, int) override;
};
} // namespace init